feat: add backup contracts
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IBackupRecord, 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>;
|
||||
};
|
||||
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>;
|
||||
};
|
||||
response: {
|
||||
snapshots: TBackupSnapshot[];
|
||||
};
|
||||
}
|
||||
|
||||
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']>;
|
||||
};
|
||||
response: {
|
||||
restored: TBackupSnapshot[];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user