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

    Class BondiClient

    Low-level Bondi client. Handles register() (definition sync) and bind() (typed trigger emitters). Most users should reach for the NestJS adapter (BondiModule) instead; this class is the underlying engine.

    import { createBondiClient } from "@bondi-labs/integration-sdk/core";
    const client = createBondiClient({
    workspaceId: process.env.BONDI_WORKSPACE_ID,
    token: process.env.BONDI_INTEGRATION_TOKEN,
    });
    const bondi = client.bind(myIntegration);
    bondi.triggers["contact.created"].emit({ id: "1", email: "a@b.c" });
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Effective configuration — apiUrl is filled in with the default when omitted.

    Methods

    • Register or update the integration definition. Used by npx bondi sync (PUT to public endpoint) or by the CLI init flow (POST to JWT endpoint with cliToken).

      Parameters

      • definition: IntegrationDefinition
      • opts: { cliToken?: string; version?: string } = {}
        • OptionalcliToken?: string

          Short-lived JWT from the device-code init flow. Only present during first registration.

        • Optionalversion?: string

          Optional version label (e.g. SDK package version) recorded with the sync.

      Returns Promise<{ slug: string; token?: string }>

      Object with the integration slug and (only on first registration via cliToken) the freshly generated token.