diff --git a/changelog.md b/changelog.md index 1a6bc4d..31475d4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2024-12-20 - 4.5.2 - fix(apiclient) +Implemented IService interface in Service class and improved secret bundle documentation. + +- Implemented plugins.servezoneInterfaces.data.IService interface in the Service class within ts_apiclient. +- Updated documentation comments for the type property in the ISecretBundle interface. + ## 2024-12-17 - 4.5.1 - fix(core) Updated dependencies in package.json to latest versions. diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index ba5e9d2..2fa7b58 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/cloudly', - version: '4.5.1', + version: '4.5.2', description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.' } diff --git a/ts_apiclient/classes.secretbundle.ts b/ts_apiclient/classes.secretbundle.ts new file mode 100644 index 0000000..e69de29 diff --git a/ts_apiclient/classes.secretgroup.ts b/ts_apiclient/classes.secretgroup.ts new file mode 100644 index 0000000..e69de29 diff --git a/ts_apiclient/classes.service.ts b/ts_apiclient/classes.service.ts index 4556c32..f7db3bf 100644 --- a/ts_apiclient/classes.service.ts +++ b/ts_apiclient/classes.service.ts @@ -1,7 +1,7 @@ import * as plugins from './plugins.js'; import type { CloudlyApiClient } from './classes.cloudlyapiclient.js'; -export class Service { +export class Service implements plugins.servezoneInterfaces.data.IService { public static async getServices(cloudlyClientRef: CloudlyApiClient) { const getAllServicesTR = cloudlyClientRef.typedsocketClient.createTypedRequest( 'getServices' @@ -62,7 +62,19 @@ export class Service { // INSTANCE cloudlyClientRef: CloudlyApiClient; + public id: string; + public data: plugins.servezoneInterfaces.data.IService['data']; + constructor(cloudlyClientRef: CloudlyApiClient) { this.cloudlyClientRef = cloudlyClientRef; } + + /** + * The service has a secret bundle. + * This function essentially returns the secret bundle as a flat object. + * In other words, it resolves secret groups and + */ + public async getSecretBundleAsFlatObject(environmentArg: string = 'production') { + + } } diff --git a/ts_interfaces/data/secretbundle.ts b/ts_interfaces/data/secretbundle.ts index 629ef4f..8817896 100644 --- a/ts_interfaces/data/secretbundle.ts +++ b/ts_interfaces/data/secretbundle.ts @@ -7,6 +7,17 @@ export interface ISecretBundle { /** * determines if the secret is a service or an external secret * if external secret additional checks are put in place to protect the secret + * + * * service: + * the bundle belongs to a service and can only be used by that service + * * npmci: + * the bundle is a secret bundle that is used by an npmci pipeline + * production secrets will be omitted in any case + * * gitzone: + * the bundle is a secret bundle that is used by a gitzone. + * Only local environment variables are allowed + * * external: + * the bundle is a secret bundle that is used by an external service */ type: 'service' | 'npmci' | 'gitzone' | 'external'; diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index ba5e9d2..2fa7b58 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/cloudly', - version: '4.5.1', + version: '4.5.2', description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.' }