@bondi-labs/integration-sdk - v0.0.2
    Preparing search index...

    Interface BondiClientConfig

    Configuration for createBondiClient. Most fields default to environment variables when unset; see BondiModule.forRoot (NestJS adapter) for the NestJS-friendly version.

    interface BondiClientConfig {
        apiUrl?: string;
        dryRun?: boolean;
        fetchImpl?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        internalApiKey?: string;
        internalMode?: boolean;
        internalProviderSlug?: string;
        onEmitError?: (err: Error, event: string) => void;
        token: string | undefined;
        workspaceId: string | undefined;
    }
    Index

    Properties

    apiUrl?: string

    Base URL for the Bondi automation API. Defaults to DEFAULT_BONDI_API_URL (https://automation.heybondi.com) — only set this when targeting a non-prod Bondi deployment. Required when internalMode is true (no default is applied so a misconfigured internal app falls into dry-run instead of silently posting to the public endpoint).

    dryRun?: boolean

    When true, emit() logs payloads instead of making HTTP calls. Also auto-enabled when required config is missing — workspaceId/token for the public path, or internalApiKey/apiUrl for internalMode: true.

    fetchImpl?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Custom fetch implementation. Tests can inject a mock; Node 18+ has fetch globally.

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    internalApiKey?: string

    Internal API key for BondiClientConfig.internalMode. Bondi-only.

    internalMode?: boolean

    Internal mode: post platform events to /internal/platform-events instead of the public HMAC endpoint. Bondi-only.

    internalProviderSlug?: string

    Internal provider slug used in BondiClientConfig.internalMode requests.

    onEmitError?: (err: Error, event: string) => void

    Called on emit failures (network or auth errors). Default: console.warn.

    token: string | undefined

    HMAC signing key (bnd_tok_...). Created by npx bondi init; saved as BONDI_INTEGRATION_TOKEN.

    workspaceId: string | undefined

    Workspace ID (UUID). Created by npx bondi init; saved as BONDI_WORKSPACE_ID.