segments.d.ts 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. import { Segment } from "../models/segment";
  2. import { BaseCollection } from "./base_collection";
  3. import { ProjectOnly } from "../interfaces/project_only";
  4. interface GetSegmentParams extends ProjectOnly {
  5. key_id: number | string;
  6. language_iso: string;
  7. disable_references?: number | string;
  8. }
  9. type UpdateSegmentReqParams = Omit<GetSegmentParams, "disable_references">;
  10. type UpdateSegmentBodyParams = {
  11. value: string;
  12. is_fuzzy?: boolean;
  13. is_reviewed?: boolean;
  14. custom_translation_status_ids?: string[] | number[];
  15. };
  16. interface ListSegmentParams extends GetSegmentParams {
  17. filter_is_reviewed?: number | string;
  18. filter_unverified?: number | string;
  19. filter_untranslated?: number | string;
  20. filter_qa_issues?: string;
  21. }
  22. export declare class Segments extends BaseCollection {
  23. protected static rootElementName: string;
  24. protected static rootElementNameSingular: string;
  25. protected static prefixURI: string;
  26. protected static elementClass: typeof Segment;
  27. list(request_params: ListSegmentParams): Promise<Segment[]>;
  28. get(segment_number: string | number, request_params: GetSegmentParams): Promise<Segment>;
  29. update(segment_number: string | number, segment_params: UpdateSegmentBodyParams, request_params: UpdateSegmentReqParams): Promise<any>;
  30. }
  31. export {};