@datalayer/core
Version:
[](https://datalayer.io)
39 lines (38 loc) • 2.12 kB
TypeScript
import { CreateRuntimeSnapshotRequest, ListRuntimeSnapshotsResponse, GetRuntimeSnapshotResponse, CreateRuntimeSnapshotResponse } from '../../models/RuntimeSnapshotDTO';
/**
* Create a snapshot of a runtime instance.
* @param token - Authentication token
* @param data - Snapshot creation configuration
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving to the created snapshot response
* @throws {Error} If authentication token is missing or invalid
*/
export declare const createSnapshot: (token: string, data: CreateRuntimeSnapshotRequest, baseUrl?: string) => Promise<CreateRuntimeSnapshotResponse>;
/**
* List all runtime snapshots.
* @param token - Authentication token
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving to list of snapshots
* @throws {Error} If authentication token is missing or invalid
*/
export declare const listSnapshots: (token: string, baseUrl?: string) => Promise<ListRuntimeSnapshotsResponse>;
/**
* Get details for a specific runtime snapshot.
* @param token - Authentication token
* @param snapshotId - The unique identifier of the snapshot
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving to snapshot details wrapped in response
* @throws {Error} If authentication token is missing or invalid
* @throws {Error} If snapshot ID is missing or invalid
*/
export declare const getSnapshot: (token: string, snapshotId: string, baseUrl?: string) => Promise<GetRuntimeSnapshotResponse>;
/**
* Delete a runtime snapshot.
* @param token - Authentication token
* @param snapshotId - The unique identifier of the snapshot to delete
* @param baseUrl - Base URL for the API (defaults to production Runtimes URL)
* @returns Promise resolving when deletion is complete
* @throws {Error} If authentication token is missing or invalid
* @throws {Error} If snapshot ID is missing or invalid
*/
export declare const deleteSnapshot: (token: string, snapshotId: string, baseUrl?: string) => Promise<void>;