Skip to content

Latest commit

 

History

History
23 lines (22 loc) · 8.25 KB

File metadata and controls

23 lines (22 loc) · 8.25 KB

v1.0.0 - 2026-04-09

  • The SDK now includes a new AnalyticsOperationColumnCostBreakdownLlmCachedPromptTokens analytics column constant for tracking LLM cached prompt token costs. The AnalyticsQueryDto type now always serializes the Queries field (previously omitted when empty), and all analytics types have been hardened with nil-receiver safety to prevent panics when calling GetExtraProperties() or String() on nil pointers.
  • Several assistant union types have been restructured with breaking API changes. Renamed struct fields and Visitor methods — The union types AssistantCredentialsItem, AssistantModel, AssistantTranscriber, AssistantVoice, and their UpdateAssistantDto counterparts have had all exported fields and Visitor interface methods renamed from verbose DTO names (e.g. CreateElevenLabsCredentialDto, VisitCreateElevenLabsCredentialDto) to short provider-keyed names (e.g. Field11Labs, VisitField11Labs). Callers must update all field accesses, struct literals, and Visitor interface implementations. New capabilities — New credential providers (AnthropicBedrock, Soniox, Wellsaid, Email, SlackWebhook), model providers (AnthropicBedrock, Minimax), transcriber provider (Soniox), and voice provider (Wellsaid) are now available. A new SessionCreatedHook variant has been added to the assistant hooks union, and new client/server message constants AssistantClientMessagesItemAssistantSpeechStarted and AssistantServerMessagesItemAssistantSpeechStarted are now exported.
  • The Campaign, CreateCampaignDto, and UpdateCampaignDto types now support two new fields: SquadId (to specify a squad for campaign calls alongside the existing assistantId/workflowId options) and DialPlan (a list of DialPlanEntry values pairing phone numbers with customers, as an alternative to the top-level PhoneNumberId). As part of this change, PhoneNumberId on CreateCampaignDto and Campaign has changed from a required string to an optional *string — callers that previously set this field directly must now pass a pointer. The CallControllerFindAllPaginated method has been removed from calls.Client and calls.RawClient; use List instead.
  • The ChatCostsItem union type has been redesigned with a discriminant-based approach. The fields previously named ModelCost and ChatCost are now named Model and Chat, and the visitor interface methods have been renamed from VisitModelCost/VisitChatCost to VisitModel/VisitChat. The ChatCost.Type field, the ChatCostType enum, and all related helpers (GetType, SetType, NewChatCostTypeFromString, Ptr) have been removed from ChatCost. Callers using these symbols or the old ChatCostsItemVisitor interface must update their implementations.
  • New additions in this release: ListChatsRequest gains Id and AssistantIdAny filter fields; TwilioSmsChatTransport gains a CustomerId field; and a new MaxBufSizeOption request option is available.
  • The File.Metadata field and its associated GetMetadata() and SetMetadata() methods now use map[string]any (an alias for map[string]interface{}), which is fully compatible with existing code. The File type also gains nil-receiver safety in GetExtraProperties() and String(), and UpdateFileDto now supports proper JSON marshaling with explicit-field handling.
  • Phone number union types (CreatePhoneNumbersRequest, CreatePhoneNumbersResponse, DeletePhoneNumbersResponse, GetPhoneNumbersResponse, ListPhoneNumbersResponseItem, UpdatePhoneNumbersResponse, PhoneNumberPaginatedResponseResultsItem, and all FallbackDestination / HooksItem variants) have been redesigned with discriminant-based dispatch. Breaking changes: Exported struct fields and accessor/visitor methods have been renamed throughout. For example, GetTwilioPhoneNumber() is now GetTwilio(), GetTransferDestinationNumber() is now GetNumber(), VisitPhoneNumberHookCallRinging() is now VisitCallRinging(), and the unexported Provider() getter has been removed from model types (ByoPhoneNumber, TwilioPhoneNumber, etc.). Callers that implement Visitor interfaces or access union fields by the old names must be updated to use the new names.
  • Each union struct now exposes an exported Provider, Type, or On discriminant field, and UnmarshalJSON reads that field first for reliable routing instead of trying each variant in sequence.
  • The ProviderResource.Resource field type has changed from *ElevenLabsPronunciationDictionary to map[string]any, and the ElevenLabsPronunciationDictionary struct along with its ElevenLabsPronunciationDictionaryPermissionOnResource type have been removed. Callers that reference these types or use the typed GetResource()/SetResource() methods must update their code to work with map[string]any. Additionally, Cartesia ("cartesia") is now a supported provider value across all provider resource request and response types.
  • The SessionCostsItem union type has been redesigned with breaking changes. The fields ModelCost, AnalysisCost, and SessionCost have been renamed to Model, Analysis, and Session, and a new exported Type discriminant field has been added. The visitor interface methods VisitModelCost, VisitAnalysisCost, and VisitSessionCost have been renamed to VisitModel, VisitAnalysis, and VisitSession — all implementations of SessionCostsItemVisitor must be updated. The SessionCostType type, its constants (SessionCostTypeSession), NewSessionCostTypeFromString, and the SessionCost.Type/GetType/SetType members have been removed.
  • New fields are available on sessions: AssistantOverrides (with getter/setter) on both CreateSessionDto and Session, and CustomerId (with getter/setter) on both. New filter parameters Id, AssistantIdAny, CustomerNumberAny, PhoneNumberId, and PhoneNumberIdAny have been added to ListSessionsRequest.
  • Several breaking changes have been made to the structured outputs API types in this release. Removed types: CreateStructuredOutputDto, CreateStructuredOutputDtoModel, ComplianceOverride, and GenerateStructuredOutputSuggestionsDto have been removed from the SDK. Callers using these types must migrate to the updated API. Renamed union accessors and visitor methods: StructuredOutputModel and UpdateStructuredOutputDtoModel now use provider-discriminant-based field names and visitor methods. Replace calls to GetWorkflowOpenAiModel()GetOpenai(), GetWorkflowAnthropicModel()GetAnthropic(), GetWorkflowGoogleModel()GetGoogle(), GetWorkflowCustomModel()GetCustomLlm(); update visitor interfaces accordingly (VisitOpenai, VisitAnthropic, VisitAnthropicBedrock, VisitGoogle, VisitCustomLlm). A new AnthropicBedrock provider variant (WorkflowAnthropicBedrockModel) is also available. New regex extraction mode: StructuredOutput and UpdateStructuredOutputDto now expose Type (StructuredOutputType / UpdateStructuredOutputDtoType) and Regex fields, enabling pattern-based extraction from transcripts without an LLM.
  • The StructuredOutputControllerSuggest method has been removed from the structured outputs client. If your code called this method, those calls must be removed as there is no direct replacement in this release. All structured output types continue to be available under the root SDK package.
  • The SDK now supports form URL-encoded request bodies for endpoints that require Content-Type: application/x-www-form-urlencoded. DateTime deserialization is significantly more flexible, accepting Unix epoch integers, RFC3339Nano with fractional seconds, ISO 8601 without timezone, and date-only strings in addition to plain RFC3339. Time values serialized as query parameters now use millisecond precision (e.g. 2006-01-02T15:04:05.000Z07:00) to match common API expectations. Retried HTTP requests now correctly re-send the original request body instead of an empty one.
  • The SDK now supports configuring the maximum buffer size for streaming responses via the new WithMaxStreamBufSize(size int) request option. A new Bytes() pointer helper function has been added for []byte values. UpdateScorecardDto now includes proper JSON marshaling/unmarshaling support, and nil-safety guards have been added to several scorecard methods.