Package: @vapi-ai/server-sdk
Affected versions: v0.11.0, v1.2.0 (and likely others)
File: dist/cjs/api/types/TransferPlan.d.ts
Description
The field TransferPlan.sipVerb is typed as Record<string, unknown>, but its own JSDoc comment describes it as accepting one of three string literals: "refer", "bye", or "dial". These types are mutually exclusive — a string is not assignable to Record<string, unknown> — so the field cannot be set without an unsafe cast.
Current generated type
/**
* This specifies the SIP verb to use while transferring the call.
* - 'refer': Uses SIP REFER to transfer the call (default)
* - 'bye': Ends current call with SIP BYE
* - 'dial': Uses SIP DIAL to transfer the call
*/
sipVerb?: Record<string, unknown>;
Expected type
sipVerb?: "refer" | "bye" | "dial";
Issue
import type { Vapi } from "@vapi-ai/server-sdk";
const plan: Vapi.TransferPlan = {
mode: "blind-transfer",
sipVerb: "dial", // ❌ Type 'string' is not assignable to type 'Record<string, unknown>'
};
Workaround
sipVerb: "dial" as unknown as Record<string, unknown>,
Package:
@vapi-ai/server-sdkAffected versions: v0.11.0, v1.2.0 (and likely others)
File:
dist/cjs/api/types/TransferPlan.d.tsDescription
The field
TransferPlan.sipVerbis typed asRecord<string, unknown>, but its own JSDoc comment describes it as accepting one of three string literals:"refer","bye", or"dial". These types are mutually exclusive — a string is not assignable toRecord<string, unknown>— so the field cannot be set without an unsafe cast.Current generated type
Expected type
Issue
Workaround