@camunda8/sdk
    Preparing search index...

    Class Camunda8

    A single point of configuration for all Camunda Platform 8 clients.

    This class is a factory for all the clients in the Camunda Platform 8 SDK. It allows a single point of configuration for all clients.

    import { Camunda8 } from '@camunda8/sdk'

    const c8 = new Camunda8()
    // 8.8 REST API client - recommended
    const camunda = c8.getOrchestrationClusterApiClient() // returns `CamundaClient`
    // Loosely-typed 8.8 REST API client, for migration
    const camundaLoose = c8.getOrchestrationClusterApiClientLoose() // returns `CamundaClientLoose`
    // 8.7 REST API client
    const c8Rest = c8.getCamundaRestClient()
    // gRPC API client
    const zeebe = c8.getZeebeGrpcApiClient()
    // Infrastructure APIs
    const modeler = c8.getModelerApiClient()
    const admin = c8.getAdminApiClient()
    // Legacy v1 API clients
    const operate = c8.getOperateApiClient()
    const optimize = c8.getOptimizeApiClient()
    const tasklist = c8.getTasklistApiClient()
    Index

    Constructors

    • All constructor parameters for configuration are optional. If no configuration is provided, the SDK will use environment variables to configure itself. See CamundaSDKConfiguration for the complete list of configuration parameters. Values can be passed in explicitly in code, or set via environment variables (recommended: separate configuration and application logic). Explicitly set values will override environment variables, which are merged into the configuration.

      Parameters

      • config: DeepPartial<
            {
                CAMUNDA_AUTH_STRATEGY: "BASIC"
                | "OAUTH"
                | "BEARER"
                | "COOKIE"
                | "NONE";
                CAMUNDA_BASIC_AUTH_PASSWORD: undefined | string;
                CAMUNDA_BASIC_AUTH_USERNAME: undefined | string;
                CAMUNDA_CONSOLE_BASE_URL: undefined | string;
                CAMUNDA_CONSOLE_CLIENT_ID: undefined | string;
                CAMUNDA_CONSOLE_CLIENT_SECRET: undefined | string;
                CAMUNDA_CONSOLE_OAUTH_AUDIENCE: string;
                CAMUNDA_COOKIE_AUTH_PASSWORD: string;
                CAMUNDA_COOKIE_AUTH_URL: string;
                CAMUNDA_COOKIE_AUTH_USERNAME: string;
                CAMUNDA_CUSTOM_CERT_CHAIN_PATH: undefined | string;
                CAMUNDA_CUSTOM_PRIVATE_KEY_PATH: undefined | string;
                CAMUNDA_CUSTOM_ROOT_CERT_PATH: undefined | string;
                CAMUNDA_CUSTOM_ROOT_CERT_STRING: undefined | string;
                CAMUNDA_CUSTOM_USER_AGENT_STRING: undefined | string;
                CAMUNDA_JOB_WORKER_MAX_BACKOFF_MS: number;
                CAMUNDA_LOG_LEVEL:
                    | "none"
                    | "error"
                    | "http"
                    | "info"
                    | "warn"
                    | "verbose"
                    | "debug"
                    | "silly";
                CAMUNDA_MODELER_BASE_URL: string;
                CAMUNDA_MODELER_OAUTH_AUDIENCE: undefined
                | string;
                CAMUNDA_OAUTH_DISABLED: boolean;
                CAMUNDA_OAUTH_FAIL_ON_ERROR: boolean;
                CAMUNDA_OAUTH_TOKEN: undefined | string;
                CAMUNDA_OAUTH_TOKEN_REFRESH_THRESHOLD_MS: number;
                CAMUNDA_OAUTH_URL: undefined | string;
                CAMUNDA_OPERATE_BASE_URL: string;
                CAMUNDA_OPERATE_OAUTH_AUDIENCE: string;
                CAMUNDA_OPTIMIZE_BASE_URL: undefined | string;
                CAMUNDA_OPTIMIZE_OAUTH_AUDIENCE: string;
                CAMUNDA_SECURE_CONNECTION: undefined | boolean;
                CAMUNDA_SUPPORT_LOG_ENABLED: boolean;
                CAMUNDA_SUPPORT_LOG_FILE_PATH: undefined | string;
                CAMUNDA_TASKLIST_BASE_URL: string;
                CAMUNDA_TASKLIST_OAUTH_AUDIENCE: string;
                CAMUNDA_TENANT_ID: string;
                CAMUNDA_TOKEN_CACHE_DIR: undefined | string;
                CAMUNDA_TOKEN_DISK_CACHE_DISABLE: boolean;
                CAMUNDA_TOKEN_SCOPE: undefined | string;
                CAMUNDA_ZEEBE_OAUTH_AUDIENCE: undefined | string;
                ZEEBE_ADDRESS: undefined | string;
                ZEEBE_CLIENT_ID: undefined | string;
                ZEEBE_CLIENT_SECRET: undefined | string;
                ZEEBE_GRPC_ADDRESS: undefined | string;
                ZEEBE_REST_ADDRESS: string;
                ZEEBE_TOKEN_AUDIENCE: string;
                zeebeGrpcSettings: {
                    GRPC_HTTP2_MAX_PINGS_WITHOUT_DATA: number;
                    GRPC_HTTP2_MIN_PING_INTERVAL_WITHOUT_DATA_MS: number;
                    GRPC_HTTP2_MIN_TIME_BETWEEN_PINGS_MS: number;
                    GRPC_INITIAL_RECONNECT_BACKOFF_MS: string | 1000;
                    GRPC_KEEPALIVE_PERMIT_WITHOUT_CALLS: number;
                    GRPC_KEEPALIVE_TIME_MS: number;
                    GRPC_KEEPALIVE_TIMEOUT_MS: number;
                    GRPC_MAX_RECONNECT_BACKOFF_MS: string | 10000;
                    GRPC_MIN_RECONNECT_BACKOFF_MS: string | 5000;
                    ZEEBE_CLIENT_LOG_LEVEL: "NONE" | "DEBUG" | "INFO" | "ERROR";
                    ZEEBE_CLIENT_LOG_TYPE: "JSON" | "SIMPLE";
                    ZEEBE_GRPC_CLIENT_CONNECTION_TOLERANCE_MS: number;
                    ZEEBE_GRPC_CLIENT_EAGER_CONNECT: boolean;
                    ZEEBE_GRPC_CLIENT_INITIAL_CONNECTION_TOLERANCE_MS: undefined | number;
                    ZEEBE_GRPC_CLIENT_MAX_RETRIES: number;
                    ZEEBE_GRPC_CLIENT_MAX_RETRY_TIMEOUT_SECONDS: number;
                    ZEEBE_GRPC_CLIENT_RETRY: boolean;
                    ZEEBE_GRPC_WORKER_LONGPOLL_SECONDS: number;
                    ZEEBE_GRPC_WORKER_POLL_INTERVAL_MS: number;
                    ZEEBE_INSECURE_CONNECTION: undefined | boolean;
                };
            },
        > & { logger?: Logger } & { oAuthProvider?: IHeadersProvider<AuthHeader> } = {}

        Optional explicit overrides. With no configuration, the SDK will use environment variables to configure itself.

        • Optionallogger?: Logger

          An optional logger. If no logger is supplied, winston will be used.

        • OptionaloAuthProvider?: IHeadersProvider<AuthHeader>

          An optional IHeadersProvider implementation. This can be used to add headers to REST requests made by the SDK. In most cases, you will not need to supply this. You can use CAMUNDA_AUTH_STRATEGY and appropriate config values to configure a preconfigured auth strategy. This configuration parameter is provided for advanced use-cases.

      • options: Camunda8Options = ...

        Optional global configuration for the Camunda8 instance.

      Returns Camunda8

    Properties

    log: Logger

    Methods

    • Closes all created API clients and clears all caches

      Returns Promise<void>

    • Returns a strongly-typed Orchestration Cluster API client, of type CamundaClient. See here for full API documentation of the CamundaClient.

      This client exposes branded identifier types (e.g. OrchestrationLifters.ProcessInstanceKey) to provide additional compile-time safety when interacting with the Orchestration Cluster API.

      The configuration passed here is merged with environment variables (see CamundaSDKConfiguration). When options.cached (default) is true, a client instance keyed by its effective configuration is reused.

      Parameters

      Returns CamundaClient

      CamundaClient A branded Orchestration Cluster API client instance.

    • Returns a loosely-typed Orchestration Cluster API client.

      This variant widens branded identifier types to plain strings to make incremental adoption easier in existing codebases that already use raw string IDs. Use this when you prefer flexibility over the additional type safety provided by getOrchestrationClusterApiClient.

      Parameters

      Returns {}

      CamundaClientLoose A loose Orchestration Cluster API client instance.