199 lines
4.9 KiB
TypeScript
199 lines
4.9 KiB
TypeScript
import * as plugins from '../plugins.js';
|
|
import type {
|
|
IBackupArchiveManifest,
|
|
IBackupArchiveObject,
|
|
IBackupRecord,
|
|
IBackupReplicationResult,
|
|
TBackupSnapshot,
|
|
} from '../data/backup.js';
|
|
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;
|
|
};
|
|
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>;
|
|
replication?: {
|
|
enabled: boolean;
|
|
};
|
|
};
|
|
response: {
|
|
snapshots: TBackupSnapshot[];
|
|
replication?: IBackupReplicationResult;
|
|
};
|
|
}
|
|
|
|
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']>;
|
|
replication?: {
|
|
enabled: boolean;
|
|
};
|
|
};
|
|
response: {
|
|
restored: TBackupSnapshot[];
|
|
};
|
|
}
|
|
|
|
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;
|
|
};
|
|
}
|