diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index ec5b8ad..ab3b2c8 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/interfaces', - version: '1.0.26', + version: '1.0.27', description: 'interfaces for working with containers' } diff --git a/ts/data/deployment.ts b/ts/data/deployment.ts new file mode 100644 index 0000000..3d787fb --- /dev/null +++ b/ts/data/deployment.ts @@ -0,0 +1,8 @@ +import * as plugins from '../plugins.js'; + +export interface IDeployment { + affectedServiceIds: string[]; + usedImageId: string; + deploymentLog: string[]; + status: 'scheduled' | 'running' | 'deployed' | 'failed'; +} \ No newline at end of file diff --git a/ts/data/image.ts b/ts/data/image.ts new file mode 100644 index 0000000..eb38eab --- /dev/null +++ b/ts/data/image.ts @@ -0,0 +1,10 @@ +import * as plugins from '../plugins.js'; + +export interface IImage { + name: string; + description: string; + versions: Array<{ + version: string; + storagePath?: string; + }>; +} diff --git a/ts/data/index.ts b/ts/data/index.ts index abf1125..276586f 100644 --- a/ts/data/index.ts +++ b/ts/data/index.ts @@ -1,6 +1,7 @@ export * from './cloudlyconfig.js'; export * from './cluster.js'; export * from './config.js'; +export * from './deployment.js'; export * from './docker.js'; export * from './env.js'; export * from './event.js'; diff --git a/ts/requests/image.ts b/ts/requests/image.ts new file mode 100644 index 0000000..57c84be --- /dev/null +++ b/ts/requests/image.ts @@ -0,0 +1,35 @@ +import * as plugins from '../plugins.js'; + +export interface IRequest_PushImage extends plugins.typedrequestInterfaces.implementsTR< + plugins.typedrequestInterfaces.ITypedRequest, + IRequest_PushImage +> { + method: 'pushImage'; + request: { + jwt: string; + image: string; + version: string; + transferId?: string; + chunk: Buffer; + }; + response: { + transferId: string; + }; +} + +export interface IRequest_DownloadImage extends plugins.typedrequestInterfaces.implementsTR< + plugins.typedrequestInterfaces.ITypedRequest, + IRequest_DownloadImage +> { + method: 'downloadImage'; + request: { + jwt: string; + image: string; + version: string; + transferId: string; + }; + response: { + transferId: string; + chunk: Buffer; + }; +} \ No newline at end of file diff --git a/ts/requests/index.ts b/ts/requests/index.ts index 3d3737e..93e2bf1 100644 --- a/ts/requests/index.ts +++ b/ts/requests/index.ts @@ -4,6 +4,7 @@ import * as certificateRequests from './certificate.js'; import * as clusterRequests from './cluster.js'; import * as configRequests from './config.js'; import * as identityRequests from './identity.js'; +import * as imageRequests from './image.js'; import * as informRequests from './inform.js'; import * as logRequests from './log.js'; import * as networkRequests from './network.js'; @@ -18,6 +19,7 @@ export { clusterRequests as cluster, configRequests as config, identityRequests as identity, + imageRequests as image, informRequests as inform, logRequests as log, networkRequests as network,