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

    Interface ActionDefinition<TBody, TResponse>

    A single action exposed by your integration — Bondi calls this from a workflow, signing the request with the integration token (HMAC-SHA256).

    The generics TBody and TResponse capture the inferred Zod types so actionHandler(action, ...) adapters can type their handler context end-to-end. They default to unknown so heterogeneous arrays of actions (e.g. ServiceDefinition.actions) still type-check.

    defineAction({
    name: "createContact",
    label: "Create Contact",
    method: "POST",
    endpoint: "/contacts",
    body: z.object({ name: z.string(), email: z.string().email() }),
    response: z.object({ id: z.string() }),
    });
    interface ActionDefinition<TBody = unknown, TResponse = unknown> {
        body?: ZodType<TBody, ZodTypeDef, TBody>;
        description?: string;
        endpoint: string;
        headers?: ZodTypeAny;
        label: string;
        method: HttpMethod;
        name: string;
        query?: ZodTypeAny;
        response?: ZodType<TResponse, ZodTypeDef, TResponse>;
    }

    Type Parameters

    • TBody = unknown
    • TResponse = unknown
    Index

    Properties

    body?: ZodType<TBody, ZodTypeDef, TBody>

    Zod schema for the request body — converted to JSON Schema at sync time.

    description?: string

    Optional longer description shown in the action picker.

    endpoint: string

    Path appended to the integration baseUrl (e.g. /contacts).

    headers?: ZodTypeAny

    Zod schema for additional HTTP headers (rare; auth headers are added by Bondi).

    label: string

    Human-readable label shown in the Bondi Studio UI.

    method: HttpMethod

    HTTP method Bondi should use to call your endpoint.

    name: string

    Stable identifier — used in workflow nodes and webhook signatures.

    query?: ZodTypeAny

    Zod schema for query string parameters.

    response?: ZodType<TResponse, ZodTypeDef, TResponse>

    Zod schema describing the expected response — drives autocomplete in workflows.