export type TCoreStoreCapability = 'database' | 'objectstorage'; export interface ICoreStoreVolumeCreateRequest { name: string; opts?: Record; options?: Record; serviceId?: string; serviceName?: string; mountPath?: string; backup?: boolean; } export interface ICoreStoreVolumeRemoveRequest { name: string; } export interface ICoreStoreVolumeSnapshotRequest { name: string; tags?: Record; snapshotName?: string; } export interface ICoreStoreVolumeRestoreRequest { name: string; snapshotId: string; clear?: boolean; } export interface ICoreStoreResourceSnapshotRequest { serviceId: string; capabilities?: TCoreStoreCapability[]; tags?: Record; snapshotName?: string; } export interface ICoreStoreResourceSnapshotEntry { capability: TCoreStoreCapability; resourceName: string; snapshotId: string; snapshotName?: string; originalSize: number; storedSize: number; createdAt: number; tags: Record; databaseName?: string; bucketName?: string; } export interface ICoreStoreResourceRestoreRequest { serviceId: string; snapshots: ICoreStoreResourceSnapshotEntry[]; } export interface ICoreStoreProvisionRequest { serviceId: string; serviceName?: string; capabilities?: TCoreStoreCapability[]; database?: boolean; db?: boolean; objectstorage?: boolean; s3?: boolean; } export interface ICoreStoreDeprovisionRequest { serviceId: string; } export interface ICoreStoreResourceBase { capability: TCoreStoreCapability; provider: string; resourceName: string; env: Record; createdAt: number; } export interface ICoreStoreDatabaseResource extends ICoreStoreResourceBase { capability: 'database'; provider: 'smartdb'; databaseName: string; username: string; } export interface ICoreStoreObjectStorageResource extends ICoreStoreResourceBase { capability: 'objectstorage'; provider: 'smartstorage'; bucketName: string; accessKeyId: string; } export type TCoreStoreResource = ICoreStoreDatabaseResource | ICoreStoreObjectStorageResource; export interface ICoreStoreServiceManifestEntry { serviceId: string; serviceName?: string; resources: Partial>; env: Record; snapshots?: ICoreStoreResourceSnapshotEntry[]; createdAt: number; updatedAt: number; } export interface ICoreStoreVolumeSnapshotEntry { snapshotId: string; snapshotName?: string; createdAt: number; originalSize: number; storedSize: number; tags: Record; } export interface ICoreStoreVolumeManifestEntry { name: string; directoryName: string; mountpoint: string; options: Record; serviceId?: string; serviceName?: string; mountPath?: string; backup: boolean; mountIds: string[]; snapshots: ICoreStoreVolumeSnapshotEntry[]; createdAt: number; updatedAt: number; } export interface ICoreStoreManifest { version: 1; services: Record; volumes: Record; } export interface ICoreStoreProvisionResponse { serviceId: string; serviceName?: string; resources: TCoreStoreResource[]; env: Record; } export interface ICoreStoreSecretFile { masterSecret: string; dbRootPassword: string; s3AdminAccessKeyId: string; s3AdminSecretAccessKey: string; }