snapshots.d.ts 1.1 KB

123456789101112131415161718192021222324
  1. import { BaseCollection } from "./base_collection";
  2. import { Snapshot } from "../models/snapshot";
  3. import { PaginatedResult } from "../interfaces/paginated_result";
  4. import { ProjectWithPagination } from "../interfaces/project_with_pagination";
  5. import { ProjectOnly } from "../interfaces/project_only";
  6. import { Project } from "../models/project";
  7. type CreateSnapshotParams = {
  8. title: string;
  9. };
  10. type SnapshotDeleted = {
  11. project_id: string;
  12. snapshot_deleted: boolean;
  13. };
  14. export declare class Snapshots extends BaseCollection {
  15. protected static rootElementName: string;
  16. protected static rootElementNameSingular: string;
  17. protected static prefixURI: string;
  18. protected static elementClass: typeof Snapshot;
  19. list(request_params: ProjectWithPagination): Promise<PaginatedResult<Snapshot>>;
  20. create(snapshot_params: CreateSnapshotParams, request_params: ProjectOnly): Promise<Snapshot>;
  21. restore(snapshot_id: string | number, request_params: ProjectOnly): Promise<Project>;
  22. delete(snapshot_id: string | number, request_params: ProjectOnly): Promise<SnapshotDeleted>;
  23. }
  24. export {};