feat(cloudlyapiclient): Extend CloudlyApiClient with cluster, secretbundle, and secretgroup methods
This commit is contained in:
parent
c9073df7cd
commit
0d0b106f90
@ -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
|
||||
|
||||
|
@ -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.'
|
||||
}
|
||||
|
@ -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<typeof Cluster.createCluster>[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<typeof SecretBundle.createSecretBundle>[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<typeof SecretGroup.createSecretGroup>[1]) => {
|
||||
return SecretGroup.createSecretGroup(this, optionsArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -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.'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user