ChatBotKit Node SDK
    Preparing search index...

    Platform Report client.

    Hierarchy (View Summary)

    Index
    • Proxies a request and resolves the upstream Response. Successful and upstream-error responses pass through untouched - streaming, binary and large bodies are preserved (the body is never read on the success path). The one exception is a CBK authorization_required signal, which is thrown as an AuthorizationRequiredError carrying the url the user must visit to authenticate.

      Parameters

      • path: string
      • Optionaloptions: {
            buffer?: ArrayBuffer;
            endpoint?: string;
            external?: boolean;
            fetchFn?: FetchFunction;
            file?: { data: string | ArrayBuffer; name?: string; type?: string };
            headers?: Record<string, any>;
            method?: string;
            query?: Record<string, any>;
            record?: Record<string, any>;
            retries?: number;
            retryDelay?: number;
            retryTimeout?: boolean;
            timeout?: number;
        }

      Returns Promise<Response>

    • Creates a new instance of the same client type with extended options.

      This is useful when you need to create a client with modified configuration (e.g., different endpoint, token, or headers) without affecting the original.

      Note: This method creates a completely new instance rather than cloning, which is necessary because private class fields cannot be copied.

      Parameters

      Returns PlatformReportClient

      A new instance of the same client class with extended options

    • Generates a specific report.

      Parameters

      • reportId: string
      • request: { [key: string]: unknown }

      Returns Promise<Record<string, never>>

    • Generates multiple reports in a single request.

      Parameters

      • request: { [key: string]: Record<string, never> }

      Returns Promise<{ [key: string]: Record<string, never> | {} }>

    • Generates a typed report with full type safety for input and output.

      Type Parameters

      • T extends ReportId

      Parameters

      • reportId: T

        The report ID

      • request: ReportInputTypes[T]

        The report input

      Returns Promise<ReportOutputTypes[T]>