diff --git a/changelog.md b/changelog.md index ef67e6a..6ba66ca 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2024-12-22 - 4.6.0 - feat(cloudlyapiclient) +Extend CloudlyApiClient with cluster, secretbundle, and secretgroup methods + +- Added methods to CloudlyApiClient for managing clusters: getClusterById, getClusters, createCluster. +- Added methods to CloudlyApiClient for managing secret bundles: getSecretBundleById, getSecretBundles, createSecretBundle. +- Added methods to CloudlyApiClient for managing secret groups: getSecretGroupById, getSecretGroups, createSecretGroup. + ## 2024-12-22 - 4.5.5 - fix(apiclient) Fixed image creation method in cloudlyApiClient diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 3c91967..9836656 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.5', + version: '4.6.0', 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.cloudlyapiclient.ts b/ts_apiclient/classes.cloudlyapiclient.ts index f108f88..74e42ba 100644 --- a/ts_apiclient/classes.cloudlyapiclient.ts +++ b/ts_apiclient/classes.cloudlyapiclient.ts @@ -4,6 +4,9 @@ export type TClientType = 'api' | 'ci' | 'coreflow' | 'cli' | 'serverconfig'; import { Image } from './classes.image.js'; import { Service } from './classes.service.js'; +import { Cluster } from './classes.cluster.js'; +import { SecretBundle } from './classes.secretbundle.js'; +import { SecretGroup } from './classes.secretgroup.js'; export class CloudlyApiClient { private cloudlyUrl: string; @@ -181,4 +184,43 @@ export class CloudlyApiClient { return Service.createService(this, optionsArg); } } + + public cluster = { + // Clusters + getClusterById: async (clusterIdArg: string) => { + return Cluster.getClusterById(this, clusterIdArg); + }, + getClusters: async () => { + return Cluster.getClusters(this); + }, + createCluster: async (optionsArg: Parameters[1]) => { + return Cluster.createCluster(this, optionsArg); + } + } + + public secretbundle = { + // SecretBundles + getSecretBundleById: async (secretBundleIdArg: string) => { + return SecretBundle.getSecretBundleById(this, secretBundleIdArg); + }, + getSecretBundles: async () => { + return SecretBundle.getSecretBundles(this); + }, + createSecretBundle: async (optionsArg: Parameters[1]) => { + return SecretBundle.createSecretBundle(this, optionsArg); + } + } + + public secretgroup = { + // SecretGroups + getSecretGroupById: async (secretGroupIdArg: string) => { + return SecretGroup.getSecretGroupById(this, secretGroupIdArg); + }, + getSecretGroups: async () => { + return SecretGroup.getSecretGroups(this); + }, + createSecretGroup: async (optionsArg: Parameters[1]) => { + return SecretGroup.createSecretGroup(this, optionsArg); + } + } } diff --git a/ts_apiclient/classes.secretgroup.ts b/ts_apiclient/classes.secretgroup.ts index 3bc190c..c057276 100644 --- a/ts_apiclient/classes.secretgroup.ts +++ b/ts_apiclient/classes.secretgroup.ts @@ -72,14 +72,7 @@ export class SecretGroup implements plugins.servezoneInterfaces.data.ISecretGrou identity: this.cloudlyClientRef.identity, secretGroup: { id: this.id, - data: { - name: this.data.name, - description: this.data.description, - environments: this.data.environments, - key: this.data.key, - tags: this.data.tags, - priority: this.data.priority, - }, + data: this.data, }, }); diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 3c91967..9836656 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.5', + version: '4.6.0', description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.' }