import * as plugins from '../plugins.js'; import type { IDeployment } from '../data/deployment.js'; import type { IService } from '../data/service.js'; import type { IIdentity } from '../data/user.js'; import type { IImmutableRolloutReportEnvelope } from '../data/immutableimage.js'; import type { IServiceDeploymentAdoptionRetentionAttestation, TServiceDeploymentAdoptionRetentionPhase } from '../data/deploymentadoption.js'; export interface IDeploymentWorkspaceFileEntry { type: 'file' | 'directory'; name: string; path: string; } export interface IReq_Any_Cloudly_GetDeploymentById extends plugins.typedrequestInterfaces.implementsTR { method: 'getDeploymentById'; request: { identity: IIdentity; deploymentId: string; }; response: { deployment: IDeployment; }; } export interface IReq_Any_Cloudly_GetDeployments extends plugins.typedrequestInterfaces.implementsTR { method: 'getDeployments'; request: { identity: IIdentity; /** Include archived deployments (default: active only). */ includeArchived?: boolean; }; response: { deployments: IDeployment[]; }; } export interface IReq_Any_Cloudly_GetDeploymentsByService extends plugins.typedrequestInterfaces.implementsTR { method: 'getDeploymentsByService'; request: { identity: IIdentity; serviceId: string; }; response: { deployments: IDeployment[]; }; } export interface IReq_Any_Cloudly_GetDeploymentsByNode extends plugins.typedrequestInterfaces.implementsTR { method: 'getDeploymentsByNode'; request: { identity: IIdentity; nodeId: string; }; response: { deployments: IDeployment[]; }; } export interface IReq_Any_Cloudly_CreateDeployment extends plugins.typedrequestInterfaces.implementsTR { method: 'createDeployment'; request: { identity: IIdentity; deploymentData: Partial; }; response: { deployment: IDeployment; }; } export interface IReq_Any_Cloudly_UpdateDeployment extends plugins.typedrequestInterfaces.implementsTR { method: 'updateDeployment'; request: { identity: IIdentity; deploymentId: string; deploymentData: Partial; }; response: { deployment: IDeployment; }; } export interface IReq_Any_Cloudly_DeleteDeploymentById extends plugins.typedrequestInterfaces.implementsTR { method: 'deleteDeploymentById'; request: { identity: IIdentity; deploymentId: string; }; response: { success: boolean; }; } export interface IReq_Any_Cloudly_RestartDeployment extends plugins.typedrequestInterfaces.implementsTR { method: 'restartDeployment'; request: { identity: IIdentity; deploymentId: string; }; response: { success: boolean; deployment: IDeployment; }; } export interface IReq_Any_Cloudly_ScaleDeployment extends plugins.typedrequestInterfaces.implementsTR { method: 'scaleDeployment'; request: { identity: IIdentity; deploymentId: string; replicas: number; }; response: { success: boolean; deployment: IDeployment; }; } export interface IReq_Any_Cloudly_KillDeployment extends plugins.typedrequestInterfaces.implementsTR { method: 'killDeployment'; request: { identity: IIdentity; deploymentId: string; }; response: { success: boolean; deployment: IDeployment; }; } export interface IReq_Any_Cloudly_DeploymentWorkspaceReadFile extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentWorkspaceReadFile'; request: { identity: IIdentity; deploymentId: string; path: string; }; response: { content: string; }; } export interface IReq_Any_Cloudly_DeploymentWorkspaceWriteFile extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentWorkspaceWriteFile'; request: { identity: IIdentity; deploymentId: string; path: string; content: string; }; response: Record; } export interface IReq_Any_Cloudly_DeploymentWorkspaceReadDir extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentWorkspaceReadDir'; request: { identity: IIdentity; deploymentId: string; path: string; }; response: { entries: IDeploymentWorkspaceFileEntry[]; }; } export interface IReq_Any_Cloudly_DeploymentWorkspaceMkdir extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentWorkspaceMkdir'; request: { identity: IIdentity; deploymentId: string; path: string; }; response: Record; } export interface IReq_Any_Cloudly_DeploymentWorkspaceRm extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentWorkspaceRm'; request: { identity: IIdentity; deploymentId: string; path: string; recursive?: boolean; }; response: Record; } export interface IReq_Any_Cloudly_DeploymentWorkspaceExists extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentWorkspaceExists'; request: { identity: IIdentity; deploymentId: string; path: string; }; response: { exists: boolean; }; } export interface IReq_Any_Cloudly_DeploymentWorkspaceExec extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentWorkspaceExec'; request: { identity: IIdentity; deploymentId: string; command: string; args?: string[]; }; response: { stdout: string; stderr: string; exitCode: number; }; } export interface IReq_Cloudly_Coreflow_GetServiceDeployments extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowGetServiceDeployments'; request: { service: IService; }; response: { deployments: IDeployment[]; }; } export interface IReq_Cloudly_Coreflow_AttestServiceDeploymentAdoption extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowAttestServiceDeploymentAdoption'; request: { phase: TServiceDeploymentAdoptionRetentionPhase; service: IService; }; response: { found: boolean; attestation?: IServiceDeploymentAdoptionRetentionAttestation; }; } export interface IReq_Cloudly_Coreflow_RestartDeployment extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowRestartDeployment'; request: { deploymentId: string; }; response: { found: boolean; deployment?: IDeployment; }; } export interface IReq_Cloudly_Coreflow_KillDeployment extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowKillDeployment'; request: { deploymentId: string; }; response: { found: boolean; deployment?: IDeployment; }; } export interface IReq_Cloudly_Coreflow_DeploymentWorkspaceReadFile extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentWorkspaceReadFile'; request: { deploymentId: string; path: string; }; response: { found: boolean; content?: string; }; } export interface IReq_Cloudly_Coreflow_DeploymentWorkspaceWriteFile extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentWorkspaceWriteFile'; request: { deploymentId: string; path: string; content: string; }; response: { found: boolean; }; } export interface IReq_Cloudly_Coreflow_DeploymentWorkspaceReadDir extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentWorkspaceReadDir'; request: { deploymentId: string; path: string; }; response: { found: boolean; entries?: IDeploymentWorkspaceFileEntry[]; }; } export interface IReq_Cloudly_Coreflow_DeploymentWorkspaceMkdir extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentWorkspaceMkdir'; request: { deploymentId: string; path: string; }; response: { found: boolean; }; } export interface IReq_Cloudly_Coreflow_DeploymentWorkspaceRm extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentWorkspaceRm'; request: { deploymentId: string; path: string; recursive?: boolean; }; response: { found: boolean; }; } export interface IReq_Cloudly_Coreflow_DeploymentWorkspaceExists extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentWorkspaceExists'; request: { deploymentId: string; path: string; }; response: { found: boolean; exists?: boolean; }; } export interface IReq_Cloudly_Coreflow_DeploymentWorkspaceExec extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentWorkspaceExec'; request: { deploymentId: string; command: string; args?: string[]; }; response: { found: boolean; stdout?: string; stderr?: string; exitCode?: number; }; } export interface IReq_Coreflow_Cloudly_ReportDeploymentSnapshots extends plugins.typedrequestInterfaces.implementsTR { method: 'reportDeploymentSnapshots'; request: { identity: IIdentity; serviceId: string; serviceName?: string; deployments: IDeployment[]; /** * Node hostnames this snapshot is authoritative for (the reporter's swarm). * Cloudly prunes stale deployments for the service only on these nodes, so * reports from different swarms/nodes do not delete each other's records. * When absent, the snapshot replaces all persisted deployments of the service. */ reporterNodeNames?: string[]; /** Mandatory when the referenced service requires immutable deployment. */ immutableReport?: IImmutableRolloutReportEnvelope; reportedAt: number; }; response: Record; } export interface IReq_Cloudly_Any_PushDeploymentUpdate extends plugins.typedrequestInterfaces.implementsTR { method: 'pushDeploymentUpdate'; request: { serviceId: string; deployments: IDeployment[]; }; response: Record; } export interface IReq_Cloudly_Any_PushServiceReconciliationStatus extends plugins.typedrequestInterfaces.implementsTR { method: 'pushServiceReconciliationStatus'; request: { serviceId: string; reconciliationStatus: NonNullable; }; response: Record; } export interface IDeploymentShellCommand { command: string; args?: string[]; label?: string; prompt?: string; } export interface IReq_Any_Cloudly_DeploymentShellGetCommand extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentShellGetCommand'; request: { identity: IIdentity; deploymentId: string; }; response: { shellCommand: IDeploymentShellCommand; }; } export interface IReq_Any_Cloudly_DeploymentShellStart extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentShellStart'; request: { identity: IIdentity; deploymentId: string; processId: string; command: string; args?: string[]; }; response: { processId: string; }; } export interface IReq_Any_Cloudly_DeploymentShellInput extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentShellInput'; request: { identity: IIdentity; processId: string; input: string; }; response: Record; } export interface IReq_Any_Cloudly_DeploymentShellKill extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentShellKill'; request: { identity: IIdentity; processId: string; }; response: Record; } export interface IReq_Cloudly_Coreflow_DeploymentShellGetCommand extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentShellGetCommand'; request: { deploymentId: string; }; response: { found: boolean; shellCommand?: IDeploymentShellCommand; }; } export interface IReq_Cloudly_Coreflow_DeploymentShellStart extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentShellStart'; request: { deploymentId: string; processId: string; command: string; args?: string[]; }; response: { found: boolean; processId?: string; }; } export interface IReq_Cloudly_Coreflow_DeploymentShellInput extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentShellInput'; request: { processId: string; input: string; }; response: { found: boolean; }; } export interface IReq_Cloudly_Coreflow_DeploymentShellKill extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentShellKill'; request: { processId: string; }; response: { found: boolean; }; } export interface IReq_Coreflow_Cloudly_ReportDeploymentShellOutput extends plugins.typedrequestInterfaces.implementsTR { method: 'reportDeploymentShellOutput'; request: { identity: IIdentity; processId: string; output: string; }; response: Record; } export interface IReq_Coreflow_Cloudly_ReportDeploymentShellExit extends plugins.typedrequestInterfaces.implementsTR { method: 'reportDeploymentShellExit'; request: { identity: IIdentity; processId: string; exitCode: number; }; response: Record; } export interface IReq_Cloudly_Any_PushDeploymentShellOutput extends plugins.typedrequestInterfaces.implementsTR { method: 'pushDeploymentShellOutput'; request: { processId: string; output: string; }; response: Record; } export interface IReq_Cloudly_Any_PushDeploymentShellExit extends plugins.typedrequestInterfaces.implementsTR { method: 'pushDeploymentShellExit'; request: { processId: string; exitCode: number; }; response: Record; } export interface IReq_Any_Cloudly_DeploymentLogStreamStart extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentLogStreamStart'; request: { identity: IIdentity; deploymentId: string; streamId: string; /** Number of trailing log lines to seed the stream with (default 200). */ tail?: number; }; response: { streamId: string; }; } export interface IReq_Any_Cloudly_DeploymentLogStreamStop extends plugins.typedrequestInterfaces.implementsTR { method: 'deploymentLogStreamStop'; request: { identity: IIdentity; streamId: string; }; response: Record; } export interface IReq_Cloudly_Coreflow_DeploymentLogStreamStart extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentLogStreamStart'; request: { deploymentId: string; streamId: string; tail?: number; }; response: { found: boolean; streamId?: string; }; } export interface IReq_Cloudly_Coreflow_DeploymentLogStreamStop extends plugins.typedrequestInterfaces.implementsTR { method: 'coreflowDeploymentLogStreamStop'; request: { streamId: string; }; response: { found: boolean; }; } export interface IReq_Coreflow_Cloudly_ReportDeploymentLogLines extends plugins.typedrequestInterfaces.implementsTR { method: 'reportDeploymentLogLines'; request: { identity: IIdentity; streamId: string; deploymentId: string; lines: string[]; }; response: Record; } export interface IReq_Coreflow_Cloudly_ReportDeploymentLogStreamEnd extends plugins.typedrequestInterfaces.implementsTR { method: 'reportDeploymentLogStreamEnd'; request: { identity: IIdentity; streamId: string; /** e.g. 'container-exited' | 'stopped' | 'ttl-expired' | 'error' */ reason?: string; }; response: Record; } export interface IReq_Cloudly_Any_PushDeploymentLogLines extends plugins.typedrequestInterfaces.implementsTR { method: 'pushDeploymentLogLines'; request: { streamId: string; deploymentId: string; lines: string[]; }; response: Record; } export interface IReq_Cloudly_Any_PushDeploymentLogStreamEnd extends plugins.typedrequestInterfaces.implementsTR { method: 'pushDeploymentLogStreamEnd'; request: { streamId: string; reason?: string; }; response: Record; }