screenshots.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. import { BaseCollection } from "./base_collection";
  2. import { Screenshot } from "../models/screenshot";
  3. import { PaginatedResult } from "../interfaces/paginated_result";
  4. import { ProjectWithPagination } from "../interfaces/project_with_pagination";
  5. import { ProjectOnly } from "../interfaces/project_only";
  6. import { BulkResult } from "../interfaces/bulk_result";
  7. type CreateScreenshotParams = {
  8. data: string;
  9. title?: string;
  10. description?: string;
  11. ocr?: boolean;
  12. key_ids?: string[] | number[];
  13. tags?: string[];
  14. };
  15. type UpdateScreenshotParams = Omit<CreateScreenshotParams, "data" | "ocr">;
  16. type ScreenshotDeleted = {
  17. project_id: string;
  18. screenshot_deleted: boolean;
  19. };
  20. export declare class Screenshots extends BaseCollection {
  21. protected static rootElementName: string;
  22. protected static rootElementNameSingular: string;
  23. protected static prefixURI: string;
  24. protected static elementClass: object;
  25. list(request_params: ProjectWithPagination): Promise<PaginatedResult<Screenshot>>;
  26. create(raw_body: CreateScreenshotParams | CreateScreenshotParams[], request_params: ProjectOnly): Promise<BulkResult<Screenshot>>;
  27. get(screnshot_id: string | number, request_params: ProjectOnly): Promise<Screenshot>;
  28. update(screenshot_id: string | number, screenshot_params: UpdateScreenshotParams, request_params: ProjectOnly): Promise<Screenshot>;
  29. delete(screenshot_id: string | number, request_params: ProjectOnly): Promise<ScreenshotDeleted>;
  30. }
  31. export {};