Skip to content

Latest commit

 

History

History
96 lines (94 loc) · 24.8 KB

File metadata and controls

96 lines (94 loc) · 24.8 KB

1.0.1 - 2026-04-10

  • style: use string interpolation in JsonException messages
  • Replace string concatenation with double-quoted string interpolation
  • in error messages thrown by JsonDecoder, JsonDeserializer, and
  • JsonSerializer. The resulting messages are identical at runtime.
  • Key changes:
  • Replace "..." . $json with "...$json" in JsonDecoder error messages
  • Replace "..." . $type with "...$type" in JsonDeserializer error message
  • Replace "..." . $unionType with "...$unionType" in JsonSerializer error message
  • 🌿 Generated with Fern

1.0.0 - 2026-04-07

  • Several public classes have been removed in this release. The following types no longer exist and must be migrated:
  • UpdateAssistantDtoVoicemailDetection and AssistantOverridesVoicemailDetection — removed voicemail detection union type classes; consult the updated API types for replacements.
  • CallControllerFindAllPaginatedRequest and CallControllerFindAllPaginatedRequestSortOrder — removed call-listing request class and sort-order enum; update call-listing code to use the new request type.
  • SessionsListRequest — removed session-listing request class; update session-listing code to use the new request type.
  • RetryMiddleware — removed internal retry middleware class; avoid direct references to this class.
  • Several public types have been removed in this release:
  • AssistantVoicemailDetection, CreateAssistantDtoVoicemailDetection, CreateWorkflowDtoVoicemailDetection, and UpdateWorkflowDtoVoicemailDetection have been deleted. Replace usages with the consolidated shared voicemail detection plan types (GoogleVoicemailDetectionPlan, OpenAiVoicemailDetectionPlan, TwilioVoicemailDetectionPlan, or VapiVoicemailDetectionPlan) directly.
  • UpdateSupabaseCredentialDto has been removed. Update any code that instantiated or type-hinted this class.
  • The speakerLabel property has been removed from BotMessage. Remove any access to $botMessage->speakerLabel in consuming code.
  • The WorkflowVoicemailDetection and WorkflowUserEditableVoicemailDetection classes have been removed. Additionally, AssistantsListRequest has been renamed to ListAssistantsRequest — update any references accordingly. Several AssistantsClient methods (list, create, get, delete, update) and AnalyticsClient::get() now return nullable types (?Assistant, ?array, etc.) instead of non-nullable types; callers should add null checks where needed.
  • Breaking changes in this release:
  • CallsListRequest has been renamed to ListCallsRequest. Update all usages accordingly.
  • The callControllerFindAllPaginated() method has been removed from CallsClient. Use list() instead.
  • Return types for CallsClient methods (list, create, get, delete, update) and all CampaignsClient methods are now nullable (e.g. ?Call instead of Call). Callers must handle null responses.
  • The voicemailDetection field on UpdateAssistantDto now accepts a union of provider-specific plan objects (GoogleVoicemailDetectionPlan, OpenAiVoicemailDetectionPlan, TwilioVoicemailDetectionPlan, VapiVoicemailDetectionPlan) instead of UpdateAssistantDtoVoicemailDetection. New features:
  • SessionCreatedHook is now supported in the hooks array on UpdateAssistantDto.
  • monitorPlan now supports attaching monitors via monitorPlan.monitorIds.
  • The SDK now supports squad-based campaigns via a new squadId field on CreateCampaignDto and UpdateCampaignDto, and introduces dialPlan (a list of DialPlanEntry objects) as an alternative to phoneNumberId for routing calls to different customer sets per phone number. The ChatsListRequest class has been renamed to ListChatsRequest and gains new filter fields (id, assistantIdAny, previousChatId) while removing workflowId. Methods on ChatsClient (list, get, delete, create, createResponse) now return nullable types to handle empty API responses. The underlying HTTP client has been migrated from Guzzle to PSR-18-compatible interfaces, enabling use of any PSR-18 HTTP client implementation.
  • All EvalClient and FilesClient methods now return nullable types (e.g., ?Eval_, ?File, ?EvalPaginatedResponse) to gracefully handle empty API responses instead of throwing a deserialization error. DateTime filter parameters are now correctly serialized before being sent as query parameters. The HTTP client dependency has been updated to use the PSR-18 standard interface, improving compatibility with non-Guzzle HTTP client implementations.
  • Several PhoneNumbers public classes have been renamed for consistency. The old names (PhoneNumbersListRequest, PhoneNumbersListResponseItem, PhoneNumbersCreateRequest, PhoneNumbersCreateResponse, PhoneNumbersGetResponse, PhoneNumbersDeleteResponse, PhoneNumbersUpdateRequest, PhoneNumbersUpdateResponse) must be replaced with their new equivalents (e.g., ListPhoneNumbersRequest, CreatePhoneNumbersRequest, GetPhoneNumbersResponse, DeletePhoneNumbersResponse, UpdatePhoneNumbersRequest, UpdatePhoneNumbersResponse). All PhoneNumbersClient methods (list, create, get, delete, update, phoneNumberControllerFindAllPaginated) now return nullable types — callers must handle null when the response body is empty.
  • Several public classes have been renamed in this release. PhoneNumbersUpdateRequest is now UpdatePhoneNumbersRequestBody, PhoneNumbersDeleteResponse is now UpdatePhoneNumbersResponse, SessionsListRequest is now ListSessionsRequest, and SquadsListRequest is now ListSquadsRequest. All ProviderResourcesClient and SessionsClient methods (list, create, get, delete, update) now return nullable types — callers must add null checks to handle empty responses. The ListSessionsRequest object also gains new optional filter fields: id, assistantIdAny, numberE164CheckEnabled, extension, assistantOverrides, number, sipUri, email, externalId, customerNumberAny, phoneNumberId, and phoneNumberIdAny.
  • Several breaking changes have been introduced in this release:
  • The list, create, get, delete, and update methods on SquadsClient, and all equivalent methods on StructuredOutputsClient, now return nullable types (e.g. ?Squad, ?StructuredOutput). Callers that previously assumed a non-null return value must now add null checks.
  • ToolsListRequest has been renamed to ListToolsRequest, and SquadsListRequest has been renamed to ListSquadsRequest. Update any instantiation or type hints accordingly.
  • The HTTP client dependency has been migrated from GuzzleHttp\ClientInterface to Psr\Http\Client\ClientInterface; any custom client injection must now implement PSR-18.
  • New capabilities in this release include a structuredOutputControllerRun() method on StructuredOutputsClient for on-demand structured output execution, new optional type, regex, and compliancePlan fields on UpdateStructuredOutputDto, and Anthropic Bedrock model support (anthropic-bedrock) in UpdateStructuredOutputDtoModel.
  • Several Tools API types have been renamed to follow a consistent convention: ToolsCreateRequestCreateToolsRequest, ToolsListRequestListToolsRequest, ToolsGetResponseGetToolsResponse, ToolsDeleteResponseDeleteToolsResponse, ToolsUpdateRequestUpdateToolsRequest, and ToolsUpdateResponseUpdateToolsResponse. All ToolsClient methods (list, create, get, delete, update) now return nullable types. Two new tool variants — sipRequest and voicemail — are now supported in CreateToolsRequest.
  • The ToolsCreateResponse class has been renamed to CreateToolsResponse. Callers must update any references to ToolsCreateResponse to use CreateToolsResponse instead. Additionally, the tools create response union now supports three new tool variants: CodeTool, SipRequestTool, and VoicemailTool, accessible via the new code(), sipRequest(), and voicemail() factory methods and their corresponding isCode()/asCode(), isSipRequest()/asSipRequest(), and isVoicemail()/asVoicemail() accessors.
  • The ToolsDeleteResponse class has been renamed to DeleteToolsResponse in the Vapi\Tools\Types namespace. Consumers must update all references to use the new class name. Additionally, the response union type now supports three new tool variants: CodeTool, SipRequestTool, and VoicemailTool, each with corresponding factory methods and type-check helpers.
  • The ToolsUpdateResponse class has been renamed to GetToolsResponse. Consumers referencing ToolsUpdateResponse by name must update their code to use GetToolsResponse instead. Three new tool variants — CodeTool, SipRequestTool, and VoicemailTool — are now supported in the GetToolsResponse union type, with corresponding factory methods (code(), sipRequest(), voicemail()) and type-check/cast helpers.
  • The ToolsListResponseItem class has been renamed to ListToolsResponseItem, and ToolsUpdateRequest has been renamed to UpdateToolsRequestBody. Consumers must update any references to these class names. Both union types now also support three new tool variants: code, sipRequest, and voicemail, with corresponding factory methods and type-safe accessors.
  • The ToolsGetResponse class has been renamed to UpdateToolsResponse. Update any references to ToolsGetResponse in your code to use UpdateToolsResponse instead. The voicemailDetection property on Assistant and AssistantOverrides now accepts a richer union type (GoogleVoicemailDetectionPlan, OpenAiVoicemailDetectionPlan, TwilioVoicemailDetectionPlan, VapiVoicemailDetectionPlan, or a string) instead of the previous single-type values. New tool types (CodeTool, SipRequestTool, VoicemailTool) are now supported in the tools union, SessionCreatedHook is available in hooks arrays, and AssemblyAiTranscriber gains optional vadAssistedEndpointingEnabled and speechModel fields.
  • The SDK introduces several new capabilities:
  • Campaigns now support a squadId field and a dialPlan (list of dial entries with per-number customer sets); phoneNumberId and customers are now optional to accommodate the new dial plan flow.
  • Client messages gain two new types: ClientMessageAssistantStarted and ClientMessageAssistantSpeech. ClientMessageModelOutput and ClientMessageUserInterrupted now include an optional turnId for correlating LLM response tokens and interruptions.
  • CreateAssistantDto voicemail detection has been expanded to support multiple providers (Google, OpenAI, Twilio, Vapi) and the hooks array now accepts SessionCreatedHook.
  • CreateWebChatDto now accepts either an assistantId or an inline transient assistant object, and supports a new sessionExpirationSeconds field.
  • CreateStructuredOutputDto gains type (ai/regex), regex, and compliancePlan fields; CreateStructuredOutputDtoModel now supports the anthropic-bedrock provider.
  • A new CreateSonioxCredentialDto class is available for Soniox credential management.
  • Several breaking changes have been introduced in this release:
  • The Eval class has been renamed to Eval_ (file renamed from Eval.php to Eval_.php). Update any references to use the new class name.
  • The FallbackSpeechmaticsTranscriber class has removed the maxSpeakers, enablePartials, enableEntities, enablePunctuation, and enableCapitalization fields. Remove any usage of these fields from your code.
  • The EvalAnthropicModel and EvalGroqModel classes now require a messages field, and EvalRun now requires cost and costs fields — existing construction of these objects without these fields will fail.
  • New optional fields have also been added across multiple types: profanityFilter on DeepgramTranscriber, VAD configuration fields on ElevenLabsTranscriber and FallbackElevenLabsTranscriber, encryptionPlan on CustomCredential, vadAssistedEndpointingEnabled and speechModel on FallbackAssemblyAiTranscriber, temperature and speakingRate on FallbackInworldVoice, and subtitleType on FallbackMinimaxVoice.
  • Several breaking changes and new features are included in this release. Breaking changes:
  • StructuredOutputsFilterValue has been renamed to StructuredOutputFilterDto. Update all references accordingly.
  • UpdateTavusCredentialDto has been renamed to UpdateSonioxCredentialDto; UpdateSmallestAiCredentialDto has been renamed to UpdateWellSaidCredentialDto.
  • TwilioVoicemailDetectionPlan and VapiVoicemailDetectionPlan constructors now require a provider field; callers using array $values = [] must pass provider.
  • ToolCallHookAction constructor now requires a type field.
  • Five fields (maxSpeakers, enablePartials, enableEntities, enablePunctuation, enableCapitalization) have been removed from SpeechmaticsTranscriber.
  • The voicemailDetection property on Workflow, WorkflowUserEditable, and UpdateWorkflowDto is now a discriminated union of concrete plan types instead of a single wrapper type. New features:
  • Two new sub-clients, InsightClient and ObservabilityScorecardClient, are now available as $client->insight and $client->observabilityScorecard.
  • StructuredOutput now supports a type field ('ai' or 'regex') and a regex field for pattern-based extraction, as well as a compliancePlan field.
  • StructuredOutputModel now supports the anthropic-bedrock provider via StructuredOutputModel::anthropicBedrock().
  • Workflow hooks arrays now accept CallHookModelResponseTimeout entries.
  • The SDK's HTTP layer has been migrated from a hard dependency on guzzlehttp/guzzle to PSR-18/PSR-17 interfaces resolved at runtime via php-http/discovery. Any PSR-18-compatible client (Guzzle, Symfony HTTP Client, etc.) can now be used. The ChatsListRequestSortOrder enum has been renamed to ListChatsRequestSortOrder; update any references accordingly. Multipart form-data uploads are now supported via the new MultipartApiRequest, MultipartFormData, and MultipartFormDataPart classes, and the retry logic now honours Retry-After and X-RateLimit-Reset response headers.
  • The SessionsListRequestSortOrder enum has been renamed to ListSessionsRequestSortOrder. Update any references to this enum in your code to use the new name.
  • The AzureCredentialRegion and AzureOpenAiCredentialRegion enums have had the Australia case renamed to Australiaeast; update any references accordingly. Several new region cases have been added (Centralus, Germanywestcentral, Polandcentral, Spaincentral, Westeurope).
  • Additional improvements include new AssistantStarted and AssistantSpeechStarted server message enum cases, correct UTC datetime serialization using Z suffix, accurate bool serialization/deserialization, and support for serializing explicitly-set null properties via a new _setField() helper on model classes.
  • The CartesiaExperimentalControlsSpeed enum has been renamed to CartesiaExperimentalControlsSpeedZero. Update any references to this enum in your code. Additionally, the do property of CallHookCallEnding now uses CallHookCallEndingDoItem instead of ToolCallHookAction. The SDK also expands CallEndedReason with ~60 new error/status cases (Vapi/WellSaid voice failures, Baseten/Minimax LLM errors, Soniox transcriber errors, and new SIP call failure codes), and CartesiaVoiceLanguage with 27 new language codes.
  • The SDK now supports additional Azure regions (australiaeast, centralus, germanywestcentral, polandcentral, spaincentral, westeurope) in CreateAzureCredentialDtoRegion and CreateAzureOpenAiCredentialDtoRegion. Two new server message types (assistant.started, assistant.speechStarted) are available in CreateAssistantDtoServerMessagesItem, and ChatEvalToolResponseMessageEvaluation is now a valid message type in CreateEvalDto.
  • The SDK now includes expanded OpenAI GPT-5.x model enum cases (gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.2, gpt-5.1, and more) in EvalOpenAiModelModel, along with new regional deployment cases for GPT-4.1, GPT-4.1-mini, and GPT-4o (westeurope, germanywestcentral, polandcentral, spaincentral). FallbackCartesiaVoiceLanguage now supports 25+ additional languages (Arabic, Bulgarian, Bengali, Czech, Danish, etc.). The FallbackAzureVoiceVoiceId enum has been renamed to FallbackAzureVoiceVoiceIdZero — update any direct references to this enum in your code. Several RimeAI voice IDs have been removed and replaced with new ones; review usages of FallbackRimeAiVoiceIdEnum and update to the new available cases.
  • The RimeAiVoiceIdEnum enum has been updated with a new set of voice IDs that reflect the current Rime AI voice catalogue. Many previously available cases (e.g. Abbie, Allison, Ally, Bayou, Brook, etc.) have been removed and replaced with new ones. Update any code that references removed voice ID cases to use the new equivalents.
  • Additionally, the Gpt41106PreviewAustralia case in OpenAiModelModel and OpenAiModelFallbackModelsItem has been renamed to Gpt41106PreviewAustraliaeast (value changed from "gpt-4-1106-preview:australia" to "gpt-4-1106-preview:australiaeast"). New GPT-5.x model variants and additional European regional deployment options have also been added to both enums.
  • The ServerMessageEndOfCallReportEndedReason enum has been expanded with over 40 new cases covering additional voice providers (Vapi, WellSaid), transcribers (ElevenLabs, Google, OpenAI, Soniox), LLM providers (Baseten, Minimax), SIP connection error scenarios, and new call-state transitions such as CustomerEndedCallDuringTransfer. Several previously available enum cases (CallInProgressErrorWarmTransferHangTimeout, CallInProgressErrorWarmTransferIdleTimeout, CallRingingErrorSipInboundCallFailedToConnect) have been removed or repositioned — consumers matching against these specific values should update their code accordingly.
  • The ServerMessageStatusUpdateEndedReason enum has been expanded with new cases covering additional voice providers (Vapi, WellSaid), transcriber failures (ElevenLabs, Google, OpenAI, Soniox), LLM provider errors (Baseten, Minimax), SIP call connection errors, and new call lifecycle events such as CustomerEndedCallDuringTransfer. PHPDoc type annotations across numerous request/response types have been updated to reference typed enum constants instead of hardcoded string literals.
  • The Australia enum case in UpdateAzureCredentialDtoRegion and UpdateAzureOpenAiCredentialDtoRegion has been renamed to Australiaeast (value changed from "australia" to "australiaeast"). Similarly, the Gpt41106PreviewAustralia case in WorkflowOpenAiModelModel has been renamed to Gpt41106PreviewAustraliaeast. Any code referencing these enum cases by name must be updated.
  • The SDK also adds several new GPT-5 model variants (gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.2, gpt-5.1, and their chat-latest aliases) and new Azure-hosted regional endpoints for GPT-4 models (westeurope, germanywestcentral, polandcentral, spaincentral), along with new Azure credential regions (centralus, germanywestcentral, polandcentral, spaincentral, westeurope).
  • The SDK now supports additional credential providers (anthropic-bedrock, soniox, wellsaid, email, slack-webhook), LLM models (AnthropicBedrockModel, MinimaxLlmModel), voice provider (WellSaidVoice), and transcriber (SonioxTranscriber) on the assistant update DTOs. Two new client message enum cases (AssistantSpeechStarted, AssistantStarted) and a new UpdateAssistantDtoVoicemailDetectionZero enum have also been added.
  • The SDK now includes a new InsightClient for managing and running reporting insights via the reporting/insight API endpoints (list, create, find, update, delete, run, and preview). HTTP requests now benefit from automatic retry logic with exponential backoff, jitter, and support for Retry-After and X-RateLimit-Reset response headers. A new optional squadOverrides field has been added to CreateCallDto to allow overriding settings for all members of a squad.
  • The SDK now includes types for the Insight API, enabling creation, preview, and retrieval of bar, pie, line, and text insights. New classes include InsightControllerCreateRequest, InsightControllerCreateResponse, InsightControllerFindOneResponse, InsightControllerPreviewRequest, and the InsightControllerFindAllRequestSortOrder enum.
  • New ObservabilityScorecardClient is now available, providing methods to create, retrieve, update, delete, and paginate scorecards (scorecardControllerCreate, scorecardControllerGet, scorecardControllerRemove, scorecardControllerUpdate, scorecardControllerGetPaginated). Three new Insight union-type classes have also been added: InsightControllerRemoveResponse, InsightControllerUpdateRequestBody, and InsightControllerUpdateResponse, each supporting bar, pie, line, and text insight variants.
  • The SDK now includes new request classes for paginating and updating scorecards (ScorecardControllerGetPaginatedRequest, UpdateScorecardDto), listing sessions with rich filtering (ListSessionsRequest), running structured outputs (StructuredOutputRunDto), and updating phone numbers and tools (UpdatePhoneNumbersRequest, UpdateToolsRequest). CreateSessionDto gains two new optional fields: assistantOverrides and customerId. Cost tracking types (AnalysisCost, AnalysisCostBreakdown) now expose optional cachedPromptTokens fields, and AnalyticsOperationColumn includes a new CostBreakdownLlmCachedPromptTokens case for analytics queries.
  • The SDK now supports Anthropic Claude models via AWS Bedrock. New AnthropicBedrockCredential and AnthropicBedrockModel types are available, enabling configuration of Claude 3, 3.5, 3.7, and 4 model variants through the AWS Bedrock service with IAM or STS-based authentication.
  • The SDK now includes a new AnthropicBedrockModelToolsItem union type that supports all 23 tool variants (including GoHighLevel, Google Calendar/Sheets, MCP, Slack, SIP, and voicemail tools) for use with Anthropic Bedrock models. Three additional Claude model enum cases have been added to AnthropicModelModel: ClaudeOpus4520251101, ClaudeOpus46, and ClaudeSonnet46. A new AnthropicCredentialProvider enum is also now available.
  • The SDK now supports three new tool types — code, sipRequest, and voicemail — across all model tool union types, with full factory and accessor methods. ArtifactPlan accepts inline structuredOutputs, scorecardIds, and scorecards for in-call scorecard evaluation. The Artifact type now exposes assistantActivations, scorecards, and structuredOutputsLastUpdatedAt fields, and a new AssistantActivation class tracks which assistants were active during a call.
  • The SDK now supports additional credential providers: Anthropic Bedrock, Soniox, WellSaid, Email, and Slack Webhook — available via new factory and accessor methods on AssistantCredentialsItem and AssistantOverridesCredentialsItem. New AI model variants anthropic-bedrock and minimax are also supported on AssistantModel. Additionally, AssistantMessageJudgePlanAi gains a new required type field and an optional autoIncludeMessageHistory field, and new enum cases AssistantSpeechStarted and AssistantStarted have been added to AssistantOverridesClientMessagesItem.
  • The SDK now supports additional LLM providers (anthropic-bedrock and minimax) in assistant model configuration, a new soniox transcription provider, and a wellsaid voice provider. New tool types (code, sipRequest, voicemail) are available in assistant tool override configurations. New types for speech word timing (AssistantSpeechWordAlignmentTiming, AssistantSpeechWordProgressTiming, AssistantSpeechWordTimestamp) and AWS STS authentication (AwsStsAssumeRoleUser, AwsStsAuthenticationArtifact, AwsStsAuthenticationPlan) have also been added.
  • The SDK now includes new AWS STS authentication types (AwsStsAuthenticationSession, AwsStsCredentials, AwsiamCredentialsAuthenticationPlan) and provider enums (AzureCredentialProvider, AzureOpenAiCredentialProvider, ByoSipTrunkCredentialProvider). New BarInsight and related analytics types are available for creating bar chart insights. Call hook actions now support a message.add variant via MessageAddHookAction, and a new CallHookCallEndingDoItem type enables actions on call-ending hooks. The Call type gains optional endedMessage and squadOverrides fields, and CallBatchResponse gains an optional subscriptionLimits field.
  • The SDK now supports new call hook types including CallHookModelResponseTimeout and CallHookTranscriberEndpointedSpeechLowConfidence, as well as a message.add action variant on existing hook do-item types. Cartesia voice configuration gains optional generationConfig and pronunciationDictId fields, plus new sonic-3 model variants. CerebrasModelToolsItem now supports code, sipRequest, and voicemail tool types.