// This file was auto-generated by Fern from our API Definition.

import { VapiClient } from "../../src/Client";
import { mockServerPool } from "../mock-server/MockServerPool";

describe("CallsClient", () => {
    test("list", async () => {
        const server = mockServerPool.createServer();
        const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl });

        const rawResponseBody = [
            {
                type: "inboundPhoneCall",
                costs: [{ type: "transport", minutes: 1.1, cost: 1.1 }],
                messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }],
                phoneCallTransport: "sip",
                status: "scheduled",
                endedReason: "call-start-error-neither-assistant-nor-server-set",
                endedMessage: "endedMessage",
                destination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: { mode: "blind-transfer" },
                    description: "description",
                },
                id: "id",
                orgId: "orgId",
                createdAt: "2024-01-15T09:30:00Z",
                updatedAt: "2024-01-15T09:30:00Z",
                startedAt: "2024-01-15T09:30:00Z",
                endedAt: "2024-01-15T09:30:00Z",
                cost: 1.1,
                costBreakdown: {
                    transport: 1.1,
                    stt: 1.1,
                    llm: 1.1,
                    tts: 1.1,
                    vapi: 1.1,
                    chat: 1.1,
                    total: 1.1,
                    llmPromptTokens: 1.1,
                    llmCompletionTokens: 1.1,
                    llmCachedPromptTokens: 1.1,
                    ttsCharacters: 1.1,
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                analysis: {
                    summary: "summary",
                    structuredData: { key: "value" },
                    structuredDataMulti: [{ key: "value" }],
                    successEvaluation: "successEvaluation",
                },
                monitor: {
                    monitors: [{ monitorId: "monitorId", filterPassed: true }],
                    listenUrl: "listenUrl",
                    controlUrl: "controlUrl",
                },
                artifact: {
                    messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }],
                    messagesOpenAIFormatted: [{ content: null, role: "assistant" }],
                    transcript: "transcript",
                    pcapUrl: "pcapUrl",
                    logUrl: "logUrl",
                    nodes: [{}],
                    assistantActivations: [{ assistantName: "assistantName" }],
                    variableValues: { key: "value" },
                    structuredOutputs: { key: "value" },
                    scorecards: { key: "value" },
                    transfers: ["transfers"],
                    structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
                },
                compliance: { recordingConsent: { type: { key: "value" } } },
                campaignId: "campaignId",
                assistantId: "assistantId",
                assistant: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                squadId: "squadId",
                squad: {
                    name: "name",
                    members: [
                        {
                            assistantDestinations: [{ type: "assistant", assistantName: "assistantName" }],
                            assistant: {
                                transcriber: {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                    fallbackPlan: {
                                        transcribers: [
                                            {
                                                provider: "assembly-ai",
                                                confidenceThreshold: 0.4,
                                                formatTurns: true,
                                                endOfTurnConfidenceThreshold: 0.7,
                                                minEndOfTurnSilenceWhenConfident: 160,
                                                maxTurnSilence: 400,
                                                vadAssistedEndpointingEnabled: true,
                                            },
                                        ],
                                    },
                                },
                                model: {
                                    provider: "anthropic",
                                    tools: [
                                        {
                                            type: "apiRequest",
                                            messages: [{ type: "request-start", blocking: false }],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: { key: "value" },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: { position: -1 },
                                                    },
                                                ],
                                            },
                                        },
                                    ],
                                    knowledgeBase: {
                                        provider: "custom-knowledge-base",
                                        server: {
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            staticIpAddressesEnabled: false,
                                            backoffPlan: {
                                                type: { key: "value" },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                ],
                                            },
                                        },
                                    },
                                    model: "claude-3-opus-20240229",
                                },
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "。",
                                                        "，",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "،",
                                                        "۔",
                                                        "।",
                                                        "॥",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                },
                                            },
                                        ],
                                    },
                                },
                                firstMessage: "Hello! How can I help you today?",
                                clientMessages: [
                                    "conversation-update",
                                    "function-call",
                                    "hang",
                                    "model-output",
                                    "speech-update",
                                    "status-update",
                                    "transfer-update",
                                    "transcript",
                                    "tool-calls",
                                    "user-interrupted",
                                    "voice-input",
                                    "workflow.node.started",
                                    "assistant.started",
                                ],
                                serverMessages: [
                                    "conversation-update",
                                    "end-of-call-report",
                                    "function-call",
                                    "hang",
                                    "speech-update",
                                    "status-update",
                                    "tool-calls",
                                    "transfer-destination-request",
                                    "handoff-destination-request",
                                    "user-interrupted",
                                    "assistant.started",
                                ],
                                maxDurationSeconds: 600,
                                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                                modelOutputInMessagesEnabled: false,
                                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                                hooks: [
                                    {
                                        on: "call.ending",
                                        do: [
                                            {
                                                type: "tool",
                                                tool: {
                                                    type: "apiRequest",
                                                    messages: [{ type: "request-start", blocking: false }],
                                                    method: "POST",
                                                    timeoutSeconds: 20,
                                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                    url: "url",
                                                    backoffPlan: {
                                                        type: { key: "value" },
                                                        maxRetries: 0,
                                                        baseDelaySeconds: 1,
                                                        excludedStatusCodes: [
                                                            { key: "value" },
                                                            { key: "value" },
                                                            { key: "value" },
                                                            { key: "value" },
                                                        ],
                                                    },
                                                    rejectionPlan: {
                                                        conditions: [
                                                            {
                                                                type: "regex",
                                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                                target: { position: -1 },
                                                            },
                                                        ],
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                ],
                                compliancePlan: {
                                    recordingConsentPlan: {
                                        type: "stay-on-line",
                                        message:
                                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                        voice: {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                            fallbackPlan: {
                                                voices: [
                                                    {
                                                        provider: "azure",
                                                        cachingEnabled: true,
                                                        voiceId: "andrew",
                                                        chunkPlan: {
                                                            enabled: true,
                                                            minCharacters: 30,
                                                            punctuationBoundaries: [
                                                                "。",
                                                                "，",
                                                                ".",
                                                                "!",
                                                                "?",
                                                                ";",
                                                                "،",
                                                                "۔",
                                                                "।",
                                                                "॥",
                                                                "|",
                                                                "||",
                                                                ",",
                                                                ":",
                                                            ],
                                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                        waitSeconds: 3,
                                    },
                                },
                                backgroundSpeechDenoisingPlan: {
                                    fourierDenoisingPlan: {
                                        mediaDetectionEnabled: true,
                                        staticThreshold: -35,
                                        baselineOffsetDb: -15,
                                        windowSizeMs: 3000,
                                        baselinePercentile: 85,
                                    },
                                },
                                artifactPlan: {
                                    recordingEnabled: true,
                                    recordingUseCustomStorageEnabled: true,
                                    videoRecordingEnabled: false,
                                    fullMessageHistoryEnabled: false,
                                    pcapEnabled: true,
                                    pcapS3PathPrefix: "/pcaps",
                                    pcapUseCustomStorageEnabled: true,
                                    loggingEnabled: true,
                                    loggingUseCustomStorageEnabled: true,
                                    transcriptPlan: { enabled: true },
                                    structuredOutputs: [
                                        {
                                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                                            name: "name",
                                            schema: { type: "string" },
                                        },
                                    ],
                                },
                                startSpeakingPlan: {
                                    waitSeconds: 0.4,
                                    smartEndpointingPlan: { provider: "vapi" },
                                    transcriptionEndpointingPlan: {
                                        onPunctuationSeconds: 0.1,
                                        onNoPunctuationSeconds: 1.5,
                                        onNumberSeconds: 0.5,
                                    },
                                },
                                stopSpeakingPlan: {
                                    numWords: 0,
                                    voiceSeconds: 0.2,
                                    backoffSeconds: 1,
                                    acknowledgementPhrases: [
                                        "i understand",
                                        "i see",
                                        "i got it",
                                        "i hear you",
                                        "im listening",
                                        "im with you",
                                        "right",
                                        "okay",
                                        "ok",
                                        "sure",
                                        "alright",
                                        "got it",
                                        "understood",
                                        "yeah",
                                        "yes",
                                        "uh-huh",
                                        "mm-hmm",
                                        "gotcha",
                                        "mhmm",
                                        "ah",
                                        "yeah okay",
                                        "yeah sure",
                                    ],
                                    interruptionPhrases: [
                                        "stop",
                                        "shut",
                                        "up",
                                        "enough",
                                        "quiet",
                                        "silence",
                                        "but",
                                        "dont",
                                        "not",
                                        "no",
                                        "hold",
                                        "wait",
                                        "cut",
                                        "pause",
                                        "nope",
                                        "nah",
                                        "nevermind",
                                        "never",
                                        "bad",
                                        "actually",
                                    ],
                                },
                                monitorPlan: {
                                    listenEnabled: false,
                                    listenAuthenticationEnabled: false,
                                    controlEnabled: false,
                                    controlAuthenticationEnabled: false,
                                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                                },
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                },
                            },
                            assistantOverrides: {
                                transcriber: {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                    fallbackPlan: {
                                        transcribers: [
                                            {
                                                provider: "assembly-ai",
                                                confidenceThreshold: 0.4,
                                                formatTurns: true,
                                                endOfTurnConfidenceThreshold: 0.7,
                                                minEndOfTurnSilenceWhenConfident: 160,
                                                maxTurnSilence: 400,
                                                vadAssistedEndpointingEnabled: true,
                                            },
                                        ],
                                    },
                                },
                                model: {
                                    provider: "anthropic",
                                    tools: [
                                        {
                                            type: "apiRequest",
                                            messages: [{ type: "request-start", blocking: false }],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: { key: "value" },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: { position: -1 },
                                                    },
                                                ],
                                            },
                                        },
                                    ],
                                    knowledgeBase: {
                                        provider: "custom-knowledge-base",
                                        server: {
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            staticIpAddressesEnabled: false,
                                            backoffPlan: {
                                                type: { key: "value" },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                ],
                                            },
                                        },
                                    },
                                    model: "claude-3-opus-20240229",
                                },
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "。",
                                                        "，",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "،",
                                                        "۔",
                                                        "।",
                                                        "॥",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                },
                                            },
                                        ],
                                    },
                                },
                                firstMessage: "Hello! How can I help you today?",
                                clientMessages: [
                                    "conversation-update",
                                    "function-call",
                                    "hang",
                                    "model-output",
                                    "speech-update",
                                    "status-update",
                                    "transfer-update",
                                    "transcript",
                                    "tool-calls",
                                    "user-interrupted",
                                    "voice-input",
                                    "workflow.node.started",
                                    "assistant.started",
                                ],
                                serverMessages: [
                                    "conversation-update",
                                    "end-of-call-report",
                                    "function-call",
                                    "hang",
                                    "speech-update",
                                    "status-update",
                                    "tool-calls",
                                    "transfer-destination-request",
                                    "handoff-destination-request",
                                    "user-interrupted",
                                    "assistant.started",
                                ],
                                maxDurationSeconds: 600,
                                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                                modelOutputInMessagesEnabled: false,
                                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                                hooks: [
                                    {
                                        on: "call.ending",
                                        do: [
                                            {
                                                type: "tool",
                                                tool: {
                                                    type: "apiRequest",
                                                    messages: [{ type: "request-start", blocking: false }],
                                                    method: "POST",
                                                    timeoutSeconds: 20,
                                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                    url: "url",
                                                    backoffPlan: {
                                                        type: { key: "value" },
                                                        maxRetries: 0,
                                                        baseDelaySeconds: 1,
                                                        excludedStatusCodes: [
                                                            { key: "value" },
                                                            { key: "value" },
                                                            { key: "value" },
                                                            { key: "value" },
                                                        ],
                                                    },
                                                    rejectionPlan: {
                                                        conditions: [
                                                            {
                                                                type: "regex",
                                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                                target: { position: -1 },
                                                            },
                                                        ],
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                ],
                                "tools:append": [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                compliancePlan: {
                                    recordingConsentPlan: {
                                        type: "stay-on-line",
                                        message:
                                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                        voice: {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                            fallbackPlan: {
                                                voices: [
                                                    {
                                                        provider: "azure",
                                                        cachingEnabled: true,
                                                        voiceId: "andrew",
                                                        chunkPlan: {
                                                            enabled: true,
                                                            minCharacters: 30,
                                                            punctuationBoundaries: [
                                                                "。",
                                                                "，",
                                                                ".",
                                                                "!",
                                                                "?",
                                                                ";",
                                                                "،",
                                                                "۔",
                                                                "।",
                                                                "॥",
                                                                "|",
                                                                "||",
                                                                ",",
                                                                ":",
                                                            ],
                                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                        waitSeconds: 3,
                                    },
                                },
                                backgroundSpeechDenoisingPlan: {
                                    fourierDenoisingPlan: {
                                        mediaDetectionEnabled: true,
                                        staticThreshold: -35,
                                        baselineOffsetDb: -15,
                                        windowSizeMs: 3000,
                                        baselinePercentile: 85,
                                    },
                                },
                                artifactPlan: {
                                    recordingEnabled: true,
                                    recordingUseCustomStorageEnabled: true,
                                    videoRecordingEnabled: false,
                                    fullMessageHistoryEnabled: false,
                                    pcapEnabled: true,
                                    pcapS3PathPrefix: "/pcaps",
                                    pcapUseCustomStorageEnabled: true,
                                    loggingEnabled: true,
                                    loggingUseCustomStorageEnabled: true,
                                    transcriptPlan: { enabled: true },
                                    structuredOutputs: [
                                        {
                                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                                            name: "name",
                                            schema: { type: "string" },
                                        },
                                    ],
                                },
                                startSpeakingPlan: {
                                    waitSeconds: 0.4,
                                    smartEndpointingPlan: { provider: "vapi" },
                                    transcriptionEndpointingPlan: {
                                        onPunctuationSeconds: 0.1,
                                        onNoPunctuationSeconds: 1.5,
                                        onNumberSeconds: 0.5,
                                    },
                                },
                                stopSpeakingPlan: {
                                    numWords: 0,
                                    voiceSeconds: 0.2,
                                    backoffSeconds: 1,
                                    acknowledgementPhrases: [
                                        "i understand",
                                        "i see",
                                        "i got it",
                                        "i hear you",
                                        "im listening",
                                        "im with you",
                                        "right",
                                        "okay",
                                        "ok",
                                        "sure",
                                        "alright",
                                        "got it",
                                        "understood",
                                        "yeah",
                                        "yes",
                                        "uh-huh",
                                        "mm-hmm",
                                        "gotcha",
                                        "mhmm",
                                        "ah",
                                        "yeah okay",
                                        "yeah sure",
                                    ],
                                    interruptionPhrases: [
                                        "stop",
                                        "shut",
                                        "up",
                                        "enough",
                                        "quiet",
                                        "silence",
                                        "but",
                                        "dont",
                                        "not",
                                        "no",
                                        "hold",
                                        "wait",
                                        "cut",
                                        "pause",
                                        "nope",
                                        "nah",
                                        "nevermind",
                                        "never",
                                        "bad",
                                        "actually",
                                    ],
                                },
                                monitorPlan: {
                                    listenEnabled: false,
                                    listenAuthenticationEnabled: false,
                                    controlEnabled: false,
                                    controlAuthenticationEnabled: false,
                                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                                },
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                },
                            },
                        },
                    ],
                    membersOverrides: {
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        model: {
                            provider: "anthropic",
                            tools: [
                                {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            ],
                            knowledgeBase: {
                                provider: "custom-knowledge-base",
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                },
                            },
                            model: "claude-3-opus-20240229",
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        firstMessage: "Hello! How can I help you today?",
                        clientMessages: [
                            "conversation-update",
                            "function-call",
                            "hang",
                            "model-output",
                            "speech-update",
                            "status-update",
                            "transfer-update",
                            "transcript",
                            "tool-calls",
                            "user-interrupted",
                            "voice-input",
                            "workflow.node.started",
                            "assistant.started",
                        ],
                        serverMessages: [
                            "conversation-update",
                            "end-of-call-report",
                            "function-call",
                            "hang",
                            "speech-update",
                            "status-update",
                            "tool-calls",
                            "transfer-destination-request",
                            "handoff-destination-request",
                            "user-interrupted",
                            "assistant.started",
                        ],
                        maxDurationSeconds: 600,
                        backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                        modelOutputInMessagesEnabled: false,
                        transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                        credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                        hooks: [
                            {
                                on: "call.ending",
                                do: [
                                    {
                                        type: "tool",
                                        tool: {
                                            type: "apiRequest",
                                            messages: [{ type: "request-start", blocking: false }],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: { key: "value" },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: { position: -1 },
                                                    },
                                                ],
                                            },
                                        },
                                    },
                                ],
                            },
                        ],
                        "tools:append": [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        compliancePlan: {
                            recordingConsentPlan: {
                                type: "stay-on-line",
                                message:
                                    "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "。",
                                                        "，",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "،",
                                                        "۔",
                                                        "।",
                                                        "॥",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                },
                                            },
                                        ],
                                    },
                                },
                                waitSeconds: 3,
                            },
                        },
                        backgroundSpeechDenoisingPlan: {
                            fourierDenoisingPlan: {
                                mediaDetectionEnabled: true,
                                staticThreshold: -35,
                                baselineOffsetDb: -15,
                                windowSizeMs: 3000,
                                baselinePercentile: 85,
                            },
                        },
                        artifactPlan: {
                            recordingEnabled: true,
                            recordingUseCustomStorageEnabled: true,
                            videoRecordingEnabled: false,
                            fullMessageHistoryEnabled: false,
                            pcapEnabled: true,
                            pcapS3PathPrefix: "/pcaps",
                            pcapUseCustomStorageEnabled: true,
                            loggingEnabled: true,
                            loggingUseCustomStorageEnabled: true,
                            transcriptPlan: { enabled: true },
                            structuredOutputs: [
                                {
                                    compliancePlan: { forceStoreOnHipaaEnabled: false },
                                    name: "name",
                                    schema: { type: "string" },
                                },
                            ],
                        },
                        startSpeakingPlan: {
                            waitSeconds: 0.4,
                            smartEndpointingPlan: { provider: "vapi" },
                            transcriptionEndpointingPlan: {
                                onPunctuationSeconds: 0.1,
                                onNoPunctuationSeconds: 1.5,
                                onNumberSeconds: 0.5,
                            },
                        },
                        stopSpeakingPlan: {
                            numWords: 0,
                            voiceSeconds: 0.2,
                            backoffSeconds: 1,
                            acknowledgementPhrases: [
                                "i understand",
                                "i see",
                                "i got it",
                                "i hear you",
                                "im listening",
                                "im with you",
                                "right",
                                "okay",
                                "ok",
                                "sure",
                                "alright",
                                "got it",
                                "understood",
                                "yeah",
                                "yes",
                                "uh-huh",
                                "mm-hmm",
                                "gotcha",
                                "mhmm",
                                "ah",
                                "yeah okay",
                                "yeah sure",
                            ],
                            interruptionPhrases: [
                                "stop",
                                "shut",
                                "up",
                                "enough",
                                "quiet",
                                "silence",
                                "but",
                                "dont",
                                "not",
                                "no",
                                "hold",
                                "wait",
                                "cut",
                                "pause",
                                "nope",
                                "nah",
                                "nevermind",
                                "never",
                                "bad",
                                "actually",
                            ],
                        },
                        monitorPlan: {
                            listenEnabled: false,
                            listenAuthenticationEnabled: false,
                            controlEnabled: false,
                            controlAuthenticationEnabled: false,
                            monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                        },
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                },
                squadOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                workflowId: "workflowId",
                workflow: {
                    nodes: [
                        {
                            type: "conversation",
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            tools: [
                                {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            ],
                            name: "name",
                        },
                    ],
                    model: { provider: "openai", model: "gpt-5.4" },
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    voicemailDetection: "off",
                    maxDurationSeconds: 600,
                    name: "name",
                    edges: [{ from: "from", to: "to" }],
                    globalPrompt: "globalPrompt",
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    credentialIds: ["credentialIds"],
                    voicemailMessage: "voicemailMessage",
                },
                workflowOverrides: { variableValues: { key: "value" } },
                phoneNumberId: "phoneNumberId",
                phoneNumber: {
                    fallbackDestination: { type: "number", number: "number" },
                    hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }],
                    smsEnabled: true,
                    twilioPhoneNumber: "twilioPhoneNumber",
                    twilioAccountSid: "twilioAccountSid",
                    twilioAuthToken: "twilioAuthToken",
                    twilioApiKey: "twilioApiKey",
                    twilioApiSecret: "twilioApiSecret",
                    name: "name",
                    assistantId: "assistantId",
                    workflowId: "workflowId",
                    squadId: "squadId",
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                customerId: "customerId",
                customer: {
                    numberE164CheckEnabled: true,
                    extension: "extension",
                    assistantOverrides: {
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        model: {
                            provider: "anthropic",
                            tools: [
                                {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            ],
                            knowledgeBase: {
                                provider: "custom-knowledge-base",
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                },
                            },
                            model: "claude-3-opus-20240229",
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        firstMessage: "Hello! How can I help you today?",
                        clientMessages: [
                            "conversation-update",
                            "function-call",
                            "hang",
                            "model-output",
                            "speech-update",
                            "status-update",
                            "transfer-update",
                            "transcript",
                            "tool-calls",
                            "user-interrupted",
                            "voice-input",
                            "workflow.node.started",
                            "assistant.started",
                        ],
                        serverMessages: [
                            "conversation-update",
                            "end-of-call-report",
                            "function-call",
                            "hang",
                            "speech-update",
                            "status-update",
                            "tool-calls",
                            "transfer-destination-request",
                            "handoff-destination-request",
                            "user-interrupted",
                            "assistant.started",
                        ],
                        maxDurationSeconds: 600,
                        backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                        modelOutputInMessagesEnabled: false,
                        transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                        credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                        hooks: [
                            {
                                on: "call.ending",
                                do: [
                                    {
                                        type: "tool",
                                        tool: {
                                            type: "apiRequest",
                                            messages: [{ type: "request-start", blocking: false }],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: { key: "value" },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                    { key: "value" },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: { position: -1 },
                                                    },
                                                ],
                                            },
                                        },
                                    },
                                ],
                            },
                        ],
                        "tools:append": [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        compliancePlan: {
                            recordingConsentPlan: {
                                type: "stay-on-line",
                                message:
                                    "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "。",
                                                        "，",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "،",
                                                        "۔",
                                                        "।",
                                                        "॥",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                },
                                            },
                                        ],
                                    },
                                },
                                waitSeconds: 3,
                            },
                        },
                        backgroundSpeechDenoisingPlan: {
                            fourierDenoisingPlan: {
                                mediaDetectionEnabled: true,
                                staticThreshold: -35,
                                baselineOffsetDb: -15,
                                windowSizeMs: 3000,
                                baselinePercentile: 85,
                            },
                        },
                        artifactPlan: {
                            recordingEnabled: true,
                            recordingUseCustomStorageEnabled: true,
                            videoRecordingEnabled: false,
                            fullMessageHistoryEnabled: false,
                            pcapEnabled: true,
                            pcapS3PathPrefix: "/pcaps",
                            pcapUseCustomStorageEnabled: true,
                            loggingEnabled: true,
                            loggingUseCustomStorageEnabled: true,
                            transcriptPlan: { enabled: true },
                            structuredOutputs: [
                                {
                                    compliancePlan: { forceStoreOnHipaaEnabled: false },
                                    name: "name",
                                    schema: { type: "string" },
                                },
                            ],
                        },
                        startSpeakingPlan: {
                            waitSeconds: 0.4,
                            smartEndpointingPlan: { provider: "vapi" },
                            transcriptionEndpointingPlan: {
                                onPunctuationSeconds: 0.1,
                                onNoPunctuationSeconds: 1.5,
                                onNumberSeconds: 0.5,
                            },
                        },
                        stopSpeakingPlan: {
                            numWords: 0,
                            voiceSeconds: 0.2,
                            backoffSeconds: 1,
                            acknowledgementPhrases: [
                                "i understand",
                                "i see",
                                "i got it",
                                "i hear you",
                                "im listening",
                                "im with you",
                                "right",
                                "okay",
                                "ok",
                                "sure",
                                "alright",
                                "got it",
                                "understood",
                                "yeah",
                                "yes",
                                "uh-huh",
                                "mm-hmm",
                                "gotcha",
                                "mhmm",
                                "ah",
                                "yeah okay",
                                "yeah sure",
                            ],
                            interruptionPhrases: [
                                "stop",
                                "shut",
                                "up",
                                "enough",
                                "quiet",
                                "silence",
                                "but",
                                "dont",
                                "not",
                                "no",
                                "hold",
                                "wait",
                                "cut",
                                "pause",
                                "nope",
                                "nah",
                                "nevermind",
                                "never",
                                "bad",
                                "actually",
                            ],
                        },
                        monitorPlan: {
                            listenEnabled: false,
                            listenAuthenticationEnabled: false,
                            controlEnabled: false,
                            controlAuthenticationEnabled: false,
                            monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                        },
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    number: "number",
                    sipUri: "sipUri",
                    name: "name",
                    email: "email",
                    externalId: "externalId",
                },
                name: "name",
                schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
                transport: { key: "value" },
                subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
            },
        ];

        server.mockEndpoint().get("/call").respondWith().statusCode(200).jsonBody(rawResponseBody).build();

        const response = await client.calls.list();
        expect(response).toEqual([
            {
                type: "inboundPhoneCall",
                costs: [
                    {
                        type: "transport",
                        minutes: 1.1,
                        cost: 1.1,
                    },
                ],
                messages: [
                    {
                        role: "role",
                        message: "message",
                        time: 1.1,
                        endTime: 1.1,
                        secondsFromStart: 1.1,
                    },
                ],
                phoneCallTransport: "sip",
                status: "scheduled",
                endedReason: "call-start-error-neither-assistant-nor-server-set",
                endedMessage: "endedMessage",
                destination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: {
                        mode: "blind-transfer",
                    },
                    description: "description",
                },
                id: "id",
                orgId: "orgId",
                createdAt: "2024-01-15T09:30:00Z",
                updatedAt: "2024-01-15T09:30:00Z",
                startedAt: "2024-01-15T09:30:00Z",
                endedAt: "2024-01-15T09:30:00Z",
                cost: 1.1,
                costBreakdown: {
                    transport: 1.1,
                    stt: 1.1,
                    llm: 1.1,
                    tts: 1.1,
                    vapi: 1.1,
                    chat: 1.1,
                    total: 1.1,
                    llmPromptTokens: 1.1,
                    llmCompletionTokens: 1.1,
                    llmCachedPromptTokens: 1.1,
                    ttsCharacters: 1.1,
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                analysis: {
                    summary: "summary",
                    structuredData: {
                        key: "value",
                    },
                    structuredDataMulti: [
                        {
                            key: "value",
                        },
                    ],
                    successEvaluation: "successEvaluation",
                },
                monitor: {
                    monitors: [
                        {
                            monitorId: "monitorId",
                            filterPassed: true,
                        },
                    ],
                    listenUrl: "listenUrl",
                    controlUrl: "controlUrl",
                },
                artifact: {
                    messages: [
                        {
                            role: "role",
                            message: "message",
                            time: 1.1,
                            endTime: 1.1,
                            secondsFromStart: 1.1,
                        },
                    ],
                    messagesOpenAIFormatted: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    transcript: "transcript",
                    pcapUrl: "pcapUrl",
                    logUrl: "logUrl",
                    nodes: [{}],
                    assistantActivations: [
                        {
                            assistantName: "assistantName",
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    structuredOutputs: {
                        key: "value",
                    },
                    scorecards: {
                        key: "value",
                    },
                    transfers: ["transfers"],
                    structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
                },
                compliance: {
                    recordingConsent: {
                        type: {
                            key: "value",
                        },
                    },
                },
                campaignId: "campaignId",
                assistantId: "assistantId",
                assistant: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                squadId: "squadId",
                squad: {
                    name: "name",
                    members: [
                        {
                            assistantDestinations: [
                                {
                                    type: "assistant",
                                    assistantName: "assistantName",
                                },
                            ],
                            assistant: {
                                transcriber: {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                    fallbackPlan: {
                                        transcribers: [
                                            {
                                                provider: "assembly-ai",
                                                confidenceThreshold: 0.4,
                                                formatTurns: true,
                                                endOfTurnConfidenceThreshold: 0.7,
                                                minEndOfTurnSilenceWhenConfident: 160,
                                                maxTurnSilence: 400,
                                                vadAssistedEndpointingEnabled: true,
                                            },
                                        ],
                                    },
                                },
                                model: {
                                    provider: "anthropic",
                                    tools: [
                                        {
                                            type: "apiRequest",
                                            messages: [
                                                {
                                                    type: "request-start",
                                                    blocking: false,
                                                },
                                            ],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: {
                                                    key: "value",
                                                },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: {
                                                            position: -1,
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                    ],
                                    knowledgeBase: {
                                        provider: "custom-knowledge-base",
                                        server: {
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            staticIpAddressesEnabled: false,
                                            backoffPlan: {
                                                type: {
                                                    key: "value",
                                                },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                ],
                                            },
                                        },
                                    },
                                    model: "claude-3-opus-20240229",
                                },
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "\u3002",
                                                        "\uFF0C",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "\u060C",
                                                        "\u06D4",
                                                        "\u0964",
                                                        "\u0965",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: {
                                                        enabled: true,
                                                        numberToDigitsCutoff: 2025,
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                },
                                firstMessage: "Hello! How can I help you today?",
                                clientMessages: [
                                    "conversation-update",
                                    "function-call",
                                    "hang",
                                    "model-output",
                                    "speech-update",
                                    "status-update",
                                    "transfer-update",
                                    "transcript",
                                    "tool-calls",
                                    "user-interrupted",
                                    "voice-input",
                                    "workflow.node.started",
                                    "assistant.started",
                                ],
                                serverMessages: [
                                    "conversation-update",
                                    "end-of-call-report",
                                    "function-call",
                                    "hang",
                                    "speech-update",
                                    "status-update",
                                    "tool-calls",
                                    "transfer-destination-request",
                                    "handoff-destination-request",
                                    "user-interrupted",
                                    "assistant.started",
                                ],
                                maxDurationSeconds: 600,
                                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                                modelOutputInMessagesEnabled: false,
                                transportConfigurations: [
                                    {
                                        provider: "twilio",
                                        timeout: 60,
                                        record: false,
                                    },
                                ],
                                credentials: [
                                    {
                                        provider: "11labs",
                                        apiKey: "apiKey",
                                    },
                                ],
                                hooks: [
                                    {
                                        on: "call.ending",
                                        do: [
                                            {
                                                type: "tool",
                                                tool: {
                                                    type: "apiRequest",
                                                    messages: [
                                                        {
                                                            type: "request-start",
                                                            blocking: false,
                                                        },
                                                    ],
                                                    method: "POST",
                                                    timeoutSeconds: 20,
                                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                    url: "url",
                                                    backoffPlan: {
                                                        type: {
                                                            key: "value",
                                                        },
                                                        maxRetries: 0,
                                                        baseDelaySeconds: 1,
                                                        excludedStatusCodes: [
                                                            {
                                                                key: "value",
                                                            },
                                                            {
                                                                key: "value",
                                                            },
                                                            {
                                                                key: "value",
                                                            },
                                                            {
                                                                key: "value",
                                                            },
                                                        ],
                                                    },
                                                    rejectionPlan: {
                                                        conditions: [
                                                            {
                                                                type: "regex",
                                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                                target: {
                                                                    position: -1,
                                                                },
                                                            },
                                                        ],
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                ],
                                compliancePlan: {
                                    recordingConsentPlan: {
                                        type: "stay-on-line",
                                        message:
                                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                        voice: {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                            fallbackPlan: {
                                                voices: [
                                                    {
                                                        provider: "azure",
                                                        cachingEnabled: true,
                                                        voiceId: "andrew",
                                                        chunkPlan: {
                                                            enabled: true,
                                                            minCharacters: 30,
                                                            punctuationBoundaries: [
                                                                "\u3002",
                                                                "\uFF0C",
                                                                ".",
                                                                "!",
                                                                "?",
                                                                ";",
                                                                "\u060C",
                                                                "\u06D4",
                                                                "\u0964",
                                                                "\u0965",
                                                                "|",
                                                                "||",
                                                                ",",
                                                                ":",
                                                            ],
                                                            formatPlan: {
                                                                enabled: true,
                                                                numberToDigitsCutoff: 2025,
                                                            },
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                        waitSeconds: 3,
                                    },
                                },
                                backgroundSpeechDenoisingPlan: {
                                    fourierDenoisingPlan: {
                                        mediaDetectionEnabled: true,
                                        staticThreshold: -35,
                                        baselineOffsetDb: -15,
                                        windowSizeMs: 3000,
                                        baselinePercentile: 85,
                                    },
                                },
                                artifactPlan: {
                                    recordingEnabled: true,
                                    recordingUseCustomStorageEnabled: true,
                                    videoRecordingEnabled: false,
                                    fullMessageHistoryEnabled: false,
                                    pcapEnabled: true,
                                    pcapS3PathPrefix: "/pcaps",
                                    pcapUseCustomStorageEnabled: true,
                                    loggingEnabled: true,
                                    loggingUseCustomStorageEnabled: true,
                                    transcriptPlan: {
                                        enabled: true,
                                    },
                                    structuredOutputs: [
                                        {
                                            compliancePlan: {
                                                forceStoreOnHipaaEnabled: false,
                                            },
                                            name: "name",
                                            schema: {
                                                type: "string",
                                            },
                                        },
                                    ],
                                },
                                startSpeakingPlan: {
                                    waitSeconds: 0.4,
                                    smartEndpointingPlan: {
                                        provider: "vapi",
                                    },
                                    transcriptionEndpointingPlan: {
                                        onPunctuationSeconds: 0.1,
                                        onNoPunctuationSeconds: 1.5,
                                        onNumberSeconds: 0.5,
                                    },
                                },
                                stopSpeakingPlan: {
                                    numWords: 0,
                                    voiceSeconds: 0.2,
                                    backoffSeconds: 1,
                                    acknowledgementPhrases: [
                                        "i understand",
                                        "i see",
                                        "i got it",
                                        "i hear you",
                                        "im listening",
                                        "im with you",
                                        "right",
                                        "okay",
                                        "ok",
                                        "sure",
                                        "alright",
                                        "got it",
                                        "understood",
                                        "yeah",
                                        "yes",
                                        "uh-huh",
                                        "mm-hmm",
                                        "gotcha",
                                        "mhmm",
                                        "ah",
                                        "yeah okay",
                                        "yeah sure",
                                    ],
                                    interruptionPhrases: [
                                        "stop",
                                        "shut",
                                        "up",
                                        "enough",
                                        "quiet",
                                        "silence",
                                        "but",
                                        "dont",
                                        "not",
                                        "no",
                                        "hold",
                                        "wait",
                                        "cut",
                                        "pause",
                                        "nope",
                                        "nah",
                                        "nevermind",
                                        "never",
                                        "bad",
                                        "actually",
                                    ],
                                },
                                monitorPlan: {
                                    listenEnabled: false,
                                    listenAuthenticationEnabled: false,
                                    controlEnabled: false,
                                    controlAuthenticationEnabled: false,
                                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                                },
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                },
                            },
                            assistantOverrides: {
                                transcriber: {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                    fallbackPlan: {
                                        transcribers: [
                                            {
                                                provider: "assembly-ai",
                                                confidenceThreshold: 0.4,
                                                formatTurns: true,
                                                endOfTurnConfidenceThreshold: 0.7,
                                                minEndOfTurnSilenceWhenConfident: 160,
                                                maxTurnSilence: 400,
                                                vadAssistedEndpointingEnabled: true,
                                            },
                                        ],
                                    },
                                },
                                model: {
                                    provider: "anthropic",
                                    tools: [
                                        {
                                            type: "apiRequest",
                                            messages: [
                                                {
                                                    type: "request-start",
                                                    blocking: false,
                                                },
                                            ],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: {
                                                    key: "value",
                                                },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: {
                                                            position: -1,
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                    ],
                                    knowledgeBase: {
                                        provider: "custom-knowledge-base",
                                        server: {
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            staticIpAddressesEnabled: false,
                                            backoffPlan: {
                                                type: {
                                                    key: "value",
                                                },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                ],
                                            },
                                        },
                                    },
                                    model: "claude-3-opus-20240229",
                                },
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "\u3002",
                                                        "\uFF0C",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "\u060C",
                                                        "\u06D4",
                                                        "\u0964",
                                                        "\u0965",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: {
                                                        enabled: true,
                                                        numberToDigitsCutoff: 2025,
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                },
                                firstMessage: "Hello! How can I help you today?",
                                clientMessages: [
                                    "conversation-update",
                                    "function-call",
                                    "hang",
                                    "model-output",
                                    "speech-update",
                                    "status-update",
                                    "transfer-update",
                                    "transcript",
                                    "tool-calls",
                                    "user-interrupted",
                                    "voice-input",
                                    "workflow.node.started",
                                    "assistant.started",
                                ],
                                serverMessages: [
                                    "conversation-update",
                                    "end-of-call-report",
                                    "function-call",
                                    "hang",
                                    "speech-update",
                                    "status-update",
                                    "tool-calls",
                                    "transfer-destination-request",
                                    "handoff-destination-request",
                                    "user-interrupted",
                                    "assistant.started",
                                ],
                                maxDurationSeconds: 600,
                                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                                modelOutputInMessagesEnabled: false,
                                transportConfigurations: [
                                    {
                                        provider: "twilio",
                                        timeout: 60,
                                        record: false,
                                    },
                                ],
                                credentials: [
                                    {
                                        provider: "11labs",
                                        apiKey: "apiKey",
                                    },
                                ],
                                hooks: [
                                    {
                                        on: "call.ending",
                                        do: [
                                            {
                                                type: "tool",
                                                tool: {
                                                    type: "apiRequest",
                                                    messages: [
                                                        {
                                                            type: "request-start",
                                                            blocking: false,
                                                        },
                                                    ],
                                                    method: "POST",
                                                    timeoutSeconds: 20,
                                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                    url: "url",
                                                    backoffPlan: {
                                                        type: {
                                                            key: "value",
                                                        },
                                                        maxRetries: 0,
                                                        baseDelaySeconds: 1,
                                                        excludedStatusCodes: [
                                                            {
                                                                key: "value",
                                                            },
                                                            {
                                                                key: "value",
                                                            },
                                                            {
                                                                key: "value",
                                                            },
                                                            {
                                                                key: "value",
                                                            },
                                                        ],
                                                    },
                                                    rejectionPlan: {
                                                        conditions: [
                                                            {
                                                                type: "regex",
                                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                                target: {
                                                                    position: -1,
                                                                },
                                                            },
                                                        ],
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                ],
                                "tools:append": [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                compliancePlan: {
                                    recordingConsentPlan: {
                                        type: "stay-on-line",
                                        message:
                                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                        voice: {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                            fallbackPlan: {
                                                voices: [
                                                    {
                                                        provider: "azure",
                                                        cachingEnabled: true,
                                                        voiceId: "andrew",
                                                        chunkPlan: {
                                                            enabled: true,
                                                            minCharacters: 30,
                                                            punctuationBoundaries: [
                                                                "\u3002",
                                                                "\uFF0C",
                                                                ".",
                                                                "!",
                                                                "?",
                                                                ";",
                                                                "\u060C",
                                                                "\u06D4",
                                                                "\u0964",
                                                                "\u0965",
                                                                "|",
                                                                "||",
                                                                ",",
                                                                ":",
                                                            ],
                                                            formatPlan: {
                                                                enabled: true,
                                                                numberToDigitsCutoff: 2025,
                                                            },
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                        waitSeconds: 3,
                                    },
                                },
                                backgroundSpeechDenoisingPlan: {
                                    fourierDenoisingPlan: {
                                        mediaDetectionEnabled: true,
                                        staticThreshold: -35,
                                        baselineOffsetDb: -15,
                                        windowSizeMs: 3000,
                                        baselinePercentile: 85,
                                    },
                                },
                                artifactPlan: {
                                    recordingEnabled: true,
                                    recordingUseCustomStorageEnabled: true,
                                    videoRecordingEnabled: false,
                                    fullMessageHistoryEnabled: false,
                                    pcapEnabled: true,
                                    pcapS3PathPrefix: "/pcaps",
                                    pcapUseCustomStorageEnabled: true,
                                    loggingEnabled: true,
                                    loggingUseCustomStorageEnabled: true,
                                    transcriptPlan: {
                                        enabled: true,
                                    },
                                    structuredOutputs: [
                                        {
                                            compliancePlan: {
                                                forceStoreOnHipaaEnabled: false,
                                            },
                                            name: "name",
                                            schema: {
                                                type: "string",
                                            },
                                        },
                                    ],
                                },
                                startSpeakingPlan: {
                                    waitSeconds: 0.4,
                                    smartEndpointingPlan: {
                                        provider: "vapi",
                                    },
                                    transcriptionEndpointingPlan: {
                                        onPunctuationSeconds: 0.1,
                                        onNoPunctuationSeconds: 1.5,
                                        onNumberSeconds: 0.5,
                                    },
                                },
                                stopSpeakingPlan: {
                                    numWords: 0,
                                    voiceSeconds: 0.2,
                                    backoffSeconds: 1,
                                    acknowledgementPhrases: [
                                        "i understand",
                                        "i see",
                                        "i got it",
                                        "i hear you",
                                        "im listening",
                                        "im with you",
                                        "right",
                                        "okay",
                                        "ok",
                                        "sure",
                                        "alright",
                                        "got it",
                                        "understood",
                                        "yeah",
                                        "yes",
                                        "uh-huh",
                                        "mm-hmm",
                                        "gotcha",
                                        "mhmm",
                                        "ah",
                                        "yeah okay",
                                        "yeah sure",
                                    ],
                                    interruptionPhrases: [
                                        "stop",
                                        "shut",
                                        "up",
                                        "enough",
                                        "quiet",
                                        "silence",
                                        "but",
                                        "dont",
                                        "not",
                                        "no",
                                        "hold",
                                        "wait",
                                        "cut",
                                        "pause",
                                        "nope",
                                        "nah",
                                        "nevermind",
                                        "never",
                                        "bad",
                                        "actually",
                                    ],
                                },
                                monitorPlan: {
                                    listenEnabled: false,
                                    listenAuthenticationEnabled: false,
                                    controlEnabled: false,
                                    controlAuthenticationEnabled: false,
                                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                                },
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                },
                            },
                        },
                    ],
                    membersOverrides: {
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        model: {
                            provider: "anthropic",
                            tools: [
                                {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            ],
                            knowledgeBase: {
                                provider: "custom-knowledge-base",
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                },
                            },
                            model: "claude-3-opus-20240229",
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        firstMessage: "Hello! How can I help you today?",
                        clientMessages: [
                            "conversation-update",
                            "function-call",
                            "hang",
                            "model-output",
                            "speech-update",
                            "status-update",
                            "transfer-update",
                            "transcript",
                            "tool-calls",
                            "user-interrupted",
                            "voice-input",
                            "workflow.node.started",
                            "assistant.started",
                        ],
                        serverMessages: [
                            "conversation-update",
                            "end-of-call-report",
                            "function-call",
                            "hang",
                            "speech-update",
                            "status-update",
                            "tool-calls",
                            "transfer-destination-request",
                            "handoff-destination-request",
                            "user-interrupted",
                            "assistant.started",
                        ],
                        maxDurationSeconds: 600,
                        backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                        modelOutputInMessagesEnabled: false,
                        transportConfigurations: [
                            {
                                provider: "twilio",
                                timeout: 60,
                                record: false,
                            },
                        ],
                        credentials: [
                            {
                                provider: "11labs",
                                apiKey: "apiKey",
                            },
                        ],
                        hooks: [
                            {
                                on: "call.ending",
                                do: [
                                    {
                                        type: "tool",
                                        tool: {
                                            type: "apiRequest",
                                            messages: [
                                                {
                                                    type: "request-start",
                                                    blocking: false,
                                                },
                                            ],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: {
                                                    key: "value",
                                                },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: {
                                                            position: -1,
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                    },
                                ],
                            },
                        ],
                        "tools:append": [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        compliancePlan: {
                            recordingConsentPlan: {
                                type: "stay-on-line",
                                message:
                                    "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "\u3002",
                                                        "\uFF0C",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "\u060C",
                                                        "\u06D4",
                                                        "\u0964",
                                                        "\u0965",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: {
                                                        enabled: true,
                                                        numberToDigitsCutoff: 2025,
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                },
                                waitSeconds: 3,
                            },
                        },
                        backgroundSpeechDenoisingPlan: {
                            fourierDenoisingPlan: {
                                mediaDetectionEnabled: true,
                                staticThreshold: -35,
                                baselineOffsetDb: -15,
                                windowSizeMs: 3000,
                                baselinePercentile: 85,
                            },
                        },
                        artifactPlan: {
                            recordingEnabled: true,
                            recordingUseCustomStorageEnabled: true,
                            videoRecordingEnabled: false,
                            fullMessageHistoryEnabled: false,
                            pcapEnabled: true,
                            pcapS3PathPrefix: "/pcaps",
                            pcapUseCustomStorageEnabled: true,
                            loggingEnabled: true,
                            loggingUseCustomStorageEnabled: true,
                            transcriptPlan: {
                                enabled: true,
                            },
                            structuredOutputs: [
                                {
                                    compliancePlan: {
                                        forceStoreOnHipaaEnabled: false,
                                    },
                                    name: "name",
                                    schema: {
                                        type: "string",
                                    },
                                },
                            ],
                        },
                        startSpeakingPlan: {
                            waitSeconds: 0.4,
                            smartEndpointingPlan: {
                                provider: "vapi",
                            },
                            transcriptionEndpointingPlan: {
                                onPunctuationSeconds: 0.1,
                                onNoPunctuationSeconds: 1.5,
                                onNumberSeconds: 0.5,
                            },
                        },
                        stopSpeakingPlan: {
                            numWords: 0,
                            voiceSeconds: 0.2,
                            backoffSeconds: 1,
                            acknowledgementPhrases: [
                                "i understand",
                                "i see",
                                "i got it",
                                "i hear you",
                                "im listening",
                                "im with you",
                                "right",
                                "okay",
                                "ok",
                                "sure",
                                "alright",
                                "got it",
                                "understood",
                                "yeah",
                                "yes",
                                "uh-huh",
                                "mm-hmm",
                                "gotcha",
                                "mhmm",
                                "ah",
                                "yeah okay",
                                "yeah sure",
                            ],
                            interruptionPhrases: [
                                "stop",
                                "shut",
                                "up",
                                "enough",
                                "quiet",
                                "silence",
                                "but",
                                "dont",
                                "not",
                                "no",
                                "hold",
                                "wait",
                                "cut",
                                "pause",
                                "nope",
                                "nah",
                                "nevermind",
                                "never",
                                "bad",
                                "actually",
                            ],
                        },
                        monitorPlan: {
                            listenEnabled: false,
                            listenAuthenticationEnabled: false,
                            controlEnabled: false,
                            controlAuthenticationEnabled: false,
                            monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                        },
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                },
                squadOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                workflowId: "workflowId",
                workflow: {
                    nodes: [
                        {
                            type: "conversation",
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            tools: [
                                {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            ],
                            name: "name",
                        },
                    ],
                    model: {
                        provider: "openai",
                        model: "gpt-5.4",
                    },
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    voicemailDetection: "off",
                    maxDurationSeconds: 600,
                    name: "name",
                    edges: [
                        {
                            from: "from",
                            to: "to",
                        },
                    ],
                    globalPrompt: "globalPrompt",
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    credentialIds: ["credentialIds"],
                    voicemailMessage: "voicemailMessage",
                },
                workflowOverrides: {
                    variableValues: {
                        key: "value",
                    },
                },
                phoneNumberId: "phoneNumberId",
                phoneNumber: {
                    fallbackDestination: {
                        type: "number",
                        number: "number",
                    },
                    hooks: [
                        {
                            on: "call.ringing",
                            do: [
                                {
                                    type: "transfer",
                                },
                            ],
                        },
                    ],
                    smsEnabled: true,
                    twilioPhoneNumber: "twilioPhoneNumber",
                    twilioAccountSid: "twilioAccountSid",
                    twilioAuthToken: "twilioAuthToken",
                    twilioApiKey: "twilioApiKey",
                    twilioApiSecret: "twilioApiSecret",
                    name: "name",
                    assistantId: "assistantId",
                    workflowId: "workflowId",
                    squadId: "squadId",
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                customerId: "customerId",
                customer: {
                    numberE164CheckEnabled: true,
                    extension: "extension",
                    assistantOverrides: {
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        model: {
                            provider: "anthropic",
                            tools: [
                                {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            ],
                            knowledgeBase: {
                                provider: "custom-knowledge-base",
                                server: {
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    staticIpAddressesEnabled: false,
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                },
                            },
                            model: "claude-3-opus-20240229",
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        firstMessage: "Hello! How can I help you today?",
                        clientMessages: [
                            "conversation-update",
                            "function-call",
                            "hang",
                            "model-output",
                            "speech-update",
                            "status-update",
                            "transfer-update",
                            "transcript",
                            "tool-calls",
                            "user-interrupted",
                            "voice-input",
                            "workflow.node.started",
                            "assistant.started",
                        ],
                        serverMessages: [
                            "conversation-update",
                            "end-of-call-report",
                            "function-call",
                            "hang",
                            "speech-update",
                            "status-update",
                            "tool-calls",
                            "transfer-destination-request",
                            "handoff-destination-request",
                            "user-interrupted",
                            "assistant.started",
                        ],
                        maxDurationSeconds: 600,
                        backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                        modelOutputInMessagesEnabled: false,
                        transportConfigurations: [
                            {
                                provider: "twilio",
                                timeout: 60,
                                record: false,
                            },
                        ],
                        credentials: [
                            {
                                provider: "11labs",
                                apiKey: "apiKey",
                            },
                        ],
                        hooks: [
                            {
                                on: "call.ending",
                                do: [
                                    {
                                        type: "tool",
                                        tool: {
                                            type: "apiRequest",
                                            messages: [
                                                {
                                                    type: "request-start",
                                                    blocking: false,
                                                },
                                            ],
                                            method: "POST",
                                            timeoutSeconds: 20,
                                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                            url: "url",
                                            backoffPlan: {
                                                type: {
                                                    key: "value",
                                                },
                                                maxRetries: 0,
                                                baseDelaySeconds: 1,
                                                excludedStatusCodes: [
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                    {
                                                        key: "value",
                                                    },
                                                ],
                                            },
                                            rejectionPlan: {
                                                conditions: [
                                                    {
                                                        type: "regex",
                                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                        target: {
                                                            position: -1,
                                                        },
                                                    },
                                                ],
                                            },
                                        },
                                    },
                                ],
                            },
                        ],
                        "tools:append": [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        compliancePlan: {
                            recordingConsentPlan: {
                                type: "stay-on-line",
                                message:
                                    "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                voice: {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                    fallbackPlan: {
                                        voices: [
                                            {
                                                provider: "azure",
                                                cachingEnabled: true,
                                                voiceId: "andrew",
                                                chunkPlan: {
                                                    enabled: true,
                                                    minCharacters: 30,
                                                    punctuationBoundaries: [
                                                        "\u3002",
                                                        "\uFF0C",
                                                        ".",
                                                        "!",
                                                        "?",
                                                        ";",
                                                        "\u060C",
                                                        "\u06D4",
                                                        "\u0964",
                                                        "\u0965",
                                                        "|",
                                                        "||",
                                                        ",",
                                                        ":",
                                                    ],
                                                    formatPlan: {
                                                        enabled: true,
                                                        numberToDigitsCutoff: 2025,
                                                    },
                                                },
                                            },
                                        ],
                                    },
                                },
                                waitSeconds: 3,
                            },
                        },
                        backgroundSpeechDenoisingPlan: {
                            fourierDenoisingPlan: {
                                mediaDetectionEnabled: true,
                                staticThreshold: -35,
                                baselineOffsetDb: -15,
                                windowSizeMs: 3000,
                                baselinePercentile: 85,
                            },
                        },
                        artifactPlan: {
                            recordingEnabled: true,
                            recordingUseCustomStorageEnabled: true,
                            videoRecordingEnabled: false,
                            fullMessageHistoryEnabled: false,
                            pcapEnabled: true,
                            pcapS3PathPrefix: "/pcaps",
                            pcapUseCustomStorageEnabled: true,
                            loggingEnabled: true,
                            loggingUseCustomStorageEnabled: true,
                            transcriptPlan: {
                                enabled: true,
                            },
                            structuredOutputs: [
                                {
                                    compliancePlan: {
                                        forceStoreOnHipaaEnabled: false,
                                    },
                                    name: "name",
                                    schema: {
                                        type: "string",
                                    },
                                },
                            ],
                        },
                        startSpeakingPlan: {
                            waitSeconds: 0.4,
                            smartEndpointingPlan: {
                                provider: "vapi",
                            },
                            transcriptionEndpointingPlan: {
                                onPunctuationSeconds: 0.1,
                                onNoPunctuationSeconds: 1.5,
                                onNumberSeconds: 0.5,
                            },
                        },
                        stopSpeakingPlan: {
                            numWords: 0,
                            voiceSeconds: 0.2,
                            backoffSeconds: 1,
                            acknowledgementPhrases: [
                                "i understand",
                                "i see",
                                "i got it",
                                "i hear you",
                                "im listening",
                                "im with you",
                                "right",
                                "okay",
                                "ok",
                                "sure",
                                "alright",
                                "got it",
                                "understood",
                                "yeah",
                                "yes",
                                "uh-huh",
                                "mm-hmm",
                                "gotcha",
                                "mhmm",
                                "ah",
                                "yeah okay",
                                "yeah sure",
                            ],
                            interruptionPhrases: [
                                "stop",
                                "shut",
                                "up",
                                "enough",
                                "quiet",
                                "silence",
                                "but",
                                "dont",
                                "not",
                                "no",
                                "hold",
                                "wait",
                                "cut",
                                "pause",
                                "nope",
                                "nah",
                                "nevermind",
                                "never",
                                "bad",
                                "actually",
                            ],
                        },
                        monitorPlan: {
                            listenEnabled: false,
                            listenAuthenticationEnabled: false,
                            controlEnabled: false,
                            controlAuthenticationEnabled: false,
                            monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                        },
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    number: "number",
                    sipUri: "sipUri",
                    name: "name",
                    email: "email",
                    externalId: "externalId",
                },
                name: "name",
                schedulePlan: {
                    earliestAt: "2024-01-15T09:30:00Z",
                    latestAt: "2024-01-15T09:30:00Z",
                },
                transport: {
                    key: "value",
                },
                subscriptionLimits: {
                    concurrencyBlocked: true,
                    concurrencyLimit: 1.1,
                    remainingConcurrentCalls: 1.1,
                },
            },
        ]);
    });

    test("create", async () => {
        const server = mockServerPool.createServer();
        const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl });
        const rawRequestBody = {};
        const rawResponseBody = {
            type: "inboundPhoneCall",
            costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: { key: "value" },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: { key: "value" },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: { message: "message" },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    { compliancePlan: { forceStoreOnHipaaEnabled: false }, name: "name", schema: { type: "string" } },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: { key: "value" },
                structuredDataMulti: [{ key: "value" }],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [{ monitorId: "monitorId", filterPassed: true }],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }],
                messagesOpenAIFormatted: [{ content: null, role: "assistant" }],
                recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [{ assistantName: "assistantName" }],
                variableValues: { key: "value" },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: { key: "value" },
                scorecards: { key: "value" },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [{ type: "assistant", assistantName: "assistantName" }],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: { provider: "openai", model: "gpt-5.4", temperature: 1.1, maxTokens: 1.1 },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [{ from: "from", to: "to" }],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: { variableValues: { key: "value" } },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: { mode: "blind-transfer" },
                    description: "description",
                },
                hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
            transport: { key: "value" },
            subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
        };

        server
            .mockEndpoint()
            .post("/call")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const response = await client.calls.create();
        expect(response).toEqual({
            type: "inboundPhoneCall",
            costs: [
                {
                    type: "transport",
                    provider: "daily",
                    minutes: 1.1,
                    cost: 1.1,
                },
            ],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: {
                        key: "value",
                    },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: {
                        key: "value",
                    },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: {
                        type: "lastNMessages",
                        maxMessages: 1.1,
                    },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: {
                        message: "message",
                    },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: {
                    enabled: true,
                    assistantName: "assistantName",
                    userName: "userName",
                },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    {
                        compliancePlan: {
                            forceStoreOnHipaaEnabled: false,
                        },
                        name: "name",
                        schema: {
                            type: "string",
                        },
                    },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    {
                        metrics: [
                            {
                                structuredOutputId: "structuredOutputId",
                                conditions: [
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        ],
                    },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: {
                    key: "value",
                },
                structuredDataMulti: [
                    {
                        key: "value",
                    },
                ],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [
                    {
                        monitorId: "monitorId",
                        filterPassed: true,
                    },
                ],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [
                    {
                        role: "role",
                        message: "message",
                        time: 1.1,
                        endTime: 1.1,
                        secondsFromStart: 1.1,
                    },
                ],
                messagesOpenAIFormatted: [
                    {
                        content: null,
                        role: "assistant",
                    },
                ],
                recording: {
                    stereoUrl: "stereoUrl",
                    videoUrl: "videoUrl",
                    videoRecordingStartDelaySeconds: 1.1,
                },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [
                    {
                        assistantName: "assistantName",
                    },
                ],
                variableValues: {
                    key: "value",
                },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: {
                    key: "value",
                },
                scorecards: {
                    key: "value",
                },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: {
                recordingConsent: {
                    type: {
                        key: "value",
                    },
                    grantedAt: "2024-01-15T09:30:00Z",
                },
            },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [
                            {
                                type: "assistant",
                                assistantName: "assistantName",
                            },
                        ],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: {
                    provider: "openai",
                    model: "gpt-5.4",
                    temperature: 1.1,
                    maxTokens: 1.1,
                },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [
                    {
                        from: "from",
                        to: "to",
                    },
                ],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: {
                variableValues: {
                    key: "value",
                },
            },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: {
                        mode: "blind-transfer",
                    },
                    description: "description",
                },
                hooks: [
                    {
                        on: "call.ringing",
                        do: [
                            {
                                type: "transfer",
                            },
                        ],
                    },
                ],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: {
                earliestAt: "2024-01-15T09:30:00Z",
                latestAt: "2024-01-15T09:30:00Z",
            },
            transport: {
                key: "value",
            },
            subscriptionLimits: {
                concurrencyBlocked: true,
                concurrencyLimit: 1.1,
                remainingConcurrentCalls: 1.1,
            },
        });
    });

    test("get", async () => {
        const server = mockServerPool.createServer();
        const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl });

        const rawResponseBody = {
            type: "inboundPhoneCall",
            costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: { key: "value" },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: { key: "value" },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: { message: "message" },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    { compliancePlan: { forceStoreOnHipaaEnabled: false }, name: "name", schema: { type: "string" } },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: { key: "value" },
                structuredDataMulti: [{ key: "value" }],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [{ monitorId: "monitorId", filterPassed: true }],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }],
                messagesOpenAIFormatted: [{ content: null, role: "assistant" }],
                recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [{ assistantName: "assistantName" }],
                variableValues: { key: "value" },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: { key: "value" },
                scorecards: { key: "value" },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [{ type: "assistant", assistantName: "assistantName" }],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: { provider: "openai", model: "gpt-5.4", temperature: 1.1, maxTokens: 1.1 },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [{ from: "from", to: "to" }],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: { variableValues: { key: "value" } },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: { mode: "blind-transfer" },
                    description: "description",
                },
                hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
            transport: { key: "value" },
            subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
        };

        server.mockEndpoint().get("/call/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build();

        const response = await client.calls.get({
            id: "id",
        });
        expect(response).toEqual({
            type: "inboundPhoneCall",
            costs: [
                {
                    type: "transport",
                    provider: "daily",
                    minutes: 1.1,
                    cost: 1.1,
                },
            ],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: {
                        key: "value",
                    },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: {
                        key: "value",
                    },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: {
                        type: "lastNMessages",
                        maxMessages: 1.1,
                    },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: {
                        message: "message",
                    },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: {
                    enabled: true,
                    assistantName: "assistantName",
                    userName: "userName",
                },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    {
                        compliancePlan: {
                            forceStoreOnHipaaEnabled: false,
                        },
                        name: "name",
                        schema: {
                            type: "string",
                        },
                    },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    {
                        metrics: [
                            {
                                structuredOutputId: "structuredOutputId",
                                conditions: [
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        ],
                    },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: {
                    key: "value",
                },
                structuredDataMulti: [
                    {
                        key: "value",
                    },
                ],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [
                    {
                        monitorId: "monitorId",
                        filterPassed: true,
                    },
                ],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [
                    {
                        role: "role",
                        message: "message",
                        time: 1.1,
                        endTime: 1.1,
                        secondsFromStart: 1.1,
                    },
                ],
                messagesOpenAIFormatted: [
                    {
                        content: null,
                        role: "assistant",
                    },
                ],
                recording: {
                    stereoUrl: "stereoUrl",
                    videoUrl: "videoUrl",
                    videoRecordingStartDelaySeconds: 1.1,
                },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [
                    {
                        assistantName: "assistantName",
                    },
                ],
                variableValues: {
                    key: "value",
                },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: {
                    key: "value",
                },
                scorecards: {
                    key: "value",
                },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: {
                recordingConsent: {
                    type: {
                        key: "value",
                    },
                    grantedAt: "2024-01-15T09:30:00Z",
                },
            },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [
                            {
                                type: "assistant",
                                assistantName: "assistantName",
                            },
                        ],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: {
                    provider: "openai",
                    model: "gpt-5.4",
                    temperature: 1.1,
                    maxTokens: 1.1,
                },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [
                    {
                        from: "from",
                        to: "to",
                    },
                ],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: {
                variableValues: {
                    key: "value",
                },
            },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: {
                        mode: "blind-transfer",
                    },
                    description: "description",
                },
                hooks: [
                    {
                        on: "call.ringing",
                        do: [
                            {
                                type: "transfer",
                            },
                        ],
                    },
                ],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: {
                earliestAt: "2024-01-15T09:30:00Z",
                latestAt: "2024-01-15T09:30:00Z",
            },
            transport: {
                key: "value",
            },
            subscriptionLimits: {
                concurrencyBlocked: true,
                concurrencyLimit: 1.1,
                remainingConcurrentCalls: 1.1,
            },
        });
    });

    test("delete", async () => {
        const server = mockServerPool.createServer();
        const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl });
        const rawRequestBody = {};
        const rawResponseBody = {
            type: "inboundPhoneCall",
            costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: { key: "value" },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: { key: "value" },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: { message: "message" },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    { compliancePlan: { forceStoreOnHipaaEnabled: false }, name: "name", schema: { type: "string" } },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: { key: "value" },
                structuredDataMulti: [{ key: "value" }],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [{ monitorId: "monitorId", filterPassed: true }],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }],
                messagesOpenAIFormatted: [{ content: null, role: "assistant" }],
                recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [{ assistantName: "assistantName" }],
                variableValues: { key: "value" },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: { key: "value" },
                scorecards: { key: "value" },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [{ type: "assistant", assistantName: "assistantName" }],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: { provider: "openai", model: "gpt-5.4", temperature: 1.1, maxTokens: 1.1 },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [{ from: "from", to: "to" }],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: { variableValues: { key: "value" } },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: { mode: "blind-transfer" },
                    description: "description",
                },
                hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
            transport: { key: "value" },
            subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
        };

        server
            .mockEndpoint()
            .delete("/call/id")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const response = await client.calls.delete({
            id: "id",
        });
        expect(response).toEqual({
            type: "inboundPhoneCall",
            costs: [
                {
                    type: "transport",
                    provider: "daily",
                    minutes: 1.1,
                    cost: 1.1,
                },
            ],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: {
                        key: "value",
                    },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: {
                        key: "value",
                    },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: {
                        type: "lastNMessages",
                        maxMessages: 1.1,
                    },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: {
                        message: "message",
                    },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: {
                    enabled: true,
                    assistantName: "assistantName",
                    userName: "userName",
                },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    {
                        compliancePlan: {
                            forceStoreOnHipaaEnabled: false,
                        },
                        name: "name",
                        schema: {
                            type: "string",
                        },
                    },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    {
                        metrics: [
                            {
                                structuredOutputId: "structuredOutputId",
                                conditions: [
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        ],
                    },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: {
                    key: "value",
                },
                structuredDataMulti: [
                    {
                        key: "value",
                    },
                ],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [
                    {
                        monitorId: "monitorId",
                        filterPassed: true,
                    },
                ],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [
                    {
                        role: "role",
                        message: "message",
                        time: 1.1,
                        endTime: 1.1,
                        secondsFromStart: 1.1,
                    },
                ],
                messagesOpenAIFormatted: [
                    {
                        content: null,
                        role: "assistant",
                    },
                ],
                recording: {
                    stereoUrl: "stereoUrl",
                    videoUrl: "videoUrl",
                    videoRecordingStartDelaySeconds: 1.1,
                },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [
                    {
                        assistantName: "assistantName",
                    },
                ],
                variableValues: {
                    key: "value",
                },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: {
                    key: "value",
                },
                scorecards: {
                    key: "value",
                },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: {
                recordingConsent: {
                    type: {
                        key: "value",
                    },
                    grantedAt: "2024-01-15T09:30:00Z",
                },
            },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [
                            {
                                type: "assistant",
                                assistantName: "assistantName",
                            },
                        ],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: {
                    provider: "openai",
                    model: "gpt-5.4",
                    temperature: 1.1,
                    maxTokens: 1.1,
                },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [
                    {
                        from: "from",
                        to: "to",
                    },
                ],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: {
                variableValues: {
                    key: "value",
                },
            },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: {
                        mode: "blind-transfer",
                    },
                    description: "description",
                },
                hooks: [
                    {
                        on: "call.ringing",
                        do: [
                            {
                                type: "transfer",
                            },
                        ],
                    },
                ],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: {
                earliestAt: "2024-01-15T09:30:00Z",
                latestAt: "2024-01-15T09:30:00Z",
            },
            transport: {
                key: "value",
            },
            subscriptionLimits: {
                concurrencyBlocked: true,
                concurrencyLimit: 1.1,
                remainingConcurrentCalls: 1.1,
            },
        });
    });

    test("update", async () => {
        const server = mockServerPool.createServer();
        const client = new VapiClient({ maxRetries: 0, token: "test", environment: server.baseUrl });
        const rawRequestBody = {};
        const rawResponseBody = {
            type: "inboundPhoneCall",
            costs: [{ type: "transport", provider: "daily", minutes: 1.1, cost: 1.1 }],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: { key: "value" },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: { key: "value" },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: { type: "lastNMessages", maxMessages: 1.1 },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: { message: "message" },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: { enabled: true, assistantName: "assistantName", userName: "userName" },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    { compliancePlan: { forceStoreOnHipaaEnabled: false }, name: "name", schema: { type: "string" } },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: { key: "value" },
                structuredDataMulti: [{ key: "value" }],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [{ monitorId: "monitorId", filterPassed: true }],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [{ role: "role", message: "message", time: 1.1, endTime: 1.1, secondsFromStart: 1.1 }],
                messagesOpenAIFormatted: [{ content: null, role: "assistant" }],
                recording: { stereoUrl: "stereoUrl", videoUrl: "videoUrl", videoRecordingStartDelaySeconds: 1.1 },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [{ assistantName: "assistantName" }],
                variableValues: { key: "value" },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: { key: "value" },
                scorecards: { key: "value" },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: { recordingConsent: { type: { key: "value" }, grantedAt: "2024-01-15T09:30:00Z" } },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [{ type: "assistant", assistantName: "assistantName" }],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                            credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [{ type: "request-start", blocking: false }],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: { key: "value" },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                        { key: "value" },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: { position: -1 },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "。",
                                                            "，",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "،",
                                                            "۔",
                                                            "।",
                                                            "॥",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: { enabled: true },
                                structuredOutputs: [
                                    {
                                        compliancePlan: { forceStoreOnHipaaEnabled: false },
                                        name: "name",
                                        schema: { type: "string" },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: { provider: "vapi" },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [{ content: null, role: "assistant" }],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: { type: "enabled", budgetTokens: 1.1 },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [{ type: "request-start", blocking: false }],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: { position: -1 },
                                },
                            ],
                        },
                    },
                ],
                variableValues: { key: "value" },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: { key: "value" },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: { provider: "openai", model: "gpt-5.4", temperature: 1.1, maxTokens: 1.1 },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "。",
                            "，",
                            ".",
                            "!",
                            "?",
                            ";",
                            "،",
                            "۔",
                            "।",
                            "॥",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: { key: "value" },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [{ type: "request-start", blocking: false }],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: { key: "value" },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                            { key: "value" },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: { position: -1 },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [{ from: "from", to: "to" }],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "。",
                                    "，",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "،",
                                    "۔",
                                    "।",
                                    "॥",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "。",
                                                "，",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "،",
                                                "۔",
                                                "।",
                                                "॥",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: { enabled: true },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: { forceStoreOnHipaaEnabled: false },
                            name: "name",
                            schema: { type: "string" },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        { metrics: [{ structuredOutputId: "structuredOutputId", conditions: [{ key: "value" }] }] },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: { provider: "vapi" },
                    customEndpointingRules: [{ type: "assistant", regex: "regex", timeoutSeconds: 1.1 }],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: { enabled: true, timeoutSeconds: 1.1, delimiters: "#" },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: { variableValues: { key: "value" } },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: { mode: "blind-transfer" },
                    description: "description",
                },
                hooks: [{ on: "call.ringing", do: [{ type: "transfer" }] }],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: { key: "value" },
                    backoffPlan: {
                        type: { key: "value" },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [{ key: "value" }, { key: "value" }, { key: "value" }, { key: "value" }],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [{ type: "request-start", blocking: false }],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: { position: -1 },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: { key: "value" },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                        { key: "value" },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "。",
                                "，",
                                ".",
                                "!",
                                "?",
                                ";",
                                "،",
                                "۔",
                                "।",
                                "॥",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "。",
                                            "，",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "،",
                                            "۔",
                                            "।",
                                            "॥",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [{ provider: "twilio", timeout: 60, record: false }],
                    observabilityPlan: { provider: "langfuse", tags: ["tags"] },
                    credentials: [{ provider: "11labs", apiKey: "apiKey" }],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [{ type: "request-start", blocking: false }],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: { key: "value" },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                                { key: "value" },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: { position: -1 },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [{ type: "request-start", blocking: false }],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: { key: "value" },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                    { key: "value" },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: { position: -1 },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: { key: "value" },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "。",
                                        "，",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "،",
                                        "۔",
                                        "।",
                                        "॥",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "。",
                                                    "，",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "،",
                                                    "۔",
                                                    "।",
                                                    "॥",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: { enabled: true, numberToDigitsCutoff: 2025 },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: { key: "value" },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: { enabled: true },
                        structuredOutputs: [
                            {
                                compliancePlan: { forceStoreOnHipaaEnabled: false },
                                name: "name",
                                schema: { type: "string" },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: { provider: "vapi" },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: { key: "value" },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                                { key: "value" },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: { earliestAt: "2024-01-15T09:30:00Z", latestAt: "2024-01-15T09:30:00Z" },
            transport: { key: "value" },
            subscriptionLimits: { concurrencyBlocked: true, concurrencyLimit: 1.1, remainingConcurrentCalls: 1.1 },
        };

        server
            .mockEndpoint()
            .patch("/call/id")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const response = await client.calls.update({
            id: "id",
        });
        expect(response).toEqual({
            type: "inboundPhoneCall",
            costs: [
                {
                    type: "transport",
                    provider: "daily",
                    minutes: 1.1,
                    cost: 1.1,
                },
            ],
            messages: [
                {
                    role: "role",
                    message: "message",
                    time: 1.1,
                    endTime: 1.1,
                    secondsFromStart: 1.1,
                    duration: 1.1,
                    isFiltered: true,
                    detectedThreats: ["detectedThreats"],
                    originalMessage: "originalMessage",
                    metadata: {
                        key: "value",
                    },
                    speakerLabel: "speakerLabel",
                },
            ],
            phoneCallTransport: "sip",
            status: "scheduled",
            endedReason: "call-start-error-neither-assistant-nor-server-set",
            endedMessage: "endedMessage",
            destination: {
                type: "number",
                message: "message",
                numberE164CheckEnabled: true,
                number: "number",
                extension: "extension",
                callerId: "callerId",
                transferPlan: {
                    mode: "blind-transfer",
                    message: "message",
                    timeout: 1.1,
                    sipVerb: {
                        key: "value",
                    },
                    dialTimeout: 1.1,
                    holdAudioUrl: "holdAudioUrl",
                    transferCompleteAudioUrl: "transferCompleteAudioUrl",
                    contextEngineeringPlan: {
                        type: "lastNMessages",
                        maxMessages: 1.1,
                    },
                    twiml: "twiml",
                    sipHeadersInReferToEnabled: true,
                    fallbackPlan: {
                        message: "message",
                    },
                },
                description: "description",
            },
            id: "id",
            orgId: "orgId",
            createdAt: "2024-01-15T09:30:00Z",
            updatedAt: "2024-01-15T09:30:00Z",
            startedAt: "2024-01-15T09:30:00Z",
            endedAt: "2024-01-15T09:30:00Z",
            cost: 1.1,
            costBreakdown: {
                transport: 1.1,
                stt: 1.1,
                llm: 1.1,
                tts: 1.1,
                vapi: 1.1,
                chat: 1.1,
                total: 1.1,
                llmPromptTokens: 1.1,
                llmCompletionTokens: 1.1,
                llmCachedPromptTokens: 1.1,
                ttsCharacters: 1.1,
                analysisCostBreakdown: {
                    summary: 1.1,
                    summaryPromptTokens: 1.1,
                    summaryCompletionTokens: 1.1,
                    summaryCachedPromptTokens: 1.1,
                    structuredData: 1.1,
                    structuredDataPromptTokens: 1.1,
                    structuredDataCompletionTokens: 1.1,
                    structuredDataCachedPromptTokens: 1.1,
                    successEvaluation: 1.1,
                    successEvaluationPromptTokens: 1.1,
                    successEvaluationCompletionTokens: 1.1,
                    successEvaluationCachedPromptTokens: 1.1,
                    structuredOutput: 1.1,
                    structuredOutputPromptTokens: 1.1,
                    structuredOutputCompletionTokens: 1.1,
                    structuredOutputCachedPromptTokens: 1.1,
                },
            },
            artifactPlan: {
                recordingEnabled: true,
                recordingFormat: "wav;l16",
                recordingUseCustomStorageEnabled: true,
                videoRecordingEnabled: false,
                fullMessageHistoryEnabled: false,
                pcapEnabled: true,
                pcapS3PathPrefix: "/pcaps",
                pcapUseCustomStorageEnabled: true,
                loggingEnabled: true,
                loggingUseCustomStorageEnabled: true,
                transcriptPlan: {
                    enabled: true,
                    assistantName: "assistantName",
                    userName: "userName",
                },
                recordingPath: "recordingPath",
                structuredOutputIds: ["structuredOutputIds"],
                structuredOutputs: [
                    {
                        compliancePlan: {
                            forceStoreOnHipaaEnabled: false,
                        },
                        name: "name",
                        schema: {
                            type: "string",
                        },
                    },
                ],
                scorecardIds: ["scorecardIds"],
                scorecards: [
                    {
                        metrics: [
                            {
                                structuredOutputId: "structuredOutputId",
                                conditions: [
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        ],
                    },
                ],
                loggingPath: "loggingPath",
            },
            analysis: {
                summary: "summary",
                structuredData: {
                    key: "value",
                },
                structuredDataMulti: [
                    {
                        key: "value",
                    },
                ],
                successEvaluation: "successEvaluation",
            },
            monitor: {
                monitors: [
                    {
                        monitorId: "monitorId",
                        filterPassed: true,
                    },
                ],
                listenUrl: "listenUrl",
                controlUrl: "controlUrl",
            },
            artifact: {
                messages: [
                    {
                        role: "role",
                        message: "message",
                        time: 1.1,
                        endTime: 1.1,
                        secondsFromStart: 1.1,
                    },
                ],
                messagesOpenAIFormatted: [
                    {
                        content: null,
                        role: "assistant",
                    },
                ],
                recording: {
                    stereoUrl: "stereoUrl",
                    videoUrl: "videoUrl",
                    videoRecordingStartDelaySeconds: 1.1,
                },
                transcript: "transcript",
                pcapUrl: "pcapUrl",
                logUrl: "logUrl",
                nodes: [{}],
                assistantActivations: [
                    {
                        assistantName: "assistantName",
                    },
                ],
                variableValues: {
                    key: "value",
                },
                performanceMetrics: {
                    turnLatencies: [{}],
                    modelLatencyAverage: 1.1,
                    voiceLatencyAverage: 1.1,
                    transcriberLatencyAverage: 1.1,
                    endpointingLatencyAverage: 1.1,
                    turnLatencyAverage: 1.1,
                    fromTransportLatencyAverage: 1.1,
                    toTransportLatencyAverage: 1.1,
                    numUserInterrupted: 1.1,
                    numAssistantInterrupted: 1.1,
                },
                structuredOutputs: {
                    key: "value",
                },
                scorecards: {
                    key: "value",
                },
                transfers: ["transfers"],
                structuredOutputsLastUpdatedAt: "2024-01-15T09:30:00Z",
            },
            compliance: {
                recordingConsent: {
                    type: {
                        key: "value",
                    },
                    grantedAt: "2024-01-15T09:30:00Z",
                },
            },
            campaignId: "campaignId",
            assistantId: "assistantId",
            assistant: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            assistantOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            squadId: "squadId",
            squad: {
                name: "name",
                members: [
                    {
                        assistantDestinations: [
                            {
                                type: "assistant",
                                assistantName: "assistantName",
                            },
                        ],
                        assistant: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        assistantOverrides: {
                            transcriber: {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                                fallbackPlan: {
                                    transcribers: [
                                        {
                                            provider: "assembly-ai",
                                            confidenceThreshold: 0.4,
                                            formatTurns: true,
                                            endOfTurnConfidenceThreshold: 0.7,
                                            minEndOfTurnSilenceWhenConfident: 160,
                                            maxTurnSilence: 400,
                                            vadAssistedEndpointingEnabled: true,
                                        },
                                    ],
                                },
                            },
                            model: {
                                provider: "anthropic",
                                tools: [
                                    {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                ],
                                knowledgeBase: {
                                    provider: "custom-knowledge-base",
                                    server: {
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        staticIpAddressesEnabled: false,
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                    },
                                },
                                model: "claude-3-opus-20240229",
                            },
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            firstMessage: "Hello! How can I help you today?",
                            clientMessages: [
                                "conversation-update",
                                "function-call",
                                "hang",
                                "model-output",
                                "speech-update",
                                "status-update",
                                "transfer-update",
                                "transcript",
                                "tool-calls",
                                "user-interrupted",
                                "voice-input",
                                "workflow.node.started",
                                "assistant.started",
                            ],
                            serverMessages: [
                                "conversation-update",
                                "end-of-call-report",
                                "function-call",
                                "hang",
                                "speech-update",
                                "status-update",
                                "tool-calls",
                                "transfer-destination-request",
                                "handoff-destination-request",
                                "user-interrupted",
                                "assistant.started",
                            ],
                            maxDurationSeconds: 600,
                            backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                            modelOutputInMessagesEnabled: false,
                            transportConfigurations: [
                                {
                                    provider: "twilio",
                                    timeout: 60,
                                    record: false,
                                },
                            ],
                            credentials: [
                                {
                                    provider: "11labs",
                                    apiKey: "apiKey",
                                },
                            ],
                            hooks: [
                                {
                                    on: "call.ending",
                                    do: [
                                        {
                                            type: "tool",
                                            tool: {
                                                type: "apiRequest",
                                                messages: [
                                                    {
                                                        type: "request-start",
                                                        blocking: false,
                                                    },
                                                ],
                                                method: "POST",
                                                timeoutSeconds: 20,
                                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                                url: "url",
                                                backoffPlan: {
                                                    type: {
                                                        key: "value",
                                                    },
                                                    maxRetries: 0,
                                                    baseDelaySeconds: 1,
                                                    excludedStatusCodes: [
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                        {
                                                            key: "value",
                                                        },
                                                    ],
                                                },
                                                rejectionPlan: {
                                                    conditions: [
                                                        {
                                                            type: "regex",
                                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                            target: {
                                                                position: -1,
                                                            },
                                                        },
                                                    ],
                                                },
                                            },
                                        },
                                    ],
                                },
                            ],
                            "tools:append": [
                                {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            ],
                            compliancePlan: {
                                recordingConsentPlan: {
                                    type: "stay-on-line",
                                    message:
                                        "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                                    voice: {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                        fallbackPlan: {
                                            voices: [
                                                {
                                                    provider: "azure",
                                                    cachingEnabled: true,
                                                    voiceId: "andrew",
                                                    chunkPlan: {
                                                        enabled: true,
                                                        minCharacters: 30,
                                                        punctuationBoundaries: [
                                                            "\u3002",
                                                            "\uFF0C",
                                                            ".",
                                                            "!",
                                                            "?",
                                                            ";",
                                                            "\u060C",
                                                            "\u06D4",
                                                            "\u0964",
                                                            "\u0965",
                                                            "|",
                                                            "||",
                                                            ",",
                                                            ":",
                                                        ],
                                                        formatPlan: {
                                                            enabled: true,
                                                            numberToDigitsCutoff: 2025,
                                                        },
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                    waitSeconds: 3,
                                },
                            },
                            backgroundSpeechDenoisingPlan: {
                                fourierDenoisingPlan: {
                                    mediaDetectionEnabled: true,
                                    staticThreshold: -35,
                                    baselineOffsetDb: -15,
                                    windowSizeMs: 3000,
                                    baselinePercentile: 85,
                                },
                            },
                            artifactPlan: {
                                recordingEnabled: true,
                                recordingUseCustomStorageEnabled: true,
                                videoRecordingEnabled: false,
                                fullMessageHistoryEnabled: false,
                                pcapEnabled: true,
                                pcapS3PathPrefix: "/pcaps",
                                pcapUseCustomStorageEnabled: true,
                                loggingEnabled: true,
                                loggingUseCustomStorageEnabled: true,
                                transcriptPlan: {
                                    enabled: true,
                                },
                                structuredOutputs: [
                                    {
                                        compliancePlan: {
                                            forceStoreOnHipaaEnabled: false,
                                        },
                                        name: "name",
                                        schema: {
                                            type: "string",
                                        },
                                    },
                                ],
                            },
                            startSpeakingPlan: {
                                waitSeconds: 0.4,
                                smartEndpointingPlan: {
                                    provider: "vapi",
                                },
                                transcriptionEndpointingPlan: {
                                    onPunctuationSeconds: 0.1,
                                    onNoPunctuationSeconds: 1.5,
                                    onNumberSeconds: 0.5,
                                },
                            },
                            stopSpeakingPlan: {
                                numWords: 0,
                                voiceSeconds: 0.2,
                                backoffSeconds: 1,
                                acknowledgementPhrases: [
                                    "i understand",
                                    "i see",
                                    "i got it",
                                    "i hear you",
                                    "im listening",
                                    "im with you",
                                    "right",
                                    "okay",
                                    "ok",
                                    "sure",
                                    "alright",
                                    "got it",
                                    "understood",
                                    "yeah",
                                    "yes",
                                    "uh-huh",
                                    "mm-hmm",
                                    "gotcha",
                                    "mhmm",
                                    "ah",
                                    "yeah okay",
                                    "yeah sure",
                                ],
                                interruptionPhrases: [
                                    "stop",
                                    "shut",
                                    "up",
                                    "enough",
                                    "quiet",
                                    "silence",
                                    "but",
                                    "dont",
                                    "not",
                                    "no",
                                    "hold",
                                    "wait",
                                    "cut",
                                    "pause",
                                    "nope",
                                    "nah",
                                    "nevermind",
                                    "never",
                                    "bad",
                                    "actually",
                                ],
                            },
                            monitorPlan: {
                                listenEnabled: false,
                                listenAuthenticationEnabled: false,
                                controlEnabled: false,
                                controlAuthenticationEnabled: false,
                                monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                            },
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                    },
                ],
                membersOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
            },
            squadOverrides: {
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                model: {
                    provider: "anthropic",
                    messages: [
                        {
                            content: null,
                            role: "assistant",
                        },
                    ],
                    tools: [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    toolIds: ["toolIds"],
                    knowledgeBase: {
                        provider: "custom-knowledge-base",
                        server: {
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            staticIpAddressesEnabled: false,
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                        },
                    },
                    model: "claude-3-opus-20240229",
                    thinking: {
                        type: "enabled",
                        budgetTokens: 1.1,
                    },
                    temperature: 1.1,
                    maxTokens: 1.1,
                    emotionRecognitionEnabled: true,
                    numFastTurns: 1.1,
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                firstMessage: "Hello! How can I help you today?",
                firstMessageInterruptionsEnabled: true,
                firstMessageMode: "assistant-speaks-first",
                voicemailDetection: "off",
                clientMessages: [
                    "conversation-update",
                    "function-call",
                    "hang",
                    "model-output",
                    "speech-update",
                    "status-update",
                    "transfer-update",
                    "transcript",
                    "tool-calls",
                    "user-interrupted",
                    "voice-input",
                    "workflow.node.started",
                    "assistant.started",
                ],
                serverMessages: [
                    "conversation-update",
                    "end-of-call-report",
                    "function-call",
                    "hang",
                    "speech-update",
                    "status-update",
                    "tool-calls",
                    "transfer-destination-request",
                    "handoff-destination-request",
                    "user-interrupted",
                    "assistant.started",
                ],
                maxDurationSeconds: 600,
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                modelOutputInMessagesEnabled: false,
                transportConfigurations: [
                    {
                        provider: "twilio",
                        timeout: 60,
                        record: false,
                    },
                ],
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                "tools:append": [
                    {
                        type: "apiRequest",
                        messages: [
                            {
                                type: "request-start",
                                blocking: false,
                            },
                        ],
                        method: "POST",
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        url: "url",
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                        rejectionPlan: {
                            conditions: [
                                {
                                    type: "regex",
                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                    target: {
                                        position: -1,
                                    },
                                },
                            ],
                        },
                    },
                ],
                variableValues: {
                    key: "value",
                },
                name: "name",
                voicemailMessage: "voicemailMessage",
                endCallMessage: "endCallMessage",
                endCallPhrases: ["endCallPhrases"],
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                metadata: {
                    key: "value",
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                credentialIds: ["credentialIds"],
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
            },
            workflowId: "workflowId",
            workflow: {
                nodes: [
                    {
                        type: "conversation",
                        transcriber: {
                            provider: "assembly-ai",
                            confidenceThreshold: 0.4,
                            formatTurns: true,
                            endOfTurnConfidenceThreshold: 0.7,
                            minEndOfTurnSilenceWhenConfident: 160,
                            maxTurnSilence: 400,
                            vadAssistedEndpointingEnabled: true,
                            fallbackPlan: {
                                transcribers: [
                                    {
                                        provider: "assembly-ai",
                                        confidenceThreshold: 0.4,
                                        formatTurns: true,
                                        endOfTurnConfidenceThreshold: 0.7,
                                        minEndOfTurnSilenceWhenConfident: 160,
                                        maxTurnSilence: 400,
                                        vadAssistedEndpointingEnabled: true,
                                    },
                                ],
                            },
                        },
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        name: "name",
                    },
                ],
                model: {
                    provider: "openai",
                    model: "gpt-5.4",
                    temperature: 1.1,
                    maxTokens: 1.1,
                },
                transcriber: {
                    provider: "assembly-ai",
                    language: "multi",
                    confidenceThreshold: 0.4,
                    formatTurns: true,
                    endOfTurnConfidenceThreshold: 0.7,
                    minEndOfTurnSilenceWhenConfident: 160,
                    maxTurnSilence: 400,
                    vadAssistedEndpointingEnabled: true,
                    speechModel: "universal-streaming-english",
                    realtimeUrl: "realtimeUrl",
                    wordBoost: ["wordBoost"],
                    keytermsPrompt: ["keytermsPrompt"],
                    endUtteranceSilenceThreshold: 1.1,
                    disablePartialTranscripts: true,
                    fallbackPlan: {
                        transcribers: [
                            {
                                provider: "assembly-ai",
                                confidenceThreshold: 0.4,
                                formatTurns: true,
                                endOfTurnConfidenceThreshold: 0.7,
                                minEndOfTurnSilenceWhenConfident: 160,
                                maxTurnSilence: 400,
                                vadAssistedEndpointingEnabled: true,
                            },
                        ],
                    },
                },
                voice: {
                    provider: "azure",
                    cachingEnabled: true,
                    voiceId: "andrew",
                    chunkPlan: {
                        enabled: true,
                        minCharacters: 30,
                        punctuationBoundaries: [
                            "\u3002",
                            "\uFF0C",
                            ".",
                            "!",
                            "?",
                            ";",
                            "\u060C",
                            "\u06D4",
                            "\u0964",
                            "\u0965",
                            "|",
                            "||",
                            ",",
                            ":",
                        ],
                        formatPlan: {
                            enabled: true,
                            numberToDigitsCutoff: 2025,
                        },
                    },
                    speed: 1.1,
                    fallbackPlan: {
                        voices: [
                            {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                            },
                        ],
                    },
                },
                observabilityPlan: {
                    provider: "langfuse",
                    promptName: "promptName",
                    promptVersion: 1.1,
                    traceName: "traceName",
                    tags: ["tags"],
                    metadata: {
                        key: "value",
                    },
                },
                backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                hooks: [
                    {
                        on: "call.ending",
                        do: [
                            {
                                type: "tool",
                                tool: {
                                    type: "apiRequest",
                                    messages: [
                                        {
                                            type: "request-start",
                                            blocking: false,
                                        },
                                    ],
                                    method: "POST",
                                    timeoutSeconds: 20,
                                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                    url: "url",
                                    backoffPlan: {
                                        type: {
                                            key: "value",
                                        },
                                        maxRetries: 0,
                                        baseDelaySeconds: 1,
                                        excludedStatusCodes: [
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                            {
                                                key: "value",
                                            },
                                        ],
                                    },
                                    rejectionPlan: {
                                        conditions: [
                                            {
                                                type: "regex",
                                                regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                target: {
                                                    position: -1,
                                                },
                                            },
                                        ],
                                    },
                                },
                            },
                        ],
                    },
                ],
                credentials: [
                    {
                        provider: "11labs",
                        apiKey: "apiKey",
                    },
                ],
                voicemailDetection: "off",
                maxDurationSeconds: 600,
                name: "name",
                edges: [
                    {
                        from: "from",
                        to: "to",
                    },
                ],
                globalPrompt: "globalPrompt",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
                compliancePlan: {
                    hipaaEnabled: true,
                    pciEnabled: true,
                    recordingConsentPlan: {
                        type: "stay-on-line",
                        message:
                            "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                        voice: {
                            provider: "azure",
                            cachingEnabled: true,
                            voiceId: "andrew",
                            chunkPlan: {
                                enabled: true,
                                minCharacters: 30,
                                punctuationBoundaries: [
                                    "\u3002",
                                    "\uFF0C",
                                    ".",
                                    "!",
                                    "?",
                                    ";",
                                    "\u060C",
                                    "\u06D4",
                                    "\u0964",
                                    "\u0965",
                                    "|",
                                    "||",
                                    ",",
                                    ":",
                                ],
                                formatPlan: {
                                    enabled: true,
                                    numberToDigitsCutoff: 2025,
                                },
                            },
                            fallbackPlan: {
                                voices: [
                                    {
                                        provider: "azure",
                                        cachingEnabled: true,
                                        voiceId: "andrew",
                                        chunkPlan: {
                                            enabled: true,
                                            minCharacters: 30,
                                            punctuationBoundaries: [
                                                "\u3002",
                                                "\uFF0C",
                                                ".",
                                                "!",
                                                "?",
                                                ";",
                                                "\u060C",
                                                "\u06D4",
                                                "\u0964",
                                                "\u0965",
                                                "|",
                                                "||",
                                                ",",
                                                ":",
                                            ],
                                            formatPlan: {
                                                enabled: true,
                                                numberToDigitsCutoff: 2025,
                                            },
                                        },
                                    },
                                ],
                            },
                        },
                        waitSeconds: 3,
                    },
                },
                artifactPlan: {
                    recordingEnabled: true,
                    recordingFormat: "wav;l16",
                    recordingUseCustomStorageEnabled: true,
                    videoRecordingEnabled: false,
                    fullMessageHistoryEnabled: false,
                    pcapEnabled: true,
                    pcapS3PathPrefix: "/pcaps",
                    pcapUseCustomStorageEnabled: true,
                    loggingEnabled: true,
                    loggingUseCustomStorageEnabled: true,
                    transcriptPlan: {
                        enabled: true,
                    },
                    recordingPath: "recordingPath",
                    structuredOutputIds: ["structuredOutputIds"],
                    structuredOutputs: [
                        {
                            compliancePlan: {
                                forceStoreOnHipaaEnabled: false,
                            },
                            name: "name",
                            schema: {
                                type: "string",
                            },
                        },
                    ],
                    scorecardIds: ["scorecardIds"],
                    scorecards: [
                        {
                            metrics: [
                                {
                                    structuredOutputId: "structuredOutputId",
                                    conditions: [
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            ],
                        },
                    ],
                    loggingPath: "loggingPath",
                },
                startSpeakingPlan: {
                    waitSeconds: 0.4,
                    smartEndpointingPlan: {
                        provider: "vapi",
                    },
                    customEndpointingRules: [
                        {
                            type: "assistant",
                            regex: "regex",
                            timeoutSeconds: 1.1,
                        },
                    ],
                    transcriptionEndpointingPlan: {
                        onPunctuationSeconds: 0.1,
                        onNoPunctuationSeconds: 1.5,
                        onNumberSeconds: 0.5,
                    },
                },
                stopSpeakingPlan: {
                    numWords: 0,
                    voiceSeconds: 0.2,
                    backoffSeconds: 1,
                    acknowledgementPhrases: [
                        "i understand",
                        "i see",
                        "i got it",
                        "i hear you",
                        "im listening",
                        "im with you",
                        "right",
                        "okay",
                        "ok",
                        "sure",
                        "alright",
                        "got it",
                        "understood",
                        "yeah",
                        "yes",
                        "uh-huh",
                        "mm-hmm",
                        "gotcha",
                        "mhmm",
                        "ah",
                        "yeah okay",
                        "yeah sure",
                    ],
                    interruptionPhrases: [
                        "stop",
                        "shut",
                        "up",
                        "enough",
                        "quiet",
                        "silence",
                        "but",
                        "dont",
                        "not",
                        "no",
                        "hold",
                        "wait",
                        "cut",
                        "pause",
                        "nope",
                        "nah",
                        "nevermind",
                        "never",
                        "bad",
                        "actually",
                    ],
                },
                monitorPlan: {
                    listenEnabled: false,
                    listenAuthenticationEnabled: false,
                    controlEnabled: false,
                    controlAuthenticationEnabled: false,
                    monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                },
                backgroundSpeechDenoisingPlan: {
                    fourierDenoisingPlan: {
                        mediaDetectionEnabled: true,
                        staticThreshold: -35,
                        baselineOffsetDb: -15,
                        windowSizeMs: 3000,
                        baselinePercentile: 85,
                    },
                },
                credentialIds: ["credentialIds"],
                keypadInputPlan: {
                    enabled: true,
                    timeoutSeconds: 1.1,
                    delimiters: "#",
                },
                voicemailMessage: "voicemailMessage",
            },
            workflowOverrides: {
                variableValues: {
                    key: "value",
                },
            },
            phoneNumberId: "phoneNumberId",
            phoneNumber: {
                fallbackDestination: {
                    type: "number",
                    message: "message",
                    numberE164CheckEnabled: true,
                    number: "number",
                    extension: "extension",
                    callerId: "callerId",
                    transferPlan: {
                        mode: "blind-transfer",
                    },
                    description: "description",
                },
                hooks: [
                    {
                        on: "call.ringing",
                        do: [
                            {
                                type: "transfer",
                            },
                        ],
                    },
                ],
                smsEnabled: true,
                twilioPhoneNumber: "twilioPhoneNumber",
                twilioAccountSid: "twilioAccountSid",
                twilioAuthToken: "twilioAuthToken",
                twilioApiKey: "twilioApiKey",
                twilioApiSecret: "twilioApiSecret",
                name: "name",
                assistantId: "assistantId",
                workflowId: "workflowId",
                squadId: "squadId",
                server: {
                    timeoutSeconds: 20,
                    credentialId: "550e8400-e29b-41d4-a716-446655440000",
                    staticIpAddressesEnabled: false,
                    encryptedPaths: ["encryptedPaths"],
                    url: "url",
                    headers: {
                        key: "value",
                    },
                    backoffPlan: {
                        type: {
                            key: "value",
                        },
                        maxRetries: 0,
                        baseDelaySeconds: 1,
                        excludedStatusCodes: [
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                            {
                                key: "value",
                            },
                        ],
                    },
                },
            },
            customerId: "customerId",
            customer: {
                numberE164CheckEnabled: true,
                extension: "extension",
                assistantOverrides: {
                    transcriber: {
                        provider: "assembly-ai",
                        confidenceThreshold: 0.4,
                        formatTurns: true,
                        endOfTurnConfidenceThreshold: 0.7,
                        minEndOfTurnSilenceWhenConfident: 160,
                        maxTurnSilence: 400,
                        vadAssistedEndpointingEnabled: true,
                        fallbackPlan: {
                            transcribers: [
                                {
                                    provider: "assembly-ai",
                                    confidenceThreshold: 0.4,
                                    formatTurns: true,
                                    endOfTurnConfidenceThreshold: 0.7,
                                    minEndOfTurnSilenceWhenConfident: 160,
                                    maxTurnSilence: 400,
                                    vadAssistedEndpointingEnabled: true,
                                },
                            ],
                        },
                    },
                    model: {
                        provider: "anthropic",
                        tools: [
                            {
                                type: "apiRequest",
                                messages: [
                                    {
                                        type: "request-start",
                                        blocking: false,
                                    },
                                ],
                                method: "POST",
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                url: "url",
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                                rejectionPlan: {
                                    conditions: [
                                        {
                                            type: "regex",
                                            regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                            target: {
                                                position: -1,
                                            },
                                        },
                                    ],
                                },
                            },
                        ],
                        knowledgeBase: {
                            provider: "custom-knowledge-base",
                            server: {
                                timeoutSeconds: 20,
                                credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                staticIpAddressesEnabled: false,
                                backoffPlan: {
                                    type: {
                                        key: "value",
                                    },
                                    maxRetries: 0,
                                    baseDelaySeconds: 1,
                                    excludedStatusCodes: [
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                        {
                                            key: "value",
                                        },
                                    ],
                                },
                            },
                        },
                        model: "claude-3-opus-20240229",
                    },
                    voice: {
                        provider: "azure",
                        cachingEnabled: true,
                        voiceId: "andrew",
                        chunkPlan: {
                            enabled: true,
                            minCharacters: 30,
                            punctuationBoundaries: [
                                "\u3002",
                                "\uFF0C",
                                ".",
                                "!",
                                "?",
                                ";",
                                "\u060C",
                                "\u06D4",
                                "\u0964",
                                "\u0965",
                                "|",
                                "||",
                                ",",
                                ":",
                            ],
                            formatPlan: {
                                enabled: true,
                                numberToDigitsCutoff: 2025,
                            },
                        },
                        fallbackPlan: {
                            voices: [
                                {
                                    provider: "azure",
                                    cachingEnabled: true,
                                    voiceId: "andrew",
                                    chunkPlan: {
                                        enabled: true,
                                        minCharacters: 30,
                                        punctuationBoundaries: [
                                            "\u3002",
                                            "\uFF0C",
                                            ".",
                                            "!",
                                            "?",
                                            ";",
                                            "\u060C",
                                            "\u06D4",
                                            "\u0964",
                                            "\u0965",
                                            "|",
                                            "||",
                                            ",",
                                            ":",
                                        ],
                                        formatPlan: {
                                            enabled: true,
                                            numberToDigitsCutoff: 2025,
                                        },
                                    },
                                },
                            ],
                        },
                    },
                    firstMessage: "Hello! How can I help you today?",
                    firstMessageInterruptionsEnabled: true,
                    firstMessageMode: "assistant-speaks-first",
                    voicemailDetection: "off",
                    clientMessages: [
                        "conversation-update",
                        "function-call",
                        "hang",
                        "model-output",
                        "speech-update",
                        "status-update",
                        "transfer-update",
                        "transcript",
                        "tool-calls",
                        "user-interrupted",
                        "voice-input",
                        "workflow.node.started",
                        "assistant.started",
                    ],
                    serverMessages: [
                        "conversation-update",
                        "end-of-call-report",
                        "function-call",
                        "hang",
                        "speech-update",
                        "status-update",
                        "tool-calls",
                        "transfer-destination-request",
                        "handoff-destination-request",
                        "user-interrupted",
                        "assistant.started",
                    ],
                    maxDurationSeconds: 600,
                    backgroundSound: "https://www.soundjay.com/ambient/sounds/people-in-lounge-1.mp3",
                    modelOutputInMessagesEnabled: false,
                    transportConfigurations: [
                        {
                            provider: "twilio",
                            timeout: 60,
                            record: false,
                        },
                    ],
                    observabilityPlan: {
                        provider: "langfuse",
                        tags: ["tags"],
                    },
                    credentials: [
                        {
                            provider: "11labs",
                            apiKey: "apiKey",
                        },
                    ],
                    hooks: [
                        {
                            on: "call.ending",
                            do: [
                                {
                                    type: "tool",
                                    tool: {
                                        type: "apiRequest",
                                        messages: [
                                            {
                                                type: "request-start",
                                                blocking: false,
                                            },
                                        ],
                                        method: "POST",
                                        timeoutSeconds: 20,
                                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                                        url: "url",
                                        backoffPlan: {
                                            type: {
                                                key: "value",
                                            },
                                            maxRetries: 0,
                                            baseDelaySeconds: 1,
                                            excludedStatusCodes: [
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                                {
                                                    key: "value",
                                                },
                                            ],
                                        },
                                        rejectionPlan: {
                                            conditions: [
                                                {
                                                    type: "regex",
                                                    regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                                    target: {
                                                        position: -1,
                                                    },
                                                },
                                            ],
                                        },
                                    },
                                },
                            ],
                        },
                    ],
                    "tools:append": [
                        {
                            type: "apiRequest",
                            messages: [
                                {
                                    type: "request-start",
                                    blocking: false,
                                },
                            ],
                            method: "POST",
                            timeoutSeconds: 20,
                            credentialId: "550e8400-e29b-41d4-a716-446655440000",
                            url: "url",
                            backoffPlan: {
                                type: {
                                    key: "value",
                                },
                                maxRetries: 0,
                                baseDelaySeconds: 1,
                                excludedStatusCodes: [
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                    {
                                        key: "value",
                                    },
                                ],
                            },
                            rejectionPlan: {
                                conditions: [
                                    {
                                        type: "regex",
                                        regex: "\\\\b(cancel|stop|wait)\\\\b - Matches whole words",
                                        target: {
                                            position: -1,
                                        },
                                    },
                                ],
                            },
                        },
                    ],
                    variableValues: {
                        key: "value",
                    },
                    name: "name",
                    voicemailMessage: "voicemailMessage",
                    endCallMessage: "endCallMessage",
                    endCallPhrases: ["endCallPhrases"],
                    compliancePlan: {
                        recordingConsentPlan: {
                            type: "stay-on-line",
                            message:
                                "For quality purposes, this call may be recorded. Please stay on the line if you agree or end the call if you do not consent.",
                            voice: {
                                provider: "azure",
                                cachingEnabled: true,
                                voiceId: "andrew",
                                chunkPlan: {
                                    enabled: true,
                                    minCharacters: 30,
                                    punctuationBoundaries: [
                                        "\u3002",
                                        "\uFF0C",
                                        ".",
                                        "!",
                                        "?",
                                        ";",
                                        "\u060C",
                                        "\u06D4",
                                        "\u0964",
                                        "\u0965",
                                        "|",
                                        "||",
                                        ",",
                                        ":",
                                    ],
                                    formatPlan: {
                                        enabled: true,
                                        numberToDigitsCutoff: 2025,
                                    },
                                },
                                fallbackPlan: {
                                    voices: [
                                        {
                                            provider: "azure",
                                            cachingEnabled: true,
                                            voiceId: "andrew",
                                            chunkPlan: {
                                                enabled: true,
                                                minCharacters: 30,
                                                punctuationBoundaries: [
                                                    "\u3002",
                                                    "\uFF0C",
                                                    ".",
                                                    "!",
                                                    "?",
                                                    ";",
                                                    "\u060C",
                                                    "\u06D4",
                                                    "\u0964",
                                                    "\u0965",
                                                    "|",
                                                    "||",
                                                    ",",
                                                    ":",
                                                ],
                                                formatPlan: {
                                                    enabled: true,
                                                    numberToDigitsCutoff: 2025,
                                                },
                                            },
                                        },
                                    ],
                                },
                            },
                            waitSeconds: 3,
                        },
                    },
                    metadata: {
                        key: "value",
                    },
                    backgroundSpeechDenoisingPlan: {
                        fourierDenoisingPlan: {
                            mediaDetectionEnabled: true,
                            staticThreshold: -35,
                            baselineOffsetDb: -15,
                            windowSizeMs: 3000,
                            baselinePercentile: 85,
                        },
                    },
                    artifactPlan: {
                        recordingEnabled: true,
                        recordingUseCustomStorageEnabled: true,
                        videoRecordingEnabled: false,
                        fullMessageHistoryEnabled: false,
                        pcapEnabled: true,
                        pcapS3PathPrefix: "/pcaps",
                        pcapUseCustomStorageEnabled: true,
                        loggingEnabled: true,
                        loggingUseCustomStorageEnabled: true,
                        transcriptPlan: {
                            enabled: true,
                        },
                        structuredOutputs: [
                            {
                                compliancePlan: {
                                    forceStoreOnHipaaEnabled: false,
                                },
                                name: "name",
                                schema: {
                                    type: "string",
                                },
                            },
                        ],
                    },
                    startSpeakingPlan: {
                        waitSeconds: 0.4,
                        smartEndpointingPlan: {
                            provider: "vapi",
                        },
                        transcriptionEndpointingPlan: {
                            onPunctuationSeconds: 0.1,
                            onNoPunctuationSeconds: 1.5,
                            onNumberSeconds: 0.5,
                        },
                    },
                    stopSpeakingPlan: {
                        numWords: 0,
                        voiceSeconds: 0.2,
                        backoffSeconds: 1,
                        acknowledgementPhrases: [
                            "i understand",
                            "i see",
                            "i got it",
                            "i hear you",
                            "im listening",
                            "im with you",
                            "right",
                            "okay",
                            "ok",
                            "sure",
                            "alright",
                            "got it",
                            "understood",
                            "yeah",
                            "yes",
                            "uh-huh",
                            "mm-hmm",
                            "gotcha",
                            "mhmm",
                            "ah",
                            "yeah okay",
                            "yeah sure",
                        ],
                        interruptionPhrases: [
                            "stop",
                            "shut",
                            "up",
                            "enough",
                            "quiet",
                            "silence",
                            "but",
                            "dont",
                            "not",
                            "no",
                            "hold",
                            "wait",
                            "cut",
                            "pause",
                            "nope",
                            "nah",
                            "nevermind",
                            "never",
                            "bad",
                            "actually",
                        ],
                    },
                    monitorPlan: {
                        listenEnabled: false,
                        listenAuthenticationEnabled: false,
                        controlEnabled: false,
                        controlAuthenticationEnabled: false,
                        monitorIds: ["123e4567-e89b-12d3-a456-426614174000"],
                    },
                    credentialIds: ["credentialIds"],
                    server: {
                        timeoutSeconds: 20,
                        credentialId: "550e8400-e29b-41d4-a716-446655440000",
                        staticIpAddressesEnabled: false,
                        backoffPlan: {
                            type: {
                                key: "value",
                            },
                            maxRetries: 0,
                            baseDelaySeconds: 1,
                            excludedStatusCodes: [
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                                {
                                    key: "value",
                                },
                            ],
                        },
                    },
                },
                number: "number",
                sipUri: "sipUri",
                name: "name",
                email: "email",
                externalId: "externalId",
            },
            name: "name",
            schedulePlan: {
                earliestAt: "2024-01-15T09:30:00Z",
                latestAt: "2024-01-15T09:30:00Z",
            },
            transport: {
                key: "value",
            },
            subscriptionLimits: {
                concurrencyBlocked: true,
                concurrencyLimit: 1.1,
                remainingConcurrentCalls: 1.1,
            },
        });
    });
});
