@camunda8/sdk
Version:
[](https://www.npmjs.com/package/@camunda8/sdk)
141 lines (140 loc) • 5.65 kB
TypeScript
import { CamundaPlatform8Configuration, DeepPartial } from '../../lib';
import { IOAuthProvider } from '../../oauth';
import * as Dto from './AdminDto';
/**
* This class provides methods to interact with the Camunda Admin API.
* @throws {RESTError} An error that may occur during API operations.
*/
export declare class AdminApiClient {
private userAgentString;
private oAuthProvider;
private rest;
constructor(options?: {
config?: DeepPartial<CamundaPlatform8Configuration>;
oAuthProvider?: IOAuthProvider;
});
private getHeaders;
/**
*
* @description Get an array of the current API clients for this cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClients) for more details.
* @throws {RESTError}
* @param clusterUuid - The cluster UUID
*
*/
getClients(clusterUuid: string): Promise<Dto.ClusterClient[]>;
/**
* @description Create a new API client for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateClient) for more details.
* @throws {RESTError}
*/
createClient(req: {
clusterUuid: string;
clientName: string;
permissions: string[];
}): Promise<Dto.CreatedClusterClient>;
/**
* @description Get the details of an API client. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClient) for more details.
* @param clusterUuid
* @param clientId
* @throws {RESTError}
* @returns
*/
getClient(clusterUuid: string, clientId: string): Promise<Dto.ClusterClientConnectionDetails>;
/**
* @description See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteClient) for more details.
* @param clusterUuid
* @param clientId
* @throws {RESTError}
*/
deleteClient(clusterUuid: string, clientId: string): Promise<null>;
/**
*
* @description Return an array of clusters. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetClusters) for more details.
* @throws {RESTError}
*/
getClusters(): Promise<Dto.Cluster[]>;
/**
*
* @description Create a new cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateCluster) for more details.
* @throws {RESTError}
*/
createCluster(createClusterRequest: Dto.CreateClusterBody): Promise<{
clusterId: string;
}>;
/**
*
* @description Retrieve the metadata for a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetCluster) for more details.
* @throws {RESTError}
*
*/
getCluster(clusterUuid: string): Promise<Dto.Cluster>;
/**
*
* @description Delete a cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteCluster) for more details.
* @throws {RESTError}
*
*/
deleteCluster(clusterUuid: string): Promise<null>;
/**
*
* @description Retrieve the available parameters for cluster creation. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetParameters) for more details.
* @throws {RESTError}
*/
getParameters(): Promise<Dto.Parameters>;
/**
*
* @description Retrieve the connector secrets. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/GetSecrets) for more details.
* @throws {RESTError}
*/
getSecrets(clusterUuid: string): Promise<{
[key: string]: string;
}>;
/**
*
* @description Create a new connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/CreateSecret) for more details.
* @throws {RESTError}
*/
createSecret({ clusterUuid, secretName, secretValue, }: {
clusterUuid: string;
secretName: string;
secretValue: string;
}): Promise<null>;
/**
*
* @description Delete a connector secret. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/DeleteSecret) for more details.
* @throws {RESTError}
*/
deleteSecret(clusterUuid: string, secretName: string): Promise<null>;
/**
*
* @description Add one or more IPs to the whitelist for the cluster. See [the API Documentation](https://console.cloud.camunda.io/customer-api/openapi/docs/#/default/UpdateIpWhitelist) for more details.
* @throws {RESTError}
* @param ipwhitelist
* @returns
*/
whitelistIPs(clusterUuid: string, ipwhitelist: [
{
description: string;
ip: string;
}
]): Promise<null>;
/**
*
* @description Retrieve a list of members and pending invites for your organisation. See the [API Documentation]() for more details.
* @throws {RESTError}
*/
getUsers(): Promise<Dto.Member[]>;
/**
*
* @description Add a member. See the [API Documentation]() for more details.
* @throws {RESTError}
*
*/
createMember(email: string, orgRoles: Dto.OrganizationRole[]): Promise<null>;
/**
*
* @description Delete a member from your organization. See the [API Documentation]() for more details.
* @throws {RESTError}
*
*/
deleteMember(email: string): Promise<null>;
}