cloud-ide-lms-model
Version:
Package for Model management of Cloud IDEsys LMS
126 lines (125 loc) • 3.83 kB
TypeScript
export interface ValidatablePayload {
Validate: () => Record<string, string>;
}
export type DeploymentSourceMode = "LOCAL_BUILD" | "SERVER_BUILD" | "PREVIOUS_VERSION";
export type DeploymentArtifactType = "api" | "ui";
export type DeploymentEnvironment = "dev" | "test" | "uat" | "prod";
export type DeploymentAction = "deploy" | "rollback";
export type DeploymentStatus = "PENDING" | "RUNNING" | "SUCCESS" | "FAILED";
export type DeploymentBackupStatus = "PENDING" | "SYNCED" | "FAILED";
export interface DeploymentArtifact {
id: string;
appCode: string;
artifactType: DeploymentArtifactType;
artifactVersion: string;
sourceMode: DeploymentSourceMode;
sourceRef: string;
checksum: string;
createdAt: string;
createdBy: string;
backupStatus: DeploymentBackupStatus;
}
export interface DeploymentJob {
id: string;
appCode: string;
artifactVersion: string;
environment: DeploymentEnvironment;
action: DeploymentAction;
sourceMode: DeploymentSourceMode;
sourceRef: string;
status: DeploymentStatus;
message?: string;
createdAt: string;
updatedAt: string;
}
export declare class MDeploymentArtifactInsertPayload implements ValidatablePayload {
appCode: string;
artifactType: DeploymentArtifactType;
artifactVersion: string;
sourceMode: DeploymentSourceMode;
sourceRef: string;
checksum: string;
createdBy: string;
backupStatus: DeploymentBackupStatus;
constructor(init: Partial<MDeploymentArtifactInsertPayload>);
Validate(): Record<string, string>;
}
export declare class MDeploymentJobInsertPayload implements ValidatablePayload {
appCode: string;
artifactVersion: string;
environment: DeploymentEnvironment;
action: DeploymentAction;
sourceMode: DeploymentSourceMode;
sourceRef: string;
reason: string;
constructor(init: Partial<MDeploymentJobInsertPayload>);
Validate(): Record<string, string>;
}
export interface DeploymentControllerResponse<T> {
success: boolean;
code?: number;
message: string;
data: T;
totalDocument?: number;
}
export type BackupType = "full" | "incremental";
export type BackupStatus = "PENDING" | "RUNNING" | "SUCCESS" | "FAILED";
export interface BackupPolicy {
id: string;
environment: DeploymentEnvironment;
backupType: BackupType;
scheduleCron: string;
retentionDays: number;
enabled: boolean;
updatedAt: string;
}
export interface BackupJob {
id: string;
environment: DeploymentEnvironment;
instance: string;
database: string;
backupType: BackupType;
storagePath: string;
backupFileName: string;
checksum?: string;
sizeBytes?: number;
status: BackupStatus;
triggeredBy: string;
startedAt?: string;
completedAt?: string;
message?: string;
}
export interface RestoreJob {
id: string;
environment: DeploymentEnvironment;
instance: string;
database: string;
backupJobId: string;
restoreTargetDatabase: string;
status: BackupStatus;
triggeredBy: string;
startedAt?: string;
completedAt?: string;
message?: string;
}
export declare class MBackupRunPayload implements ValidatablePayload {
environment: DeploymentEnvironment;
instance: string;
database: string;
backupType: BackupType;
triggeredBy: string;
mongoUri: string;
constructor(init: Partial<MBackupRunPayload>);
Validate(): Record<string, string>;
}
export declare class MRestoreRunPayload implements ValidatablePayload {
environment: DeploymentEnvironment;
instance: string;
database: string;
backupJobId: string;
restoreTargetDatabase: string;
triggeredBy: string;
mongoUri: string;
constructor(init: Partial<MRestoreRunPayload>);
Validate(): Record<string, string>;
}