translations.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. import { BaseCollection } from "./base_collection";
  2. import { Translation } from "../models/translation";
  3. import { PaginatedResult } from "../interfaces/paginated_result";
  4. import { ProjectWithPagination } from "../interfaces/project_with_pagination";
  5. import { ProjectOnly } from "../interfaces/project_only";
  6. interface ListTranslationParams extends ProjectWithPagination {
  7. disable_references?: number | string;
  8. filter_lang_id?: number | string;
  9. filter_is_reviewed?: number | string;
  10. filter_unverified?: number | string;
  11. filter_untranslated?: number | string;
  12. filter_qa_issues?: string;
  13. filter_active_task_id?: number | string;
  14. }
  15. interface GetTranslationParams extends ProjectOnly {
  16. disable_references?: number | string;
  17. }
  18. type TranslationParams = {
  19. translation: string;
  20. is_unverified?: boolean;
  21. is_reviewed?: boolean;
  22. custom_translation_status_ids?: string[] | number[];
  23. };
  24. export declare class Translations extends BaseCollection {
  25. protected static rootElementName: string;
  26. protected static rootElementNameSingular: string;
  27. protected static prefixURI: string;
  28. protected static elementClass: typeof Translation;
  29. list(request_params: ListTranslationParams): Promise<PaginatedResult<Translation>>;
  30. get(translation_id: string | number, request_params: GetTranslationParams): Promise<Translation>;
  31. update(translation_id: string | number, translation_params: TranslationParams, request_params: ProjectOnly): Promise<Translation>;
  32. }
  33. export {};