Files
interfaces/ts/requests/backup.ts
T

199 lines
4.9 KiB
TypeScript
Raw Normal View History

2026-05-02 21:59:42 +00:00
import * as plugins from '../plugins.js';
2026-05-07 17:44:31 +00:00
import type {
IBackupArchiveManifest,
IBackupArchiveObject,
IBackupRecord,
IBackupReplicationResult,
TBackupSnapshot,
} from '../data/backup.js';
2026-05-02 21:59:42 +00:00
import type { IService } from '../data/service.js';
import type { IIdentity } from '../data/user.js';
export interface IReq_Any_Cloudly_CreateServiceBackup
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Any_Cloudly_CreateServiceBackup
> {
method: 'createServiceBackup';
request: {
identity: IIdentity;
serviceId: string;
clusterId?: string;
tags?: Record<string, string>;
replicate?: boolean;
2026-05-02 21:59:42 +00:00
};
response: {
backup: IBackupRecord;
};
}
export interface IReq_Any_Cloudly_GetServiceBackups
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Any_Cloudly_GetServiceBackups
> {
method: 'getServiceBackups';
request: {
identity: IIdentity;
serviceId?: string;
status?: IBackupRecord['status'];
};
response: {
backups: IBackupRecord[];
};
}
export interface IReq_Any_Cloudly_GetBackupById
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Any_Cloudly_GetBackupById
> {
method: 'getBackupById';
request: {
identity: IIdentity;
backupId: string;
};
response: {
backup: IBackupRecord;
};
}
export interface IReq_Any_Cloudly_RestoreServiceBackup
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Any_Cloudly_RestoreServiceBackup
> {
method: 'restoreServiceBackup';
request: {
identity: IIdentity;
backupId: string;
clear?: boolean;
resourceTypes?: Array<TBackupSnapshot['type']>;
};
response: {
backup: IBackupRecord;
};
}
export interface IReq_Cloudly_Coreflow_ExecuteServiceBackup
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Cloudly_Coreflow_ExecuteServiceBackup
> {
method: 'executeServiceBackup';
request: {
backupId: string;
service: IService;
tags?: Record<string, string>;
2026-05-07 17:44:31 +00:00
replication?: {
enabled: boolean;
};
2026-05-02 21:59:42 +00:00
};
response: {
snapshots: TBackupSnapshot[];
2026-05-07 17:44:31 +00:00
replication?: IBackupReplicationResult;
2026-05-02 21:59:42 +00:00
};
}
export interface IReq_Cloudly_Coreflow_ExecuteServiceRestore
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Cloudly_Coreflow_ExecuteServiceRestore
> {
method: 'executeServiceRestore';
request: {
backupId: string;
service: IService;
snapshots: TBackupSnapshot[];
clear?: boolean;
resourceTypes?: Array<TBackupSnapshot['type']>;
2026-05-07 17:44:31 +00:00
replication?: {
enabled: boolean;
};
2026-05-02 21:59:42 +00:00
};
response: {
restored: TBackupSnapshot[];
};
}
2026-05-07 17:44:31 +00:00
export interface IReq_Coreflow_Cloudly_PrepareBackupReplication
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Coreflow_Cloudly_PrepareBackupReplication
> {
method: 'prepareBackupReplication';
request: {
identity: IIdentity;
backupId: string;
manifest: IBackupArchiveManifest;
};
response: {
missingObjects: IBackupArchiveObject[];
};
}
export interface IReq_Coreflow_Cloudly_UploadBackupArchiveObject
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Coreflow_Cloudly_UploadBackupArchiveObject
> {
method: 'uploadBackupArchiveObject';
request: {
identity: IIdentity;
backupId: string;
object: IBackupArchiveObject;
contentsBase64: string;
};
response: {
accepted: boolean;
};
}
export interface IReq_Coreflow_Cloudly_CompleteBackupReplication
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Coreflow_Cloudly_CompleteBackupReplication
> {
method: 'completeBackupReplication';
request: {
identity: IIdentity;
backupId: string;
manifest: IBackupArchiveManifest;
};
response: {
replication: IBackupReplicationResult;
};
}
export interface IReq_Coreflow_Cloudly_GetBackupArchiveManifest
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Coreflow_Cloudly_GetBackupArchiveManifest
> {
method: 'getBackupArchiveManifest';
request: {
identity: IIdentity;
backupId: string;
};
response: {
manifest: IBackupArchiveManifest;
};
}
export interface IReq_Coreflow_Cloudly_DownloadBackupArchiveObject
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_Coreflow_Cloudly_DownloadBackupArchiveObject
> {
method: 'downloadBackupArchiveObject';
request: {
identity: IIdentity;
backupId: string;
object: IBackupArchiveObject;
};
response: {
object: IBackupArchiveObject;
contentsBase64: string;
};
}