@getdial/sdk - v0.21.0
    Preparing search index...

    Function serializeServerMessage

    • Validate + serialize an outbound frame to a JSON string.

      Parameters

      • message:
            | { timestamp: number; type: "ping_pong" }
            | {
                content: string;
                content_complete: boolean;
                end_call?: boolean;
                response_id: number;
                type: "response";
            }
            | {
                content: string;
                content_complete: boolean;
                end_call?: boolean;
                type: "interrupt";
            }

      Returns string