import { APIPayload } from '../../common/v2.js'; import '../../utils.js'; /** * Scope of the user snapshot listing. * @see https://docs.squarecloud.app/en/api-reference/endpoint/users/snapshots */ type SnapshotScope = "applications" | "databases"; declare const SnapshotScope: { readonly Applications: "applications"; readonly Databases: "databases"; }; /** * @see https://docs.squarecloud.app/en/api-reference/endpoint/apps/snapshots */ interface RESTPostAPISnapshotResult { url: string; key: string; } type RESTPostAPISnapshotResultPayload = APIPayload; /** * Restore an application (or database) from a snapshot. * @see https://docs.squarecloud.app/en/api-reference/endpoint/apps/snapshots/restore * @see https://docs.squarecloud.app/en/api-reference/endpoint/databases/snapshots/restore */ interface RESTPostAPISnapshotRestoreJSONBody { /** * Snapshot identifier (UUID v4). For database restores, the suffixed form * `_` returned by the listing is also accepted — both work. */ snapshotId: string; /** Snapshot version identifier (24-96 chars, base64url-ish). */ versionId: string; } /** * Query for the authenticated user's snapshot listing. * @see https://docs.squarecloud.app/en/api-reference/endpoint/users/snapshots */ interface RESTGetAPIUserSnapshotsQuery { /** Snapshot domain. Defaults to `applications`. */ scope?: SnapshotScope; } export { type RESTGetAPIUserSnapshotsQuery, type RESTPostAPISnapshotRestoreJSONBody, type RESTPostAPISnapshotResult, type RESTPostAPISnapshotResultPayload, SnapshotScope };