@jambonz/sdk
    Preparing search index...

    Class WebhookResponse

    Verb builder for HTTP webhook applications. Construct one per request, chain verb methods, and pass to res.json().

    app.post('/incoming', (req, res) => {
    const jambonz = new WebhookResponse();
    jambonz.say({ text: 'Hello!' }).hangup();
    res.json(jambonz);
    });

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    verbs: Verb[] = []
    validator: JambonzValidator | null

    Accessors

    • get length(): number

      Get the current verb count.

      Returns number

    Methods

    • Synonym for llm. Requires vendor to be specified.

      Parameters

      • opts: Omit<S2sVerb, "verb">

      Returns this

    • Shortcut for s2s with vendor='openai'.

      Parameters

      • opts: Omit<LlmBaseOptions, "vendor">

      Returns this

    • Shortcut for s2s with vendor='google'.

      Parameters

      • opts: Omit<LlmBaseOptions, "vendor">

      Returns this

    • Connect the caller to a Google Dialogflow agent (ES, CX, or CES).

      Parameters

      • opts: Omit<DialogflowVerb, "verb">

      Returns this

    • Express-compatible middleware for verifying jambonz webhook signatures. Uses HMAC-SHA256 with timing-safe comparison.

      Parameters

      • secret: string
      • Optionalopts: { tolerance?: number }

      Returns (
          req: IncomingMessage & {
              body?: unknown;
              rawBody?: Buffer<ArrayBufferLike>;
          },
          _res: ServerResponse,
          next: (err?: Error) => void,
      ) => void