orders.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829
  1. import { Order } from "../models/order";
  2. import { BaseCollection } from "./base_collection";
  3. import { TeamWithPagination } from "../interfaces/team_with_pagination";
  4. import { TeamOnly } from "../interfaces/team_only";
  5. import { PaginatedResult } from "../interfaces/paginated_result";
  6. type OrderParams = {
  7. project_id: string;
  8. branch?: string;
  9. payment_method?: "credit_card" | "team_credit";
  10. card_id?: number | string;
  11. briefing: string;
  12. source_language_iso: string;
  13. target_language_isos: string[];
  14. keys: string[] | number[];
  15. provider_slug: string;
  16. translation_tier: number | string;
  17. is_saved_to_translation_memory?: boolean;
  18. dry_run?: boolean;
  19. translation_style?: "formal" | "informal" | "business" | "friendly";
  20. };
  21. export declare class Orders extends BaseCollection {
  22. protected static rootElementName: string;
  23. protected static prefixURI: string;
  24. protected static elementClass: typeof Order;
  25. list(request_params: TeamWithPagination): Promise<PaginatedResult<Order>>;
  26. create(order_params: OrderParams, request_params: TeamOnly): Promise<Order>;
  27. get(order_id: string | number, request_params: TeamOnly): Promise<Order>;
  28. }
  29. export {};