From f9f41553b4d0283b41ba3bb89f1b8bc2eea6df9c Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 16 Feb 2026 10:43:10 +0000 Subject: [PATCH] SDK regeneration --- package.json | 2 +- reference.md | 136 +++++++---- src/BaseClient.ts | 4 +- .../conversationalAi/client/Client.ts | 6 + .../resources/agents/client/Client.ts | 36 ++- .../client/requests/AgentsGetRequest.ts | 15 ++ .../client/requests/UpdateAgentRequest.ts | 6 +- .../resources/agents/client/requests/index.ts | 1 + .../conversationalAi/resources/index.ts | 2 + .../resources/documents/client/Client.ts | 2 +- .../client/requests/DocumentsDeleteRequest.ts | 2 +- .../resources/tests/client/Client.ts | 62 ++--- .../client/requests/CreateUnitTestRequest.ts | 45 ---- .../client/requests/UpdateUnitTestRequest.ts | 45 ---- .../resources/tests/client/requests/index.ts | 2 - .../tests/types/TestsCreateRequestBody.ts | 25 +++ .../resources/tests/types/TestsGetResponse.ts | 22 ++ .../tests/types/TestsUpdateRequestBody.ts | 25 +++ .../tests/types/TestsUpdateResponse.ts | 22 ++ .../resources/tests/types/index.ts | 6 +- .../resources/users/client/Client.ts | 137 +++++++++++ .../resources/users/client/index.ts | 1 + .../users/client/requests/UsersListRequest.ts | 27 +++ .../resources/users/client/requests/index.ts | 1 + .../conversationalAi/resources/users/index.ts | 1 + .../client/Client.ts | 6 +- ...tionariesPronunciationDictionaryIdPatch.ts | 2 +- src/api/types/BuiltInToolsInput.ts | 2 + src/api/types/BuiltInToolsOutput.ts | 2 + .../BuiltInToolsWorkflowOverrideInput.ts | 2 + .../BuiltInToolsWorkflowOverrideOutput.ts | 2 + src/api/types/ContentConfig.ts | 13 ++ src/api/types/ContentGuardrailInput.ts | 7 + src/api/types/ContentGuardrailOutput.ts | 7 + .../types/ConversationSummaryResponseModel.ts | 3 + .../types/ConversationUserResponseModel.ts | 10 + ...del.ts => CreateAgentTestResponseModel.ts} | 2 +- .../types/CreateResponseUnitTestRequest.ts | 18 ++ ...nseUnitTestRequestDynamicVariablesValue.ts | 3 + src/api/types/CreateSimulationTestRequest.ts | 18 ++ ...ulationTestRequestDynamicVariablesValue.ts | 3 + .../types/CreateToolCallUnitTestRequest.ts | 16 ++ ...allUnitTestRequestDynamicVariablesValue.ts | 3 + src/api/types/CustomGuardrailConfig.ts | 16 ++ src/api/types/CustomGuardrailConfigModel.ts | 8 + src/api/types/CustomGuardrailInput.ts | 10 + src/api/types/CustomGuardrailOutput.ts | 10 + src/api/types/CustomGuardrailsConfig.ts | 10 + .../types/DefaultSharingGroupResponseModel.ts | 10 + ...haringGroupResponseModelPermissionLevel.ts | 10 + .../DirectPublishingReadResponseModel.ts | 2 +- src/api/types/GetConversationResponseModel.ts | 2 +- .../GetConversationUsersPageResponseModel.ts | 9 + ...ciationDictionaryWithRulesResponseModel.ts | 26 +++ ...hRulesResponseModelPermissionOnResource.ts | 10 + ...ctionaryWithRulesResponseModelRulesItem.ts | 17 ++ .../types/GetResponseUnitTestResponseModel.ts | 19 ++ ...tTestResponseModelDynamicVariablesValue.ts | 3 + .../types/GetSimulationTestResponseModel.ts | 19 ++ ...nTestResponseModelDynamicVariablesValue.ts | 3 + ...ts => GetToolCallUnitTestResponseModel.ts} | 19 +- ...tTestResponseModelDynamicVariablesValue.ts | 3 + ...tTestResponseModelDynamicVariablesValue.ts | 3 - src/api/types/GuardrailsV1Input.ts | 2 + src/api/types/GuardrailsV1Output.ts | 2 + src/api/types/MergingStrategy.ts | 9 + src/api/types/MultiSourceConfigJson.ts | 25 +++ src/api/types/PendingClipTask.ts | 11 + src/api/types/PendingClipTaskType.ts | 8 + src/api/types/PermissionType.ts | 1 + src/api/types/PhoneNumberTransfer.ts | 2 + .../PhoneNumberTransferPostDialDigits.ts | 17 ++ .../types/PostDialDigitsDynamicVariable.ts | 6 + src/api/types/PostDialDigitsStatic.ts | 6 + .../ProjectCreationMetaResponseModelType.ts | 1 + .../ProjectExternalAudioResponseModel.ts | 3 + src/api/types/ProjectVideoResponseModel.ts | 2 + ...ciationDictionaryAliasRuleResponseModel.ts | 6 + ...ationDictionaryPhonemeRuleResponseModel.ts | 7 + .../types/ReferencedToolCommonModelType.ts | 1 + .../types/ResourceMetadataResponseModel.ts | 2 + src/api/types/ResponseUnitTestModel.ts | 17 ++ ...onseUnitTestModelDynamicVariablesValue.ts} | 2 +- .../SearchDocumentationToolConfigInput.ts | 42 ++++ .../SearchDocumentationToolConfigOutput.ts | 40 ++++ src/api/types/SimilarVoice.ts | 2 +- src/api/types/SimulationTestModel.ts | 17 ++ ...mulationTestModelDynamicVariablesValue.ts} | 2 +- src/api/types/SourceConfigJson.ts | 34 +++ src/api/types/SourceRetrievalConfig.ts | 19 ++ src/api/types/SystemToolConfigInputParams.ts | 5 + src/api/types/SystemToolConfigOutputParams.ts | 5 + src/api/types/TestRunMetadataTestType.ts | 1 + src/api/types/TestType.ts | 8 + src/api/types/ToolCallUnitTestModel.ts | 15 ++ ...CallUnitTestModelDynamicVariablesValue.ts} | 2 +- src/api/types/ToolRequestModelToolConfig.ts | 6 + src/api/types/ToolResponseModelToolConfig.ts | 6 + ...ransferToNumberResultTwilioSuccessModel.ts | 1 + src/api/types/TtsConversationalConfigInput.ts | 2 + .../types/TtsConversationalConfigOutput.ts | 2 + ...nversationalConfigWorkflowOverrideInput.ts | 2 + ...versationalConfigWorkflowOverrideOutput.ts | 2 + src/api/types/UnitTestCommonModel.ts | 25 --- src/api/types/UnitTestCommonModelType.ts | 7 - src/api/types/UnitTestRunResponseModel.ts | 2 +- .../types/UnitTestRunResponseModelTestInfo.ts | 22 ++ src/api/types/UnitTestSummaryResponseModel.ts | 2 +- .../types/UpdateResponseUnitTestRequest.ts | 18 ++ ...nseUnitTestRequestDynamicVariablesValue.ts | 3 + src/api/types/UpdateSimulationTestRequest.ts | 18 ++ ...ulationTestRequestDynamicVariablesValue.ts | 3 + .../types/UpdateToolCallUnitTestRequest.ts | 16 ++ ...allUnitTestRequestDynamicVariablesValue.ts | 3 + ...milarVoiceCategory.ts => VoiceCategory.ts} | 4 +- .../WorkflowPhoneNumberNodeModelInput.ts | 2 + ...PhoneNumberNodeModelInputPostDialDigits.ts | 17 ++ .../WorkflowPhoneNumberNodeModelOutput.ts | 2 + ...honeNumberNodeModelOutputPostDialDigits.ts | 17 ++ src/api/types/WorkspaceGroupPermission.ts | 33 +++ src/api/types/WorkspaceGroupResponseModel.ts | 12 + ...kspaceGroupResponseModelGroupUsageLimit.ts | 3 + .../WorkspaceServiceAccountResponseModel.ts | 1 + src/api/types/index.ts | 68 +++++- .../client/requests/UpdateAgentRequest.ts | 2 +- .../client/requests/CreateUnitTestRequest.ts | 63 ------ .../client/requests/UpdateUnitTestRequest.ts | 63 ------ .../resources/tests/client/requests/index.ts | 2 - ...ateUnitTestRequestDynamicVariablesValue.ts | 19 -- .../tests/types/TestsCreateRequestBody.ts | 38 ++++ .../resources/tests/types/TestsGetResponse.ts | 38 ++++ .../tests/types/TestsUpdateRequestBody.ts | 38 ++++ .../tests/types/TestsUpdateResponse.ts | 38 ++++ ...ateUnitTestRequestDynamicVariablesValue.ts | 19 -- .../resources/tests/types/index.ts | 6 +- src/serialization/types/BuiltInToolsInput.ts | 2 + src/serialization/types/BuiltInToolsOutput.ts | 2 + .../BuiltInToolsWorkflowOverrideInput.ts | 2 + .../BuiltInToolsWorkflowOverrideOutput.ts | 2 + src/serialization/types/ContentConfig.ts | 32 +++ .../types/ContentGuardrailInput.ts | 19 ++ .../types/ContentGuardrailOutput.ts | 19 ++ .../types/ConversationSummaryResponseModel.ts | 13 ++ .../types/ConversationUserResponseModel.ts | 28 +++ ...del.ts => CreateAgentTestResponseModel.ts} | 8 +- .../types/CreateResponseUnitTestRequest.ts | 55 +++++ ...nseUnitTestRequestDynamicVariablesValue.ts | 19 ++ .../types/CreateSimulationTestRequest.ts | 47 ++++ ...ulationTestRequestDynamicVariablesValue.ts | 19 ++ .../types/CreateToolCallUnitTestRequest.ts | 49 ++++ ...allUnitTestRequestDynamicVariablesValue.ts | 19 ++ .../types/CustomGuardrailConfig.ts | 25 +++ .../types/CustomGuardrailConfigModel.ts | 14 ++ .../types/CustomGuardrailInput.ts | 19 ++ .../types/CustomGuardrailOutput.ts | 19 ++ .../types/CustomGuardrailsConfig.ts | 19 ++ .../types/DefaultSharingGroupResponseModel.ts | 22 ++ ...haringGroupResponseModelPermissionLevel.ts | 14 ++ .../DirectPublishingReadResponseModel.ts | 4 +- .../types/GetConversationResponseModel.ts | 4 +- .../GetConversationUsersPageResponseModel.ts | 23 ++ ...ciationDictionaryWithRulesResponseModel.ts | 41 ++++ ...hRulesResponseModelPermissionOnResource.ts | 14 ++ ...ctionaryWithRulesResponseModelRulesItem.ts | 34 +++ .../types/GetResponseUnitTestResponseModel.ts | 57 +++++ ...tTestResponseModelDynamicVariablesValue.ts | 19 ++ .../types/GetSimulationTestResponseModel.ts | 49 ++++ ...nTestResponseModelDynamicVariablesValue.ts | 19 ++ ...ts => GetToolCallUnitTestResponseModel.ts} | 58 ++--- ...tTestResponseModelDynamicVariablesValue.ts | 19 ++ src/serialization/types/GuardrailsV1Input.ts | 6 + src/serialization/types/GuardrailsV1Output.ts | 6 + src/serialization/types/MergingStrategy.ts | 12 + .../types/MultiSourceConfigJson.ts | 38 ++++ src/serialization/types/PendingClipTask.ts | 27 +++ .../types/PendingClipTaskType.ts | 14 ++ src/serialization/types/PermissionType.ts | 2 + .../types/PhoneNumberTransfer.ts | 3 + .../PhoneNumberTransferPostDialDigits.ts | 32 +++ .../types/PostDialDigitsDynamicVariable.ts | 18 ++ .../types/PostDialDigitsStatic.ts | 18 ++ .../ProjectCreationMetaResponseModelType.ts | 4 +- .../ProjectExternalAudioResponseModel.ts | 3 + .../types/ProjectVideoResponseModel.ts | 5 + ...ciationDictionaryAliasRuleResponseModel.ts | 20 ++ ...ationDictionaryPhonemeRuleResponseModel.ts | 22 ++ .../types/ReferencedToolCommonModelType.ts | 4 +- .../types/ResourceMetadataResponseModel.ts | 2 + .../types/ResponseUnitTestModel.ts | 50 +++++ ...onseUnitTestModelDynamicVariablesValue.ts} | 8 +- .../SearchDocumentationToolConfigInput.ts | 49 ++++ .../SearchDocumentationToolConfigOutput.ts | 43 ++++ src/serialization/types/SimilarVoice.ts | 6 +- .../types/SimulationTestModel.ts | 42 ++++ ...mulationTestModelDynamicVariablesValue.ts} | 8 +- src/serialization/types/SourceConfigJson.ts | 40 ++++ .../types/SourceRetrievalConfig.ts | 54 +++++ .../types/SystemToolConfigInputParams.ts | 7 + .../types/SystemToolConfigOutputParams.ts | 7 + .../types/TestRunMetadataTestType.ts | 4 +- src/serialization/types/TestType.ts | 12 + ...ommonModel.ts => ToolCallUnitTestModel.ts} | 55 ++--- ...lCallUnitTestModelDynamicVariablesValue.ts | 19 ++ .../types/ToolRequestModelToolConfig.ts | 9 + .../types/ToolResponseModelToolConfig.ts | 9 + ...ransferToNumberResultTwilioSuccessModel.ts | 2 + .../types/TtsConversationalConfigInput.ts | 2 + .../types/TtsConversationalConfigOutput.ts | 2 + ...nversationalConfigWorkflowOverrideInput.ts | 2 + ...versationalConfigWorkflowOverrideOutput.ts | 2 + .../types/UnitTestCommonModelType.ts | 14 -- .../types/UnitTestRunResponseModel.ts | 6 +- .../types/UnitTestRunResponseModelTestInfo.ts | 41 ++++ .../types/UnitTestSummaryResponseModel.ts | 6 +- .../types/UpdateResponseUnitTestRequest.ts | 55 +++++ ...nseUnitTestRequestDynamicVariablesValue.ts | 19 ++ .../types/UpdateSimulationTestRequest.ts | 47 ++++ ...ulationTestRequestDynamicVariablesValue.ts | 19 ++ .../types/UpdateToolCallUnitTestRequest.ts | 49 ++++ ...allUnitTestRequestDynamicVariablesValue.ts | 19 ++ ...milarVoiceCategory.ts => VoiceCategory.ts} | 8 +- .../WorkflowPhoneNumberNodeModelInput.ts | 6 + ...PhoneNumberNodeModelInputPostDialDigits.ts | 34 +++ .../WorkflowPhoneNumberNodeModelOutput.ts | 6 + ...honeNumberNodeModelOutputPostDialDigits.ts | 34 +++ .../types/WorkspaceGroupPermission.ts | 71 ++++++ .../types/WorkspaceGroupResponseModel.ts | 33 +++ ...kspaceGroupResponseModelGroupUsageLimit.ts | 17 ++ .../WorkspaceServiceAccountResponseModel.ts | 6 + src/serialization/types/index.ts | 68 +++++- src/version.ts | 2 +- tests/wire/conversationalAi/agents.test.ts | 42 ++-- .../conversationalAi/conversations.test.ts | 6 + tests/wire/conversationalAi/tests.test.ts | 212 +++++------------- .../tests/invocations.test.ts | 27 +-- tests/wire/conversationalAi/users.test.ts | 50 +++++ tests/wire/pronunciationDictionaries.test.ts | 17 ++ tests/wire/serviceAccounts.test.ts | 13 ++ tests/wire/studio/projects.test.ts | 10 +- tests/wire/workspace/resources.test.ts | 2 + 240 files changed, 3555 insertions(+), 768 deletions(-) create mode 100644 src/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.ts delete mode 100644 src/api/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts delete mode 100644 src/api/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts create mode 100644 src/api/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts create mode 100644 src/api/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts create mode 100644 src/api/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts create mode 100644 src/api/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts create mode 100644 src/api/resources/conversationalAi/resources/users/client/Client.ts create mode 100644 src/api/resources/conversationalAi/resources/users/client/index.ts create mode 100644 src/api/resources/conversationalAi/resources/users/client/requests/UsersListRequest.ts create mode 100644 src/api/resources/conversationalAi/resources/users/client/requests/index.ts create mode 100644 src/api/resources/conversationalAi/resources/users/index.ts create mode 100644 src/api/types/ContentConfig.ts create mode 100644 src/api/types/ContentGuardrailInput.ts create mode 100644 src/api/types/ContentGuardrailOutput.ts create mode 100644 src/api/types/ConversationUserResponseModel.ts rename src/api/types/{CreateUnitTestResponseModel.ts => CreateAgentTestResponseModel.ts} (63%) create mode 100644 src/api/types/CreateResponseUnitTestRequest.ts create mode 100644 src/api/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/api/types/CreateSimulationTestRequest.ts create mode 100644 src/api/types/CreateSimulationTestRequestDynamicVariablesValue.ts create mode 100644 src/api/types/CreateToolCallUnitTestRequest.ts create mode 100644 src/api/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/api/types/CustomGuardrailConfig.ts create mode 100644 src/api/types/CustomGuardrailConfigModel.ts create mode 100644 src/api/types/CustomGuardrailInput.ts create mode 100644 src/api/types/CustomGuardrailOutput.ts create mode 100644 src/api/types/CustomGuardrailsConfig.ts create mode 100644 src/api/types/DefaultSharingGroupResponseModel.ts create mode 100644 src/api/types/DefaultSharingGroupResponseModelPermissionLevel.ts create mode 100644 src/api/types/GetConversationUsersPageResponseModel.ts create mode 100644 src/api/types/GetPronunciationDictionaryWithRulesResponseModel.ts create mode 100644 src/api/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts create mode 100644 src/api/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts create mode 100644 src/api/types/GetResponseUnitTestResponseModel.ts create mode 100644 src/api/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts create mode 100644 src/api/types/GetSimulationTestResponseModel.ts create mode 100644 src/api/types/GetSimulationTestResponseModelDynamicVariablesValue.ts rename src/api/types/{GetUnitTestResponseModel.ts => GetToolCallUnitTestResponseModel.ts} (51%) create mode 100644 src/api/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts delete mode 100644 src/api/types/GetUnitTestResponseModelDynamicVariablesValue.ts create mode 100644 src/api/types/MergingStrategy.ts create mode 100644 src/api/types/MultiSourceConfigJson.ts create mode 100644 src/api/types/PendingClipTask.ts create mode 100644 src/api/types/PendingClipTaskType.ts create mode 100644 src/api/types/PhoneNumberTransferPostDialDigits.ts create mode 100644 src/api/types/PostDialDigitsDynamicVariable.ts create mode 100644 src/api/types/PostDialDigitsStatic.ts create mode 100644 src/api/types/PronunciationDictionaryAliasRuleResponseModel.ts create mode 100644 src/api/types/PronunciationDictionaryPhonemeRuleResponseModel.ts create mode 100644 src/api/types/ResponseUnitTestModel.ts rename src/api/{resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts => types/ResponseUnitTestModelDynamicVariablesValue.ts} (59%) create mode 100644 src/api/types/SearchDocumentationToolConfigInput.ts create mode 100644 src/api/types/SearchDocumentationToolConfigOutput.ts create mode 100644 src/api/types/SimulationTestModel.ts rename src/api/types/{UnitTestCommonModelDynamicVariablesValue.ts => SimulationTestModelDynamicVariablesValue.ts} (59%) create mode 100644 src/api/types/SourceConfigJson.ts create mode 100644 src/api/types/SourceRetrievalConfig.ts create mode 100644 src/api/types/TestType.ts create mode 100644 src/api/types/ToolCallUnitTestModel.ts rename src/api/{resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts => types/ToolCallUnitTestModelDynamicVariablesValue.ts} (59%) delete mode 100644 src/api/types/UnitTestCommonModel.ts delete mode 100644 src/api/types/UnitTestCommonModelType.ts create mode 100644 src/api/types/UnitTestRunResponseModelTestInfo.ts create mode 100644 src/api/types/UpdateResponseUnitTestRequest.ts create mode 100644 src/api/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/api/types/UpdateSimulationTestRequest.ts create mode 100644 src/api/types/UpdateSimulationTestRequestDynamicVariablesValue.ts create mode 100644 src/api/types/UpdateToolCallUnitTestRequest.ts create mode 100644 src/api/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts rename src/api/types/{SimilarVoiceCategory.ts => VoiceCategory.ts} (59%) create mode 100644 src/api/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts create mode 100644 src/api/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts create mode 100644 src/api/types/WorkspaceGroupPermission.ts create mode 100644 src/api/types/WorkspaceGroupResponseModel.ts create mode 100644 src/api/types/WorkspaceGroupResponseModelGroupUsageLimit.ts delete mode 100644 src/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts delete mode 100644 src/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts delete mode 100644 src/serialization/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/serialization/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts create mode 100644 src/serialization/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts create mode 100644 src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts create mode 100644 src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts delete mode 100644 src/serialization/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/serialization/types/ContentConfig.ts create mode 100644 src/serialization/types/ContentGuardrailInput.ts create mode 100644 src/serialization/types/ContentGuardrailOutput.ts create mode 100644 src/serialization/types/ConversationUserResponseModel.ts rename src/serialization/types/{CreateUnitTestResponseModel.ts => CreateAgentTestResponseModel.ts} (59%) create mode 100644 src/serialization/types/CreateResponseUnitTestRequest.ts create mode 100644 src/serialization/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/serialization/types/CreateSimulationTestRequest.ts create mode 100644 src/serialization/types/CreateSimulationTestRequestDynamicVariablesValue.ts create mode 100644 src/serialization/types/CreateToolCallUnitTestRequest.ts create mode 100644 src/serialization/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/serialization/types/CustomGuardrailConfig.ts create mode 100644 src/serialization/types/CustomGuardrailConfigModel.ts create mode 100644 src/serialization/types/CustomGuardrailInput.ts create mode 100644 src/serialization/types/CustomGuardrailOutput.ts create mode 100644 src/serialization/types/CustomGuardrailsConfig.ts create mode 100644 src/serialization/types/DefaultSharingGroupResponseModel.ts create mode 100644 src/serialization/types/DefaultSharingGroupResponseModelPermissionLevel.ts create mode 100644 src/serialization/types/GetConversationUsersPageResponseModel.ts create mode 100644 src/serialization/types/GetPronunciationDictionaryWithRulesResponseModel.ts create mode 100644 src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts create mode 100644 src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts create mode 100644 src/serialization/types/GetResponseUnitTestResponseModel.ts create mode 100644 src/serialization/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts create mode 100644 src/serialization/types/GetSimulationTestResponseModel.ts create mode 100644 src/serialization/types/GetSimulationTestResponseModelDynamicVariablesValue.ts rename src/serialization/types/{GetUnitTestResponseModel.ts => GetToolCallUnitTestResponseModel.ts} (51%) create mode 100644 src/serialization/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts create mode 100644 src/serialization/types/MergingStrategy.ts create mode 100644 src/serialization/types/MultiSourceConfigJson.ts create mode 100644 src/serialization/types/PendingClipTask.ts create mode 100644 src/serialization/types/PendingClipTaskType.ts create mode 100644 src/serialization/types/PhoneNumberTransferPostDialDigits.ts create mode 100644 src/serialization/types/PostDialDigitsDynamicVariable.ts create mode 100644 src/serialization/types/PostDialDigitsStatic.ts create mode 100644 src/serialization/types/PronunciationDictionaryAliasRuleResponseModel.ts create mode 100644 src/serialization/types/PronunciationDictionaryPhonemeRuleResponseModel.ts create mode 100644 src/serialization/types/ResponseUnitTestModel.ts rename src/serialization/types/{GetUnitTestResponseModelDynamicVariablesValue.ts => ResponseUnitTestModelDynamicVariablesValue.ts} (60%) create mode 100644 src/serialization/types/SearchDocumentationToolConfigInput.ts create mode 100644 src/serialization/types/SearchDocumentationToolConfigOutput.ts create mode 100644 src/serialization/types/SimulationTestModel.ts rename src/serialization/types/{UnitTestCommonModelDynamicVariablesValue.ts => SimulationTestModelDynamicVariablesValue.ts} (65%) create mode 100644 src/serialization/types/SourceConfigJson.ts create mode 100644 src/serialization/types/SourceRetrievalConfig.ts create mode 100644 src/serialization/types/TestType.ts rename src/serialization/types/{UnitTestCommonModel.ts => ToolCallUnitTestModel.ts} (50%) create mode 100644 src/serialization/types/ToolCallUnitTestModelDynamicVariablesValue.ts delete mode 100644 src/serialization/types/UnitTestCommonModelType.ts create mode 100644 src/serialization/types/UnitTestRunResponseModelTestInfo.ts create mode 100644 src/serialization/types/UpdateResponseUnitTestRequest.ts create mode 100644 src/serialization/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts create mode 100644 src/serialization/types/UpdateSimulationTestRequest.ts create mode 100644 src/serialization/types/UpdateSimulationTestRequestDynamicVariablesValue.ts create mode 100644 src/serialization/types/UpdateToolCallUnitTestRequest.ts create mode 100644 src/serialization/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts rename src/serialization/types/{SimilarVoiceCategory.ts => VoiceCategory.ts} (55%) create mode 100644 src/serialization/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts create mode 100644 src/serialization/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts create mode 100644 src/serialization/types/WorkspaceGroupPermission.ts create mode 100644 src/serialization/types/WorkspaceGroupResponseModel.ts create mode 100644 src/serialization/types/WorkspaceGroupResponseModelGroupUsageLimit.ts create mode 100644 tests/wire/conversationalAi/users.test.ts diff --git a/package.json b/package.json index 4e5fa759..979efcfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@elevenlabs/elevenlabs-js", - "version": "v2.35.0", + "version": "v2.36.0", "private": false, "repository": "github:elevenlabs/elevenlabs-js", "license": "MIT", diff --git a/reference.md b/reference.md index 8fa7f9eb..5843d044 100644 --- a/reference.md +++ b/reference.md @@ -1542,7 +1542,7 @@ await client.textToVoice.remix("21m00Tcm4TlvDq8ikWAM", { -## user +## User
client.user.get() -> ElevenLabs.User
@@ -2765,7 +2765,7 @@ await client.audioNative.update("21m00Tcm4TlvDq8ikWAM", {});
-## usage +## Usage
client.usage.get({ ...params }) -> ElevenLabs.UsageCharactersResponseModel
@@ -2973,7 +2973,7 @@ await client.pronunciationDictionaries.createFromRules({
-
client.pronunciationDictionaries.get(pronunciation_dictionary_id) -> ElevenLabs.GetPronunciationDictionaryMetadataResponse +
client.pronunciationDictionaries.get(pronunciation_dictionary_id) -> ElevenLabs.GetPronunciationDictionaryWithRulesResponseModel
@@ -4840,7 +4840,7 @@ await client.conversationalAi.agents.create({
-
client.conversationalAi.agents.get(agent_id) -> ElevenLabs.GetAgentResponseModel +
client.conversationalAi.agents.get(agent_id, { ...params }) -> ElevenLabs.GetAgentResponseModel
@@ -4867,7 +4867,10 @@ Retrieve config for an agent
```typescript -await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz"); +await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz", { + versionId: "version_id", + branchId: "branch_id" +}); ```
@@ -4891,6 +4894,14 @@ await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz");
+**request:** `ElevenLabs.conversationalAi.AgentsGetRequest` + +
+
+ +
+
+ **requestOptions:** `AgentsClient.RequestOptions`
@@ -4993,7 +5004,9 @@ Patches an Agent settings
```typescript -await client.conversationalAi.agents.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz"); +await client.conversationalAi.agents.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz", { + branchId: "branch_id" +}); ```
@@ -5413,7 +5426,7 @@ await client.conversationalAi.agents.runTests("agent_3701k3ttaq12ewp8b7qv5rfyszk
## ConversationalAi Tests -
client.conversationalAi.tests.create({ ...params }) -> ElevenLabs.CreateUnitTestResponseModel +
client.conversationalAi.tests.create({ ...params }) -> ElevenLabs.CreateAgentTestResponseModel
@@ -5441,19 +5454,7 @@ Creates a new agent response test. ```typescript await client.conversationalAi.tests.create({ - chatHistory: [{ - role: "user", - timeInCallSecs: 1 - }], - successCondition: "success_condition", - successExamples: [{ - response: "response", - type: "success" - }], - failureExamples: [{ - response: "response", - type: "failure" - }], + type: "llm", name: "name" }); @@ -5471,7 +5472,7 @@ await client.conversationalAi.tests.create({
-**request:** `ElevenLabs.conversationalAi.CreateUnitTestRequest` +**request:** `ElevenLabs.TestsCreateRequestBody`
@@ -5491,7 +5492,7 @@ await client.conversationalAi.tests.create({
-
client.conversationalAi.tests.get(test_id) -> ElevenLabs.GetUnitTestResponseModel +
client.conversationalAi.tests.get(test_id) -> ElevenLabs.TestsGetResponse
@@ -5554,7 +5555,7 @@ await client.conversationalAi.tests.get("TeaqRRdTcIfIu2i7BYfT");
-
client.conversationalAi.tests.update(test_id, { ...params }) -> ElevenLabs.GetUnitTestResponseModel +
client.conversationalAi.tests.update(test_id, { ...params }) -> ElevenLabs.TestsUpdateResponse
@@ -5582,19 +5583,7 @@ Updates an agent response test by ID. ```typescript await client.conversationalAi.tests.update("TeaqRRdTcIfIu2i7BYfT", { - chatHistory: [{ - role: "user", - timeInCallSecs: 1 - }], - successCondition: "success_condition", - successExamples: [{ - response: "response", - type: "success" - }], - failureExamples: [{ - response: "response", - type: "failure" - }], + type: "llm", name: "name" }); @@ -5620,7 +5609,7 @@ await client.conversationalAi.tests.update("TeaqRRdTcIfIu2i7BYfT", {
-**request:** `ElevenLabs.conversationalAi.UpdateUnitTestRequest` +**request:** `ElevenLabs.TestsUpdateRequestBody`
@@ -5831,6 +5820,77 @@ await client.conversationalAi.tests.list({
+ + +
+ +## ConversationalAi Users +
client.conversationalAi.users.list({ ...params }) -> ElevenLabs.GetConversationUsersPageResponseModel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get distinct users from conversations with pagination. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.conversationalAi.users.list({ + agentId: "agent_id", + callStartBeforeUnix: 1, + callStartAfterUnix: 1, + search: "search", + pageSize: 1, + cursor: "cursor" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ElevenLabs.conversationalAi.UsersListRequest` + +
+
+ +
+
+ +**requestOptions:** `UsersClient.RequestOptions` + +
+
+
+
+ +
@@ -10047,7 +10107,7 @@ await client.conversationalAi.knowledgeBase.documents.get("21m00Tcm4TlvDq8ikWAM"
-Delete a document from the knowledge base +Delete a document or folder from the knowledge base.
diff --git a/src/BaseClient.ts b/src/BaseClient.ts index dca14ec3..de3c71c5 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -47,8 +47,8 @@ export function normalizeClientOptions(options: T): { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js", - "X-Fern-SDK-Version": "v2.35.0", - "User-Agent": "@elevenlabs/elevenlabs-js/v2.35.0", + "X-Fern-SDK-Version": "v2.36.0", + "User-Agent": "@elevenlabs/elevenlabs-js/v2.36.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "xi-api-key": options?.apiKey, diff --git a/src/api/resources/conversationalAi/client/Client.ts b/src/api/resources/conversationalAi/client/Client.ts index a941d55c..5a275a2b 100644 --- a/src/api/resources/conversationalAi/client/Client.ts +++ b/src/api/resources/conversationalAi/client/Client.ts @@ -24,6 +24,7 @@ import { SipTrunkClient } from "../resources/sipTrunk/client/Client"; import { TestsClient } from "../resources/tests/client/Client"; import { ToolsClient } from "../resources/tools/client/Client"; import { TwilioClient } from "../resources/twilio/client/Client"; +import { UsersClient } from "../resources/users/client/Client"; import { WhatsappClient } from "../resources/whatsapp/client/Client"; import { WhatsappAccountsClient } from "../resources/whatsappAccounts/client/Client"; @@ -40,6 +41,7 @@ export class ConversationalAiClient { protected _whatsapp: WhatsappClient | undefined; protected _agents: AgentsClient | undefined; protected _tests: TestsClient | undefined; + protected _users: UsersClient | undefined; protected _phoneNumbers: PhoneNumbersClient | undefined; protected _llmUsage: LlmUsageClient | undefined; protected _knowledgeBase: KnowledgeBaseClient | undefined; @@ -77,6 +79,10 @@ export class ConversationalAiClient { return (this._tests ??= new TestsClient(this._options)); } + public get users(): UsersClient { + return (this._users ??= new UsersClient(this._options)); + } + public get phoneNumbers(): PhoneNumbersClient { return (this._phoneNumbers ??= new PhoneNumbersClient(this._options)); } diff --git a/src/api/resources/conversationalAi/resources/agents/client/Client.ts b/src/api/resources/conversationalAi/resources/agents/client/Client.ts index 13746257..48d1d7f3 100644 --- a/src/api/resources/conversationalAi/resources/agents/client/Client.ts +++ b/src/api/resources/conversationalAi/resources/agents/client/Client.ts @@ -161,24 +161,40 @@ export class AgentsClient { * Retrieve config for an agent * * @param {string} agent_id - The id of an agent. This is returned on agent creation. + * @param {ElevenLabs.conversationalAi.AgentsGetRequest} request * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz") + * await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz", { + * versionId: "version_id", + * branchId: "branch_id" + * }) */ public get( agent_id: string, + request: ElevenLabs.conversationalAi.AgentsGetRequest = {}, requestOptions?: AgentsClient.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(agent_id, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__get(agent_id, request, requestOptions)); } private async __get( agent_id: string, + request: ElevenLabs.conversationalAi.AgentsGetRequest = {}, requestOptions?: AgentsClient.RequestOptions, ): Promise> { + const { versionId, branchId } = request; + const _queryParams: Record = {}; + if (versionId != null) { + _queryParams.version_id = versionId; + } + + if (branchId != null) { + _queryParams.branch_id = branchId; + } + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), @@ -193,7 +209,7 @@ export class AgentsClient { ), method: "GET", headers: _headers, - queryParameters: requestOptions?.queryParams, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -319,7 +335,9 @@ export class AgentsClient { * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example - * await client.conversationalAi.agents.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz") + * await client.conversationalAi.agents.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz", { + * branchId: "branch_id" + * }) */ public update( agent_id: string, @@ -334,6 +352,12 @@ export class AgentsClient { request: ElevenLabs.conversationalAi.UpdateAgentRequest = {}, requestOptions?: AgentsClient.RequestOptions, ): Promise> { + const { branchId, ..._body } = request; + const _queryParams: Record = {}; + if (branchId != null) { + _queryParams.branch_id = branchId; + } + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), @@ -349,9 +373,9 @@ export class AgentsClient { method: "PATCH", headers: _headers, contentType: "application/json", - queryParameters: requestOptions?.queryParams, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, requestType: "json", - body: serializers.conversationalAi.UpdateAgentRequest.jsonOrThrow(request, { + body: serializers.conversationalAi.UpdateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip", }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000, diff --git a/src/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.ts b/src/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.ts new file mode 100644 index 00000000..21fab6d3 --- /dev/null +++ b/src/api/resources/conversationalAi/resources/agents/client/requests/AgentsGetRequest.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * versionId: "version_id", + * branchId: "branch_id" + * } + */ +export interface AgentsGetRequest { + /** The ID of the agent version to use */ + versionId?: string; + /** The ID of the branch to use */ + branchId?: string; +} diff --git a/src/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts b/src/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts index 8c5c1965..979dfc87 100644 --- a/src/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts +++ b/src/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts @@ -4,9 +4,13 @@ import type * as ElevenLabs from "../../../../../../index"; /** * @example - * {} + * { + * branchId: "branch_id" + * } */ export interface UpdateAgentRequest { + /** The ID of the branch to use */ + branchId?: string; /** Conversation configuration for an agent */ conversationConfig?: ElevenLabs.ConversationalConfig; /** Platform settings for the agent are all settings that aren't related to the conversation orchestration and content. */ diff --git a/src/api/resources/conversationalAi/resources/agents/client/requests/index.ts b/src/api/resources/conversationalAi/resources/agents/client/requests/index.ts index 3261153e..7e8f8c68 100644 --- a/src/api/resources/conversationalAi/resources/agents/client/requests/index.ts +++ b/src/api/resources/conversationalAi/resources/agents/client/requests/index.ts @@ -1,3 +1,4 @@ +export type { AgentsGetRequest } from "./AgentsGetRequest"; export type { AgentsListRequest } from "./AgentsListRequest"; export type { BodyCreateAgentV1ConvaiAgentsCreatePost } from "./BodyCreateAgentV1ConvaiAgentsCreatePost"; export type { BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost } from "./BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost"; diff --git a/src/api/resources/conversationalAi/resources/index.ts b/src/api/resources/conversationalAi/resources/index.ts index 14a9016a..095f5aa1 100644 --- a/src/api/resources/conversationalAi/resources/index.ts +++ b/src/api/resources/conversationalAi/resources/index.ts @@ -33,6 +33,8 @@ export * from "./tools/client/requests"; export * as twilio from "./twilio"; export * from "./twilio/client/requests"; export * from "./twilio/types"; +export * as users from "./users"; +export * from "./users/client/requests"; export * as whatsapp from "./whatsapp"; export * from "./whatsapp/client/requests"; export * from "./whatsapp/types"; diff --git a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts index 44c5e017..d2c4cc5e 100644 --- a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts +++ b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.ts @@ -511,7 +511,7 @@ export class DocumentsClient { } /** - * Delete a document from the knowledge base + * Delete a document or folder from the knowledge base. * * @param {string} documentation_id - The id of a document from the knowledge base. This is returned on document addition. * @param {ElevenLabs.conversationalAi.knowledgeBase.DocumentsDeleteRequest} request diff --git a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsDeleteRequest.ts b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsDeleteRequest.ts index eae5b279..42877646 100644 --- a/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsDeleteRequest.ts +++ b/src/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsDeleteRequest.ts @@ -7,6 +7,6 @@ * } */ export interface DocumentsDeleteRequest { - /** If set to true, the document will be deleted regardless of whether it is used by any agents and it will be deleted from the dependent agents. */ + /** If set to true, the document or folder will be deleted regardless of whether it is used by any agents and it will be removed from the dependent agents. For non-empty folders, this will also delete all child documents and folders. */ force?: boolean; } diff --git a/src/api/resources/conversationalAi/resources/tests/client/Client.ts b/src/api/resources/conversationalAi/resources/tests/client/Client.ts index 19b4f74b..133cd9a4 100644 --- a/src/api/resources/conversationalAi/resources/tests/client/Client.ts +++ b/src/api/resources/conversationalAi/resources/tests/client/Client.ts @@ -32,40 +32,28 @@ export class TestsClient { /** * Creates a new agent response test. * - * @param {ElevenLabs.conversationalAi.CreateUnitTestRequest} request + * @param {ElevenLabs.conversationalAi.TestsCreateRequestBody} request * @param {TestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.conversationalAi.tests.create({ - * chatHistory: [{ - * role: "user", - * timeInCallSecs: 1 - * }], - * successCondition: "success_condition", - * successExamples: [{ - * response: "response", - * type: "success" - * }], - * failureExamples: [{ - * response: "response", - * type: "failure" - * }], + * type: "llm", * name: "name" * }) */ public create( - request: ElevenLabs.conversationalAi.CreateUnitTestRequest, + request: ElevenLabs.conversationalAi.TestsCreateRequestBody, requestOptions?: TestsClient.RequestOptions, - ): core.HttpResponsePromise { + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); } private async __create( - request: ElevenLabs.conversationalAi.CreateUnitTestRequest, + request: ElevenLabs.conversationalAi.TestsCreateRequestBody, requestOptions?: TestsClient.RequestOptions, - ): Promise> { + ): Promise> { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), @@ -83,7 +71,7 @@ export class TestsClient { contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.conversationalAi.CreateUnitTestRequest.jsonOrThrow(request, { + body: serializers.conversationalAi.TestsCreateRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000, @@ -94,7 +82,7 @@ export class TestsClient { }); if (_response.ok) { return { - data: serializers.CreateUnitTestResponseModel.parseOrThrow(_response.body, { + data: serializers.CreateAgentTestResponseModel.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -147,14 +135,14 @@ export class TestsClient { public get( test_id: string, requestOptions?: TestsClient.RequestOptions, - ): core.HttpResponsePromise { + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__get(test_id, requestOptions)); } private async __get( test_id: string, requestOptions?: TestsClient.RequestOptions, - ): Promise> { + ): Promise> { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), @@ -178,7 +166,7 @@ export class TestsClient { }); if (_response.ok) { return { - data: serializers.GetUnitTestResponseModel.parseOrThrow(_response.body, { + data: serializers.conversationalAi.TestsGetResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, @@ -221,42 +209,30 @@ export class TestsClient { * Updates an agent response test by ID. * * @param {string} test_id - The id of a chat response test. This is returned on test creation. - * @param {ElevenLabs.conversationalAi.UpdateUnitTestRequest} request + * @param {ElevenLabs.conversationalAi.TestsUpdateRequestBody} request * @param {TestsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.conversationalAi.tests.update("TeaqRRdTcIfIu2i7BYfT", { - * chatHistory: [{ - * role: "user", - * timeInCallSecs: 1 - * }], - * successCondition: "success_condition", - * successExamples: [{ - * response: "response", - * type: "success" - * }], - * failureExamples: [{ - * response: "response", - * type: "failure" - * }], + * type: "llm", * name: "name" * }) */ public update( test_id: string, - request: ElevenLabs.conversationalAi.UpdateUnitTestRequest, + request: ElevenLabs.conversationalAi.TestsUpdateRequestBody, requestOptions?: TestsClient.RequestOptions, - ): core.HttpResponsePromise { + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__update(test_id, request, requestOptions)); } private async __update( test_id: string, - request: ElevenLabs.conversationalAi.UpdateUnitTestRequest, + request: ElevenLabs.conversationalAi.TestsUpdateRequestBody, requestOptions?: TestsClient.RequestOptions, - ): Promise> { + ): Promise> { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), @@ -274,7 +250,7 @@ export class TestsClient { contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: serializers.conversationalAi.UpdateUnitTestRequest.jsonOrThrow(request, { + body: serializers.conversationalAi.TestsUpdateRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip", }), timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000, @@ -285,7 +261,7 @@ export class TestsClient { }); if (_response.ok) { return { - data: serializers.GetUnitTestResponseModel.parseOrThrow(_response.body, { + data: serializers.conversationalAi.TestsUpdateResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, diff --git a/src/api/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts b/src/api/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts deleted file mode 100644 index 145cecfc..00000000 --- a/src/api/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../../../../../../index"; - -/** - * @example - * { - * chatHistory: [{ - * role: "user", - * timeInCallSecs: 1 - * }], - * successCondition: "success_condition", - * successExamples: [{ - * response: "response", - * type: "success" - * }], - * failureExamples: [{ - * response: "response", - * type: "failure" - * }], - * name: "name" - * } - */ -export interface CreateUnitTestRequest { - chatHistory: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; - /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ - successCondition: string; - /** Non-empty list of example responses that should be considered successful */ - successExamples: ElevenLabs.AgentSuccessfulResponseExample[]; - /** Non-empty list of example responses that should be considered failures */ - failureExamples: ElevenLabs.AgentFailureResponseExample[]; - /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */ - toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelInput; - /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */ - checkAnyToolMatches?: boolean; - /** Dynamic variables to replace in the agent config during testing */ - dynamicVariables?: Record< - string, - ElevenLabs.conversationalAi.CreateUnitTestRequestDynamicVariablesValue | undefined - >; - type?: ElevenLabs.UnitTestCommonModelType; - /** Metadata of a conversation this test was created from (if applicable). */ - fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; - name: string; -} diff --git a/src/api/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts b/src/api/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts deleted file mode 100644 index 0ffe724b..00000000 --- a/src/api/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts +++ /dev/null @@ -1,45 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../../../../../../index"; - -/** - * @example - * { - * chatHistory: [{ - * role: "user", - * timeInCallSecs: 1 - * }], - * successCondition: "success_condition", - * successExamples: [{ - * response: "response", - * type: "success" - * }], - * failureExamples: [{ - * response: "response", - * type: "failure" - * }], - * name: "name" - * } - */ -export interface UpdateUnitTestRequest { - chatHistory: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; - /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ - successCondition: string; - /** Non-empty list of example responses that should be considered successful */ - successExamples: ElevenLabs.AgentSuccessfulResponseExample[]; - /** Non-empty list of example responses that should be considered failures */ - failureExamples: ElevenLabs.AgentFailureResponseExample[]; - /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */ - toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelInput; - /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */ - checkAnyToolMatches?: boolean; - /** Dynamic variables to replace in the agent config during testing */ - dynamicVariables?: Record< - string, - ElevenLabs.conversationalAi.UpdateUnitTestRequestDynamicVariablesValue | undefined - >; - type?: ElevenLabs.UnitTestCommonModelType; - /** Metadata of a conversation this test was created from (if applicable). */ - fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; - name: string; -} diff --git a/src/api/resources/conversationalAi/resources/tests/client/requests/index.ts b/src/api/resources/conversationalAi/resources/tests/client/requests/index.ts index 5ff583d3..520c3b7a 100644 --- a/src/api/resources/conversationalAi/resources/tests/client/requests/index.ts +++ b/src/api/resources/conversationalAi/resources/tests/client/requests/index.ts @@ -1,4 +1,2 @@ -export type { CreateUnitTestRequest } from "./CreateUnitTestRequest"; export type { ListTestsByIdsRequestModel } from "./ListTestsByIdsRequestModel"; export type { TestsListRequest } from "./TestsListRequest"; -export type { UpdateUnitTestRequest } from "./UpdateUnitTestRequest"; diff --git a/src/api/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts b/src/api/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts new file mode 100644 index 00000000..2b42556b --- /dev/null +++ b/src/api/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../index"; + +/** + * Create Chat Response Test Request Information + */ +export type TestsCreateRequestBody = + | ElevenLabs.conversationalAi.TestsCreateRequestBody.Llm + | ElevenLabs.conversationalAi.TestsCreateRequestBody.Tool + | ElevenLabs.conversationalAi.TestsCreateRequestBody.Simulation; + +export namespace TestsCreateRequestBody { + export interface Llm extends ElevenLabs.CreateResponseUnitTestRequest { + type: "llm"; + } + + export interface Tool extends ElevenLabs.CreateToolCallUnitTestRequest { + type: "tool"; + } + + export interface Simulation extends ElevenLabs.CreateSimulationTestRequest { + type: "simulation"; + } +} diff --git a/src/api/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts b/src/api/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts new file mode 100644 index 00000000..c0b652a9 --- /dev/null +++ b/src/api/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../index"; + +export type TestsGetResponse = + | ElevenLabs.conversationalAi.TestsGetResponse.Llm + | ElevenLabs.conversationalAi.TestsGetResponse.Tool + | ElevenLabs.conversationalAi.TestsGetResponse.Simulation; + +export namespace TestsGetResponse { + export interface Llm extends ElevenLabs.GetResponseUnitTestResponseModel { + type: "llm"; + } + + export interface Tool extends ElevenLabs.GetToolCallUnitTestResponseModel { + type: "tool"; + } + + export interface Simulation extends ElevenLabs.GetSimulationTestResponseModel { + type: "simulation"; + } +} diff --git a/src/api/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts b/src/api/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts new file mode 100644 index 00000000..5ea51b9d --- /dev/null +++ b/src/api/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../index"; + +/** + * Agent test to update + */ +export type TestsUpdateRequestBody = + | ElevenLabs.conversationalAi.TestsUpdateRequestBody.Llm + | ElevenLabs.conversationalAi.TestsUpdateRequestBody.Tool + | ElevenLabs.conversationalAi.TestsUpdateRequestBody.Simulation; + +export namespace TestsUpdateRequestBody { + export interface Llm extends ElevenLabs.UpdateResponseUnitTestRequest { + type: "llm"; + } + + export interface Tool extends ElevenLabs.UpdateToolCallUnitTestRequest { + type: "tool"; + } + + export interface Simulation extends ElevenLabs.UpdateSimulationTestRequest { + type: "simulation"; + } +} diff --git a/src/api/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts b/src/api/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts new file mode 100644 index 00000000..59dc1e4a --- /dev/null +++ b/src/api/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../index"; + +export type TestsUpdateResponse = + | ElevenLabs.conversationalAi.TestsUpdateResponse.Llm + | ElevenLabs.conversationalAi.TestsUpdateResponse.Tool + | ElevenLabs.conversationalAi.TestsUpdateResponse.Simulation; + +export namespace TestsUpdateResponse { + export interface Llm extends ElevenLabs.GetResponseUnitTestResponseModel { + type: "llm"; + } + + export interface Tool extends ElevenLabs.GetToolCallUnitTestResponseModel { + type: "tool"; + } + + export interface Simulation extends ElevenLabs.GetSimulationTestResponseModel { + type: "simulation"; + } +} diff --git a/src/api/resources/conversationalAi/resources/tests/types/index.ts b/src/api/resources/conversationalAi/resources/tests/types/index.ts index 9a68f2ca..2da15598 100644 --- a/src/api/resources/conversationalAi/resources/tests/types/index.ts +++ b/src/api/resources/conversationalAi/resources/tests/types/index.ts @@ -1,2 +1,4 @@ -export * from "./CreateUnitTestRequestDynamicVariablesValue"; -export * from "./UpdateUnitTestRequestDynamicVariablesValue"; +export * from "./TestsCreateRequestBody"; +export * from "./TestsGetResponse"; +export * from "./TestsUpdateRequestBody"; +export * from "./TestsUpdateResponse"; diff --git a/src/api/resources/conversationalAi/resources/users/client/Client.ts b/src/api/resources/conversationalAi/resources/users/client/Client.ts new file mode 100644 index 00000000..eb5eae7a --- /dev/null +++ b/src/api/resources/conversationalAi/resources/users/client/Client.ts @@ -0,0 +1,137 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient"; +import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../../../BaseClient"; +import * as core from "../../../../../../core"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as environments from "../../../../../../environments"; +import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError"; +import * as errors from "../../../../../../errors/index"; +import * as serializers from "../../../../../../serialization/index"; +import * as ElevenLabs from "../../../../../index"; + +export declare namespace UsersClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class UsersClient { + protected readonly _options: NormalizedClientOptions; + + constructor(options: UsersClient.Options = {}) { + this._options = normalizeClientOptions(options); + } + + /** + * Get distinct users from conversations with pagination. + * + * @param {ElevenLabs.conversationalAi.UsersListRequest} request + * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link ElevenLabs.UnprocessableEntityError} + * + * @example + * await client.conversationalAi.users.list({ + * agentId: "agent_id", + * callStartBeforeUnix: 1, + * callStartAfterUnix: 1, + * search: "search", + * pageSize: 1, + * cursor: "cursor" + * }) + */ + public list( + request: ElevenLabs.conversationalAi.UsersListRequest = {}, + requestOptions?: UsersClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: ElevenLabs.conversationalAi.UsersListRequest = {}, + requestOptions?: UsersClient.RequestOptions, + ): Promise> { + const { agentId, callStartBeforeUnix, callStartAfterUnix, search, pageSize, cursor } = request; + const _queryParams: Record = {}; + if (agentId != null) { + _queryParams.agent_id = agentId; + } + + if (callStartBeforeUnix != null) { + _queryParams.call_start_before_unix = callStartBeforeUnix.toString(); + } + + if (callStartAfterUnix != null) { + _queryParams.call_start_after_unix = callStartAfterUnix.toString(); + } + + if (search != null) { + _queryParams.search = search; + } + + if (pageSize != null) { + _queryParams.page_size = pageSize.toString(); + } + + if (cursor != null) { + _queryParams.cursor = cursor; + } + + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ElevenLabsEnvironment.Production, + "v1/convai/users", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 240) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.GetConversationUsersPageResponseModel.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new ElevenLabs.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + breadcrumbsPrefix: ["response"], + }), + _response.rawResponse, + ); + default: + throw new errors.ElevenLabsError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/convai/users"); + } +} diff --git a/src/api/resources/conversationalAi/resources/users/client/index.ts b/src/api/resources/conversationalAi/resources/users/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/conversationalAi/resources/users/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/conversationalAi/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/conversationalAi/resources/users/client/requests/UsersListRequest.ts new file mode 100644 index 00000000..5cbc2bb0 --- /dev/null +++ b/src/api/resources/conversationalAi/resources/users/client/requests/UsersListRequest.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * agentId: "agent_id", + * callStartBeforeUnix: 1, + * callStartAfterUnix: 1, + * search: "search", + * pageSize: 1, + * cursor: "cursor" + * } + */ +export interface UsersListRequest { + /** The id of the agent you're taking the action on. */ + agentId?: string; + /** Unix timestamp (in seconds) to filter conversations up to this start date. */ + callStartBeforeUnix?: number; + /** Unix timestamp (in seconds) to filter conversations after to this start date. */ + callStartAfterUnix?: number; + /** Search/filter by user ID (exact match). */ + search?: string; + /** How many users to return at maximum. Defaults to 30. */ + pageSize?: number; + /** Used for fetching next page. Cursor is returned in the response. */ + cursor?: string; +} diff --git a/src/api/resources/conversationalAi/resources/users/client/requests/index.ts b/src/api/resources/conversationalAi/resources/users/client/requests/index.ts new file mode 100644 index 00000000..826cce46 --- /dev/null +++ b/src/api/resources/conversationalAi/resources/users/client/requests/index.ts @@ -0,0 +1 @@ +export type { UsersListRequest } from "./UsersListRequest"; diff --git a/src/api/resources/conversationalAi/resources/users/index.ts b/src/api/resources/conversationalAi/resources/users/index.ts new file mode 100644 index 00000000..5ec76921 --- /dev/null +++ b/src/api/resources/conversationalAi/resources/users/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/pronunciationDictionaries/client/Client.ts b/src/api/resources/pronunciationDictionaries/client/Client.ts index 4c0828fc..18e6f0d8 100644 --- a/src/api/resources/pronunciationDictionaries/client/Client.ts +++ b/src/api/resources/pronunciationDictionaries/client/Client.ts @@ -254,14 +254,14 @@ export class PronunciationDictionariesClient { public get( pronunciation_dictionary_id: string, requestOptions?: PronunciationDictionariesClient.RequestOptions, - ): core.HttpResponsePromise { + ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__get(pronunciation_dictionary_id, requestOptions)); } private async __get( pronunciation_dictionary_id: string, requestOptions?: PronunciationDictionariesClient.RequestOptions, - ): Promise> { + ): Promise> { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ "xi-api-key": requestOptions?.apiKey ?? this._options?.apiKey }), @@ -285,7 +285,7 @@ export class PronunciationDictionariesClient { }); if (_response.ok) { return { - data: serializers.GetPronunciationDictionaryMetadataResponse.parseOrThrow(_response.body, { + data: serializers.GetPronunciationDictionaryWithRulesResponseModel.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, diff --git a/src/api/resources/pronunciationDictionaries/client/requests/BodyUpdatePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdPatch.ts b/src/api/resources/pronunciationDictionaries/client/requests/BodyUpdatePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdPatch.ts index 234eff3d..c7a7fd77 100644 --- a/src/api/resources/pronunciationDictionaries/client/requests/BodyUpdatePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdPatch.ts +++ b/src/api/resources/pronunciationDictionaries/client/requests/BodyUpdatePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdPatch.ts @@ -5,7 +5,7 @@ * {} */ export interface BodyUpdatePronunciationDictionaryV1PronunciationDictionariesPronunciationDictionaryIdPatch { - /** The name of the pronunciation dictionary, used for identification only. */ + /** Whether to archive the pronunciation dictionary. */ archived?: boolean; /** The name of the pronunciation dictionary, used for identification only. */ name?: string; diff --git a/src/api/types/BuiltInToolsInput.ts b/src/api/types/BuiltInToolsInput.ts index fb42910e..3e12a628 100644 --- a/src/api/types/BuiltInToolsInput.ts +++ b/src/api/types/BuiltInToolsInput.ts @@ -17,4 +17,6 @@ export interface BuiltInToolsInput { playKeypadTouchTone?: ElevenLabs.SystemToolConfigInput; /** The voicemail detection tool */ voicemailDetection?: ElevenLabs.SystemToolConfigInput; + /** The search documentation tool for RAG */ + searchDocumentation?: ElevenLabs.SystemToolConfigInput; } diff --git a/src/api/types/BuiltInToolsOutput.ts b/src/api/types/BuiltInToolsOutput.ts index ca122e3e..df7d7a8e 100644 --- a/src/api/types/BuiltInToolsOutput.ts +++ b/src/api/types/BuiltInToolsOutput.ts @@ -17,4 +17,6 @@ export interface BuiltInToolsOutput { playKeypadTouchTone?: ElevenLabs.SystemToolConfigOutput; /** The voicemail detection tool */ voicemailDetection?: ElevenLabs.SystemToolConfigOutput; + /** The search documentation tool for RAG */ + searchDocumentation?: ElevenLabs.SystemToolConfigOutput; } diff --git a/src/api/types/BuiltInToolsWorkflowOverrideInput.ts b/src/api/types/BuiltInToolsWorkflowOverrideInput.ts index 89cefa59..6e9986f9 100644 --- a/src/api/types/BuiltInToolsWorkflowOverrideInput.ts +++ b/src/api/types/BuiltInToolsWorkflowOverrideInput.ts @@ -17,4 +17,6 @@ export interface BuiltInToolsWorkflowOverrideInput { playKeypadTouchTone?: ElevenLabs.SystemToolConfigInput; /** The voicemail detection tool */ voicemailDetection?: ElevenLabs.SystemToolConfigInput; + /** The search documentation tool for RAG */ + searchDocumentation?: ElevenLabs.SystemToolConfigInput; } diff --git a/src/api/types/BuiltInToolsWorkflowOverrideOutput.ts b/src/api/types/BuiltInToolsWorkflowOverrideOutput.ts index e89d3d3f..066d239c 100644 --- a/src/api/types/BuiltInToolsWorkflowOverrideOutput.ts +++ b/src/api/types/BuiltInToolsWorkflowOverrideOutput.ts @@ -17,4 +17,6 @@ export interface BuiltInToolsWorkflowOverrideOutput { playKeypadTouchTone?: ElevenLabs.SystemToolConfigOutput; /** The voicemail detection tool */ voicemailDetection?: ElevenLabs.SystemToolConfigOutput; + /** The search documentation tool for RAG */ + searchDocumentation?: ElevenLabs.SystemToolConfigOutput; } diff --git a/src/api/types/ContentConfig.ts b/src/api/types/ContentConfig.ts new file mode 100644 index 00000000..d7e9ce21 --- /dev/null +++ b/src/api/types/ContentConfig.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface ContentConfig { + sexual?: ElevenLabs.ThresholdGuardrail; + violence?: ElevenLabs.ThresholdGuardrail; + harassment?: ElevenLabs.ThresholdGuardrail; + selfHarm?: ElevenLabs.ThresholdGuardrail; + profanity?: ElevenLabs.ThresholdGuardrail; + religionAndPolitics?: ElevenLabs.ThresholdGuardrail; + medicalAndLegalInformation?: ElevenLabs.ThresholdGuardrail; +} diff --git a/src/api/types/ContentGuardrailInput.ts b/src/api/types/ContentGuardrailInput.ts new file mode 100644 index 00000000..c518f431 --- /dev/null +++ b/src/api/types/ContentGuardrailInput.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface ContentGuardrailInput { + config?: ElevenLabs.ContentConfig; +} diff --git a/src/api/types/ContentGuardrailOutput.ts b/src/api/types/ContentGuardrailOutput.ts new file mode 100644 index 00000000..85108198 --- /dev/null +++ b/src/api/types/ContentGuardrailOutput.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface ContentGuardrailOutput { + config?: ElevenLabs.ContentConfig; +} diff --git a/src/api/types/ConversationSummaryResponseModel.ts b/src/api/types/ConversationSummaryResponseModel.ts index 51dbd2ed..e63f8987 100644 --- a/src/api/types/ConversationSummaryResponseModel.ts +++ b/src/api/types/ConversationSummaryResponseModel.ts @@ -15,6 +15,9 @@ export interface ConversationSummaryResponseModel { callSuccessful: ElevenLabs.EvaluationSuccessResult; transcriptSummary?: string; callSummaryTitle?: string; + mainLanguage?: string; + conversationInitiationSource?: ElevenLabs.ConversationInitiationSource; + toolNames?: string[]; direction?: ElevenLabs.ConversationSummaryResponseModelDirection; rating?: number; } diff --git a/src/api/types/ConversationUserResponseModel.ts b/src/api/types/ConversationUserResponseModel.ts new file mode 100644 index 00000000..26f52e07 --- /dev/null +++ b/src/api/types/ConversationUserResponseModel.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface ConversationUserResponseModel { + userId: string; + lastContactUnixSecs: number; + firstContactUnixSecs: number; + conversationCount: number; + lastAgentId?: string; + lastAgentName?: string; +} diff --git a/src/api/types/CreateUnitTestResponseModel.ts b/src/api/types/CreateAgentTestResponseModel.ts similarity index 63% rename from src/api/types/CreateUnitTestResponseModel.ts rename to src/api/types/CreateAgentTestResponseModel.ts index 5bff558f..aa8bf366 100644 --- a/src/api/types/CreateUnitTestResponseModel.ts +++ b/src/api/types/CreateAgentTestResponseModel.ts @@ -1,5 +1,5 @@ // This file was auto-generated by Fern from our API Definition. -export interface CreateUnitTestResponseModel { +export interface CreateAgentTestResponseModel { id: string; } diff --git a/src/api/types/CreateResponseUnitTestRequest.ts b/src/api/types/CreateResponseUnitTestRequest.ts new file mode 100644 index 00000000..8015348d --- /dev/null +++ b/src/api/types/CreateResponseUnitTestRequest.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface CreateResponseUnitTestRequest { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Non-empty list of example responses that should be considered successful */ + successExamples?: ElevenLabs.AgentSuccessfulResponseExample[]; + /** Non-empty list of example responses that should be considered failures */ + failureExamples?: ElevenLabs.AgentFailureResponseExample[]; + name: string; +} diff --git a/src/api/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts b/src/api/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..fd09e43c --- /dev/null +++ b/src/api/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type CreateResponseUnitTestRequestDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/CreateSimulationTestRequest.ts b/src/api/types/CreateSimulationTestRequest.ts new file mode 100644 index 00000000..c9123b2a --- /dev/null +++ b/src/api/types/CreateSimulationTestRequest.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface CreateSimulationTestRequest { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Description of the simulation scenario and user persona for simulation tests. */ + simulationScenario?: string; + /** Maximum number of conversation turns for simulation tests. */ + simulationMaxTurns?: number; + name: string; +} diff --git a/src/api/types/CreateSimulationTestRequestDynamicVariablesValue.ts b/src/api/types/CreateSimulationTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..fcf6aaa9 --- /dev/null +++ b/src/api/types/CreateSimulationTestRequestDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type CreateSimulationTestRequestDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/CreateToolCallUnitTestRequest.ts b/src/api/types/CreateToolCallUnitTestRequest.ts new file mode 100644 index 00000000..9ced6af0 --- /dev/null +++ b/src/api/types/CreateToolCallUnitTestRequest.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface CreateToolCallUnitTestRequest { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; + /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */ + toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelInput; + /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */ + checkAnyToolMatches?: boolean; + name: string; +} diff --git a/src/api/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts b/src/api/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..00dd28a5 --- /dev/null +++ b/src/api/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type CreateToolCallUnitTestRequestDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/CustomGuardrailConfig.ts b/src/api/types/CustomGuardrailConfig.ts new file mode 100644 index 00000000..7b5a7f21 --- /dev/null +++ b/src/api/types/CustomGuardrailConfig.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +/** + * Single custom guardrail configuration + */ +export interface CustomGuardrailConfig { + isEnabled?: boolean; + /** User-facing name for this guardrail */ + name: string; + /** Instruction describing what to block, e.g. 'don't talk about politics' */ + prompt: string; + /** LLM model to use for custom guardrail evaluation */ + model: ElevenLabs.CustomGuardrailConfigModel; +} diff --git a/src/api/types/CustomGuardrailConfigModel.ts b/src/api/types/CustomGuardrailConfigModel.ts new file mode 100644 index 00000000..e177aaf7 --- /dev/null +++ b/src/api/types/CustomGuardrailConfigModel.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** LLM model to use for custom guardrail evaluation */ +export const CustomGuardrailConfigModel = { + Gemini25FlashLite: "gemini-2.5-flash-lite", + Gemini20Flash: "gemini-2.0-flash", +} as const; +export type CustomGuardrailConfigModel = (typeof CustomGuardrailConfigModel)[keyof typeof CustomGuardrailConfigModel]; diff --git a/src/api/types/CustomGuardrailInput.ts b/src/api/types/CustomGuardrailInput.ts new file mode 100644 index 00000000..588eb91a --- /dev/null +++ b/src/api/types/CustomGuardrailInput.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +/** + * Container for custom guardrails, matching ModerationGuardrail pattern + */ +export interface CustomGuardrailInput { + config?: ElevenLabs.CustomGuardrailsConfig; +} diff --git a/src/api/types/CustomGuardrailOutput.ts b/src/api/types/CustomGuardrailOutput.ts new file mode 100644 index 00000000..52b74f5a --- /dev/null +++ b/src/api/types/CustomGuardrailOutput.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +/** + * Container for custom guardrails, matching ModerationGuardrail pattern + */ +export interface CustomGuardrailOutput { + config?: ElevenLabs.CustomGuardrailsConfig; +} diff --git a/src/api/types/CustomGuardrailsConfig.ts b/src/api/types/CustomGuardrailsConfig.ts new file mode 100644 index 00000000..ba0f0935 --- /dev/null +++ b/src/api/types/CustomGuardrailsConfig.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +/** + * Config container for custom guardrails list + */ +export interface CustomGuardrailsConfig { + configs?: ElevenLabs.CustomGuardrailConfig[]; +} diff --git a/src/api/types/DefaultSharingGroupResponseModel.ts b/src/api/types/DefaultSharingGroupResponseModel.ts new file mode 100644 index 00000000..0715a7b6 --- /dev/null +++ b/src/api/types/DefaultSharingGroupResponseModel.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface DefaultSharingGroupResponseModel { + /** The group to share with by default */ + group: ElevenLabs.WorkspaceGroupResponseModel; + /** The permission level to grant to the group */ + permissionLevel: ElevenLabs.DefaultSharingGroupResponseModelPermissionLevel; +} diff --git a/src/api/types/DefaultSharingGroupResponseModelPermissionLevel.ts b/src/api/types/DefaultSharingGroupResponseModelPermissionLevel.ts new file mode 100644 index 00000000..0020f2dd --- /dev/null +++ b/src/api/types/DefaultSharingGroupResponseModelPermissionLevel.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The permission level to grant to the group */ +export const DefaultSharingGroupResponseModelPermissionLevel = { + Admin: "admin", + Editor: "editor", + Viewer: "viewer", +} as const; +export type DefaultSharingGroupResponseModelPermissionLevel = + (typeof DefaultSharingGroupResponseModelPermissionLevel)[keyof typeof DefaultSharingGroupResponseModelPermissionLevel]; diff --git a/src/api/types/DirectPublishingReadResponseModel.ts b/src/api/types/DirectPublishingReadResponseModel.ts index aa6308d1..441c9980 100644 --- a/src/api/types/DirectPublishingReadResponseModel.ts +++ b/src/api/types/DirectPublishingReadResponseModel.ts @@ -35,7 +35,7 @@ export interface DirectPublishingReadResponseModel { publisher?: string; copyright?: string; subtitle?: string; - distributionTerritories?: "worldwide"[]; + distributionTerritories?: string[]; edition?: string; contributors?: ElevenLabs.Contributor[]; payoutType?: ElevenLabs.DirectPublishingReadResponseModelPayoutType; diff --git a/src/api/types/GetConversationResponseModel.ts b/src/api/types/GetConversationResponseModel.ts index 608f3b3b..3ec4454f 100644 --- a/src/api/types/GetConversationResponseModel.ts +++ b/src/api/types/GetConversationResponseModel.ts @@ -5,7 +5,6 @@ import type * as ElevenLabs from "../index"; export interface GetConversationResponseModel { agentId: string; agentName?: string; - conversationId: string; status: ElevenLabs.GetConversationResponseModelStatus; userId?: string; branchId?: string; @@ -15,6 +14,7 @@ export interface GetConversationResponseModel { metadata: ElevenLabs.ConversationHistoryMetadataCommonModel; analysis?: ElevenLabs.ConversationHistoryAnalysisCommonModel; conversationInitiationClientData?: ElevenLabs.ConversationInitiationClientDataRequestOutput; + conversationId: string; hasAudio: boolean; hasUserAudio: boolean; hasResponseAudio: boolean; diff --git a/src/api/types/GetConversationUsersPageResponseModel.ts b/src/api/types/GetConversationUsersPageResponseModel.ts new file mode 100644 index 00000000..2ee3a980 --- /dev/null +++ b/src/api/types/GetConversationUsersPageResponseModel.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface GetConversationUsersPageResponseModel { + users: ElevenLabs.ConversationUserResponseModel[]; + nextCursor?: string; + hasMore: boolean; +} diff --git a/src/api/types/GetPronunciationDictionaryWithRulesResponseModel.ts b/src/api/types/GetPronunciationDictionaryWithRulesResponseModel.ts new file mode 100644 index 00000000..723eca06 --- /dev/null +++ b/src/api/types/GetPronunciationDictionaryWithRulesResponseModel.ts @@ -0,0 +1,26 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface GetPronunciationDictionaryWithRulesResponseModel { + /** The ID of the pronunciation dictionary. */ + id: string; + /** The ID of the latest version of the pronunciation dictionary. */ + latestVersionId: string; + /** The number of rules in the latest version of the pronunciation dictionary. */ + latestVersionRulesNum: number; + /** The name of the pronunciation dictionary. */ + name: string; + /** The permission on the resource of the pronunciation dictionary. */ + permissionOnResource?: ElevenLabs.GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource; + /** The user ID of the creator of the pronunciation dictionary. */ + createdBy: string; + /** The creation time of the pronunciation dictionary in Unix timestamp. */ + creationTimeUnix: number; + /** The archive time of the pronunciation dictionary in Unix timestamp. */ + archivedTimeUnix?: number; + /** The description of the pronunciation dictionary. */ + description?: string; + /** The rules in the latest version of the pronunciation dictionary. */ + rules: ElevenLabs.GetPronunciationDictionaryWithRulesResponseModelRulesItem[]; +} diff --git a/src/api/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts b/src/api/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts new file mode 100644 index 00000000..50be7cd6 --- /dev/null +++ b/src/api/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +export const GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource = { + Admin: "admin", + Editor: "editor", + Commenter: "commenter", + Viewer: "viewer", +} as const; +export type GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource = + (typeof GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource)[keyof typeof GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource]; diff --git a/src/api/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts b/src/api/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts new file mode 100644 index 00000000..2764549c --- /dev/null +++ b/src/api/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export type GetPronunciationDictionaryWithRulesResponseModelRulesItem = + | ElevenLabs.GetPronunciationDictionaryWithRulesResponseModelRulesItem.Alias + | ElevenLabs.GetPronunciationDictionaryWithRulesResponseModelRulesItem.Phoneme; + +export namespace GetPronunciationDictionaryWithRulesResponseModelRulesItem { + export interface Alias extends ElevenLabs.PronunciationDictionaryAliasRuleResponseModel { + type: "alias"; + } + + export interface Phoneme extends ElevenLabs.PronunciationDictionaryPhonemeRuleResponseModel { + type: "phoneme"; + } +} diff --git a/src/api/types/GetResponseUnitTestResponseModel.ts b/src/api/types/GetResponseUnitTestResponseModel.ts new file mode 100644 index 00000000..6c63d0e7 --- /dev/null +++ b/src/api/types/GetResponseUnitTestResponseModel.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface GetResponseUnitTestResponseModel { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Non-empty list of example responses that should be considered successful */ + successExamples?: ElevenLabs.AgentSuccessfulResponseExample[]; + /** Non-empty list of example responses that should be considered failures */ + failureExamples?: ElevenLabs.AgentFailureResponseExample[]; + id: string; + name: string; +} diff --git a/src/api/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts b/src/api/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts new file mode 100644 index 00000000..6daad4ec --- /dev/null +++ b/src/api/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type GetResponseUnitTestResponseModelDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/GetSimulationTestResponseModel.ts b/src/api/types/GetSimulationTestResponseModel.ts new file mode 100644 index 00000000..351c53aa --- /dev/null +++ b/src/api/types/GetSimulationTestResponseModel.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface GetSimulationTestResponseModel { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Description of the simulation scenario and user persona for simulation tests. */ + simulationScenario?: string; + /** Maximum number of conversation turns for simulation tests. */ + simulationMaxTurns?: number; + id: string; + name: string; +} diff --git a/src/api/types/GetSimulationTestResponseModelDynamicVariablesValue.ts b/src/api/types/GetSimulationTestResponseModelDynamicVariablesValue.ts new file mode 100644 index 00000000..bde06c74 --- /dev/null +++ b/src/api/types/GetSimulationTestResponseModelDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type GetSimulationTestResponseModelDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/GetUnitTestResponseModel.ts b/src/api/types/GetToolCallUnitTestResponseModel.ts similarity index 51% rename from src/api/types/GetUnitTestResponseModel.ts rename to src/api/types/GetToolCallUnitTestResponseModel.ts index d18d02d5..82382e82 100644 --- a/src/api/types/GetUnitTestResponseModel.ts +++ b/src/api/types/GetToolCallUnitTestResponseModel.ts @@ -2,23 +2,16 @@ import type * as ElevenLabs from "../index"; -export interface GetUnitTestResponseModel { - chatHistory: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; - /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ - successCondition: string; - /** Non-empty list of example responses that should be considered successful */ - successExamples: ElevenLabs.AgentSuccessfulResponseExample[]; - /** Non-empty list of example responses that should be considered failures */ - failureExamples: ElevenLabs.AgentFailureResponseExample[]; +export interface GetToolCallUnitTestResponseModel { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */ toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelOutput; /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */ checkAnyToolMatches?: boolean; - /** Dynamic variables to replace in the agent config during testing */ - dynamicVariables?: Record; - type?: ElevenLabs.UnitTestCommonModelType; - /** Metadata of a conversation this test was created from (if applicable). */ - fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; id: string; name: string; } diff --git a/src/api/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts b/src/api/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts new file mode 100644 index 00000000..555983ca --- /dev/null +++ b/src/api/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type GetToolCallUnitTestResponseModelDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/GetUnitTestResponseModelDynamicVariablesValue.ts b/src/api/types/GetUnitTestResponseModelDynamicVariablesValue.ts deleted file mode 100644 index 0789782c..00000000 --- a/src/api/types/GetUnitTestResponseModelDynamicVariablesValue.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export type GetUnitTestResponseModelDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/GuardrailsV1Input.ts b/src/api/types/GuardrailsV1Input.ts index 75764b91..04fd51ce 100644 --- a/src/api/types/GuardrailsV1Input.ts +++ b/src/api/types/GuardrailsV1Input.ts @@ -5,5 +5,7 @@ import type * as ElevenLabs from "../index"; export interface GuardrailsV1Input { version?: "1"; alignment?: ElevenLabs.AlignmentGuardrail; + content?: ElevenLabs.ContentGuardrailInput; moderation?: ElevenLabs.ModerationGuardrailInput; + custom?: ElevenLabs.CustomGuardrailInput; } diff --git a/src/api/types/GuardrailsV1Output.ts b/src/api/types/GuardrailsV1Output.ts index 6080a5d1..c1dcc0a3 100644 --- a/src/api/types/GuardrailsV1Output.ts +++ b/src/api/types/GuardrailsV1Output.ts @@ -5,5 +5,7 @@ import type * as ElevenLabs from "../index"; export interface GuardrailsV1Output { version?: "1"; alignment?: ElevenLabs.AlignmentGuardrail; + content?: ElevenLabs.ContentGuardrailOutput; moderation?: ElevenLabs.ModerationGuardrailOutput; + custom?: ElevenLabs.CustomGuardrailOutput; } diff --git a/src/api/types/MergingStrategy.ts b/src/api/types/MergingStrategy.ts new file mode 100644 index 00000000..2b69e966 --- /dev/null +++ b/src/api/types/MergingStrategy.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** Strategy for merging results from multiple sources. */ +export const MergingStrategy = { + RankFusion: "rank_fusion", + TopKPerSource: "top_k_per_source", + WeightedInterleave: "weighted_interleave", +} as const; +export type MergingStrategy = (typeof MergingStrategy)[keyof typeof MergingStrategy]; diff --git a/src/api/types/MultiSourceConfigJson.ts b/src/api/types/MultiSourceConfigJson.ts new file mode 100644 index 00000000..c77e297d --- /dev/null +++ b/src/api/types/MultiSourceConfigJson.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +/** + * JSON-serializable multi-source retrieval configuration. + * + * This can be passed as JSON in tool configurations for full control. + */ +export interface MultiSourceConfigJson { + /** List of source names to use (e.g., ['chunks', 'products']) */ + sourceNames?: string[]; + /** Per-source parameter overrides */ + sourceOverrides?: ElevenLabs.SourceConfigJson[]; + /** How to merge results from multiple sources */ + mergingStrategy?: ElevenLabs.MergingStrategy; + /** Final number of chunks after merging */ + finalTopK?: number; + /** Decompose complex queries */ + useDecomposition?: boolean; + /** LLM reformulates query */ + useReformulation?: boolean; + /** LLM generates answer vs raw chunks */ + synthesizeResponse?: boolean; +} diff --git a/src/api/types/PendingClipTask.ts b/src/api/types/PendingClipTask.ts new file mode 100644 index 00000000..4d5417ed --- /dev/null +++ b/src/api/types/PendingClipTask.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface PendingClipTask { + type: ElevenLabs.PendingClipTaskType; + progress?: number; + startedAtMs?: number; + updatedAtMs?: number; + metadata?: Record; +} diff --git a/src/api/types/PendingClipTaskType.ts b/src/api/types/PendingClipTaskType.ts new file mode 100644 index 00000000..89aa4ac6 --- /dev/null +++ b/src/api/types/PendingClipTaskType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const PendingClipTaskType = { + Preprocessing: "preprocessing", + SpeechImport: "speech_import", + Dubbing: "dubbing", +} as const; +export type PendingClipTaskType = (typeof PendingClipTaskType)[keyof typeof PendingClipTaskType]; diff --git a/src/api/types/PermissionType.ts b/src/api/types/PermissionType.ts index 2d5979e2..295f0849 100644 --- a/src/api/types/PermissionType.ts +++ b/src/api/types/PermissionType.ts @@ -39,6 +39,7 @@ export const PermissionType = { WebhooksWrite: "webhooks_write", ServiceAccountWrite: "service_account_write", GroupMembersManage: "group_members_manage", + WorkspaceMembersRead: "workspace_members_read", WorkspaceMembersInvite: "workspace_members_invite", WorkspaceMembersRemove: "workspace_members_remove", TermsOfServiceAccept: "terms_of_service_accept", diff --git a/src/api/types/PhoneNumberTransfer.ts b/src/api/types/PhoneNumberTransfer.ts index 5370e9d1..7caae60d 100644 --- a/src/api/types/PhoneNumberTransfer.ts +++ b/src/api/types/PhoneNumberTransfer.ts @@ -9,4 +9,6 @@ export interface PhoneNumberTransfer { phoneNumber?: string; condition: string; transferType?: ElevenLabs.TransferTypeEnum; + /** DTMF digits to send after call connects (e.g., 'ww1234' for extension). Can be either a static value or a dynamic variable reference. Use 'w' for 0.5s pause. Only supported for Twilio transfers. */ + postDialDigits?: ElevenLabs.PhoneNumberTransferPostDialDigits; } diff --git a/src/api/types/PhoneNumberTransferPostDialDigits.ts b/src/api/types/PhoneNumberTransferPostDialDigits.ts new file mode 100644 index 00000000..0438eca8 --- /dev/null +++ b/src/api/types/PhoneNumberTransferPostDialDigits.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export type PhoneNumberTransferPostDialDigits = + | ElevenLabs.PhoneNumberTransferPostDialDigits.Dynamic + | ElevenLabs.PhoneNumberTransferPostDialDigits.Static; + +export namespace PhoneNumberTransferPostDialDigits { + export interface Dynamic extends ElevenLabs.PostDialDigitsDynamicVariable { + type: "dynamic"; + } + + export interface Static extends ElevenLabs.PostDialDigitsStatic { + type: "static"; + } +} diff --git a/src/api/types/PostDialDigitsDynamicVariable.ts b/src/api/types/PostDialDigitsDynamicVariable.ts new file mode 100644 index 00000000..c7f7b8e9 --- /dev/null +++ b/src/api/types/PostDialDigitsDynamicVariable.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface PostDialDigitsDynamicVariable { + /** The dynamic variable name to resolve */ + value: string; +} diff --git a/src/api/types/PostDialDigitsStatic.ts b/src/api/types/PostDialDigitsStatic.ts new file mode 100644 index 00000000..183eb991 --- /dev/null +++ b/src/api/types/PostDialDigitsStatic.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface PostDialDigitsStatic { + /** DTMF digits to send after call connects (e.g., 'ww1234' for extension) */ + value: string; +} diff --git a/src/api/types/ProjectCreationMetaResponseModelType.ts b/src/api/types/ProjectCreationMetaResponseModelType.ts index 4b055586..9a3cbed0 100644 --- a/src/api/types/ProjectCreationMetaResponseModelType.ts +++ b/src/api/types/ProjectCreationMetaResponseModelType.ts @@ -6,6 +6,7 @@ export const ProjectCreationMetaResponseModelType = { GeneratePodcast: "generate_podcast", AutoAssignVoices: "auto_assign_voices", DubVideo: "dub_video", + ImportSpeech: "import_speech", } as const; export type ProjectCreationMetaResponseModelType = (typeof ProjectCreationMetaResponseModelType)[keyof typeof ProjectCreationMetaResponseModelType]; diff --git a/src/api/types/ProjectExternalAudioResponseModel.ts b/src/api/types/ProjectExternalAudioResponseModel.ts index 27b995ab..cae322ac 100644 --- a/src/api/types/ProjectExternalAudioResponseModel.ts +++ b/src/api/types/ProjectExternalAudioResponseModel.ts @@ -1,5 +1,7 @@ // This file was auto-generated by Fern from our API Definition. +import type * as ElevenLabs from "../index"; + export interface ProjectExternalAudioResponseModel { externalAudioId: string; filename: string; @@ -22,5 +24,6 @@ export interface ProjectExternalAudioResponseModel { importSpeechProgress?: number; speechImported?: boolean; dubAudioProgress?: number; + pendingTask?: ElevenLabs.PendingClipTask; currentSnapshotId?: string; } diff --git a/src/api/types/ProjectVideoResponseModel.ts b/src/api/types/ProjectVideoResponseModel.ts index 26fe071a..ef19c68c 100644 --- a/src/api/types/ProjectVideoResponseModel.ts +++ b/src/api/types/ProjectVideoResponseModel.ts @@ -31,7 +31,9 @@ export interface ProjectVideoResponseModel { importSpeechProgress?: number; speechImported?: boolean; dubAudioProgress?: number; + pendingTask?: ElevenLabs.PendingClipTask; audioTrackReady?: boolean; + exportFormatReady?: boolean; currentSnapshotId?: string; canvasPlacement?: ElevenLabs.CanvasPlacement; trackId?: string; diff --git a/src/api/types/PronunciationDictionaryAliasRuleResponseModel.ts b/src/api/types/PronunciationDictionaryAliasRuleResponseModel.ts new file mode 100644 index 00000000..3529a4c3 --- /dev/null +++ b/src/api/types/PronunciationDictionaryAliasRuleResponseModel.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface PronunciationDictionaryAliasRuleResponseModel { + stringToReplace: string; + alias: string; +} diff --git a/src/api/types/PronunciationDictionaryPhonemeRuleResponseModel.ts b/src/api/types/PronunciationDictionaryPhonemeRuleResponseModel.ts new file mode 100644 index 00000000..69c07259 --- /dev/null +++ b/src/api/types/PronunciationDictionaryPhonemeRuleResponseModel.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface PronunciationDictionaryPhonemeRuleResponseModel { + stringToReplace: string; + phoneme: string; + alphabet: string; +} diff --git a/src/api/types/ReferencedToolCommonModelType.ts b/src/api/types/ReferencedToolCommonModelType.ts index 4f671ea3..d3243811 100644 --- a/src/api/types/ReferencedToolCommonModelType.ts +++ b/src/api/types/ReferencedToolCommonModelType.ts @@ -7,6 +7,7 @@ export const ReferencedToolCommonModelType = { Client: "client", Workflow: "workflow", ApiIntegrationWebhook: "api_integration_webhook", + Mcp: "mcp", } as const; export type ReferencedToolCommonModelType = (typeof ReferencedToolCommonModelType)[keyof typeof ReferencedToolCommonModelType]; diff --git a/src/api/types/ResourceMetadataResponseModel.ts b/src/api/types/ResourceMetadataResponseModel.ts index f532a792..96327707 100644 --- a/src/api/types/ResourceMetadataResponseModel.ts +++ b/src/api/types/ResourceMetadataResponseModel.ts @@ -5,6 +5,8 @@ import type * as ElevenLabs from "../index"; export interface ResourceMetadataResponseModel { /** The ID of the resource. */ resourceId: string; + /** The name of the resource, if available. */ + resourceName?: string; /** The type of the resource. */ resourceType: ElevenLabs.WorkspaceResourceType; /** The ID of the user who created the resource. */ diff --git a/src/api/types/ResponseUnitTestModel.ts b/src/api/types/ResponseUnitTestModel.ts new file mode 100644 index 00000000..046bf49a --- /dev/null +++ b/src/api/types/ResponseUnitTestModel.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface ResponseUnitTestModel { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Non-empty list of example responses that should be considered successful */ + successExamples?: ElevenLabs.AgentSuccessfulResponseExample[]; + /** Non-empty list of example responses that should be considered failures */ + failureExamples?: ElevenLabs.AgentFailureResponseExample[]; +} diff --git a/src/api/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts b/src/api/types/ResponseUnitTestModelDynamicVariablesValue.ts similarity index 59% rename from src/api/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts rename to src/api/types/ResponseUnitTestModelDynamicVariablesValue.ts index d5aef4b7..410c87a1 100644 --- a/src/api/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts +++ b/src/api/types/ResponseUnitTestModelDynamicVariablesValue.ts @@ -1,3 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export type CreateUnitTestRequestDynamicVariablesValue = string | number | number | boolean; +export type ResponseUnitTestModelDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/SearchDocumentationToolConfigInput.ts b/src/api/types/SearchDocumentationToolConfigInput.ts new file mode 100644 index 00000000..b848460e --- /dev/null +++ b/src/api/types/SearchDocumentationToolConfigInput.ts @@ -0,0 +1,42 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +/** + * System tool for searching ElevenLabs documentation using RAG. + * + * This tool provides access to: + * - Product documentation + * - API references + * - Pricing information + * - Troubleshooting guides + * - Best practices + * + * It uses a flexible multi-source approach with configurable: + * - Document sources with per-source k for dense/keyword retrieval + * - Merging strategies (RRF, top-K per source, weighted interleave) + * - Query decomposition and reformulation + * - LLM synthesis vs raw chunks + */ +export interface SearchDocumentationToolConfigInput { + /** Use the new multi-source retrieval engine */ + useMultiSource?: boolean; + /** Full multi-source configuration as JSON. Takes precedence over individual fields. Example: {'source_names': ['chunks'], 'use_decomposition': true, 'final_top_k': 5} */ + multiSourceConfig?: ElevenLabs.MultiSourceConfigJson; + /** Decompose complex queries into sub-queries */ + useDecomposition?: boolean; + /** Use LLM to reformulate query for better retrieval */ + useReformulation?: boolean; + /** True = LLM generates answer, False = return raw chunks */ + synthesizeResponse?: boolean; + /** Strategy for merging results: 'top_k_per_source' (concatenate), 'rank_fusion' (RRF), 'weighted_interleave' */ + mergingStrategy?: ElevenLabs.MergingStrategy; + /** Final number of chunks after merging */ + finalTopK?: number; + /** List of source names to use (e.g., ['chunks', 'products']). Defaults to both 'products' and 'chunks'. Unknown sources are ignored with a warning. */ + sourceNames?: string[]; + /** Per-source parameter overrides as JSON. Example: [{'name': 'chunks', 'k_dense': 10, 'k_keyword': 5}] */ + sourceOverrides?: ElevenLabs.SourceConfigJson[]; + /** Full custom source configurations. For advanced use only. */ + sourceConfigs?: ElevenLabs.SourceRetrievalConfig[]; +} diff --git a/src/api/types/SearchDocumentationToolConfigOutput.ts b/src/api/types/SearchDocumentationToolConfigOutput.ts new file mode 100644 index 00000000..5ec4240a --- /dev/null +++ b/src/api/types/SearchDocumentationToolConfigOutput.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +/** + * System tool for searching ElevenLabs documentation using RAG. + * + * This tool provides access to: + * - Product documentation + * - API references + * - Pricing information + * - Troubleshooting guides + * - Best practices + * + * It uses a flexible multi-source approach with configurable: + * - Document sources with per-source k for dense/keyword retrieval + * - Merging strategies (RRF, top-K per source, weighted interleave) + * - Query decomposition and reformulation + * - LLM synthesis vs raw chunks + */ +export interface SearchDocumentationToolConfigOutput { + /** Use the new multi-source retrieval engine */ + useMultiSource?: boolean; + /** Full multi-source configuration as JSON. Takes precedence over individual fields. Example: {'source_names': ['chunks'], 'use_decomposition': true, 'final_top_k': 5} */ + multiSourceConfig?: ElevenLabs.MultiSourceConfigJson; + /** Decompose complex queries into sub-queries */ + useDecomposition?: boolean; + /** Use LLM to reformulate query for better retrieval */ + useReformulation?: boolean; + /** True = LLM generates answer, False = return raw chunks */ + synthesizeResponse?: boolean; + /** Strategy for merging results: 'top_k_per_source' (concatenate), 'rank_fusion' (RRF), 'weighted_interleave' */ + mergingStrategy?: ElevenLabs.MergingStrategy; + /** Final number of chunks after merging */ + finalTopK?: number; + /** List of source names to use (e.g., ['chunks', 'products']). Defaults to both 'products' and 'chunks'. Unknown sources are ignored with a warning. */ + sourceNames?: string[]; + /** Per-source parameter overrides as JSON. Example: [{'name': 'chunks', 'k_dense': 10, 'k_keyword': 5}] */ + sourceOverrides?: ElevenLabs.SourceConfigJson[]; +} diff --git a/src/api/types/SimilarVoice.ts b/src/api/types/SimilarVoice.ts index 27412cbd..7c7126d4 100644 --- a/src/api/types/SimilarVoice.ts +++ b/src/api/types/SimilarVoice.ts @@ -5,7 +5,7 @@ import type * as ElevenLabs from "../index"; export interface SimilarVoice { voiceId: string; name: string; - category: ElevenLabs.SimilarVoiceCategory; + category: ElevenLabs.VoiceCategory; description?: string; previewUrl?: string; } diff --git a/src/api/types/SimulationTestModel.ts b/src/api/types/SimulationTestModel.ts new file mode 100644 index 00000000..d45a10d7 --- /dev/null +++ b/src/api/types/SimulationTestModel.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface SimulationTestModel { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Description of the simulation scenario and user persona for simulation tests. */ + simulationScenario?: string; + /** Maximum number of conversation turns for simulation tests. */ + simulationMaxTurns?: number; +} diff --git a/src/api/types/UnitTestCommonModelDynamicVariablesValue.ts b/src/api/types/SimulationTestModelDynamicVariablesValue.ts similarity index 59% rename from src/api/types/UnitTestCommonModelDynamicVariablesValue.ts rename to src/api/types/SimulationTestModelDynamicVariablesValue.ts index ea511acf..727e8f4c 100644 --- a/src/api/types/UnitTestCommonModelDynamicVariablesValue.ts +++ b/src/api/types/SimulationTestModelDynamicVariablesValue.ts @@ -1,3 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export type UnitTestCommonModelDynamicVariablesValue = string | number | number | boolean; +export type SimulationTestModelDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/SourceConfigJson.ts b/src/api/types/SourceConfigJson.ts new file mode 100644 index 00000000..b408e6df --- /dev/null +++ b/src/api/types/SourceConfigJson.ts @@ -0,0 +1,34 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * JSON-serializable source configuration for tool configs. + * + * This can override existing sources or define entirely new ones. + * For new sources, collection_name is required. + */ +export interface SourceConfigJson { + /** Source name (can be existing or new) */ + name: string; + /** MongoDB database name. Default: eleven_customer_support */ + dbName?: string; + /** MongoDB collection name. Required for new sources. */ + collectionName?: string; + /** Number of chunks from vector search */ + kDense?: number; + /** Number of chunks from BM25 search */ + kKeyword?: number; + /** Weight for vector results */ + denseWeight?: number; + /** Weight for BM25 results */ + keywordWeight?: number; + /** Weight for cross-source merging */ + sourceWeight?: number; + /** Vector search index name. Default: 'default' */ + vectorIndexName?: string; + /** Field containing embeddings. Default: 'embedding' */ + embeddingField?: string; + /** Field containing text content. Default: 'content' */ + contentField?: string; + /** Whether this source is active */ + enabled?: boolean; +} diff --git a/src/api/types/SourceRetrievalConfig.ts b/src/api/types/SourceRetrievalConfig.ts new file mode 100644 index 00000000..74cc3691 --- /dev/null +++ b/src/api/types/SourceRetrievalConfig.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +export interface SourceRetrievalConfig { + name: string; + collectionName: string; + dbName?: string; + enabled?: boolean; + kDense?: number; + kKeyword?: number; + denseWeight?: number; + keywordWeight?: number; + sourceWeight?: number; + vectorIndexName?: string; + embeddingField?: string; + contentField?: string; + filterField?: string; + numCandidatesMultiplier?: number; + resultFields?: Record; +} diff --git a/src/api/types/SystemToolConfigInputParams.ts b/src/api/types/SystemToolConfigInputParams.ts index 01f2043b..72a0681b 100644 --- a/src/api/types/SystemToolConfigInputParams.ts +++ b/src/api/types/SystemToolConfigInputParams.ts @@ -6,6 +6,7 @@ export type SystemToolConfigInputParams = | ElevenLabs.SystemToolConfigInputParams.EndCall | ElevenLabs.SystemToolConfigInputParams.LanguageDetection | ElevenLabs.SystemToolConfigInputParams.PlayKeypadTouchTone + | ElevenLabs.SystemToolConfigInputParams.SearchDocumentation | ElevenLabs.SystemToolConfigInputParams.SkipTurn | ElevenLabs.SystemToolConfigInputParams.TransferToAgent | ElevenLabs.SystemToolConfigInputParams.TransferToNumber @@ -24,6 +25,10 @@ export namespace SystemToolConfigInputParams { systemToolType: "play_keypad_touch_tone"; } + export interface SearchDocumentation extends ElevenLabs.SearchDocumentationToolConfigInput { + systemToolType: "search_documentation"; + } + export interface SkipTurn extends ElevenLabs.SkipTurnToolConfig { systemToolType: "skip_turn"; } diff --git a/src/api/types/SystemToolConfigOutputParams.ts b/src/api/types/SystemToolConfigOutputParams.ts index 525704e7..16dee61d 100644 --- a/src/api/types/SystemToolConfigOutputParams.ts +++ b/src/api/types/SystemToolConfigOutputParams.ts @@ -6,6 +6,7 @@ export type SystemToolConfigOutputParams = | ElevenLabs.SystemToolConfigOutputParams.EndCall | ElevenLabs.SystemToolConfigOutputParams.LanguageDetection | ElevenLabs.SystemToolConfigOutputParams.PlayKeypadTouchTone + | ElevenLabs.SystemToolConfigOutputParams.SearchDocumentation | ElevenLabs.SystemToolConfigOutputParams.SkipTurn | ElevenLabs.SystemToolConfigOutputParams.TransferToAgent | ElevenLabs.SystemToolConfigOutputParams.TransferToNumber @@ -24,6 +25,10 @@ export namespace SystemToolConfigOutputParams { systemToolType: "play_keypad_touch_tone"; } + export interface SearchDocumentation extends ElevenLabs.SearchDocumentationToolConfigOutput { + systemToolType: "search_documentation"; + } + export interface SkipTurn extends ElevenLabs.SkipTurnToolConfig { systemToolType: "skip_turn"; } diff --git a/src/api/types/TestRunMetadataTestType.ts b/src/api/types/TestRunMetadataTestType.ts index afd1a261..d00cd71a 100644 --- a/src/api/types/TestRunMetadataTestType.ts +++ b/src/api/types/TestRunMetadataTestType.ts @@ -3,5 +3,6 @@ export const TestRunMetadataTestType = { Llm: "llm", ToolCall: "tool_call", + Simulation: "simulation", } as const; export type TestRunMetadataTestType = (typeof TestRunMetadataTestType)[keyof typeof TestRunMetadataTestType]; diff --git a/src/api/types/TestType.ts b/src/api/types/TestType.ts new file mode 100644 index 00000000..af1a59aa --- /dev/null +++ b/src/api/types/TestType.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const TestType = { + Llm: "llm", + Tool: "tool", + Simulation: "simulation", +} as const; +export type TestType = (typeof TestType)[keyof typeof TestType]; diff --git a/src/api/types/ToolCallUnitTestModel.ts b/src/api/types/ToolCallUnitTestModel.ts new file mode 100644 index 00000000..9ec79f46 --- /dev/null +++ b/src/api/types/ToolCallUnitTestModel.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface ToolCallUnitTestModel { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; + /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */ + toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelOutput; + /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */ + checkAnyToolMatches?: boolean; +} diff --git a/src/api/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts b/src/api/types/ToolCallUnitTestModelDynamicVariablesValue.ts similarity index 59% rename from src/api/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts rename to src/api/types/ToolCallUnitTestModelDynamicVariablesValue.ts index c0c778d0..893f6b5d 100644 --- a/src/api/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts +++ b/src/api/types/ToolCallUnitTestModelDynamicVariablesValue.ts @@ -1,3 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -export type UpdateUnitTestRequestDynamicVariablesValue = string | number | number | boolean; +export type ToolCallUnitTestModelDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/ToolRequestModelToolConfig.ts b/src/api/types/ToolRequestModelToolConfig.ts index 5a25edb6..8cc59d40 100644 --- a/src/api/types/ToolRequestModelToolConfig.ts +++ b/src/api/types/ToolRequestModelToolConfig.ts @@ -7,6 +7,7 @@ import type * as ElevenLabs from "../index"; */ export type ToolRequestModelToolConfig = | ElevenLabs.ToolRequestModelToolConfig.Client + | ElevenLabs.ToolRequestModelToolConfig.Mcp | ElevenLabs.ToolRequestModelToolConfig.System | ElevenLabs.ToolRequestModelToolConfig.Webhook; @@ -15,6 +16,11 @@ export namespace ToolRequestModelToolConfig { type: "client"; } + export interface Mcp { + type: "mcp"; + value?: unknown; + } + export interface System extends ElevenLabs.SystemToolConfigInput { type: "system"; } diff --git a/src/api/types/ToolResponseModelToolConfig.ts b/src/api/types/ToolResponseModelToolConfig.ts index 43e56df6..ba11349d 100644 --- a/src/api/types/ToolResponseModelToolConfig.ts +++ b/src/api/types/ToolResponseModelToolConfig.ts @@ -7,6 +7,7 @@ import type * as ElevenLabs from "../index"; */ export type ToolResponseModelToolConfig = | ElevenLabs.ToolResponseModelToolConfig.Client + | ElevenLabs.ToolResponseModelToolConfig.Mcp | ElevenLabs.ToolResponseModelToolConfig.System | ElevenLabs.ToolResponseModelToolConfig.Webhook; @@ -15,6 +16,11 @@ export namespace ToolResponseModelToolConfig { type: "client"; } + export interface Mcp { + type: "mcp"; + value?: unknown; + } + export interface System extends ElevenLabs.SystemToolConfigOutput { type: "system"; } diff --git a/src/api/types/TransferToNumberResultTwilioSuccessModel.ts b/src/api/types/TransferToNumberResultTwilioSuccessModel.ts index ce721e42..9819cef5 100644 --- a/src/api/types/TransferToNumberResultTwilioSuccessModel.ts +++ b/src/api/types/TransferToNumberResultTwilioSuccessModel.ts @@ -7,5 +7,6 @@ export interface TransferToNumberResultTwilioSuccessModel { clientMessage?: string; agentMessage: string; conferenceName: string; + postDialDigits?: string; note?: string; } diff --git a/src/api/types/TtsConversationalConfigInput.ts b/src/api/types/TtsConversationalConfigInput.ts index 09e93274..3568c265 100644 --- a/src/api/types/TtsConversationalConfigInput.ts +++ b/src/api/types/TtsConversationalConfigInput.ts @@ -9,6 +9,8 @@ export interface TtsConversationalConfigInput { voiceId?: string; /** Additional supported voices for the agent */ supportedVoices?: ElevenLabs.SupportedVoice[]; + /** When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models. */ + expressiveMode?: boolean; /** Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here. */ suggestedAudioTags?: ElevenLabs.SuggestedAudioTag[]; /** The audio format to use for TTS */ diff --git a/src/api/types/TtsConversationalConfigOutput.ts b/src/api/types/TtsConversationalConfigOutput.ts index c79fd89f..45c9e526 100644 --- a/src/api/types/TtsConversationalConfigOutput.ts +++ b/src/api/types/TtsConversationalConfigOutput.ts @@ -9,6 +9,8 @@ export interface TtsConversationalConfigOutput { voiceId?: string; /** Additional supported voices for the agent */ supportedVoices?: ElevenLabs.SupportedVoice[]; + /** When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models. */ + expressiveMode?: boolean; /** Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here. */ suggestedAudioTags?: ElevenLabs.SuggestedAudioTag[]; /** The audio format to use for TTS */ diff --git a/src/api/types/TtsConversationalConfigWorkflowOverrideInput.ts b/src/api/types/TtsConversationalConfigWorkflowOverrideInput.ts index 1e3307bb..8e609f4e 100644 --- a/src/api/types/TtsConversationalConfigWorkflowOverrideInput.ts +++ b/src/api/types/TtsConversationalConfigWorkflowOverrideInput.ts @@ -9,6 +9,8 @@ export interface TtsConversationalConfigWorkflowOverrideInput { voiceId?: string; /** Additional supported voices for the agent */ supportedVoices?: ElevenLabs.SupportedVoice[]; + /** When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models. */ + expressiveMode?: boolean; /** Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here. */ suggestedAudioTags?: ElevenLabs.SuggestedAudioTag[]; /** The audio format to use for TTS */ diff --git a/src/api/types/TtsConversationalConfigWorkflowOverrideOutput.ts b/src/api/types/TtsConversationalConfigWorkflowOverrideOutput.ts index 925241e1..149a050a 100644 --- a/src/api/types/TtsConversationalConfigWorkflowOverrideOutput.ts +++ b/src/api/types/TtsConversationalConfigWorkflowOverrideOutput.ts @@ -9,6 +9,8 @@ export interface TtsConversationalConfigWorkflowOverrideOutput { voiceId?: string; /** Additional supported voices for the agent */ supportedVoices?: ElevenLabs.SupportedVoice[]; + /** When enabled, applies expressive audio tags prompt. Automatically disabled for non-v3 models. */ + expressiveMode?: boolean; /** Suggested audio tags to boost expressive speech (for eleven_v3 and eleven_v3_conversational models). The agent can still use other tags not listed here. */ suggestedAudioTags?: ElevenLabs.SuggestedAudioTag[]; /** The audio format to use for TTS */ diff --git a/src/api/types/UnitTestCommonModel.ts b/src/api/types/UnitTestCommonModel.ts deleted file mode 100644 index 5df85845..00000000 --- a/src/api/types/UnitTestCommonModel.ts +++ /dev/null @@ -1,25 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../index"; - -/** - * A test case for evaluating the agent's response to a specific chat scenario. - */ -export interface UnitTestCommonModel { - chatHistory: ElevenLabs.ConversationHistoryTranscriptCommonModelOutput[]; - /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ - successCondition: string; - /** Non-empty list of example responses that should be considered successful */ - successExamples: ElevenLabs.AgentSuccessfulResponseExample[]; - /** Non-empty list of example responses that should be considered failures */ - failureExamples: ElevenLabs.AgentFailureResponseExample[]; - /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */ - toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelOutput; - /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */ - checkAnyToolMatches?: boolean; - /** Dynamic variables to replace in the agent config during testing */ - dynamicVariables?: Record; - type?: ElevenLabs.UnitTestCommonModelType; - /** Metadata of a conversation this test was created from (if applicable). */ - fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataOutput; -} diff --git a/src/api/types/UnitTestCommonModelType.ts b/src/api/types/UnitTestCommonModelType.ts deleted file mode 100644 index 1f6342ab..00000000 --- a/src/api/types/UnitTestCommonModelType.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export const UnitTestCommonModelType = { - Llm: "llm", - Tool: "tool", -} as const; -export type UnitTestCommonModelType = (typeof UnitTestCommonModelType)[keyof typeof UnitTestCommonModelType]; diff --git a/src/api/types/UnitTestRunResponseModel.ts b/src/api/types/UnitTestRunResponseModel.ts index 03831b83..ca7fc49c 100644 --- a/src/api/types/UnitTestRunResponseModel.ts +++ b/src/api/types/UnitTestRunResponseModel.ts @@ -4,7 +4,7 @@ import type * as ElevenLabs from "../index"; export interface UnitTestRunResponseModel { testRunId: string; - testInfo?: ElevenLabs.UnitTestCommonModel; + testInfo?: ElevenLabs.UnitTestRunResponseModelTestInfo; testInvocationId: string; agentId: string; branchId?: string; diff --git a/src/api/types/UnitTestRunResponseModelTestInfo.ts b/src/api/types/UnitTestRunResponseModelTestInfo.ts new file mode 100644 index 00000000..4207f035 --- /dev/null +++ b/src/api/types/UnitTestRunResponseModelTestInfo.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export type UnitTestRunResponseModelTestInfo = + | ElevenLabs.UnitTestRunResponseModelTestInfo.Llm + | ElevenLabs.UnitTestRunResponseModelTestInfo.Simulation + | ElevenLabs.UnitTestRunResponseModelTestInfo.Tool; + +export namespace UnitTestRunResponseModelTestInfo { + export interface Llm extends ElevenLabs.ResponseUnitTestModel { + type: "llm"; + } + + export interface Simulation extends ElevenLabs.SimulationTestModel { + type: "simulation"; + } + + export interface Tool extends ElevenLabs.ToolCallUnitTestModel { + type: "tool"; + } +} diff --git a/src/api/types/UnitTestSummaryResponseModel.ts b/src/api/types/UnitTestSummaryResponseModel.ts index c32016d0..f26dea4c 100644 --- a/src/api/types/UnitTestSummaryResponseModel.ts +++ b/src/api/types/UnitTestSummaryResponseModel.ts @@ -14,5 +14,5 @@ export interface UnitTestSummaryResponseModel { /** Last update time of the test in unix seconds */ lastUpdatedAtUnixSecs: number; /** Type of the test */ - type: ElevenLabs.UnitTestCommonModelType; + type: ElevenLabs.TestType; } diff --git a/src/api/types/UpdateResponseUnitTestRequest.ts b/src/api/types/UpdateResponseUnitTestRequest.ts new file mode 100644 index 00000000..1303e092 --- /dev/null +++ b/src/api/types/UpdateResponseUnitTestRequest.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface UpdateResponseUnitTestRequest { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Non-empty list of example responses that should be considered successful */ + successExamples?: ElevenLabs.AgentSuccessfulResponseExample[]; + /** Non-empty list of example responses that should be considered failures */ + failureExamples?: ElevenLabs.AgentFailureResponseExample[]; + name: string; +} diff --git a/src/api/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts b/src/api/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..eae8d24a --- /dev/null +++ b/src/api/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type UpdateResponseUnitTestRequestDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/UpdateSimulationTestRequest.ts b/src/api/types/UpdateSimulationTestRequest.ts new file mode 100644 index 00000000..b699cba9 --- /dev/null +++ b/src/api/types/UpdateSimulationTestRequest.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface UpdateSimulationTestRequest { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; + /** A prompt that evaluates whether the agent's response is successful. Should return True or False. */ + successCondition?: string; + /** Description of the simulation scenario and user persona for simulation tests. */ + simulationScenario?: string; + /** Maximum number of conversation turns for simulation tests. */ + simulationMaxTurns?: number; + name: string; +} diff --git a/src/api/types/UpdateSimulationTestRequestDynamicVariablesValue.ts b/src/api/types/UpdateSimulationTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..548e1327 --- /dev/null +++ b/src/api/types/UpdateSimulationTestRequestDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type UpdateSimulationTestRequestDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/UpdateToolCallUnitTestRequest.ts b/src/api/types/UpdateToolCallUnitTestRequest.ts new file mode 100644 index 00000000..5e823102 --- /dev/null +++ b/src/api/types/UpdateToolCallUnitTestRequest.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface UpdateToolCallUnitTestRequest { + /** Metadata of a conversation this test was created from (if applicable). */ + fromConversationMetadata?: ElevenLabs.TestFromConversationMetadataInput; + /** Dynamic variables to replace in the agent config during testing */ + dynamicVariables?: Record; + chatHistory?: ElevenLabs.ConversationHistoryTranscriptCommonModelInput[]; + /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */ + toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelInput; + /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */ + checkAnyToolMatches?: boolean; + name: string; +} diff --git a/src/api/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts b/src/api/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..d36f33d6 --- /dev/null +++ b/src/api/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type UpdateToolCallUnitTestRequestDynamicVariablesValue = string | number | number | boolean; diff --git a/src/api/types/SimilarVoiceCategory.ts b/src/api/types/VoiceCategory.ts similarity index 59% rename from src/api/types/SimilarVoiceCategory.ts rename to src/api/types/VoiceCategory.ts index 43134bab..5e7981b5 100644 --- a/src/api/types/SimilarVoiceCategory.ts +++ b/src/api/types/VoiceCategory.ts @@ -1,10 +1,10 @@ // This file was auto-generated by Fern from our API Definition. -export const SimilarVoiceCategory = { +export const VoiceCategory = { Premade: "premade", Cloned: "cloned", Generated: "generated", Professional: "professional", Famous: "famous", } as const; -export type SimilarVoiceCategory = (typeof SimilarVoiceCategory)[keyof typeof SimilarVoiceCategory]; +export type VoiceCategory = (typeof VoiceCategory)[keyof typeof VoiceCategory]; diff --git a/src/api/types/WorkflowPhoneNumberNodeModelInput.ts b/src/api/types/WorkflowPhoneNumberNodeModelInput.ts index 15ff2cba..dd2eeb00 100644 --- a/src/api/types/WorkflowPhoneNumberNodeModelInput.ts +++ b/src/api/types/WorkflowPhoneNumberNodeModelInput.ts @@ -11,4 +11,6 @@ export interface WorkflowPhoneNumberNodeModelInput { edgeOrder?: string[]; transferDestination: ElevenLabs.WorkflowPhoneNumberNodeModelInputTransferDestination; transferType?: ElevenLabs.TransferTypeEnum; + /** DTMF digits to send after call connects (e.g., 'ww1234' for extension). Can be either a static value or a dynamic variable reference. Use 'w' for 0.5s pause. */ + postDialDigits?: ElevenLabs.WorkflowPhoneNumberNodeModelInputPostDialDigits; } diff --git a/src/api/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts b/src/api/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts new file mode 100644 index 00000000..c64c5097 --- /dev/null +++ b/src/api/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export type WorkflowPhoneNumberNodeModelInputPostDialDigits = + | ElevenLabs.WorkflowPhoneNumberNodeModelInputPostDialDigits.Dynamic + | ElevenLabs.WorkflowPhoneNumberNodeModelInputPostDialDigits.Static; + +export namespace WorkflowPhoneNumberNodeModelInputPostDialDigits { + export interface Dynamic extends ElevenLabs.PostDialDigitsDynamicVariable { + type: "dynamic"; + } + + export interface Static extends ElevenLabs.PostDialDigitsStatic { + type: "static"; + } +} diff --git a/src/api/types/WorkflowPhoneNumberNodeModelOutput.ts b/src/api/types/WorkflowPhoneNumberNodeModelOutput.ts index 51c65922..38300db4 100644 --- a/src/api/types/WorkflowPhoneNumberNodeModelOutput.ts +++ b/src/api/types/WorkflowPhoneNumberNodeModelOutput.ts @@ -11,4 +11,6 @@ export interface WorkflowPhoneNumberNodeModelOutput { edgeOrder: string[]; transferDestination: ElevenLabs.WorkflowPhoneNumberNodeModelOutputTransferDestination; transferType: ElevenLabs.TransferTypeEnum; + /** DTMF digits to send after call connects (e.g., 'ww1234' for extension). Can be either a static value or a dynamic variable reference. Use 'w' for 0.5s pause. */ + postDialDigits?: ElevenLabs.WorkflowPhoneNumberNodeModelOutputPostDialDigits; } diff --git a/src/api/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts b/src/api/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts new file mode 100644 index 00000000..bd766e37 --- /dev/null +++ b/src/api/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export type WorkflowPhoneNumberNodeModelOutputPostDialDigits = + | ElevenLabs.WorkflowPhoneNumberNodeModelOutputPostDialDigits.Dynamic + | ElevenLabs.WorkflowPhoneNumberNodeModelOutputPostDialDigits.Static; + +export namespace WorkflowPhoneNumberNodeModelOutputPostDialDigits { + export interface Dynamic extends ElevenLabs.PostDialDigitsDynamicVariable { + type: "dynamic"; + } + + export interface Static extends ElevenLabs.PostDialDigitsStatic { + type: "static"; + } +} diff --git a/src/api/types/WorkspaceGroupPermission.ts b/src/api/types/WorkspaceGroupPermission.ts new file mode 100644 index 00000000..9cef679b --- /dev/null +++ b/src/api/types/WorkspaceGroupPermission.ts @@ -0,0 +1,33 @@ +// This file was auto-generated by Fern from our API Definition. + +export const WorkspaceGroupPermission = { + TextToSpeech: "text_to_speech", + SpeechToSpeech: "speech_to_speech", + SpeechToText: "speech_to_text", + VoiceLab: "voice_lab", + SoundEffects: "sound_effects", + Projects: "projects", + VoiceoverStudio: "voiceover_studio", + Dubbing: "dubbing", + AudioNative: "audio_native", + ConversationalAi: "conversational_ai", + VoiceIsolator: "voice_isolator", + AiSpeechClassifier: "ai_speech_classifier", + AddVoiceFromVoiceLibrary: "add_voice_from_voice_library", + CreateInstantVoiceClone: "create_instant_voice_clone", + CreateProfessionalVoiceClone: "create_professional_voice_clone", + CreateUserApiKey: "create_user_api_key", + PublishStudioProject: "publish_studio_project", + Music: "music", + ShareVoiceExternally: "share_voice_externally", + PublishVoiceToVoiceLibrary: "publish_voice_to_voice_library", + ViewFiatBalance: "view_fiat_balance", + WorkspaceAnalyticsFullRead: "workspace_analytics_full_read", + ServiceAccountsManage: "service_accounts_manage", + WebhooksManage: "webhooks_manage", + GroupMembersManage: "group_members_manage", + WorkspaceMembersInvite: "workspace_members_invite", + WorkspaceMembersRemove: "workspace_members_remove", + TermsOfServiceAccept: "terms_of_service_accept", +} as const; +export type WorkspaceGroupPermission = (typeof WorkspaceGroupPermission)[keyof typeof WorkspaceGroupPermission]; diff --git a/src/api/types/WorkspaceGroupResponseModel.ts b/src/api/types/WorkspaceGroupResponseModel.ts new file mode 100644 index 00000000..e8f52f07 --- /dev/null +++ b/src/api/types/WorkspaceGroupResponseModel.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../index"; + +export interface WorkspaceGroupResponseModel { + name: string; + id: string; + members: string[]; + permissions?: ElevenLabs.WorkspaceGroupPermission[]; + groupUsageLimit?: ElevenLabs.WorkspaceGroupResponseModelGroupUsageLimit; + characterCount?: number; +} diff --git a/src/api/types/WorkspaceGroupResponseModelGroupUsageLimit.ts b/src/api/types/WorkspaceGroupResponseModelGroupUsageLimit.ts new file mode 100644 index 00000000..5b2f586f --- /dev/null +++ b/src/api/types/WorkspaceGroupResponseModelGroupUsageLimit.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type WorkspaceGroupResponseModelGroupUsageLimit = number | "unlimited"; diff --git a/src/api/types/WorkspaceServiceAccountResponseModel.ts b/src/api/types/WorkspaceServiceAccountResponseModel.ts index 29525c30..53f73149 100644 --- a/src/api/types/WorkspaceServiceAccountResponseModel.ts +++ b/src/api/types/WorkspaceServiceAccountResponseModel.ts @@ -7,4 +7,5 @@ export interface WorkspaceServiceAccountResponseModel { name: string; createdAtUnix?: number; apiKeys: ElevenLabs.WorkspaceApiKeyResponseModel[]; + defaultSharingGroups?: ElevenLabs.DefaultSharingGroupResponseModel[]; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index a5c008cf..f050f361 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -203,6 +203,9 @@ export * from "./CloseContext"; export * from "./CloseSocket"; export * from "./CommittedTranscriptPayload"; export * from "./CommittedTranscriptWithTimestampsPayload"; +export * from "./ContentConfig"; +export * from "./ContentGuardrailInput"; +export * from "./ContentGuardrailOutput"; export * from "./Contributor"; export * from "./ConvAiDynamicVariable"; export * from "./ConvAiSecretLocator"; @@ -287,18 +290,30 @@ export * from "./ConversationSummaryResponseModelStatus"; export * from "./ConversationTokenDbModel"; export * from "./ConversationTokenPurpose"; export * from "./ConversationTurnMetrics"; +export * from "./ConversationUserResponseModel"; export * from "./ConvertChapterResponseModel"; export * from "./ConvertProjectResponseModel"; export * from "./CreateAgentBranchResponseModel"; export * from "./CreateAgentResponseModel"; +export * from "./CreateAgentTestResponseModel"; export * from "./CreateAudioNativeProjectRequest"; export * from "./CreatePhoneNumberResponseModel"; export * from "./CreatePreviouslyGeneratedVoiceRequest"; export * from "./CreatePronunciationDictionaryResponseModel"; +export * from "./CreateResponseUnitTestRequest"; +export * from "./CreateResponseUnitTestRequestDynamicVariablesValue"; +export * from "./CreateSimulationTestRequest"; +export * from "./CreateSimulationTestRequestDynamicVariablesValue"; export * from "./CreateSipTrunkPhoneNumberRequest"; +export * from "./CreateToolCallUnitTestRequest"; +export * from "./CreateToolCallUnitTestRequestDynamicVariablesValue"; export * from "./CreateTranscriptRequest"; export * from "./CreateTwilioPhoneNumberRequest"; -export * from "./CreateUnitTestResponseModel"; +export * from "./CustomGuardrailConfig"; +export * from "./CustomGuardrailConfigModel"; +export * from "./CustomGuardrailInput"; +export * from "./CustomGuardrailOutput"; +export * from "./CustomGuardrailsConfig"; export * from "./CustomLlm"; export * from "./CustomLlmapiType"; export * from "./CustomLlmRequestHeadersValue"; @@ -308,6 +323,8 @@ export * from "./DashboardCallSuccessChartModel"; export * from "./DashboardCriteriaChartModel"; export * from "./DashboardDataCollectionChartModel"; export * from "./DataCollectionResultCommonModel"; +export * from "./DefaultSharingGroupResponseModel"; +export * from "./DefaultSharingGroupResponseModelPermissionLevel"; export * from "./DeleteChapterRequest"; export * from "./DeleteChapterResponseModel"; export * from "./DeleteDubbingResponseModel"; @@ -407,6 +424,7 @@ export * from "./GetConvAiSettingsResponseModel"; export * from "./GetConversationResponseModel"; export * from "./GetConversationResponseModelStatus"; export * from "./GetConversationsPageResponseModel"; +export * from "./GetConversationUsersPageResponseModel"; export * from "./GetKnowledgeBaseDependentAgentsResponseModel"; export * from "./GetKnowledgeBaseDependentAgentsResponseModelAgentsItem"; export * from "./GetKnowledgeBaseFileResponseModel"; @@ -439,15 +457,22 @@ export * from "./GetPronunciationDictionariesResponse"; export * from "./GetPronunciationDictionaryMetadataResponse"; export * from "./GetPronunciationDictionaryMetadataResponseModelPermissionOnResource"; export * from "./GetPronunciationDictionaryResponse"; +export * from "./GetPronunciationDictionaryWithRulesResponseModel"; +export * from "./GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource"; +export * from "./GetPronunciationDictionaryWithRulesResponseModelRulesItem"; +export * from "./GetResponseUnitTestResponseModel"; +export * from "./GetResponseUnitTestResponseModelDynamicVariablesValue"; +export * from "./GetSimulationTestResponseModel"; +export * from "./GetSimulationTestResponseModelDynamicVariablesValue"; export * from "./GetSpeechHistoryResponse"; export * from "./GetTestInvocationsPageResponseModel"; export * from "./GetTestSuiteInvocationResponseModel"; export * from "./GetTestsPageResponseModel"; export * from "./GetTestsSummariesByIdsResponseModel"; +export * from "./GetToolCallUnitTestResponseModel"; +export * from "./GetToolCallUnitTestResponseModelDynamicVariablesValue"; export * from "./GetToolDependentAgentsResponseModel"; export * from "./GetToolDependentAgentsResponseModelAgentsItem"; -export * from "./GetUnitTestResponseModel"; -export * from "./GetUnitTestResponseModelDynamicVariablesValue"; export * from "./GetVoicesResponse"; export * from "./GetVoicesV2Response"; export * from "./GetWhatsAppAccountResponse"; @@ -530,6 +555,7 @@ export * from "./McpServerTransport"; export * from "./McpToolApprovalHash"; export * from "./McpToolApprovalPolicy"; export * from "./McpToolConfigOverride"; +export * from "./MergingStrategy"; export * from "./MetricRecord"; export * from "./MetricType"; export * from "./Model"; @@ -540,6 +566,7 @@ export * from "./ModerationGuardrailInput"; export * from "./ModerationGuardrailOutput"; export * from "./MultichannelSpeechToTextResponseModel"; export * from "./MultipartMusicResponse"; +export * from "./MultiSourceConfigJson"; export * from "./MusicPrompt"; export * from "./NonStreamingOutputFormats"; export * from "./NormalizedAlignment"; @@ -560,6 +587,8 @@ export * from "./PartialTranscriptPayload"; export * from "./PatchWorkspaceWebhookResponseModel"; export * from "./PdfExportOptions"; export * from "./PendingCancellationResponseModel"; +export * from "./PendingClipTask"; +export * from "./PendingClipTaskType"; export * from "./PendingSubscriptionSwitchResponseModel"; export * from "./PendingSubscriptionSwitchResponseModelNextTier"; export * from "./PermissionType"; @@ -568,6 +597,7 @@ export * from "./PhoneNumberDynamicVariableTransferDestination"; export * from "./PhoneNumberTransfer"; export * from "./PhoneNumberTransferCustomSipHeadersItem"; export * from "./PhoneNumberTransferDestination"; +export * from "./PhoneNumberTransferPostDialDigits"; export * from "./PhoneNumberTransferTransferDestination"; export * from "./PlayDtmfResultErrorModel"; export * from "./PlayDtmfResultSuccessModel"; @@ -582,6 +612,8 @@ export * from "./PodcastUrlSource"; export * from "./PositionInput"; export * from "./PositionOutput"; export * from "./PostAgentAvatarResponseModel"; +export * from "./PostDialDigitsDynamicVariable"; +export * from "./PostDialDigitsStatic"; export * from "./PostWorkspaceSecretResponseModel"; export * from "./PreviewAudioDbModel"; export * from "./PrivacyConfig"; @@ -633,9 +665,11 @@ export * from "./PromptAgentApiModelWorkflowOverrideOutputToolsItem"; export * from "./PromptAgentDbModel"; export * from "./PromptEvaluationCriteria"; export * from "./PronunciationDictionaryAliasRuleRequestModel"; +export * from "./PronunciationDictionaryAliasRuleResponseModel"; export * from "./PronunciationDictionaryLocator"; export * from "./PronunciationDictionaryLocatorResponseModel"; export * from "./PronunciationDictionaryPhonemeRuleRequestModel"; +export * from "./PronunciationDictionaryPhonemeRuleResponseModel"; export * from "./PronunciationDictionaryRulesResponseModel"; export * from "./PronunciationDictionaryVersionLocator"; export * from "./PronunciationDictionaryVersionResponseModel"; @@ -674,6 +708,8 @@ export * from "./ResourceAccessInfoRole"; export * from "./ResourceMetadataResponseModel"; export * from "./ResourceMetadataResponseModelAnonymousAccessLevelOverride"; export * from "./ResponseFilterMode"; +export * from "./ResponseUnitTestModel"; +export * from "./ResponseUnitTestModelDynamicVariablesValue"; export * from "./ReviewResponseModel"; export * from "./ReviewResponseModelRejectReasonsItem"; export * from "./ReviewResponseModelReviewStatus"; @@ -698,6 +734,8 @@ export * from "./ScribeSessionTimeLimitExceededErrorPayload"; export * from "./ScribeThrottledErrorPayload"; export * from "./ScribeTranscriberErrorPayload"; export * from "./ScribeUnacceptedTermsErrorPayload"; +export * from "./SearchDocumentationToolConfigInput"; +export * from "./SearchDocumentationToolConfigOutput"; export * from "./SeatType"; export * from "./SecretDependencyType"; export * from "./SectionSource"; @@ -718,8 +756,9 @@ export * from "./SessionStartedPayloadConfigCommitStrategy"; export * from "./ShareOptionResponseModel"; export * from "./ShareOptionResponseModelType"; export * from "./SimilarVoice"; -export * from "./SimilarVoiceCategory"; export * from "./SimilarVoicesForSpeakerResponse"; +export * from "./SimulationTestModel"; +export * from "./SimulationTestModelDynamicVariablesValue"; export * from "./SingleTestRunRequestModel"; export * from "./SingleUseTokenResponseModel"; export * from "./SingleUseTokenType"; @@ -738,6 +777,8 @@ export * from "./SoftTimeoutConfigWorkflowOverride"; export * from "./SongMetadata"; export * from "./SongSection"; export * from "./SortDirection"; +export * from "./SourceConfigJson"; +export * from "./SourceRetrievalConfig"; export * from "./SpeakerAudioResponseModel"; export * from "./SpeakerCreatedResponse"; export * from "./SpeakerResponseModel"; @@ -781,6 +822,7 @@ export * from "./TestRunMetadataTestType"; export * from "./TestRunStatus"; export * from "./TestsFeatureUsageCommonModel"; export * from "./TestToolResultModel"; +export * from "./TestType"; export * from "./TextNormalisationType"; export * from "./TextToSpeechApplyTextNormalizationEnum"; export * from "./TextToSpeechOutputFormatEnum"; @@ -795,6 +837,8 @@ export * from "./Tool"; export * from "./ToolAnnotations"; export * from "./ToolCallSoundBehavior"; export * from "./ToolCallSoundType"; +export * from "./ToolCallUnitTestModel"; +export * from "./ToolCallUnitTestModelDynamicVariablesValue"; export * from "./ToolErrorHandlingMode"; export * from "./ToolExecutionMode"; export * from "./ToolMockConfig"; @@ -842,10 +886,8 @@ export * from "./TwilioEdgeLocation"; export * from "./TwilioOutboundCallResponse"; export * from "./TwilioRegionId"; export * from "./TxtExportOptions"; -export * from "./UnitTestCommonModel"; -export * from "./UnitTestCommonModelDynamicVariablesValue"; -export * from "./UnitTestCommonModelType"; export * from "./UnitTestRunResponseModel"; +export * from "./UnitTestRunResponseModelTestInfo"; export * from "./UnitTestSummaryResponseModel"; export * from "./UnitTestToolCallEvaluationModelInput"; export * from "./UnitTestToolCallEvaluationModelOutput"; @@ -856,6 +898,12 @@ export * from "./UpdateAudioNativeProjectRequest"; export * from "./UpdateChapterRequest"; export * from "./UpdateProjectRequest"; export * from "./UpdatePronunciationDictionariesRequest"; +export * from "./UpdateResponseUnitTestRequest"; +export * from "./UpdateResponseUnitTestRequestDynamicVariablesValue"; +export * from "./UpdateSimulationTestRequest"; +export * from "./UpdateSimulationTestRequestDynamicVariablesValue"; +export * from "./UpdateToolCallUnitTestRequest"; +export * from "./UpdateToolCallUnitTestRequestDynamicVariablesValue"; export * from "./UpdateWorkspaceMemberResponseModel"; export * from "./UrlAvatar"; export * from "./UsageAggregationInterval"; @@ -872,6 +920,7 @@ export * from "./VerificationAttemptResponse"; export * from "./VerifiedVoiceLanguageResponseModel"; export * from "./VerifyPvcVoiceCaptchaResponseModel"; export * from "./Voice"; +export * from "./VoiceCategory"; export * from "./VoiceDesignPreviewResponse"; export * from "./VoiceGenerationParameterOptionResponse"; export * from "./VoiceGenerationParameterResponse"; @@ -956,9 +1005,11 @@ export * from "./WorkflowOverrideAgentNodeModelInput"; export * from "./WorkflowOverrideAgentNodeModelOutput"; export * from "./WorkflowPhoneNumberNodeModelInput"; export * from "./WorkflowPhoneNumberNodeModelInputCustomSipHeadersItem"; +export * from "./WorkflowPhoneNumberNodeModelInputPostDialDigits"; export * from "./WorkflowPhoneNumberNodeModelInputTransferDestination"; export * from "./WorkflowPhoneNumberNodeModelOutput"; export * from "./WorkflowPhoneNumberNodeModelOutputCustomSipHeadersItem"; +export * from "./WorkflowPhoneNumberNodeModelOutputPostDialDigits"; export * from "./WorkflowPhoneNumberNodeModelOutputTransferDestination"; export * from "./WorkflowResultConditionModelInput"; export * from "./WorkflowResultConditionModelOutput"; @@ -987,6 +1038,9 @@ export * from "./WorkspaceBatchCallsResponse"; export * from "./WorkspaceCreateApiKeyResponseModel"; export * from "./WorkspaceCreateWebhookResponseModel"; export * from "./WorkspaceGroupByNameResponseModel"; +export * from "./WorkspaceGroupPermission"; +export * from "./WorkspaceGroupResponseModel"; +export * from "./WorkspaceGroupResponseModelGroupUsageLimit"; export * from "./WorkspaceResourceType"; export * from "./WorkspaceServiceAccountListResponseModel"; export * from "./WorkspaceServiceAccountResponseModel"; diff --git a/src/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts b/src/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts index 6abf5f5f..2d86ea95 100644 --- a/src/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts +++ b/src/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.ts @@ -10,7 +10,7 @@ import { BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem } export const UpdateAgentRequest: core.serialization.Schema< serializers.conversationalAi.UpdateAgentRequest.Raw, - ElevenLabs.conversationalAi.UpdateAgentRequest + Omit > = core.serialization.object({ conversationConfig: core.serialization.property("conversation_config", ConversationalConfig.optional()), platformSettings: core.serialization.property("platform_settings", AgentPlatformSettingsRequestModel.optional()), diff --git a/src/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts b/src/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts deleted file mode 100644 index 1619f4ef..00000000 --- a/src/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.ts +++ /dev/null @@ -1,63 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../../../../../../../api/index"; -import * as core from "../../../../../../../core"; -import type * as serializers from "../../../../../../index"; -import { AgentFailureResponseExample } from "../../../../../../types/AgentFailureResponseExample"; -import { AgentSuccessfulResponseExample } from "../../../../../../types/AgentSuccessfulResponseExample"; -import { ConversationHistoryTranscriptCommonModelInput } from "../../../../../../types/ConversationHistoryTranscriptCommonModelInput"; -import { TestFromConversationMetadataInput } from "../../../../../../types/TestFromConversationMetadataInput"; -import { UnitTestCommonModelType } from "../../../../../../types/UnitTestCommonModelType"; -import { UnitTestToolCallEvaluationModelInput } from "../../../../../../types/UnitTestToolCallEvaluationModelInput"; -import { CreateUnitTestRequestDynamicVariablesValue } from "../../types/CreateUnitTestRequestDynamicVariablesValue"; - -export const CreateUnitTestRequest: core.serialization.Schema< - serializers.conversationalAi.CreateUnitTestRequest.Raw, - ElevenLabs.conversationalAi.CreateUnitTestRequest -> = core.serialization.object({ - chatHistory: core.serialization.property( - "chat_history", - core.serialization.list(ConversationHistoryTranscriptCommonModelInput), - ), - successCondition: core.serialization.property("success_condition", core.serialization.string()), - successExamples: core.serialization.property( - "success_examples", - core.serialization.list(AgentSuccessfulResponseExample), - ), - failureExamples: core.serialization.property( - "failure_examples", - core.serialization.list(AgentFailureResponseExample), - ), - toolCallParameters: core.serialization.property( - "tool_call_parameters", - UnitTestToolCallEvaluationModelInput.optional(), - ), - checkAnyToolMatches: core.serialization.property("check_any_tool_matches", core.serialization.boolean().optional()), - dynamicVariables: core.serialization.property( - "dynamic_variables", - core.serialization - .record(core.serialization.string(), CreateUnitTestRequestDynamicVariablesValue.optional()) - .optional(), - ), - type: UnitTestCommonModelType.optional(), - fromConversationMetadata: core.serialization.property( - "from_conversation_metadata", - TestFromConversationMetadataInput.optional(), - ), - name: core.serialization.string(), -}); - -export declare namespace CreateUnitTestRequest { - export interface Raw { - chat_history: ConversationHistoryTranscriptCommonModelInput.Raw[]; - success_condition: string; - success_examples: AgentSuccessfulResponseExample.Raw[]; - failure_examples: AgentFailureResponseExample.Raw[]; - tool_call_parameters?: UnitTestToolCallEvaluationModelInput.Raw | null; - check_any_tool_matches?: boolean | null; - dynamic_variables?: Record | null; - type?: UnitTestCommonModelType.Raw | null; - from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; - name: string; - } -} diff --git a/src/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts b/src/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts deleted file mode 100644 index ee6bf45a..00000000 --- a/src/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.ts +++ /dev/null @@ -1,63 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../../../../../../../api/index"; -import * as core from "../../../../../../../core"; -import type * as serializers from "../../../../../../index"; -import { AgentFailureResponseExample } from "../../../../../../types/AgentFailureResponseExample"; -import { AgentSuccessfulResponseExample } from "../../../../../../types/AgentSuccessfulResponseExample"; -import { ConversationHistoryTranscriptCommonModelInput } from "../../../../../../types/ConversationHistoryTranscriptCommonModelInput"; -import { TestFromConversationMetadataInput } from "../../../../../../types/TestFromConversationMetadataInput"; -import { UnitTestCommonModelType } from "../../../../../../types/UnitTestCommonModelType"; -import { UnitTestToolCallEvaluationModelInput } from "../../../../../../types/UnitTestToolCallEvaluationModelInput"; -import { UpdateUnitTestRequestDynamicVariablesValue } from "../../types/UpdateUnitTestRequestDynamicVariablesValue"; - -export const UpdateUnitTestRequest: core.serialization.Schema< - serializers.conversationalAi.UpdateUnitTestRequest.Raw, - ElevenLabs.conversationalAi.UpdateUnitTestRequest -> = core.serialization.object({ - chatHistory: core.serialization.property( - "chat_history", - core.serialization.list(ConversationHistoryTranscriptCommonModelInput), - ), - successCondition: core.serialization.property("success_condition", core.serialization.string()), - successExamples: core.serialization.property( - "success_examples", - core.serialization.list(AgentSuccessfulResponseExample), - ), - failureExamples: core.serialization.property( - "failure_examples", - core.serialization.list(AgentFailureResponseExample), - ), - toolCallParameters: core.serialization.property( - "tool_call_parameters", - UnitTestToolCallEvaluationModelInput.optional(), - ), - checkAnyToolMatches: core.serialization.property("check_any_tool_matches", core.serialization.boolean().optional()), - dynamicVariables: core.serialization.property( - "dynamic_variables", - core.serialization - .record(core.serialization.string(), UpdateUnitTestRequestDynamicVariablesValue.optional()) - .optional(), - ), - type: UnitTestCommonModelType.optional(), - fromConversationMetadata: core.serialization.property( - "from_conversation_metadata", - TestFromConversationMetadataInput.optional(), - ), - name: core.serialization.string(), -}); - -export declare namespace UpdateUnitTestRequest { - export interface Raw { - chat_history: ConversationHistoryTranscriptCommonModelInput.Raw[]; - success_condition: string; - success_examples: AgentSuccessfulResponseExample.Raw[]; - failure_examples: AgentFailureResponseExample.Raw[]; - tool_call_parameters?: UnitTestToolCallEvaluationModelInput.Raw | null; - check_any_tool_matches?: boolean | null; - dynamic_variables?: Record | null; - type?: UnitTestCommonModelType.Raw | null; - from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; - name: string; - } -} diff --git a/src/serialization/resources/conversationalAi/resources/tests/client/requests/index.ts b/src/serialization/resources/conversationalAi/resources/tests/client/requests/index.ts index f3673238..3007746c 100644 --- a/src/serialization/resources/conversationalAi/resources/tests/client/requests/index.ts +++ b/src/serialization/resources/conversationalAi/resources/tests/client/requests/index.ts @@ -1,3 +1 @@ -export { CreateUnitTestRequest } from "./CreateUnitTestRequest"; export { ListTestsByIdsRequestModel } from "./ListTestsByIdsRequestModel"; -export { UpdateUnitTestRequest } from "./UpdateUnitTestRequest"; diff --git a/src/serialization/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts b/src/serialization/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts deleted file mode 100644 index cac9e4e0..00000000 --- a/src/serialization/resources/conversationalAi/resources/tests/types/CreateUnitTestRequestDynamicVariablesValue.ts +++ /dev/null @@ -1,19 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import type * as serializers from "../../../../../index"; - -export const CreateUnitTestRequestDynamicVariablesValue: core.serialization.Schema< - serializers.conversationalAi.CreateUnitTestRequestDynamicVariablesValue.Raw, - ElevenLabs.conversationalAi.CreateUnitTestRequestDynamicVariablesValue -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.number(), - core.serialization.number(), - core.serialization.boolean(), -]); - -export declare namespace CreateUnitTestRequestDynamicVariablesValue { - export type Raw = string | number | number | boolean; -} diff --git a/src/serialization/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts b/src/serialization/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts new file mode 100644 index 00000000..ddd7ffa5 --- /dev/null +++ b/src/serialization/resources/conversationalAi/resources/tests/types/TestsCreateRequestBody.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import type * as serializers from "../../../../../index"; +import { CreateResponseUnitTestRequest } from "../../../../../types/CreateResponseUnitTestRequest"; +import { CreateSimulationTestRequest } from "../../../../../types/CreateSimulationTestRequest"; +import { CreateToolCallUnitTestRequest } from "../../../../../types/CreateToolCallUnitTestRequest"; + +export const TestsCreateRequestBody: core.serialization.Schema< + serializers.conversationalAi.TestsCreateRequestBody.Raw, + ElevenLabs.conversationalAi.TestsCreateRequestBody +> = core.serialization + .union("type", { + llm: CreateResponseUnitTestRequest, + tool: CreateToolCallUnitTestRequest, + simulation: CreateSimulationTestRequest, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace TestsCreateRequestBody { + export type Raw = TestsCreateRequestBody.Llm | TestsCreateRequestBody.Tool | TestsCreateRequestBody.Simulation; + + export interface Llm extends CreateResponseUnitTestRequest.Raw { + type: "llm"; + } + + export interface Tool extends CreateToolCallUnitTestRequest.Raw { + type: "tool"; + } + + export interface Simulation extends CreateSimulationTestRequest.Raw { + type: "simulation"; + } +} diff --git a/src/serialization/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts b/src/serialization/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts new file mode 100644 index 00000000..b3877ce6 --- /dev/null +++ b/src/serialization/resources/conversationalAi/resources/tests/types/TestsGetResponse.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import type * as serializers from "../../../../../index"; +import { GetResponseUnitTestResponseModel } from "../../../../../types/GetResponseUnitTestResponseModel"; +import { GetSimulationTestResponseModel } from "../../../../../types/GetSimulationTestResponseModel"; +import { GetToolCallUnitTestResponseModel } from "../../../../../types/GetToolCallUnitTestResponseModel"; + +export const TestsGetResponse: core.serialization.Schema< + serializers.conversationalAi.TestsGetResponse.Raw, + ElevenLabs.conversationalAi.TestsGetResponse +> = core.serialization + .union("type", { + llm: GetResponseUnitTestResponseModel, + tool: GetToolCallUnitTestResponseModel, + simulation: GetSimulationTestResponseModel, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace TestsGetResponse { + export type Raw = TestsGetResponse.Llm | TestsGetResponse.Tool | TestsGetResponse.Simulation; + + export interface Llm extends GetResponseUnitTestResponseModel.Raw { + type: "llm"; + } + + export interface Tool extends GetToolCallUnitTestResponseModel.Raw { + type: "tool"; + } + + export interface Simulation extends GetSimulationTestResponseModel.Raw { + type: "simulation"; + } +} diff --git a/src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts b/src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts new file mode 100644 index 00000000..f6cda31e --- /dev/null +++ b/src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateRequestBody.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import type * as serializers from "../../../../../index"; +import { UpdateResponseUnitTestRequest } from "../../../../../types/UpdateResponseUnitTestRequest"; +import { UpdateSimulationTestRequest } from "../../../../../types/UpdateSimulationTestRequest"; +import { UpdateToolCallUnitTestRequest } from "../../../../../types/UpdateToolCallUnitTestRequest"; + +export const TestsUpdateRequestBody: core.serialization.Schema< + serializers.conversationalAi.TestsUpdateRequestBody.Raw, + ElevenLabs.conversationalAi.TestsUpdateRequestBody +> = core.serialization + .union("type", { + llm: UpdateResponseUnitTestRequest, + tool: UpdateToolCallUnitTestRequest, + simulation: UpdateSimulationTestRequest, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace TestsUpdateRequestBody { + export type Raw = TestsUpdateRequestBody.Llm | TestsUpdateRequestBody.Tool | TestsUpdateRequestBody.Simulation; + + export interface Llm extends UpdateResponseUnitTestRequest.Raw { + type: "llm"; + } + + export interface Tool extends UpdateToolCallUnitTestRequest.Raw { + type: "tool"; + } + + export interface Simulation extends UpdateSimulationTestRequest.Raw { + type: "simulation"; + } +} diff --git a/src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts b/src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts new file mode 100644 index 00000000..4f4663c8 --- /dev/null +++ b/src/serialization/resources/conversationalAi/resources/tests/types/TestsUpdateResponse.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import type * as serializers from "../../../../../index"; +import { GetResponseUnitTestResponseModel } from "../../../../../types/GetResponseUnitTestResponseModel"; +import { GetSimulationTestResponseModel } from "../../../../../types/GetSimulationTestResponseModel"; +import { GetToolCallUnitTestResponseModel } from "../../../../../types/GetToolCallUnitTestResponseModel"; + +export const TestsUpdateResponse: core.serialization.Schema< + serializers.conversationalAi.TestsUpdateResponse.Raw, + ElevenLabs.conversationalAi.TestsUpdateResponse +> = core.serialization + .union("type", { + llm: GetResponseUnitTestResponseModel, + tool: GetToolCallUnitTestResponseModel, + simulation: GetSimulationTestResponseModel, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace TestsUpdateResponse { + export type Raw = TestsUpdateResponse.Llm | TestsUpdateResponse.Tool | TestsUpdateResponse.Simulation; + + export interface Llm extends GetResponseUnitTestResponseModel.Raw { + type: "llm"; + } + + export interface Tool extends GetToolCallUnitTestResponseModel.Raw { + type: "tool"; + } + + export interface Simulation extends GetSimulationTestResponseModel.Raw { + type: "simulation"; + } +} diff --git a/src/serialization/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts b/src/serialization/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts deleted file mode 100644 index ae07b42b..00000000 --- a/src/serialization/resources/conversationalAi/resources/tests/types/UpdateUnitTestRequestDynamicVariablesValue.ts +++ /dev/null @@ -1,19 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../../../../../../api/index"; -import * as core from "../../../../../../core"; -import type * as serializers from "../../../../../index"; - -export const UpdateUnitTestRequestDynamicVariablesValue: core.serialization.Schema< - serializers.conversationalAi.UpdateUnitTestRequestDynamicVariablesValue.Raw, - ElevenLabs.conversationalAi.UpdateUnitTestRequestDynamicVariablesValue -> = core.serialization.undiscriminatedUnion([ - core.serialization.string(), - core.serialization.number(), - core.serialization.number(), - core.serialization.boolean(), -]); - -export declare namespace UpdateUnitTestRequestDynamicVariablesValue { - export type Raw = string | number | number | boolean; -} diff --git a/src/serialization/resources/conversationalAi/resources/tests/types/index.ts b/src/serialization/resources/conversationalAi/resources/tests/types/index.ts index 9a68f2ca..2da15598 100644 --- a/src/serialization/resources/conversationalAi/resources/tests/types/index.ts +++ b/src/serialization/resources/conversationalAi/resources/tests/types/index.ts @@ -1,2 +1,4 @@ -export * from "./CreateUnitTestRequestDynamicVariablesValue"; -export * from "./UpdateUnitTestRequestDynamicVariablesValue"; +export * from "./TestsCreateRequestBody"; +export * from "./TestsGetResponse"; +export * from "./TestsUpdateRequestBody"; +export * from "./TestsUpdateResponse"; diff --git a/src/serialization/types/BuiltInToolsInput.ts b/src/serialization/types/BuiltInToolsInput.ts index 296ab544..d55f79fc 100644 --- a/src/serialization/types/BuiltInToolsInput.ts +++ b/src/serialization/types/BuiltInToolsInput.ts @@ -16,6 +16,7 @@ export const BuiltInToolsInput: core.serialization.ObjectSchema< skipTurn: core.serialization.property("skip_turn", SystemToolConfigInput.optional()), playKeypadTouchTone: core.serialization.property("play_keypad_touch_tone", SystemToolConfigInput.optional()), voicemailDetection: core.serialization.property("voicemail_detection", SystemToolConfigInput.optional()), + searchDocumentation: core.serialization.property("search_documentation", SystemToolConfigInput.optional()), }); export declare namespace BuiltInToolsInput { @@ -27,5 +28,6 @@ export declare namespace BuiltInToolsInput { skip_turn?: SystemToolConfigInput.Raw | null; play_keypad_touch_tone?: SystemToolConfigInput.Raw | null; voicemail_detection?: SystemToolConfigInput.Raw | null; + search_documentation?: SystemToolConfigInput.Raw | null; } } diff --git a/src/serialization/types/BuiltInToolsOutput.ts b/src/serialization/types/BuiltInToolsOutput.ts index 249dc303..16b0898d 100644 --- a/src/serialization/types/BuiltInToolsOutput.ts +++ b/src/serialization/types/BuiltInToolsOutput.ts @@ -16,6 +16,7 @@ export const BuiltInToolsOutput: core.serialization.ObjectSchema< skipTurn: core.serialization.property("skip_turn", SystemToolConfigOutput.optional()), playKeypadTouchTone: core.serialization.property("play_keypad_touch_tone", SystemToolConfigOutput.optional()), voicemailDetection: core.serialization.property("voicemail_detection", SystemToolConfigOutput.optional()), + searchDocumentation: core.serialization.property("search_documentation", SystemToolConfigOutput.optional()), }); export declare namespace BuiltInToolsOutput { @@ -27,5 +28,6 @@ export declare namespace BuiltInToolsOutput { skip_turn?: SystemToolConfigOutput.Raw | null; play_keypad_touch_tone?: SystemToolConfigOutput.Raw | null; voicemail_detection?: SystemToolConfigOutput.Raw | null; + search_documentation?: SystemToolConfigOutput.Raw | null; } } diff --git a/src/serialization/types/BuiltInToolsWorkflowOverrideInput.ts b/src/serialization/types/BuiltInToolsWorkflowOverrideInput.ts index 0b6f7ae8..812dd726 100644 --- a/src/serialization/types/BuiltInToolsWorkflowOverrideInput.ts +++ b/src/serialization/types/BuiltInToolsWorkflowOverrideInput.ts @@ -16,6 +16,7 @@ export const BuiltInToolsWorkflowOverrideInput: core.serialization.ObjectSchema< skipTurn: core.serialization.property("skip_turn", SystemToolConfigInput.optional()), playKeypadTouchTone: core.serialization.property("play_keypad_touch_tone", SystemToolConfigInput.optional()), voicemailDetection: core.serialization.property("voicemail_detection", SystemToolConfigInput.optional()), + searchDocumentation: core.serialization.property("search_documentation", SystemToolConfigInput.optional()), }); export declare namespace BuiltInToolsWorkflowOverrideInput { @@ -27,5 +28,6 @@ export declare namespace BuiltInToolsWorkflowOverrideInput { skip_turn?: SystemToolConfigInput.Raw | null; play_keypad_touch_tone?: SystemToolConfigInput.Raw | null; voicemail_detection?: SystemToolConfigInput.Raw | null; + search_documentation?: SystemToolConfigInput.Raw | null; } } diff --git a/src/serialization/types/BuiltInToolsWorkflowOverrideOutput.ts b/src/serialization/types/BuiltInToolsWorkflowOverrideOutput.ts index 0fa442ad..31c57293 100644 --- a/src/serialization/types/BuiltInToolsWorkflowOverrideOutput.ts +++ b/src/serialization/types/BuiltInToolsWorkflowOverrideOutput.ts @@ -16,6 +16,7 @@ export const BuiltInToolsWorkflowOverrideOutput: core.serialization.ObjectSchema skipTurn: core.serialization.property("skip_turn", SystemToolConfigOutput.optional()), playKeypadTouchTone: core.serialization.property("play_keypad_touch_tone", SystemToolConfigOutput.optional()), voicemailDetection: core.serialization.property("voicemail_detection", SystemToolConfigOutput.optional()), + searchDocumentation: core.serialization.property("search_documentation", SystemToolConfigOutput.optional()), }); export declare namespace BuiltInToolsWorkflowOverrideOutput { @@ -27,5 +28,6 @@ export declare namespace BuiltInToolsWorkflowOverrideOutput { skip_turn?: SystemToolConfigOutput.Raw | null; play_keypad_touch_tone?: SystemToolConfigOutput.Raw | null; voicemail_detection?: SystemToolConfigOutput.Raw | null; + search_documentation?: SystemToolConfigOutput.Raw | null; } } diff --git a/src/serialization/types/ContentConfig.ts b/src/serialization/types/ContentConfig.ts new file mode 100644 index 00000000..5beb1b53 --- /dev/null +++ b/src/serialization/types/ContentConfig.ts @@ -0,0 +1,32 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ThresholdGuardrail } from "./ThresholdGuardrail"; + +export const ContentConfig: core.serialization.ObjectSchema = + core.serialization.object({ + sexual: ThresholdGuardrail.optional(), + violence: ThresholdGuardrail.optional(), + harassment: ThresholdGuardrail.optional(), + selfHarm: core.serialization.property("self_harm", ThresholdGuardrail.optional()), + profanity: ThresholdGuardrail.optional(), + religionAndPolitics: core.serialization.property("religion_and_politics", ThresholdGuardrail.optional()), + medicalAndLegalInformation: core.serialization.property( + "medical_and_legal_information", + ThresholdGuardrail.optional(), + ), + }); + +export declare namespace ContentConfig { + export interface Raw { + sexual?: ThresholdGuardrail.Raw | null; + violence?: ThresholdGuardrail.Raw | null; + harassment?: ThresholdGuardrail.Raw | null; + self_harm?: ThresholdGuardrail.Raw | null; + profanity?: ThresholdGuardrail.Raw | null; + religion_and_politics?: ThresholdGuardrail.Raw | null; + medical_and_legal_information?: ThresholdGuardrail.Raw | null; + } +} diff --git a/src/serialization/types/ContentGuardrailInput.ts b/src/serialization/types/ContentGuardrailInput.ts new file mode 100644 index 00000000..3d0b7d20 --- /dev/null +++ b/src/serialization/types/ContentGuardrailInput.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ContentConfig } from "./ContentConfig"; + +export const ContentGuardrailInput: core.serialization.ObjectSchema< + serializers.ContentGuardrailInput.Raw, + ElevenLabs.ContentGuardrailInput +> = core.serialization.object({ + config: ContentConfig.optional(), +}); + +export declare namespace ContentGuardrailInput { + export interface Raw { + config?: ContentConfig.Raw | null; + } +} diff --git a/src/serialization/types/ContentGuardrailOutput.ts b/src/serialization/types/ContentGuardrailOutput.ts new file mode 100644 index 00000000..567c03e1 --- /dev/null +++ b/src/serialization/types/ContentGuardrailOutput.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ContentConfig } from "./ContentConfig"; + +export const ContentGuardrailOutput: core.serialization.ObjectSchema< + serializers.ContentGuardrailOutput.Raw, + ElevenLabs.ContentGuardrailOutput +> = core.serialization.object({ + config: ContentConfig.optional(), +}); + +export declare namespace ContentGuardrailOutput { + export interface Raw { + config?: ContentConfig.Raw | null; + } +} diff --git a/src/serialization/types/ConversationSummaryResponseModel.ts b/src/serialization/types/ConversationSummaryResponseModel.ts index dcf7827a..76c66fda 100644 --- a/src/serialization/types/ConversationSummaryResponseModel.ts +++ b/src/serialization/types/ConversationSummaryResponseModel.ts @@ -3,6 +3,7 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { ConversationInitiationSource } from "./ConversationInitiationSource"; import { ConversationSummaryResponseModelDirection } from "./ConversationSummaryResponseModelDirection"; import { ConversationSummaryResponseModelStatus } from "./ConversationSummaryResponseModelStatus"; import { EvaluationSuccessResult } from "./EvaluationSuccessResult"; @@ -23,6 +24,15 @@ export const ConversationSummaryResponseModel: core.serialization.ObjectSchema< callSuccessful: core.serialization.property("call_successful", EvaluationSuccessResult), transcriptSummary: core.serialization.property("transcript_summary", core.serialization.string().optional()), callSummaryTitle: core.serialization.property("call_summary_title", core.serialization.string().optional()), + mainLanguage: core.serialization.property("main_language", core.serialization.string().optional()), + conversationInitiationSource: core.serialization.property( + "conversation_initiation_source", + ConversationInitiationSource.optional(), + ), + toolNames: core.serialization.property( + "tool_names", + core.serialization.list(core.serialization.string()).optional(), + ), direction: ConversationSummaryResponseModelDirection.optional(), rating: core.serialization.number().optional(), }); @@ -41,6 +51,9 @@ export declare namespace ConversationSummaryResponseModel { call_successful: EvaluationSuccessResult.Raw; transcript_summary?: string | null; call_summary_title?: string | null; + main_language?: string | null; + conversation_initiation_source?: ConversationInitiationSource.Raw | null; + tool_names?: string[] | null; direction?: ConversationSummaryResponseModelDirection.Raw | null; rating?: number | null; } diff --git a/src/serialization/types/ConversationUserResponseModel.ts b/src/serialization/types/ConversationUserResponseModel.ts new file mode 100644 index 00000000..c374bc51 --- /dev/null +++ b/src/serialization/types/ConversationUserResponseModel.ts @@ -0,0 +1,28 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const ConversationUserResponseModel: core.serialization.ObjectSchema< + serializers.ConversationUserResponseModel.Raw, + ElevenLabs.ConversationUserResponseModel +> = core.serialization.object({ + userId: core.serialization.property("user_id", core.serialization.string()), + lastContactUnixSecs: core.serialization.property("last_contact_unix_secs", core.serialization.number()), + firstContactUnixSecs: core.serialization.property("first_contact_unix_secs", core.serialization.number()), + conversationCount: core.serialization.property("conversation_count", core.serialization.number()), + lastAgentId: core.serialization.property("last_agent_id", core.serialization.string().optional()), + lastAgentName: core.serialization.property("last_agent_name", core.serialization.string().optional()), +}); + +export declare namespace ConversationUserResponseModel { + export interface Raw { + user_id: string; + last_contact_unix_secs: number; + first_contact_unix_secs: number; + conversation_count: number; + last_agent_id?: string | null; + last_agent_name?: string | null; + } +} diff --git a/src/serialization/types/CreateUnitTestResponseModel.ts b/src/serialization/types/CreateAgentTestResponseModel.ts similarity index 59% rename from src/serialization/types/CreateUnitTestResponseModel.ts rename to src/serialization/types/CreateAgentTestResponseModel.ts index a94db53c..96f74722 100644 --- a/src/serialization/types/CreateUnitTestResponseModel.ts +++ b/src/serialization/types/CreateAgentTestResponseModel.ts @@ -4,14 +4,14 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -export const CreateUnitTestResponseModel: core.serialization.ObjectSchema< - serializers.CreateUnitTestResponseModel.Raw, - ElevenLabs.CreateUnitTestResponseModel +export const CreateAgentTestResponseModel: core.serialization.ObjectSchema< + serializers.CreateAgentTestResponseModel.Raw, + ElevenLabs.CreateAgentTestResponseModel > = core.serialization.object({ id: core.serialization.string(), }); -export declare namespace CreateUnitTestResponseModel { +export declare namespace CreateAgentTestResponseModel { export interface Raw { id: string; } diff --git a/src/serialization/types/CreateResponseUnitTestRequest.ts b/src/serialization/types/CreateResponseUnitTestRequest.ts new file mode 100644 index 00000000..ad2672b4 --- /dev/null +++ b/src/serialization/types/CreateResponseUnitTestRequest.ts @@ -0,0 +1,55 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { AgentFailureResponseExample } from "./AgentFailureResponseExample"; +import { AgentSuccessfulResponseExample } from "./AgentSuccessfulResponseExample"; +import { ConversationHistoryTranscriptCommonModelInput } from "./ConversationHistoryTranscriptCommonModelInput"; +import { CreateResponseUnitTestRequestDynamicVariablesValue } from "./CreateResponseUnitTestRequestDynamicVariablesValue"; +import { TestFromConversationMetadataInput } from "./TestFromConversationMetadataInput"; + +export const CreateResponseUnitTestRequest: core.serialization.ObjectSchema< + serializers.CreateResponseUnitTestRequest.Raw, + ElevenLabs.CreateResponseUnitTestRequest +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataInput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), CreateResponseUnitTestRequestDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelInput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + successExamples: core.serialization.property( + "success_examples", + core.serialization.list(AgentSuccessfulResponseExample).optional(), + ), + failureExamples: core.serialization.property( + "failure_examples", + core.serialization.list(AgentFailureResponseExample).optional(), + ), + name: core.serialization.string(), +}); + +export declare namespace CreateResponseUnitTestRequest { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; + dynamic_variables?: Record< + string, + CreateResponseUnitTestRequestDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelInput.Raw[] | null; + success_condition?: string | null; + success_examples?: AgentSuccessfulResponseExample.Raw[] | null; + failure_examples?: AgentFailureResponseExample.Raw[] | null; + name: string; + } +} diff --git a/src/serialization/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts b/src/serialization/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..46699508 --- /dev/null +++ b/src/serialization/types/CreateResponseUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CreateResponseUnitTestRequestDynamicVariablesValue: core.serialization.Schema< + serializers.CreateResponseUnitTestRequestDynamicVariablesValue.Raw, + ElevenLabs.CreateResponseUnitTestRequestDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace CreateResponseUnitTestRequestDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/CreateSimulationTestRequest.ts b/src/serialization/types/CreateSimulationTestRequest.ts new file mode 100644 index 00000000..d781402c --- /dev/null +++ b/src/serialization/types/CreateSimulationTestRequest.ts @@ -0,0 +1,47 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConversationHistoryTranscriptCommonModelInput } from "./ConversationHistoryTranscriptCommonModelInput"; +import { CreateSimulationTestRequestDynamicVariablesValue } from "./CreateSimulationTestRequestDynamicVariablesValue"; +import { TestFromConversationMetadataInput } from "./TestFromConversationMetadataInput"; + +export const CreateSimulationTestRequest: core.serialization.ObjectSchema< + serializers.CreateSimulationTestRequest.Raw, + ElevenLabs.CreateSimulationTestRequest +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataInput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), CreateSimulationTestRequestDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelInput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + simulationScenario: core.serialization.property("simulation_scenario", core.serialization.string().optional()), + simulationMaxTurns: core.serialization.property("simulation_max_turns", core.serialization.number().optional()), + name: core.serialization.string(), +}); + +export declare namespace CreateSimulationTestRequest { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; + dynamic_variables?: Record< + string, + CreateSimulationTestRequestDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelInput.Raw[] | null; + success_condition?: string | null; + simulation_scenario?: string | null; + simulation_max_turns?: number | null; + name: string; + } +} diff --git a/src/serialization/types/CreateSimulationTestRequestDynamicVariablesValue.ts b/src/serialization/types/CreateSimulationTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..010f19e7 --- /dev/null +++ b/src/serialization/types/CreateSimulationTestRequestDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CreateSimulationTestRequestDynamicVariablesValue: core.serialization.Schema< + serializers.CreateSimulationTestRequestDynamicVariablesValue.Raw, + ElevenLabs.CreateSimulationTestRequestDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace CreateSimulationTestRequestDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/CreateToolCallUnitTestRequest.ts b/src/serialization/types/CreateToolCallUnitTestRequest.ts new file mode 100644 index 00000000..ab363569 --- /dev/null +++ b/src/serialization/types/CreateToolCallUnitTestRequest.ts @@ -0,0 +1,49 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConversationHistoryTranscriptCommonModelInput } from "./ConversationHistoryTranscriptCommonModelInput"; +import { CreateToolCallUnitTestRequestDynamicVariablesValue } from "./CreateToolCallUnitTestRequestDynamicVariablesValue"; +import { TestFromConversationMetadataInput } from "./TestFromConversationMetadataInput"; +import { UnitTestToolCallEvaluationModelInput } from "./UnitTestToolCallEvaluationModelInput"; + +export const CreateToolCallUnitTestRequest: core.serialization.ObjectSchema< + serializers.CreateToolCallUnitTestRequest.Raw, + ElevenLabs.CreateToolCallUnitTestRequest +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataInput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), CreateToolCallUnitTestRequestDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelInput).optional(), + ), + toolCallParameters: core.serialization.property( + "tool_call_parameters", + UnitTestToolCallEvaluationModelInput.optional(), + ), + checkAnyToolMatches: core.serialization.property("check_any_tool_matches", core.serialization.boolean().optional()), + name: core.serialization.string(), +}); + +export declare namespace CreateToolCallUnitTestRequest { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; + dynamic_variables?: Record< + string, + CreateToolCallUnitTestRequestDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelInput.Raw[] | null; + tool_call_parameters?: UnitTestToolCallEvaluationModelInput.Raw | null; + check_any_tool_matches?: boolean | null; + name: string; + } +} diff --git a/src/serialization/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts b/src/serialization/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..3fd0a296 --- /dev/null +++ b/src/serialization/types/CreateToolCallUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CreateToolCallUnitTestRequestDynamicVariablesValue: core.serialization.Schema< + serializers.CreateToolCallUnitTestRequestDynamicVariablesValue.Raw, + ElevenLabs.CreateToolCallUnitTestRequestDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace CreateToolCallUnitTestRequestDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/CustomGuardrailConfig.ts b/src/serialization/types/CustomGuardrailConfig.ts new file mode 100644 index 00000000..d9ccd319 --- /dev/null +++ b/src/serialization/types/CustomGuardrailConfig.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomGuardrailConfigModel } from "./CustomGuardrailConfigModel"; + +export const CustomGuardrailConfig: core.serialization.ObjectSchema< + serializers.CustomGuardrailConfig.Raw, + ElevenLabs.CustomGuardrailConfig +> = core.serialization.object({ + isEnabled: core.serialization.property("is_enabled", core.serialization.boolean().optional()), + name: core.serialization.string(), + prompt: core.serialization.string(), + model: CustomGuardrailConfigModel, +}); + +export declare namespace CustomGuardrailConfig { + export interface Raw { + is_enabled?: boolean | null; + name: string; + prompt: string; + model: CustomGuardrailConfigModel.Raw; + } +} diff --git a/src/serialization/types/CustomGuardrailConfigModel.ts b/src/serialization/types/CustomGuardrailConfigModel.ts new file mode 100644 index 00000000..c940a7db --- /dev/null +++ b/src/serialization/types/CustomGuardrailConfigModel.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const CustomGuardrailConfigModel: core.serialization.Schema< + serializers.CustomGuardrailConfigModel.Raw, + ElevenLabs.CustomGuardrailConfigModel +> = core.serialization.enum_(["gemini-2.5-flash-lite", "gemini-2.0-flash"]); + +export declare namespace CustomGuardrailConfigModel { + export type Raw = "gemini-2.5-flash-lite" | "gemini-2.0-flash"; +} diff --git a/src/serialization/types/CustomGuardrailInput.ts b/src/serialization/types/CustomGuardrailInput.ts new file mode 100644 index 00000000..3a7f4844 --- /dev/null +++ b/src/serialization/types/CustomGuardrailInput.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomGuardrailsConfig } from "./CustomGuardrailsConfig"; + +export const CustomGuardrailInput: core.serialization.ObjectSchema< + serializers.CustomGuardrailInput.Raw, + ElevenLabs.CustomGuardrailInput +> = core.serialization.object({ + config: CustomGuardrailsConfig.optional(), +}); + +export declare namespace CustomGuardrailInput { + export interface Raw { + config?: CustomGuardrailsConfig.Raw | null; + } +} diff --git a/src/serialization/types/CustomGuardrailOutput.ts b/src/serialization/types/CustomGuardrailOutput.ts new file mode 100644 index 00000000..fdb43e92 --- /dev/null +++ b/src/serialization/types/CustomGuardrailOutput.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomGuardrailsConfig } from "./CustomGuardrailsConfig"; + +export const CustomGuardrailOutput: core.serialization.ObjectSchema< + serializers.CustomGuardrailOutput.Raw, + ElevenLabs.CustomGuardrailOutput +> = core.serialization.object({ + config: CustomGuardrailsConfig.optional(), +}); + +export declare namespace CustomGuardrailOutput { + export interface Raw { + config?: CustomGuardrailsConfig.Raw | null; + } +} diff --git a/src/serialization/types/CustomGuardrailsConfig.ts b/src/serialization/types/CustomGuardrailsConfig.ts new file mode 100644 index 00000000..269ef5f7 --- /dev/null +++ b/src/serialization/types/CustomGuardrailsConfig.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { CustomGuardrailConfig } from "./CustomGuardrailConfig"; + +export const CustomGuardrailsConfig: core.serialization.ObjectSchema< + serializers.CustomGuardrailsConfig.Raw, + ElevenLabs.CustomGuardrailsConfig +> = core.serialization.object({ + configs: core.serialization.list(CustomGuardrailConfig).optional(), +}); + +export declare namespace CustomGuardrailsConfig { + export interface Raw { + configs?: CustomGuardrailConfig.Raw[] | null; + } +} diff --git a/src/serialization/types/DefaultSharingGroupResponseModel.ts b/src/serialization/types/DefaultSharingGroupResponseModel.ts new file mode 100644 index 00000000..99c95553 --- /dev/null +++ b/src/serialization/types/DefaultSharingGroupResponseModel.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { DefaultSharingGroupResponseModelPermissionLevel } from "./DefaultSharingGroupResponseModelPermissionLevel"; +import { WorkspaceGroupResponseModel } from "./WorkspaceGroupResponseModel"; + +export const DefaultSharingGroupResponseModel: core.serialization.ObjectSchema< + serializers.DefaultSharingGroupResponseModel.Raw, + ElevenLabs.DefaultSharingGroupResponseModel +> = core.serialization.object({ + group: WorkspaceGroupResponseModel, + permissionLevel: core.serialization.property("permission_level", DefaultSharingGroupResponseModelPermissionLevel), +}); + +export declare namespace DefaultSharingGroupResponseModel { + export interface Raw { + group: WorkspaceGroupResponseModel.Raw; + permission_level: DefaultSharingGroupResponseModelPermissionLevel.Raw; + } +} diff --git a/src/serialization/types/DefaultSharingGroupResponseModelPermissionLevel.ts b/src/serialization/types/DefaultSharingGroupResponseModelPermissionLevel.ts new file mode 100644 index 00000000..a69d5e76 --- /dev/null +++ b/src/serialization/types/DefaultSharingGroupResponseModelPermissionLevel.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const DefaultSharingGroupResponseModelPermissionLevel: core.serialization.Schema< + serializers.DefaultSharingGroupResponseModelPermissionLevel.Raw, + ElevenLabs.DefaultSharingGroupResponseModelPermissionLevel +> = core.serialization.enum_(["admin", "editor", "viewer"]); + +export declare namespace DefaultSharingGroupResponseModelPermissionLevel { + export type Raw = "admin" | "editor" | "viewer"; +} diff --git a/src/serialization/types/DirectPublishingReadResponseModel.ts b/src/serialization/types/DirectPublishingReadResponseModel.ts index 704cbc1f..8021611c 100644 --- a/src/serialization/types/DirectPublishingReadResponseModel.ts +++ b/src/serialization/types/DirectPublishingReadResponseModel.ts @@ -58,7 +58,7 @@ export const DirectPublishingReadResponseModel: core.serialization.ObjectSchema< subtitle: core.serialization.string().optional(), distributionTerritories: core.serialization.property( "distribution_territories", - core.serialization.list(core.serialization.stringLiteral("worldwide")).optional(), + core.serialization.list(core.serialization.string()).optional(), ), edition: core.serialization.string().optional(), contributors: core.serialization.list(Contributor).optional(), @@ -118,7 +118,7 @@ export declare namespace DirectPublishingReadResponseModel { publisher?: string | null; copyright?: string | null; subtitle?: string | null; - distribution_territories?: "worldwide"[] | null; + distribution_territories?: string[] | null; edition?: string | null; contributors?: Contributor.Raw[] | null; payout_type?: DirectPublishingReadResponseModelPayoutType.Raw | null; diff --git a/src/serialization/types/GetConversationResponseModel.ts b/src/serialization/types/GetConversationResponseModel.ts index 844f12bb..81d52657 100644 --- a/src/serialization/types/GetConversationResponseModel.ts +++ b/src/serialization/types/GetConversationResponseModel.ts @@ -15,7 +15,6 @@ export const GetConversationResponseModel: core.serialization.ObjectSchema< > = core.serialization.object({ agentId: core.serialization.property("agent_id", core.serialization.string()), agentName: core.serialization.property("agent_name", core.serialization.string().optional()), - conversationId: core.serialization.property("conversation_id", core.serialization.string()), status: GetConversationResponseModelStatus, userId: core.serialization.property("user_id", core.serialization.string().optional()), branchId: core.serialization.property("branch_id", core.serialization.string().optional()), @@ -27,6 +26,7 @@ export const GetConversationResponseModel: core.serialization.ObjectSchema< "conversation_initiation_client_data", ConversationInitiationClientDataRequestOutput.optional(), ), + conversationId: core.serialization.property("conversation_id", core.serialization.string()), hasAudio: core.serialization.property("has_audio", core.serialization.boolean()), hasUserAudio: core.serialization.property("has_user_audio", core.serialization.boolean()), hasResponseAudio: core.serialization.property("has_response_audio", core.serialization.boolean()), @@ -36,7 +36,6 @@ export declare namespace GetConversationResponseModel { export interface Raw { agent_id: string; agent_name?: string | null; - conversation_id: string; status: GetConversationResponseModelStatus.Raw; user_id?: string | null; branch_id?: string | null; @@ -45,6 +44,7 @@ export declare namespace GetConversationResponseModel { metadata: ConversationHistoryMetadataCommonModel.Raw; analysis?: ConversationHistoryAnalysisCommonModel.Raw | null; conversation_initiation_client_data?: ConversationInitiationClientDataRequestOutput.Raw | null; + conversation_id: string; has_audio: boolean; has_user_audio: boolean; has_response_audio: boolean; diff --git a/src/serialization/types/GetConversationUsersPageResponseModel.ts b/src/serialization/types/GetConversationUsersPageResponseModel.ts new file mode 100644 index 00000000..b71fcd1f --- /dev/null +++ b/src/serialization/types/GetConversationUsersPageResponseModel.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConversationUserResponseModel } from "./ConversationUserResponseModel"; + +export const GetConversationUsersPageResponseModel: core.serialization.ObjectSchema< + serializers.GetConversationUsersPageResponseModel.Raw, + ElevenLabs.GetConversationUsersPageResponseModel +> = core.serialization.object({ + users: core.serialization.list(ConversationUserResponseModel), + nextCursor: core.serialization.property("next_cursor", core.serialization.string().optional()), + hasMore: core.serialization.property("has_more", core.serialization.boolean()), +}); + +export declare namespace GetConversationUsersPageResponseModel { + export interface Raw { + users: ConversationUserResponseModel.Raw[]; + next_cursor?: string | null; + has_more: boolean; + } +} diff --git a/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModel.ts b/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModel.ts new file mode 100644 index 00000000..818761f1 --- /dev/null +++ b/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModel.ts @@ -0,0 +1,41 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource } from "./GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource"; +import { GetPronunciationDictionaryWithRulesResponseModelRulesItem } from "./GetPronunciationDictionaryWithRulesResponseModelRulesItem"; + +export const GetPronunciationDictionaryWithRulesResponseModel: core.serialization.ObjectSchema< + serializers.GetPronunciationDictionaryWithRulesResponseModel.Raw, + ElevenLabs.GetPronunciationDictionaryWithRulesResponseModel +> = core.serialization.object({ + id: core.serialization.string(), + latestVersionId: core.serialization.property("latest_version_id", core.serialization.string()), + latestVersionRulesNum: core.serialization.property("latest_version_rules_num", core.serialization.number()), + name: core.serialization.string(), + permissionOnResource: core.serialization.property( + "permission_on_resource", + GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.optional(), + ), + createdBy: core.serialization.property("created_by", core.serialization.string()), + creationTimeUnix: core.serialization.property("creation_time_unix", core.serialization.number()), + archivedTimeUnix: core.serialization.property("archived_time_unix", core.serialization.number().optional()), + description: core.serialization.string().optional(), + rules: core.serialization.list(GetPronunciationDictionaryWithRulesResponseModelRulesItem), +}); + +export declare namespace GetPronunciationDictionaryWithRulesResponseModel { + export interface Raw { + id: string; + latest_version_id: string; + latest_version_rules_num: number; + name: string; + permission_on_resource?: GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.Raw | null; + created_by: string; + creation_time_unix: number; + archived_time_unix?: number | null; + description?: string | null; + rules: GetPronunciationDictionaryWithRulesResponseModelRulesItem.Raw[]; + } +} diff --git a/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts b/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts new file mode 100644 index 00000000..04871475 --- /dev/null +++ b/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource: core.serialization.Schema< + serializers.GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource.Raw, + ElevenLabs.GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource +> = core.serialization.enum_(["admin", "editor", "commenter", "viewer"]); + +export declare namespace GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource { + export type Raw = "admin" | "editor" | "commenter" | "viewer"; +} diff --git a/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts b/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts new file mode 100644 index 00000000..434f1423 --- /dev/null +++ b/src/serialization/types/GetPronunciationDictionaryWithRulesResponseModelRulesItem.ts @@ -0,0 +1,34 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { PronunciationDictionaryAliasRuleResponseModel } from "./PronunciationDictionaryAliasRuleResponseModel"; +import { PronunciationDictionaryPhonemeRuleResponseModel } from "./PronunciationDictionaryPhonemeRuleResponseModel"; + +export const GetPronunciationDictionaryWithRulesResponseModelRulesItem: core.serialization.Schema< + serializers.GetPronunciationDictionaryWithRulesResponseModelRulesItem.Raw, + ElevenLabs.GetPronunciationDictionaryWithRulesResponseModelRulesItem +> = core.serialization + .union("type", { + alias: PronunciationDictionaryAliasRuleResponseModel, + phoneme: PronunciationDictionaryPhonemeRuleResponseModel, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace GetPronunciationDictionaryWithRulesResponseModelRulesItem { + export type Raw = + | GetPronunciationDictionaryWithRulesResponseModelRulesItem.Alias + | GetPronunciationDictionaryWithRulesResponseModelRulesItem.Phoneme; + + export interface Alias extends PronunciationDictionaryAliasRuleResponseModel.Raw { + type: "alias"; + } + + export interface Phoneme extends PronunciationDictionaryPhonemeRuleResponseModel.Raw { + type: "phoneme"; + } +} diff --git a/src/serialization/types/GetResponseUnitTestResponseModel.ts b/src/serialization/types/GetResponseUnitTestResponseModel.ts new file mode 100644 index 00000000..b0b9e18b --- /dev/null +++ b/src/serialization/types/GetResponseUnitTestResponseModel.ts @@ -0,0 +1,57 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { AgentFailureResponseExample } from "./AgentFailureResponseExample"; +import { AgentSuccessfulResponseExample } from "./AgentSuccessfulResponseExample"; +import { ConversationHistoryTranscriptCommonModelOutput } from "./ConversationHistoryTranscriptCommonModelOutput"; +import { GetResponseUnitTestResponseModelDynamicVariablesValue } from "./GetResponseUnitTestResponseModelDynamicVariablesValue"; +import { TestFromConversationMetadataOutput } from "./TestFromConversationMetadataOutput"; + +export const GetResponseUnitTestResponseModel: core.serialization.ObjectSchema< + serializers.GetResponseUnitTestResponseModel.Raw, + ElevenLabs.GetResponseUnitTestResponseModel +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataOutput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), GetResponseUnitTestResponseModelDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelOutput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + successExamples: core.serialization.property( + "success_examples", + core.serialization.list(AgentSuccessfulResponseExample).optional(), + ), + failureExamples: core.serialization.property( + "failure_examples", + core.serialization.list(AgentFailureResponseExample).optional(), + ), + id: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace GetResponseUnitTestResponseModel { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; + dynamic_variables?: Record< + string, + GetResponseUnitTestResponseModelDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelOutput.Raw[] | null; + success_condition?: string | null; + success_examples?: AgentSuccessfulResponseExample.Raw[] | null; + failure_examples?: AgentFailureResponseExample.Raw[] | null; + id: string; + name: string; + } +} diff --git a/src/serialization/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts b/src/serialization/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts new file mode 100644 index 00000000..07f120e4 --- /dev/null +++ b/src/serialization/types/GetResponseUnitTestResponseModelDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const GetResponseUnitTestResponseModelDynamicVariablesValue: core.serialization.Schema< + serializers.GetResponseUnitTestResponseModelDynamicVariablesValue.Raw, + ElevenLabs.GetResponseUnitTestResponseModelDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace GetResponseUnitTestResponseModelDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/GetSimulationTestResponseModel.ts b/src/serialization/types/GetSimulationTestResponseModel.ts new file mode 100644 index 00000000..e8e13c79 --- /dev/null +++ b/src/serialization/types/GetSimulationTestResponseModel.ts @@ -0,0 +1,49 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConversationHistoryTranscriptCommonModelOutput } from "./ConversationHistoryTranscriptCommonModelOutput"; +import { GetSimulationTestResponseModelDynamicVariablesValue } from "./GetSimulationTestResponseModelDynamicVariablesValue"; +import { TestFromConversationMetadataOutput } from "./TestFromConversationMetadataOutput"; + +export const GetSimulationTestResponseModel: core.serialization.ObjectSchema< + serializers.GetSimulationTestResponseModel.Raw, + ElevenLabs.GetSimulationTestResponseModel +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataOutput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), GetSimulationTestResponseModelDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelOutput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + simulationScenario: core.serialization.property("simulation_scenario", core.serialization.string().optional()), + simulationMaxTurns: core.serialization.property("simulation_max_turns", core.serialization.number().optional()), + id: core.serialization.string(), + name: core.serialization.string(), +}); + +export declare namespace GetSimulationTestResponseModel { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; + dynamic_variables?: Record< + string, + GetSimulationTestResponseModelDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelOutput.Raw[] | null; + success_condition?: string | null; + simulation_scenario?: string | null; + simulation_max_turns?: number | null; + id: string; + name: string; + } +} diff --git a/src/serialization/types/GetSimulationTestResponseModelDynamicVariablesValue.ts b/src/serialization/types/GetSimulationTestResponseModelDynamicVariablesValue.ts new file mode 100644 index 00000000..138582b4 --- /dev/null +++ b/src/serialization/types/GetSimulationTestResponseModelDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const GetSimulationTestResponseModelDynamicVariablesValue: core.serialization.Schema< + serializers.GetSimulationTestResponseModelDynamicVariablesValue.Raw, + ElevenLabs.GetSimulationTestResponseModelDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace GetSimulationTestResponseModelDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/GetUnitTestResponseModel.ts b/src/serialization/types/GetToolCallUnitTestResponseModel.ts similarity index 51% rename from src/serialization/types/GetUnitTestResponseModel.ts rename to src/serialization/types/GetToolCallUnitTestResponseModel.ts index 274c0ef6..997d1118 100644 --- a/src/serialization/types/GetUnitTestResponseModel.ts +++ b/src/serialization/types/GetToolCallUnitTestResponseModel.ts @@ -3,62 +3,48 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -import { AgentFailureResponseExample } from "./AgentFailureResponseExample"; -import { AgentSuccessfulResponseExample } from "./AgentSuccessfulResponseExample"; import { ConversationHistoryTranscriptCommonModelOutput } from "./ConversationHistoryTranscriptCommonModelOutput"; -import { GetUnitTestResponseModelDynamicVariablesValue } from "./GetUnitTestResponseModelDynamicVariablesValue"; +import { GetToolCallUnitTestResponseModelDynamicVariablesValue } from "./GetToolCallUnitTestResponseModelDynamicVariablesValue"; import { TestFromConversationMetadataOutput } from "./TestFromConversationMetadataOutput"; -import { UnitTestCommonModelType } from "./UnitTestCommonModelType"; import { UnitTestToolCallEvaluationModelOutput } from "./UnitTestToolCallEvaluationModelOutput"; -export const GetUnitTestResponseModel: core.serialization.ObjectSchema< - serializers.GetUnitTestResponseModel.Raw, - ElevenLabs.GetUnitTestResponseModel +export const GetToolCallUnitTestResponseModel: core.serialization.ObjectSchema< + serializers.GetToolCallUnitTestResponseModel.Raw, + ElevenLabs.GetToolCallUnitTestResponseModel > = core.serialization.object({ - chatHistory: core.serialization.property( - "chat_history", - core.serialization.list(ConversationHistoryTranscriptCommonModelOutput), + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataOutput.optional(), ), - successCondition: core.serialization.property("success_condition", core.serialization.string()), - successExamples: core.serialization.property( - "success_examples", - core.serialization.list(AgentSuccessfulResponseExample), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), GetToolCallUnitTestResponseModelDynamicVariablesValue.optional()) + .optional(), ), - failureExamples: core.serialization.property( - "failure_examples", - core.serialization.list(AgentFailureResponseExample), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelOutput).optional(), ), toolCallParameters: core.serialization.property( "tool_call_parameters", UnitTestToolCallEvaluationModelOutput.optional(), ), checkAnyToolMatches: core.serialization.property("check_any_tool_matches", core.serialization.boolean().optional()), - dynamicVariables: core.serialization.property( - "dynamic_variables", - core.serialization - .record(core.serialization.string(), GetUnitTestResponseModelDynamicVariablesValue.optional()) - .optional(), - ), - type: UnitTestCommonModelType.optional(), - fromConversationMetadata: core.serialization.property( - "from_conversation_metadata", - TestFromConversationMetadataOutput.optional(), - ), id: core.serialization.string(), name: core.serialization.string(), }); -export declare namespace GetUnitTestResponseModel { +export declare namespace GetToolCallUnitTestResponseModel { export interface Raw { - chat_history: ConversationHistoryTranscriptCommonModelOutput.Raw[]; - success_condition: string; - success_examples: AgentSuccessfulResponseExample.Raw[]; - failure_examples: AgentFailureResponseExample.Raw[]; + from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; + dynamic_variables?: Record< + string, + GetToolCallUnitTestResponseModelDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelOutput.Raw[] | null; tool_call_parameters?: UnitTestToolCallEvaluationModelOutput.Raw | null; check_any_tool_matches?: boolean | null; - dynamic_variables?: Record | null; - type?: UnitTestCommonModelType.Raw | null; - from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; id: string; name: string; } diff --git a/src/serialization/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts b/src/serialization/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts new file mode 100644 index 00000000..53791f27 --- /dev/null +++ b/src/serialization/types/GetToolCallUnitTestResponseModelDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const GetToolCallUnitTestResponseModelDynamicVariablesValue: core.serialization.Schema< + serializers.GetToolCallUnitTestResponseModelDynamicVariablesValue.Raw, + ElevenLabs.GetToolCallUnitTestResponseModelDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace GetToolCallUnitTestResponseModelDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/GuardrailsV1Input.ts b/src/serialization/types/GuardrailsV1Input.ts index 52a6c153..ca00baf7 100644 --- a/src/serialization/types/GuardrailsV1Input.ts +++ b/src/serialization/types/GuardrailsV1Input.ts @@ -4,6 +4,8 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { AlignmentGuardrail } from "./AlignmentGuardrail"; +import { ContentGuardrailInput } from "./ContentGuardrailInput"; +import { CustomGuardrailInput } from "./CustomGuardrailInput"; import { ModerationGuardrailInput } from "./ModerationGuardrailInput"; export const GuardrailsV1Input: core.serialization.ObjectSchema< @@ -12,13 +14,17 @@ export const GuardrailsV1Input: core.serialization.ObjectSchema< > = core.serialization.object({ version: core.serialization.stringLiteral("1").optional(), alignment: AlignmentGuardrail.optional(), + content: ContentGuardrailInput.optional(), moderation: ModerationGuardrailInput.optional(), + custom: CustomGuardrailInput.optional(), }); export declare namespace GuardrailsV1Input { export interface Raw { version?: "1" | null; alignment?: AlignmentGuardrail.Raw | null; + content?: ContentGuardrailInput.Raw | null; moderation?: ModerationGuardrailInput.Raw | null; + custom?: CustomGuardrailInput.Raw | null; } } diff --git a/src/serialization/types/GuardrailsV1Output.ts b/src/serialization/types/GuardrailsV1Output.ts index d1ad38f8..28192617 100644 --- a/src/serialization/types/GuardrailsV1Output.ts +++ b/src/serialization/types/GuardrailsV1Output.ts @@ -4,6 +4,8 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { AlignmentGuardrail } from "./AlignmentGuardrail"; +import { ContentGuardrailOutput } from "./ContentGuardrailOutput"; +import { CustomGuardrailOutput } from "./CustomGuardrailOutput"; import { ModerationGuardrailOutput } from "./ModerationGuardrailOutput"; export const GuardrailsV1Output: core.serialization.ObjectSchema< @@ -12,13 +14,17 @@ export const GuardrailsV1Output: core.serialization.ObjectSchema< > = core.serialization.object({ version: core.serialization.stringLiteral("1").optional(), alignment: AlignmentGuardrail.optional(), + content: ContentGuardrailOutput.optional(), moderation: ModerationGuardrailOutput.optional(), + custom: CustomGuardrailOutput.optional(), }); export declare namespace GuardrailsV1Output { export interface Raw { version?: "1" | null; alignment?: AlignmentGuardrail.Raw | null; + content?: ContentGuardrailOutput.Raw | null; moderation?: ModerationGuardrailOutput.Raw | null; + custom?: CustomGuardrailOutput.Raw | null; } } diff --git a/src/serialization/types/MergingStrategy.ts b/src/serialization/types/MergingStrategy.ts new file mode 100644 index 00000000..3e4ca6c5 --- /dev/null +++ b/src/serialization/types/MergingStrategy.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const MergingStrategy: core.serialization.Schema = + core.serialization.enum_(["rank_fusion", "top_k_per_source", "weighted_interleave"]); + +export declare namespace MergingStrategy { + export type Raw = "rank_fusion" | "top_k_per_source" | "weighted_interleave"; +} diff --git a/src/serialization/types/MultiSourceConfigJson.ts b/src/serialization/types/MultiSourceConfigJson.ts new file mode 100644 index 00000000..845b5ccf --- /dev/null +++ b/src/serialization/types/MultiSourceConfigJson.ts @@ -0,0 +1,38 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { MergingStrategy } from "./MergingStrategy"; +import { SourceConfigJson } from "./SourceConfigJson"; + +export const MultiSourceConfigJson: core.serialization.ObjectSchema< + serializers.MultiSourceConfigJson.Raw, + ElevenLabs.MultiSourceConfigJson +> = core.serialization.object({ + sourceNames: core.serialization.property( + "source_names", + core.serialization.list(core.serialization.string()).optional(), + ), + sourceOverrides: core.serialization.property( + "source_overrides", + core.serialization.list(SourceConfigJson).optional(), + ), + mergingStrategy: core.serialization.property("merging_strategy", MergingStrategy.optional()), + finalTopK: core.serialization.property("final_top_k", core.serialization.number().optional()), + useDecomposition: core.serialization.property("use_decomposition", core.serialization.boolean().optional()), + useReformulation: core.serialization.property("use_reformulation", core.serialization.boolean().optional()), + synthesizeResponse: core.serialization.property("synthesize_response", core.serialization.boolean().optional()), +}); + +export declare namespace MultiSourceConfigJson { + export interface Raw { + source_names?: string[] | null; + source_overrides?: SourceConfigJson.Raw[] | null; + merging_strategy?: MergingStrategy.Raw | null; + final_top_k?: number | null; + use_decomposition?: boolean | null; + use_reformulation?: boolean | null; + synthesize_response?: boolean | null; + } +} diff --git a/src/serialization/types/PendingClipTask.ts b/src/serialization/types/PendingClipTask.ts new file mode 100644 index 00000000..4cb8de16 --- /dev/null +++ b/src/serialization/types/PendingClipTask.ts @@ -0,0 +1,27 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { PendingClipTaskType } from "./PendingClipTaskType"; + +export const PendingClipTask: core.serialization.ObjectSchema< + serializers.PendingClipTask.Raw, + ElevenLabs.PendingClipTask +> = core.serialization.object({ + type: PendingClipTaskType, + progress: core.serialization.number().optional(), + startedAtMs: core.serialization.property("started_at_ms", core.serialization.number().optional()), + updatedAtMs: core.serialization.property("updated_at_ms", core.serialization.number().optional()), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), +}); + +export declare namespace PendingClipTask { + export interface Raw { + type: PendingClipTaskType.Raw; + progress?: number | null; + started_at_ms?: number | null; + updated_at_ms?: number | null; + metadata?: Record | null; + } +} diff --git a/src/serialization/types/PendingClipTaskType.ts b/src/serialization/types/PendingClipTaskType.ts new file mode 100644 index 00000000..1e6b731d --- /dev/null +++ b/src/serialization/types/PendingClipTaskType.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PendingClipTaskType: core.serialization.Schema< + serializers.PendingClipTaskType.Raw, + ElevenLabs.PendingClipTaskType +> = core.serialization.enum_(["preprocessing", "speech_import", "dubbing"]); + +export declare namespace PendingClipTaskType { + export type Raw = "preprocessing" | "speech_import" | "dubbing"; +} diff --git a/src/serialization/types/PermissionType.ts b/src/serialization/types/PermissionType.ts index 2cd506c4..f75f4dd6 100644 --- a/src/serialization/types/PermissionType.ts +++ b/src/serialization/types/PermissionType.ts @@ -44,6 +44,7 @@ export const PermissionType: core.serialization.Schema = core.serialization + .union("type", { + dynamic: PostDialDigitsDynamicVariable, + static: PostDialDigitsStatic, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace PhoneNumberTransferPostDialDigits { + export type Raw = PhoneNumberTransferPostDialDigits.Dynamic | PhoneNumberTransferPostDialDigits.Static; + + export interface Dynamic extends PostDialDigitsDynamicVariable.Raw { + type: "dynamic"; + } + + export interface Static extends PostDialDigitsStatic.Raw { + type: "static"; + } +} diff --git a/src/serialization/types/PostDialDigitsDynamicVariable.ts b/src/serialization/types/PostDialDigitsDynamicVariable.ts new file mode 100644 index 00000000..9495f0a8 --- /dev/null +++ b/src/serialization/types/PostDialDigitsDynamicVariable.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PostDialDigitsDynamicVariable: core.serialization.ObjectSchema< + serializers.PostDialDigitsDynamicVariable.Raw, + ElevenLabs.PostDialDigitsDynamicVariable +> = core.serialization.object({ + value: core.serialization.string(), +}); + +export declare namespace PostDialDigitsDynamicVariable { + export interface Raw { + value: string; + } +} diff --git a/src/serialization/types/PostDialDigitsStatic.ts b/src/serialization/types/PostDialDigitsStatic.ts new file mode 100644 index 00000000..7d4cca80 --- /dev/null +++ b/src/serialization/types/PostDialDigitsStatic.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PostDialDigitsStatic: core.serialization.ObjectSchema< + serializers.PostDialDigitsStatic.Raw, + ElevenLabs.PostDialDigitsStatic +> = core.serialization.object({ + value: core.serialization.string(), +}); + +export declare namespace PostDialDigitsStatic { + export interface Raw { + value: string; + } +} diff --git a/src/serialization/types/ProjectCreationMetaResponseModelType.ts b/src/serialization/types/ProjectCreationMetaResponseModelType.ts index 8b0fe0d4..80def015 100644 --- a/src/serialization/types/ProjectCreationMetaResponseModelType.ts +++ b/src/serialization/types/ProjectCreationMetaResponseModelType.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index"; export const ProjectCreationMetaResponseModelType: core.serialization.Schema< serializers.ProjectCreationMetaResponseModelType.Raw, ElevenLabs.ProjectCreationMetaResponseModelType -> = core.serialization.enum_(["blank", "generate_podcast", "auto_assign_voices", "dub_video"]); +> = core.serialization.enum_(["blank", "generate_podcast", "auto_assign_voices", "dub_video", "import_speech"]); export declare namespace ProjectCreationMetaResponseModelType { - export type Raw = "blank" | "generate_podcast" | "auto_assign_voices" | "dub_video"; + export type Raw = "blank" | "generate_podcast" | "auto_assign_voices" | "dub_video" | "import_speech"; } diff --git a/src/serialization/types/ProjectExternalAudioResponseModel.ts b/src/serialization/types/ProjectExternalAudioResponseModel.ts index eb01c2ec..8d02190b 100644 --- a/src/serialization/types/ProjectExternalAudioResponseModel.ts +++ b/src/serialization/types/ProjectExternalAudioResponseModel.ts @@ -3,6 +3,7 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { PendingClipTask } from "./PendingClipTask"; export const ProjectExternalAudioResponseModel: core.serialization.ObjectSchema< serializers.ProjectExternalAudioResponseModel.Raw, @@ -35,6 +36,7 @@ export const ProjectExternalAudioResponseModel: core.serialization.ObjectSchema< importSpeechProgress: core.serialization.property("import_speech_progress", core.serialization.number().optional()), speechImported: core.serialization.property("speech_imported", core.serialization.boolean().optional()), dubAudioProgress: core.serialization.property("dub_audio_progress", core.serialization.number().optional()), + pendingTask: core.serialization.property("pending_task", PendingClipTask.optional()), currentSnapshotId: core.serialization.property("current_snapshot_id", core.serialization.string().optional()), }); @@ -61,6 +63,7 @@ export declare namespace ProjectExternalAudioResponseModel { import_speech_progress?: number | null; speech_imported?: boolean | null; dub_audio_progress?: number | null; + pending_task?: PendingClipTask.Raw | null; current_snapshot_id?: string | null; } } diff --git a/src/serialization/types/ProjectVideoResponseModel.ts b/src/serialization/types/ProjectVideoResponseModel.ts index c5c2696f..2661d686 100644 --- a/src/serialization/types/ProjectVideoResponseModel.ts +++ b/src/serialization/types/ProjectVideoResponseModel.ts @@ -4,6 +4,7 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { CanvasPlacement } from "./CanvasPlacement"; +import { PendingClipTask } from "./PendingClipTask"; import { ProjectVideoThumbnailSheetResponseModel } from "./ProjectVideoThumbnailSheetResponseModel"; export const ProjectVideoResponseModel: core.serialization.ObjectSchema< @@ -47,7 +48,9 @@ export const ProjectVideoResponseModel: core.serialization.ObjectSchema< importSpeechProgress: core.serialization.property("import_speech_progress", core.serialization.number().optional()), speechImported: core.serialization.property("speech_imported", core.serialization.boolean().optional()), dubAudioProgress: core.serialization.property("dub_audio_progress", core.serialization.number().optional()), + pendingTask: core.serialization.property("pending_task", PendingClipTask.optional()), audioTrackReady: core.serialization.property("audio_track_ready", core.serialization.boolean().optional()), + exportFormatReady: core.serialization.property("export_format_ready", core.serialization.boolean().optional()), currentSnapshotId: core.serialization.property("current_snapshot_id", core.serialization.string().optional()), canvasPlacement: core.serialization.property("canvas_placement", CanvasPlacement.optional()), trackId: core.serialization.property("track_id", core.serialization.string().optional()), @@ -83,7 +86,9 @@ export declare namespace ProjectVideoResponseModel { import_speech_progress?: number | null; speech_imported?: boolean | null; dub_audio_progress?: number | null; + pending_task?: PendingClipTask.Raw | null; audio_track_ready?: boolean | null; + export_format_ready?: boolean | null; current_snapshot_id?: string | null; canvas_placement?: CanvasPlacement.Raw | null; track_id?: string | null; diff --git a/src/serialization/types/PronunciationDictionaryAliasRuleResponseModel.ts b/src/serialization/types/PronunciationDictionaryAliasRuleResponseModel.ts new file mode 100644 index 00000000..7ede44b1 --- /dev/null +++ b/src/serialization/types/PronunciationDictionaryAliasRuleResponseModel.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PronunciationDictionaryAliasRuleResponseModel: core.serialization.ObjectSchema< + serializers.PronunciationDictionaryAliasRuleResponseModel.Raw, + ElevenLabs.PronunciationDictionaryAliasRuleResponseModel +> = core.serialization.object({ + stringToReplace: core.serialization.property("string_to_replace", core.serialization.string()), + alias: core.serialization.string(), +}); + +export declare namespace PronunciationDictionaryAliasRuleResponseModel { + export interface Raw { + string_to_replace: string; + alias: string; + } +} diff --git a/src/serialization/types/PronunciationDictionaryPhonemeRuleResponseModel.ts b/src/serialization/types/PronunciationDictionaryPhonemeRuleResponseModel.ts new file mode 100644 index 00000000..d0933855 --- /dev/null +++ b/src/serialization/types/PronunciationDictionaryPhonemeRuleResponseModel.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const PronunciationDictionaryPhonemeRuleResponseModel: core.serialization.ObjectSchema< + serializers.PronunciationDictionaryPhonemeRuleResponseModel.Raw, + ElevenLabs.PronunciationDictionaryPhonemeRuleResponseModel +> = core.serialization.object({ + stringToReplace: core.serialization.property("string_to_replace", core.serialization.string()), + phoneme: core.serialization.string(), + alphabet: core.serialization.string(), +}); + +export declare namespace PronunciationDictionaryPhonemeRuleResponseModel { + export interface Raw { + string_to_replace: string; + phoneme: string; + alphabet: string; + } +} diff --git a/src/serialization/types/ReferencedToolCommonModelType.ts b/src/serialization/types/ReferencedToolCommonModelType.ts index 48ddb53d..d1e61bdd 100644 --- a/src/serialization/types/ReferencedToolCommonModelType.ts +++ b/src/serialization/types/ReferencedToolCommonModelType.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index"; export const ReferencedToolCommonModelType: core.serialization.Schema< serializers.ReferencedToolCommonModelType.Raw, ElevenLabs.ReferencedToolCommonModelType -> = core.serialization.enum_(["system", "webhook", "client", "workflow", "api_integration_webhook"]); +> = core.serialization.enum_(["system", "webhook", "client", "workflow", "api_integration_webhook", "mcp"]); export declare namespace ReferencedToolCommonModelType { - export type Raw = "system" | "webhook" | "client" | "workflow" | "api_integration_webhook"; + export type Raw = "system" | "webhook" | "client" | "workflow" | "api_integration_webhook" | "mcp"; } diff --git a/src/serialization/types/ResourceMetadataResponseModel.ts b/src/serialization/types/ResourceMetadataResponseModel.ts index 185cfb66..b3ca3727 100644 --- a/src/serialization/types/ResourceMetadataResponseModel.ts +++ b/src/serialization/types/ResourceMetadataResponseModel.ts @@ -12,6 +12,7 @@ export const ResourceMetadataResponseModel: core.serialization.ObjectSchema< ElevenLabs.ResourceMetadataResponseModel > = core.serialization.object({ resourceId: core.serialization.property("resource_id", core.serialization.string()), + resourceName: core.serialization.property("resource_name", core.serialization.string().optional()), resourceType: core.serialization.property("resource_type", WorkspaceResourceType), creatorUserId: core.serialization.property("creator_user_id", core.serialization.string().optional()), anonymousAccessLevelOverride: core.serialization.property( @@ -28,6 +29,7 @@ export const ResourceMetadataResponseModel: core.serialization.ObjectSchema< export declare namespace ResourceMetadataResponseModel { export interface Raw { resource_id: string; + resource_name?: string | null; resource_type: WorkspaceResourceType.Raw; creator_user_id?: string | null; anonymous_access_level_override?: ResourceMetadataResponseModelAnonymousAccessLevelOverride.Raw | null; diff --git a/src/serialization/types/ResponseUnitTestModel.ts b/src/serialization/types/ResponseUnitTestModel.ts new file mode 100644 index 00000000..c3af58a2 --- /dev/null +++ b/src/serialization/types/ResponseUnitTestModel.ts @@ -0,0 +1,50 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { AgentFailureResponseExample } from "./AgentFailureResponseExample"; +import { AgentSuccessfulResponseExample } from "./AgentSuccessfulResponseExample"; +import { ConversationHistoryTranscriptCommonModelOutput } from "./ConversationHistoryTranscriptCommonModelOutput"; +import { ResponseUnitTestModelDynamicVariablesValue } from "./ResponseUnitTestModelDynamicVariablesValue"; +import { TestFromConversationMetadataOutput } from "./TestFromConversationMetadataOutput"; + +export const ResponseUnitTestModel: core.serialization.ObjectSchema< + serializers.ResponseUnitTestModel.Raw, + ElevenLabs.ResponseUnitTestModel +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataOutput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), ResponseUnitTestModelDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelOutput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + successExamples: core.serialization.property( + "success_examples", + core.serialization.list(AgentSuccessfulResponseExample).optional(), + ), + failureExamples: core.serialization.property( + "failure_examples", + core.serialization.list(AgentFailureResponseExample).optional(), + ), +}); + +export declare namespace ResponseUnitTestModel { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; + dynamic_variables?: Record | null; + chat_history?: ConversationHistoryTranscriptCommonModelOutput.Raw[] | null; + success_condition?: string | null; + success_examples?: AgentSuccessfulResponseExample.Raw[] | null; + failure_examples?: AgentFailureResponseExample.Raw[] | null; + } +} diff --git a/src/serialization/types/GetUnitTestResponseModelDynamicVariablesValue.ts b/src/serialization/types/ResponseUnitTestModelDynamicVariablesValue.ts similarity index 60% rename from src/serialization/types/GetUnitTestResponseModelDynamicVariablesValue.ts rename to src/serialization/types/ResponseUnitTestModelDynamicVariablesValue.ts index d1002fd1..77ee4537 100644 --- a/src/serialization/types/GetUnitTestResponseModelDynamicVariablesValue.ts +++ b/src/serialization/types/ResponseUnitTestModelDynamicVariablesValue.ts @@ -4,9 +4,9 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -export const GetUnitTestResponseModelDynamicVariablesValue: core.serialization.Schema< - serializers.GetUnitTestResponseModelDynamicVariablesValue.Raw, - ElevenLabs.GetUnitTestResponseModelDynamicVariablesValue +export const ResponseUnitTestModelDynamicVariablesValue: core.serialization.Schema< + serializers.ResponseUnitTestModelDynamicVariablesValue.Raw, + ElevenLabs.ResponseUnitTestModelDynamicVariablesValue > = core.serialization.undiscriminatedUnion([ core.serialization.string(), core.serialization.number(), @@ -14,6 +14,6 @@ export const GetUnitTestResponseModelDynamicVariablesValue: core.serialization.S core.serialization.boolean(), ]); -export declare namespace GetUnitTestResponseModelDynamicVariablesValue { +export declare namespace ResponseUnitTestModelDynamicVariablesValue { export type Raw = string | number | number | boolean; } diff --git a/src/serialization/types/SearchDocumentationToolConfigInput.ts b/src/serialization/types/SearchDocumentationToolConfigInput.ts new file mode 100644 index 00000000..02a00cd9 --- /dev/null +++ b/src/serialization/types/SearchDocumentationToolConfigInput.ts @@ -0,0 +1,49 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { MergingStrategy } from "./MergingStrategy"; +import { MultiSourceConfigJson } from "./MultiSourceConfigJson"; +import { SourceConfigJson } from "./SourceConfigJson"; +import { SourceRetrievalConfig } from "./SourceRetrievalConfig"; + +export const SearchDocumentationToolConfigInput: core.serialization.ObjectSchema< + serializers.SearchDocumentationToolConfigInput.Raw, + ElevenLabs.SearchDocumentationToolConfigInput +> = core.serialization.object({ + useMultiSource: core.serialization.property("use_multi_source", core.serialization.boolean().optional()), + multiSourceConfig: core.serialization.property("multi_source_config", MultiSourceConfigJson.optional()), + useDecomposition: core.serialization.property("use_decomposition", core.serialization.boolean().optional()), + useReformulation: core.serialization.property("use_reformulation", core.serialization.boolean().optional()), + synthesizeResponse: core.serialization.property("synthesize_response", core.serialization.boolean().optional()), + mergingStrategy: core.serialization.property("merging_strategy", MergingStrategy.optional()), + finalTopK: core.serialization.property("final_top_k", core.serialization.number().optional()), + sourceNames: core.serialization.property( + "source_names", + core.serialization.list(core.serialization.string()).optional(), + ), + sourceOverrides: core.serialization.property( + "source_overrides", + core.serialization.list(SourceConfigJson).optional(), + ), + sourceConfigs: core.serialization.property( + "source_configs", + core.serialization.list(SourceRetrievalConfig).optional(), + ), +}); + +export declare namespace SearchDocumentationToolConfigInput { + export interface Raw { + use_multi_source?: boolean | null; + multi_source_config?: MultiSourceConfigJson.Raw | null; + use_decomposition?: boolean | null; + use_reformulation?: boolean | null; + synthesize_response?: boolean | null; + merging_strategy?: MergingStrategy.Raw | null; + final_top_k?: number | null; + source_names?: string[] | null; + source_overrides?: SourceConfigJson.Raw[] | null; + source_configs?: SourceRetrievalConfig.Raw[] | null; + } +} diff --git a/src/serialization/types/SearchDocumentationToolConfigOutput.ts b/src/serialization/types/SearchDocumentationToolConfigOutput.ts new file mode 100644 index 00000000..ebdc4c7c --- /dev/null +++ b/src/serialization/types/SearchDocumentationToolConfigOutput.ts @@ -0,0 +1,43 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { MergingStrategy } from "./MergingStrategy"; +import { MultiSourceConfigJson } from "./MultiSourceConfigJson"; +import { SourceConfigJson } from "./SourceConfigJson"; + +export const SearchDocumentationToolConfigOutput: core.serialization.ObjectSchema< + serializers.SearchDocumentationToolConfigOutput.Raw, + ElevenLabs.SearchDocumentationToolConfigOutput +> = core.serialization.object({ + useMultiSource: core.serialization.property("use_multi_source", core.serialization.boolean().optional()), + multiSourceConfig: core.serialization.property("multi_source_config", MultiSourceConfigJson.optional()), + useDecomposition: core.serialization.property("use_decomposition", core.serialization.boolean().optional()), + useReformulation: core.serialization.property("use_reformulation", core.serialization.boolean().optional()), + synthesizeResponse: core.serialization.property("synthesize_response", core.serialization.boolean().optional()), + mergingStrategy: core.serialization.property("merging_strategy", MergingStrategy.optional()), + finalTopK: core.serialization.property("final_top_k", core.serialization.number().optional()), + sourceNames: core.serialization.property( + "source_names", + core.serialization.list(core.serialization.string()).optional(), + ), + sourceOverrides: core.serialization.property( + "source_overrides", + core.serialization.list(SourceConfigJson).optional(), + ), +}); + +export declare namespace SearchDocumentationToolConfigOutput { + export interface Raw { + use_multi_source?: boolean | null; + multi_source_config?: MultiSourceConfigJson.Raw | null; + use_decomposition?: boolean | null; + use_reformulation?: boolean | null; + synthesize_response?: boolean | null; + merging_strategy?: MergingStrategy.Raw | null; + final_top_k?: number | null; + source_names?: string[] | null; + source_overrides?: SourceConfigJson.Raw[] | null; + } +} diff --git a/src/serialization/types/SimilarVoice.ts b/src/serialization/types/SimilarVoice.ts index 80876fa4..6cc5c88b 100644 --- a/src/serialization/types/SimilarVoice.ts +++ b/src/serialization/types/SimilarVoice.ts @@ -3,13 +3,13 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -import { SimilarVoiceCategory } from "./SimilarVoiceCategory"; +import { VoiceCategory } from "./VoiceCategory"; export const SimilarVoice: core.serialization.ObjectSchema = core.serialization.object({ voiceId: core.serialization.property("voice_id", core.serialization.string()), name: core.serialization.string(), - category: SimilarVoiceCategory, + category: VoiceCategory, description: core.serialization.string().optional(), previewUrl: core.serialization.property("preview_url", core.serialization.string().optional()), }); @@ -18,7 +18,7 @@ export declare namespace SimilarVoice { export interface Raw { voice_id: string; name: string; - category: SimilarVoiceCategory.Raw; + category: VoiceCategory.Raw; description?: string | null; preview_url?: string | null; } diff --git a/src/serialization/types/SimulationTestModel.ts b/src/serialization/types/SimulationTestModel.ts new file mode 100644 index 00000000..a98747ea --- /dev/null +++ b/src/serialization/types/SimulationTestModel.ts @@ -0,0 +1,42 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConversationHistoryTranscriptCommonModelOutput } from "./ConversationHistoryTranscriptCommonModelOutput"; +import { SimulationTestModelDynamicVariablesValue } from "./SimulationTestModelDynamicVariablesValue"; +import { TestFromConversationMetadataOutput } from "./TestFromConversationMetadataOutput"; + +export const SimulationTestModel: core.serialization.ObjectSchema< + serializers.SimulationTestModel.Raw, + ElevenLabs.SimulationTestModel +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataOutput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), SimulationTestModelDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelOutput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + simulationScenario: core.serialization.property("simulation_scenario", core.serialization.string().optional()), + simulationMaxTurns: core.serialization.property("simulation_max_turns", core.serialization.number().optional()), +}); + +export declare namespace SimulationTestModel { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; + dynamic_variables?: Record | null; + chat_history?: ConversationHistoryTranscriptCommonModelOutput.Raw[] | null; + success_condition?: string | null; + simulation_scenario?: string | null; + simulation_max_turns?: number | null; + } +} diff --git a/src/serialization/types/UnitTestCommonModelDynamicVariablesValue.ts b/src/serialization/types/SimulationTestModelDynamicVariablesValue.ts similarity index 65% rename from src/serialization/types/UnitTestCommonModelDynamicVariablesValue.ts rename to src/serialization/types/SimulationTestModelDynamicVariablesValue.ts index f8ae15fe..8e617c51 100644 --- a/src/serialization/types/UnitTestCommonModelDynamicVariablesValue.ts +++ b/src/serialization/types/SimulationTestModelDynamicVariablesValue.ts @@ -4,9 +4,9 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -export const UnitTestCommonModelDynamicVariablesValue: core.serialization.Schema< - serializers.UnitTestCommonModelDynamicVariablesValue.Raw, - ElevenLabs.UnitTestCommonModelDynamicVariablesValue +export const SimulationTestModelDynamicVariablesValue: core.serialization.Schema< + serializers.SimulationTestModelDynamicVariablesValue.Raw, + ElevenLabs.SimulationTestModelDynamicVariablesValue > = core.serialization.undiscriminatedUnion([ core.serialization.string(), core.serialization.number(), @@ -14,6 +14,6 @@ export const UnitTestCommonModelDynamicVariablesValue: core.serialization.Schema core.serialization.boolean(), ]); -export declare namespace UnitTestCommonModelDynamicVariablesValue { +export declare namespace SimulationTestModelDynamicVariablesValue { export type Raw = string | number | number | boolean; } diff --git a/src/serialization/types/SourceConfigJson.ts b/src/serialization/types/SourceConfigJson.ts new file mode 100644 index 00000000..1d46263e --- /dev/null +++ b/src/serialization/types/SourceConfigJson.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const SourceConfigJson: core.serialization.ObjectSchema< + serializers.SourceConfigJson.Raw, + ElevenLabs.SourceConfigJson +> = core.serialization.object({ + name: core.serialization.string(), + dbName: core.serialization.property("db_name", core.serialization.string().optional()), + collectionName: core.serialization.property("collection_name", core.serialization.string().optional()), + kDense: core.serialization.property("k_dense", core.serialization.number().optional()), + kKeyword: core.serialization.property("k_keyword", core.serialization.number().optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + keywordWeight: core.serialization.property("keyword_weight", core.serialization.number().optional()), + sourceWeight: core.serialization.property("source_weight", core.serialization.number().optional()), + vectorIndexName: core.serialization.property("vector_index_name", core.serialization.string().optional()), + embeddingField: core.serialization.property("embedding_field", core.serialization.string().optional()), + contentField: core.serialization.property("content_field", core.serialization.string().optional()), + enabled: core.serialization.boolean().optional(), +}); + +export declare namespace SourceConfigJson { + export interface Raw { + name: string; + db_name?: string | null; + collection_name?: string | null; + k_dense?: number | null; + k_keyword?: number | null; + dense_weight?: number | null; + keyword_weight?: number | null; + source_weight?: number | null; + vector_index_name?: string | null; + embedding_field?: string | null; + content_field?: string | null; + enabled?: boolean | null; + } +} diff --git a/src/serialization/types/SourceRetrievalConfig.ts b/src/serialization/types/SourceRetrievalConfig.ts new file mode 100644 index 00000000..6efbb2b3 --- /dev/null +++ b/src/serialization/types/SourceRetrievalConfig.ts @@ -0,0 +1,54 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const SourceRetrievalConfig: core.serialization.ObjectSchema< + serializers.SourceRetrievalConfig.Raw, + ElevenLabs.SourceRetrievalConfig +> = core.serialization.object({ + name: core.serialization.string(), + collectionName: core.serialization.property("collection_name", core.serialization.string()), + dbName: core.serialization.property("db_name", core.serialization.string().optional()), + enabled: core.serialization.boolean().optional(), + kDense: core.serialization.property("k_dense", core.serialization.number().optional()), + kKeyword: core.serialization.property("k_keyword", core.serialization.number().optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + keywordWeight: core.serialization.property("keyword_weight", core.serialization.number().optional()), + sourceWeight: core.serialization.property("source_weight", core.serialization.number().optional()), + vectorIndexName: core.serialization.property("vector_index_name", core.serialization.string().optional()), + embeddingField: core.serialization.property("embedding_field", core.serialization.string().optional()), + contentField: core.serialization.property("content_field", core.serialization.string().optional()), + filterField: core.serialization.property("filter_field", core.serialization.string().optional()), + numCandidatesMultiplier: core.serialization.property( + "num_candidates_multiplier", + core.serialization.number().optional(), + ), + resultFields: core.serialization.property( + "result_fields", + core.serialization + .record(core.serialization.string(), core.serialization.list(core.serialization.unknown())) + .optional(), + ), +}); + +export declare namespace SourceRetrievalConfig { + export interface Raw { + name: string; + collection_name: string; + db_name?: string | null; + enabled?: boolean | null; + k_dense?: number | null; + k_keyword?: number | null; + dense_weight?: number | null; + keyword_weight?: number | null; + source_weight?: number | null; + vector_index_name?: string | null; + embedding_field?: string | null; + content_field?: string | null; + filter_field?: string | null; + num_candidates_multiplier?: number | null; + result_fields?: Record | null; + } +} diff --git a/src/serialization/types/SystemToolConfigInputParams.ts b/src/serialization/types/SystemToolConfigInputParams.ts index 2916c5b6..f7c5561c 100644 --- a/src/serialization/types/SystemToolConfigInputParams.ts +++ b/src/serialization/types/SystemToolConfigInputParams.ts @@ -6,6 +6,7 @@ import type * as serializers from "../index"; import { EndCallToolConfig } from "./EndCallToolConfig"; import { LanguageDetectionToolConfig } from "./LanguageDetectionToolConfig"; import { PlayDtmfToolConfig } from "./PlayDtmfToolConfig"; +import { SearchDocumentationToolConfigInput } from "./SearchDocumentationToolConfigInput"; import { SkipTurnToolConfig } from "./SkipTurnToolConfig"; import { TransferToAgentToolConfig } from "./TransferToAgentToolConfig"; import { TransferToNumberToolConfigInput } from "./TransferToNumberToolConfigInput"; @@ -19,6 +20,7 @@ export const SystemToolConfigInputParams: core.serialization.Schema< end_call: EndCallToolConfig, language_detection: LanguageDetectionToolConfig, play_keypad_touch_tone: PlayDtmfToolConfig, + search_documentation: SearchDocumentationToolConfigInput, skip_turn: SkipTurnToolConfig, transfer_to_agent: TransferToAgentToolConfig, transfer_to_number: TransferToNumberToolConfigInput, @@ -34,6 +36,7 @@ export declare namespace SystemToolConfigInputParams { | SystemToolConfigInputParams.EndCall | SystemToolConfigInputParams.LanguageDetection | SystemToolConfigInputParams.PlayKeypadTouchTone + | SystemToolConfigInputParams.SearchDocumentation | SystemToolConfigInputParams.SkipTurn | SystemToolConfigInputParams.TransferToAgent | SystemToolConfigInputParams.TransferToNumber @@ -51,6 +54,10 @@ export declare namespace SystemToolConfigInputParams { system_tool_type: "play_keypad_touch_tone"; } + export interface SearchDocumentation extends SearchDocumentationToolConfigInput.Raw { + system_tool_type: "search_documentation"; + } + export interface SkipTurn extends SkipTurnToolConfig.Raw { system_tool_type: "skip_turn"; } diff --git a/src/serialization/types/SystemToolConfigOutputParams.ts b/src/serialization/types/SystemToolConfigOutputParams.ts index 30e0c61f..aa87c79c 100644 --- a/src/serialization/types/SystemToolConfigOutputParams.ts +++ b/src/serialization/types/SystemToolConfigOutputParams.ts @@ -6,6 +6,7 @@ import type * as serializers from "../index"; import { EndCallToolConfig } from "./EndCallToolConfig"; import { LanguageDetectionToolConfig } from "./LanguageDetectionToolConfig"; import { PlayDtmfToolConfig } from "./PlayDtmfToolConfig"; +import { SearchDocumentationToolConfigOutput } from "./SearchDocumentationToolConfigOutput"; import { SkipTurnToolConfig } from "./SkipTurnToolConfig"; import { TransferToAgentToolConfig } from "./TransferToAgentToolConfig"; import { TransferToNumberToolConfigOutput } from "./TransferToNumberToolConfigOutput"; @@ -19,6 +20,7 @@ export const SystemToolConfigOutputParams: core.serialization.Schema< end_call: EndCallToolConfig, language_detection: LanguageDetectionToolConfig, play_keypad_touch_tone: PlayDtmfToolConfig, + search_documentation: SearchDocumentationToolConfigOutput, skip_turn: SkipTurnToolConfig, transfer_to_agent: TransferToAgentToolConfig, transfer_to_number: TransferToNumberToolConfigOutput, @@ -34,6 +36,7 @@ export declare namespace SystemToolConfigOutputParams { | SystemToolConfigOutputParams.EndCall | SystemToolConfigOutputParams.LanguageDetection | SystemToolConfigOutputParams.PlayKeypadTouchTone + | SystemToolConfigOutputParams.SearchDocumentation | SystemToolConfigOutputParams.SkipTurn | SystemToolConfigOutputParams.TransferToAgent | SystemToolConfigOutputParams.TransferToNumber @@ -51,6 +54,10 @@ export declare namespace SystemToolConfigOutputParams { system_tool_type: "play_keypad_touch_tone"; } + export interface SearchDocumentation extends SearchDocumentationToolConfigOutput.Raw { + system_tool_type: "search_documentation"; + } + export interface SkipTurn extends SkipTurnToolConfig.Raw { system_tool_type: "skip_turn"; } diff --git a/src/serialization/types/TestRunMetadataTestType.ts b/src/serialization/types/TestRunMetadataTestType.ts index 095be8bf..af4c1d2f 100644 --- a/src/serialization/types/TestRunMetadataTestType.ts +++ b/src/serialization/types/TestRunMetadataTestType.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index"; export const TestRunMetadataTestType: core.serialization.Schema< serializers.TestRunMetadataTestType.Raw, ElevenLabs.TestRunMetadataTestType -> = core.serialization.enum_(["llm", "tool_call"]); +> = core.serialization.enum_(["llm", "tool_call", "simulation"]); export declare namespace TestRunMetadataTestType { - export type Raw = "llm" | "tool_call"; + export type Raw = "llm" | "tool_call" | "simulation"; } diff --git a/src/serialization/types/TestType.ts b/src/serialization/types/TestType.ts new file mode 100644 index 00000000..d662b4ae --- /dev/null +++ b/src/serialization/types/TestType.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const TestType: core.serialization.Schema = + core.serialization.enum_(["llm", "tool", "simulation"]); + +export declare namespace TestType { + export type Raw = "llm" | "tool" | "simulation"; +} diff --git a/src/serialization/types/UnitTestCommonModel.ts b/src/serialization/types/ToolCallUnitTestModel.ts similarity index 50% rename from src/serialization/types/UnitTestCommonModel.ts rename to src/serialization/types/ToolCallUnitTestModel.ts index ac58ede9..bb69f0e2 100644 --- a/src/serialization/types/UnitTestCommonModel.ts +++ b/src/serialization/types/ToolCallUnitTestModel.ts @@ -3,59 +3,42 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -import { AgentFailureResponseExample } from "./AgentFailureResponseExample"; -import { AgentSuccessfulResponseExample } from "./AgentSuccessfulResponseExample"; import { ConversationHistoryTranscriptCommonModelOutput } from "./ConversationHistoryTranscriptCommonModelOutput"; import { TestFromConversationMetadataOutput } from "./TestFromConversationMetadataOutput"; -import { UnitTestCommonModelDynamicVariablesValue } from "./UnitTestCommonModelDynamicVariablesValue"; -import { UnitTestCommonModelType } from "./UnitTestCommonModelType"; +import { ToolCallUnitTestModelDynamicVariablesValue } from "./ToolCallUnitTestModelDynamicVariablesValue"; import { UnitTestToolCallEvaluationModelOutput } from "./UnitTestToolCallEvaluationModelOutput"; -export const UnitTestCommonModel: core.serialization.ObjectSchema< - serializers.UnitTestCommonModel.Raw, - ElevenLabs.UnitTestCommonModel +export const ToolCallUnitTestModel: core.serialization.ObjectSchema< + serializers.ToolCallUnitTestModel.Raw, + ElevenLabs.ToolCallUnitTestModel > = core.serialization.object({ - chatHistory: core.serialization.property( - "chat_history", - core.serialization.list(ConversationHistoryTranscriptCommonModelOutput), + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataOutput.optional(), ), - successCondition: core.serialization.property("success_condition", core.serialization.string()), - successExamples: core.serialization.property( - "success_examples", - core.serialization.list(AgentSuccessfulResponseExample), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), ToolCallUnitTestModelDynamicVariablesValue.optional()) + .optional(), ), - failureExamples: core.serialization.property( - "failure_examples", - core.serialization.list(AgentFailureResponseExample), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelOutput).optional(), ), toolCallParameters: core.serialization.property( "tool_call_parameters", UnitTestToolCallEvaluationModelOutput.optional(), ), checkAnyToolMatches: core.serialization.property("check_any_tool_matches", core.serialization.boolean().optional()), - dynamicVariables: core.serialization.property( - "dynamic_variables", - core.serialization - .record(core.serialization.string(), UnitTestCommonModelDynamicVariablesValue.optional()) - .optional(), - ), - type: UnitTestCommonModelType.optional(), - fromConversationMetadata: core.serialization.property( - "from_conversation_metadata", - TestFromConversationMetadataOutput.optional(), - ), }); -export declare namespace UnitTestCommonModel { +export declare namespace ToolCallUnitTestModel { export interface Raw { - chat_history: ConversationHistoryTranscriptCommonModelOutput.Raw[]; - success_condition: string; - success_examples: AgentSuccessfulResponseExample.Raw[]; - failure_examples: AgentFailureResponseExample.Raw[]; + from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; + dynamic_variables?: Record | null; + chat_history?: ConversationHistoryTranscriptCommonModelOutput.Raw[] | null; tool_call_parameters?: UnitTestToolCallEvaluationModelOutput.Raw | null; check_any_tool_matches?: boolean | null; - dynamic_variables?: Record | null; - type?: UnitTestCommonModelType.Raw | null; - from_conversation_metadata?: TestFromConversationMetadataOutput.Raw | null; } } diff --git a/src/serialization/types/ToolCallUnitTestModelDynamicVariablesValue.ts b/src/serialization/types/ToolCallUnitTestModelDynamicVariablesValue.ts new file mode 100644 index 00000000..6cd13957 --- /dev/null +++ b/src/serialization/types/ToolCallUnitTestModelDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const ToolCallUnitTestModelDynamicVariablesValue: core.serialization.Schema< + serializers.ToolCallUnitTestModelDynamicVariablesValue.Raw, + ElevenLabs.ToolCallUnitTestModelDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace ToolCallUnitTestModelDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/ToolRequestModelToolConfig.ts b/src/serialization/types/ToolRequestModelToolConfig.ts index 45eb2547..17dd6051 100644 --- a/src/serialization/types/ToolRequestModelToolConfig.ts +++ b/src/serialization/types/ToolRequestModelToolConfig.ts @@ -13,6 +13,9 @@ export const ToolRequestModelToolConfig: core.serialization.Schema< > = core.serialization .union("type", { client: ClientToolConfigInput, + mcp: core.serialization.object({ + value: core.serialization.unknown(), + }), system: SystemToolConfigInput, webhook: WebhookToolConfigInput, }) @@ -24,6 +27,7 @@ export const ToolRequestModelToolConfig: core.serialization.Schema< export declare namespace ToolRequestModelToolConfig { export type Raw = | ToolRequestModelToolConfig.Client + | ToolRequestModelToolConfig.Mcp | ToolRequestModelToolConfig.System | ToolRequestModelToolConfig.Webhook; @@ -31,6 +35,11 @@ export declare namespace ToolRequestModelToolConfig { type: "client"; } + export interface Mcp { + type: "mcp"; + value?: unknown; + } + export interface System extends SystemToolConfigInput.Raw { type: "system"; } diff --git a/src/serialization/types/ToolResponseModelToolConfig.ts b/src/serialization/types/ToolResponseModelToolConfig.ts index 0c9c2a50..5e3a78c1 100644 --- a/src/serialization/types/ToolResponseModelToolConfig.ts +++ b/src/serialization/types/ToolResponseModelToolConfig.ts @@ -13,6 +13,9 @@ export const ToolResponseModelToolConfig: core.serialization.Schema< > = core.serialization .union("type", { client: ClientToolConfigOutput, + mcp: core.serialization.object({ + value: core.serialization.unknown(), + }), system: SystemToolConfigOutput, webhook: WebhookToolConfigOutput, }) @@ -24,6 +27,7 @@ export const ToolResponseModelToolConfig: core.serialization.Schema< export declare namespace ToolResponseModelToolConfig { export type Raw = | ToolResponseModelToolConfig.Client + | ToolResponseModelToolConfig.Mcp | ToolResponseModelToolConfig.System | ToolResponseModelToolConfig.Webhook; @@ -31,6 +35,11 @@ export declare namespace ToolResponseModelToolConfig { type: "client"; } + export interface Mcp { + type: "mcp"; + value?: unknown; + } + export interface System extends SystemToolConfigOutput.Raw { type: "system"; } diff --git a/src/serialization/types/TransferToNumberResultTwilioSuccessModel.ts b/src/serialization/types/TransferToNumberResultTwilioSuccessModel.ts index 6998ca28..b66d901c 100644 --- a/src/serialization/types/TransferToNumberResultTwilioSuccessModel.ts +++ b/src/serialization/types/TransferToNumberResultTwilioSuccessModel.ts @@ -14,6 +14,7 @@ export const TransferToNumberResultTwilioSuccessModel: core.serialization.Object clientMessage: core.serialization.property("client_message", core.serialization.string().optional()), agentMessage: core.serialization.property("agent_message", core.serialization.string()), conferenceName: core.serialization.property("conference_name", core.serialization.string()), + postDialDigits: core.serialization.property("post_dial_digits", core.serialization.string().optional()), note: core.serialization.string().optional(), }); @@ -25,6 +26,7 @@ export declare namespace TransferToNumberResultTwilioSuccessModel { client_message?: string | null; agent_message: string; conference_name: string; + post_dial_digits?: string | null; note?: string | null; } } diff --git a/src/serialization/types/TtsConversationalConfigInput.ts b/src/serialization/types/TtsConversationalConfigInput.ts index 0237de32..e4db4a2f 100644 --- a/src/serialization/types/TtsConversationalConfigInput.ts +++ b/src/serialization/types/TtsConversationalConfigInput.ts @@ -21,6 +21,7 @@ export const TtsConversationalConfigInput: core.serialization.ObjectSchema< "supported_voices", core.serialization.list(SupportedVoice).optional(), ), + expressiveMode: core.serialization.property("expressive_mode", core.serialization.boolean().optional()), suggestedAudioTags: core.serialization.property( "suggested_audio_tags", core.serialization.list(SuggestedAudioTag).optional(), @@ -45,6 +46,7 @@ export declare namespace TtsConversationalConfigInput { model_id?: TtsConversationalModel.Raw | null; voice_id?: string | null; supported_voices?: SupportedVoice.Raw[] | null; + expressive_mode?: boolean | null; suggested_audio_tags?: SuggestedAudioTag.Raw[] | null; agent_output_audio_format?: TtsOutputFormat.Raw | null; optimize_streaming_latency?: TtsOptimizeStreamingLatency.Raw | null; diff --git a/src/serialization/types/TtsConversationalConfigOutput.ts b/src/serialization/types/TtsConversationalConfigOutput.ts index 9ebc4956..031b58ec 100644 --- a/src/serialization/types/TtsConversationalConfigOutput.ts +++ b/src/serialization/types/TtsConversationalConfigOutput.ts @@ -21,6 +21,7 @@ export const TtsConversationalConfigOutput: core.serialization.ObjectSchema< "supported_voices", core.serialization.list(SupportedVoice).optional(), ), + expressiveMode: core.serialization.property("expressive_mode", core.serialization.boolean().optional()), suggestedAudioTags: core.serialization.property( "suggested_audio_tags", core.serialization.list(SuggestedAudioTag).optional(), @@ -45,6 +46,7 @@ export declare namespace TtsConversationalConfigOutput { model_id?: TtsConversationalModel.Raw | null; voice_id?: string | null; supported_voices?: SupportedVoice.Raw[] | null; + expressive_mode?: boolean | null; suggested_audio_tags?: SuggestedAudioTag.Raw[] | null; agent_output_audio_format?: TtsOutputFormat.Raw | null; optimize_streaming_latency?: TtsOptimizeStreamingLatency.Raw | null; diff --git a/src/serialization/types/TtsConversationalConfigWorkflowOverrideInput.ts b/src/serialization/types/TtsConversationalConfigWorkflowOverrideInput.ts index 0024d064..c540f5fa 100644 --- a/src/serialization/types/TtsConversationalConfigWorkflowOverrideInput.ts +++ b/src/serialization/types/TtsConversationalConfigWorkflowOverrideInput.ts @@ -21,6 +21,7 @@ export const TtsConversationalConfigWorkflowOverrideInput: core.serialization.Ob "supported_voices", core.serialization.list(SupportedVoice).optional(), ), + expressiveMode: core.serialization.property("expressive_mode", core.serialization.boolean().optional()), suggestedAudioTags: core.serialization.property( "suggested_audio_tags", core.serialization.list(SuggestedAudioTag).optional(), @@ -45,6 +46,7 @@ export declare namespace TtsConversationalConfigWorkflowOverrideInput { model_id?: TtsConversationalModel.Raw | null; voice_id?: string | null; supported_voices?: SupportedVoice.Raw[] | null; + expressive_mode?: boolean | null; suggested_audio_tags?: SuggestedAudioTag.Raw[] | null; agent_output_audio_format?: TtsOutputFormat.Raw | null; optimize_streaming_latency?: TtsOptimizeStreamingLatency.Raw | null; diff --git a/src/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.ts b/src/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.ts index 0e82b2dc..34b6ddd5 100644 --- a/src/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.ts +++ b/src/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.ts @@ -21,6 +21,7 @@ export const TtsConversationalConfigWorkflowOverrideOutput: core.serialization.O "supported_voices", core.serialization.list(SupportedVoice).optional(), ), + expressiveMode: core.serialization.property("expressive_mode", core.serialization.boolean().optional()), suggestedAudioTags: core.serialization.property( "suggested_audio_tags", core.serialization.list(SuggestedAudioTag).optional(), @@ -45,6 +46,7 @@ export declare namespace TtsConversationalConfigWorkflowOverrideOutput { model_id?: TtsConversationalModel.Raw | null; voice_id?: string | null; supported_voices?: SupportedVoice.Raw[] | null; + expressive_mode?: boolean | null; suggested_audio_tags?: SuggestedAudioTag.Raw[] | null; agent_output_audio_format?: TtsOutputFormat.Raw | null; optimize_streaming_latency?: TtsOptimizeStreamingLatency.Raw | null; diff --git a/src/serialization/types/UnitTestCommonModelType.ts b/src/serialization/types/UnitTestCommonModelType.ts deleted file mode 100644 index 7df3e4ef..00000000 --- a/src/serialization/types/UnitTestCommonModelType.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as ElevenLabs from "../../api/index"; -import * as core from "../../core"; -import type * as serializers from "../index"; - -export const UnitTestCommonModelType: core.serialization.Schema< - serializers.UnitTestCommonModelType.Raw, - ElevenLabs.UnitTestCommonModelType -> = core.serialization.enum_(["llm", "tool"]); - -export declare namespace UnitTestCommonModelType { - export type Raw = "llm" | "tool"; -} diff --git a/src/serialization/types/UnitTestRunResponseModel.ts b/src/serialization/types/UnitTestRunResponseModel.ts index ab618ad3..4dbd36e4 100644 --- a/src/serialization/types/UnitTestRunResponseModel.ts +++ b/src/serialization/types/UnitTestRunResponseModel.ts @@ -7,14 +7,14 @@ import { ConversationHistoryTranscriptCommonModelOutput } from "./ConversationHi import { TestConditionResultCommonModel } from "./TestConditionResultCommonModel"; import { TestRunMetadata } from "./TestRunMetadata"; import { TestRunStatus } from "./TestRunStatus"; -import { UnitTestCommonModel } from "./UnitTestCommonModel"; +import { UnitTestRunResponseModelTestInfo } from "./UnitTestRunResponseModelTestInfo"; export const UnitTestRunResponseModel: core.serialization.ObjectSchema< serializers.UnitTestRunResponseModel.Raw, ElevenLabs.UnitTestRunResponseModel > = core.serialization.object({ testRunId: core.serialization.property("test_run_id", core.serialization.string()), - testInfo: core.serialization.property("test_info", UnitTestCommonModel.optional()), + testInfo: core.serialization.property("test_info", UnitTestRunResponseModelTestInfo.optional()), testInvocationId: core.serialization.property("test_invocation_id", core.serialization.string()), agentId: core.serialization.property("agent_id", core.serialization.string()), branchId: core.serialization.property("branch_id", core.serialization.string().optional()), @@ -34,7 +34,7 @@ export const UnitTestRunResponseModel: core.serialization.ObjectSchema< export declare namespace UnitTestRunResponseModel { export interface Raw { test_run_id: string; - test_info?: UnitTestCommonModel.Raw | null; + test_info?: UnitTestRunResponseModelTestInfo.Raw | null; test_invocation_id: string; agent_id: string; branch_id?: string | null; diff --git a/src/serialization/types/UnitTestRunResponseModelTestInfo.ts b/src/serialization/types/UnitTestRunResponseModelTestInfo.ts new file mode 100644 index 00000000..989bbc65 --- /dev/null +++ b/src/serialization/types/UnitTestRunResponseModelTestInfo.ts @@ -0,0 +1,41 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ResponseUnitTestModel } from "./ResponseUnitTestModel"; +import { SimulationTestModel } from "./SimulationTestModel"; +import { ToolCallUnitTestModel } from "./ToolCallUnitTestModel"; + +export const UnitTestRunResponseModelTestInfo: core.serialization.Schema< + serializers.UnitTestRunResponseModelTestInfo.Raw, + ElevenLabs.UnitTestRunResponseModelTestInfo +> = core.serialization + .union("type", { + llm: ResponseUnitTestModel, + simulation: SimulationTestModel, + tool: ToolCallUnitTestModel, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace UnitTestRunResponseModelTestInfo { + export type Raw = + | UnitTestRunResponseModelTestInfo.Llm + | UnitTestRunResponseModelTestInfo.Simulation + | UnitTestRunResponseModelTestInfo.Tool; + + export interface Llm extends ResponseUnitTestModel.Raw { + type: "llm"; + } + + export interface Simulation extends SimulationTestModel.Raw { + type: "simulation"; + } + + export interface Tool extends ToolCallUnitTestModel.Raw { + type: "tool"; + } +} diff --git a/src/serialization/types/UnitTestSummaryResponseModel.ts b/src/serialization/types/UnitTestSummaryResponseModel.ts index c24c62b6..b486707f 100644 --- a/src/serialization/types/UnitTestSummaryResponseModel.ts +++ b/src/serialization/types/UnitTestSummaryResponseModel.ts @@ -4,7 +4,7 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { ResourceAccessInfo } from "./ResourceAccessInfo"; -import { UnitTestCommonModelType } from "./UnitTestCommonModelType"; +import { TestType } from "./TestType"; export const UnitTestSummaryResponseModel: core.serialization.ObjectSchema< serializers.UnitTestSummaryResponseModel.Raw, @@ -15,7 +15,7 @@ export const UnitTestSummaryResponseModel: core.serialization.ObjectSchema< accessInfo: core.serialization.property("access_info", ResourceAccessInfo.optional()), createdAtUnixSecs: core.serialization.property("created_at_unix_secs", core.serialization.number()), lastUpdatedAtUnixSecs: core.serialization.property("last_updated_at_unix_secs", core.serialization.number()), - type: UnitTestCommonModelType, + type: TestType, }); export declare namespace UnitTestSummaryResponseModel { @@ -25,6 +25,6 @@ export declare namespace UnitTestSummaryResponseModel { access_info?: ResourceAccessInfo.Raw | null; created_at_unix_secs: number; last_updated_at_unix_secs: number; - type: UnitTestCommonModelType.Raw; + type: TestType.Raw; } } diff --git a/src/serialization/types/UpdateResponseUnitTestRequest.ts b/src/serialization/types/UpdateResponseUnitTestRequest.ts new file mode 100644 index 00000000..f78c635a --- /dev/null +++ b/src/serialization/types/UpdateResponseUnitTestRequest.ts @@ -0,0 +1,55 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { AgentFailureResponseExample } from "./AgentFailureResponseExample"; +import { AgentSuccessfulResponseExample } from "./AgentSuccessfulResponseExample"; +import { ConversationHistoryTranscriptCommonModelInput } from "./ConversationHistoryTranscriptCommonModelInput"; +import { TestFromConversationMetadataInput } from "./TestFromConversationMetadataInput"; +import { UpdateResponseUnitTestRequestDynamicVariablesValue } from "./UpdateResponseUnitTestRequestDynamicVariablesValue"; + +export const UpdateResponseUnitTestRequest: core.serialization.ObjectSchema< + serializers.UpdateResponseUnitTestRequest.Raw, + ElevenLabs.UpdateResponseUnitTestRequest +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataInput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), UpdateResponseUnitTestRequestDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelInput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + successExamples: core.serialization.property( + "success_examples", + core.serialization.list(AgentSuccessfulResponseExample).optional(), + ), + failureExamples: core.serialization.property( + "failure_examples", + core.serialization.list(AgentFailureResponseExample).optional(), + ), + name: core.serialization.string(), +}); + +export declare namespace UpdateResponseUnitTestRequest { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; + dynamic_variables?: Record< + string, + UpdateResponseUnitTestRequestDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelInput.Raw[] | null; + success_condition?: string | null; + success_examples?: AgentSuccessfulResponseExample.Raw[] | null; + failure_examples?: AgentFailureResponseExample.Raw[] | null; + name: string; + } +} diff --git a/src/serialization/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts b/src/serialization/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..4b1f767f --- /dev/null +++ b/src/serialization/types/UpdateResponseUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const UpdateResponseUnitTestRequestDynamicVariablesValue: core.serialization.Schema< + serializers.UpdateResponseUnitTestRequestDynamicVariablesValue.Raw, + ElevenLabs.UpdateResponseUnitTestRequestDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace UpdateResponseUnitTestRequestDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/UpdateSimulationTestRequest.ts b/src/serialization/types/UpdateSimulationTestRequest.ts new file mode 100644 index 00000000..8f4e72eb --- /dev/null +++ b/src/serialization/types/UpdateSimulationTestRequest.ts @@ -0,0 +1,47 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConversationHistoryTranscriptCommonModelInput } from "./ConversationHistoryTranscriptCommonModelInput"; +import { TestFromConversationMetadataInput } from "./TestFromConversationMetadataInput"; +import { UpdateSimulationTestRequestDynamicVariablesValue } from "./UpdateSimulationTestRequestDynamicVariablesValue"; + +export const UpdateSimulationTestRequest: core.serialization.ObjectSchema< + serializers.UpdateSimulationTestRequest.Raw, + ElevenLabs.UpdateSimulationTestRequest +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataInput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), UpdateSimulationTestRequestDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelInput).optional(), + ), + successCondition: core.serialization.property("success_condition", core.serialization.string().optional()), + simulationScenario: core.serialization.property("simulation_scenario", core.serialization.string().optional()), + simulationMaxTurns: core.serialization.property("simulation_max_turns", core.serialization.number().optional()), + name: core.serialization.string(), +}); + +export declare namespace UpdateSimulationTestRequest { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; + dynamic_variables?: Record< + string, + UpdateSimulationTestRequestDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelInput.Raw[] | null; + success_condition?: string | null; + simulation_scenario?: string | null; + simulation_max_turns?: number | null; + name: string; + } +} diff --git a/src/serialization/types/UpdateSimulationTestRequestDynamicVariablesValue.ts b/src/serialization/types/UpdateSimulationTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..37fe4a09 --- /dev/null +++ b/src/serialization/types/UpdateSimulationTestRequestDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const UpdateSimulationTestRequestDynamicVariablesValue: core.serialization.Schema< + serializers.UpdateSimulationTestRequestDynamicVariablesValue.Raw, + ElevenLabs.UpdateSimulationTestRequestDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace UpdateSimulationTestRequestDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/UpdateToolCallUnitTestRequest.ts b/src/serialization/types/UpdateToolCallUnitTestRequest.ts new file mode 100644 index 00000000..2589611f --- /dev/null +++ b/src/serialization/types/UpdateToolCallUnitTestRequest.ts @@ -0,0 +1,49 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { ConversationHistoryTranscriptCommonModelInput } from "./ConversationHistoryTranscriptCommonModelInput"; +import { TestFromConversationMetadataInput } from "./TestFromConversationMetadataInput"; +import { UnitTestToolCallEvaluationModelInput } from "./UnitTestToolCallEvaluationModelInput"; +import { UpdateToolCallUnitTestRequestDynamicVariablesValue } from "./UpdateToolCallUnitTestRequestDynamicVariablesValue"; + +export const UpdateToolCallUnitTestRequest: core.serialization.ObjectSchema< + serializers.UpdateToolCallUnitTestRequest.Raw, + ElevenLabs.UpdateToolCallUnitTestRequest +> = core.serialization.object({ + fromConversationMetadata: core.serialization.property( + "from_conversation_metadata", + TestFromConversationMetadataInput.optional(), + ), + dynamicVariables: core.serialization.property( + "dynamic_variables", + core.serialization + .record(core.serialization.string(), UpdateToolCallUnitTestRequestDynamicVariablesValue.optional()) + .optional(), + ), + chatHistory: core.serialization.property( + "chat_history", + core.serialization.list(ConversationHistoryTranscriptCommonModelInput).optional(), + ), + toolCallParameters: core.serialization.property( + "tool_call_parameters", + UnitTestToolCallEvaluationModelInput.optional(), + ), + checkAnyToolMatches: core.serialization.property("check_any_tool_matches", core.serialization.boolean().optional()), + name: core.serialization.string(), +}); + +export declare namespace UpdateToolCallUnitTestRequest { + export interface Raw { + from_conversation_metadata?: TestFromConversationMetadataInput.Raw | null; + dynamic_variables?: Record< + string, + UpdateToolCallUnitTestRequestDynamicVariablesValue.Raw | null | undefined + > | null; + chat_history?: ConversationHistoryTranscriptCommonModelInput.Raw[] | null; + tool_call_parameters?: UnitTestToolCallEvaluationModelInput.Raw | null; + check_any_tool_matches?: boolean | null; + name: string; + } +} diff --git a/src/serialization/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts b/src/serialization/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts new file mode 100644 index 00000000..3a8af1ee --- /dev/null +++ b/src/serialization/types/UpdateToolCallUnitTestRequestDynamicVariablesValue.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const UpdateToolCallUnitTestRequestDynamicVariablesValue: core.serialization.Schema< + serializers.UpdateToolCallUnitTestRequestDynamicVariablesValue.Raw, + ElevenLabs.UpdateToolCallUnitTestRequestDynamicVariablesValue +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.number(), + core.serialization.number(), + core.serialization.boolean(), +]); + +export declare namespace UpdateToolCallUnitTestRequestDynamicVariablesValue { + export type Raw = string | number | number | boolean; +} diff --git a/src/serialization/types/SimilarVoiceCategory.ts b/src/serialization/types/VoiceCategory.ts similarity index 55% rename from src/serialization/types/SimilarVoiceCategory.ts rename to src/serialization/types/VoiceCategory.ts index 30118cab..5e37b7e8 100644 --- a/src/serialization/types/SimilarVoiceCategory.ts +++ b/src/serialization/types/VoiceCategory.ts @@ -4,11 +4,9 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -export const SimilarVoiceCategory: core.serialization.Schema< - serializers.SimilarVoiceCategory.Raw, - ElevenLabs.SimilarVoiceCategory -> = core.serialization.enum_(["premade", "cloned", "generated", "professional", "famous"]); +export const VoiceCategory: core.serialization.Schema = + core.serialization.enum_(["premade", "cloned", "generated", "professional", "famous"]); -export declare namespace SimilarVoiceCategory { +export declare namespace VoiceCategory { export type Raw = "premade" | "cloned" | "generated" | "professional" | "famous"; } diff --git a/src/serialization/types/WorkflowPhoneNumberNodeModelInput.ts b/src/serialization/types/WorkflowPhoneNumberNodeModelInput.ts index e7f8c68d..8b4555bd 100644 --- a/src/serialization/types/WorkflowPhoneNumberNodeModelInput.ts +++ b/src/serialization/types/WorkflowPhoneNumberNodeModelInput.ts @@ -6,6 +6,7 @@ import type * as serializers from "../index"; import { PositionInput } from "./PositionInput"; import { TransferTypeEnum } from "./TransferTypeEnum"; import { WorkflowPhoneNumberNodeModelInputCustomSipHeadersItem } from "./WorkflowPhoneNumberNodeModelInputCustomSipHeadersItem"; +import { WorkflowPhoneNumberNodeModelInputPostDialDigits } from "./WorkflowPhoneNumberNodeModelInputPostDialDigits"; import { WorkflowPhoneNumberNodeModelInputTransferDestination } from "./WorkflowPhoneNumberNodeModelInputTransferDestination"; export const WorkflowPhoneNumberNodeModelInput: core.serialization.ObjectSchema< @@ -26,6 +27,10 @@ export const WorkflowPhoneNumberNodeModelInput: core.serialization.ObjectSchema< WorkflowPhoneNumberNodeModelInputTransferDestination, ), transferType: core.serialization.property("transfer_type", TransferTypeEnum.optional()), + postDialDigits: core.serialization.property( + "post_dial_digits", + WorkflowPhoneNumberNodeModelInputPostDialDigits.optional(), + ), }); export declare namespace WorkflowPhoneNumberNodeModelInput { @@ -35,5 +40,6 @@ export declare namespace WorkflowPhoneNumberNodeModelInput { edge_order?: string[] | null; transfer_destination: WorkflowPhoneNumberNodeModelInputTransferDestination.Raw; transfer_type?: TransferTypeEnum.Raw | null; + post_dial_digits?: WorkflowPhoneNumberNodeModelInputPostDialDigits.Raw | null; } } diff --git a/src/serialization/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts b/src/serialization/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts new file mode 100644 index 00000000..cc5c759b --- /dev/null +++ b/src/serialization/types/WorkflowPhoneNumberNodeModelInputPostDialDigits.ts @@ -0,0 +1,34 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { PostDialDigitsDynamicVariable } from "./PostDialDigitsDynamicVariable"; +import { PostDialDigitsStatic } from "./PostDialDigitsStatic"; + +export const WorkflowPhoneNumberNodeModelInputPostDialDigits: core.serialization.Schema< + serializers.WorkflowPhoneNumberNodeModelInputPostDialDigits.Raw, + ElevenLabs.WorkflowPhoneNumberNodeModelInputPostDialDigits +> = core.serialization + .union("type", { + dynamic: PostDialDigitsDynamicVariable, + static: PostDialDigitsStatic, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace WorkflowPhoneNumberNodeModelInputPostDialDigits { + export type Raw = + | WorkflowPhoneNumberNodeModelInputPostDialDigits.Dynamic + | WorkflowPhoneNumberNodeModelInputPostDialDigits.Static; + + export interface Dynamic extends PostDialDigitsDynamicVariable.Raw { + type: "dynamic"; + } + + export interface Static extends PostDialDigitsStatic.Raw { + type: "static"; + } +} diff --git a/src/serialization/types/WorkflowPhoneNumberNodeModelOutput.ts b/src/serialization/types/WorkflowPhoneNumberNodeModelOutput.ts index 85fba40d..217a8d2c 100644 --- a/src/serialization/types/WorkflowPhoneNumberNodeModelOutput.ts +++ b/src/serialization/types/WorkflowPhoneNumberNodeModelOutput.ts @@ -6,6 +6,7 @@ import type * as serializers from "../index"; import { PositionOutput } from "./PositionOutput"; import { TransferTypeEnum } from "./TransferTypeEnum"; import { WorkflowPhoneNumberNodeModelOutputCustomSipHeadersItem } from "./WorkflowPhoneNumberNodeModelOutputCustomSipHeadersItem"; +import { WorkflowPhoneNumberNodeModelOutputPostDialDigits } from "./WorkflowPhoneNumberNodeModelOutputPostDialDigits"; import { WorkflowPhoneNumberNodeModelOutputTransferDestination } from "./WorkflowPhoneNumberNodeModelOutputTransferDestination"; export const WorkflowPhoneNumberNodeModelOutput: core.serialization.ObjectSchema< @@ -23,6 +24,10 @@ export const WorkflowPhoneNumberNodeModelOutput: core.serialization.ObjectSchema WorkflowPhoneNumberNodeModelOutputTransferDestination, ), transferType: core.serialization.property("transfer_type", TransferTypeEnum), + postDialDigits: core.serialization.property( + "post_dial_digits", + WorkflowPhoneNumberNodeModelOutputPostDialDigits.optional(), + ), }); export declare namespace WorkflowPhoneNumberNodeModelOutput { @@ -32,5 +37,6 @@ export declare namespace WorkflowPhoneNumberNodeModelOutput { edge_order: string[]; transfer_destination: WorkflowPhoneNumberNodeModelOutputTransferDestination.Raw; transfer_type: TransferTypeEnum.Raw; + post_dial_digits?: WorkflowPhoneNumberNodeModelOutputPostDialDigits.Raw | null; } } diff --git a/src/serialization/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts b/src/serialization/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts new file mode 100644 index 00000000..d7421ca5 --- /dev/null +++ b/src/serialization/types/WorkflowPhoneNumberNodeModelOutputPostDialDigits.ts @@ -0,0 +1,34 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { PostDialDigitsDynamicVariable } from "./PostDialDigitsDynamicVariable"; +import { PostDialDigitsStatic } from "./PostDialDigitsStatic"; + +export const WorkflowPhoneNumberNodeModelOutputPostDialDigits: core.serialization.Schema< + serializers.WorkflowPhoneNumberNodeModelOutputPostDialDigits.Raw, + ElevenLabs.WorkflowPhoneNumberNodeModelOutputPostDialDigits +> = core.serialization + .union("type", { + dynamic: PostDialDigitsDynamicVariable, + static: PostDialDigitsStatic, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace WorkflowPhoneNumberNodeModelOutputPostDialDigits { + export type Raw = + | WorkflowPhoneNumberNodeModelOutputPostDialDigits.Dynamic + | WorkflowPhoneNumberNodeModelOutputPostDialDigits.Static; + + export interface Dynamic extends PostDialDigitsDynamicVariable.Raw { + type: "dynamic"; + } + + export interface Static extends PostDialDigitsStatic.Raw { + type: "static"; + } +} diff --git a/src/serialization/types/WorkspaceGroupPermission.ts b/src/serialization/types/WorkspaceGroupPermission.ts new file mode 100644 index 00000000..7188957d --- /dev/null +++ b/src/serialization/types/WorkspaceGroupPermission.ts @@ -0,0 +1,71 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const WorkspaceGroupPermission: core.serialization.Schema< + serializers.WorkspaceGroupPermission.Raw, + ElevenLabs.WorkspaceGroupPermission +> = core.serialization.enum_([ + "text_to_speech", + "speech_to_speech", + "speech_to_text", + "voice_lab", + "sound_effects", + "projects", + "voiceover_studio", + "dubbing", + "audio_native", + "conversational_ai", + "voice_isolator", + "ai_speech_classifier", + "add_voice_from_voice_library", + "create_instant_voice_clone", + "create_professional_voice_clone", + "create_user_api_key", + "publish_studio_project", + "music", + "share_voice_externally", + "publish_voice_to_voice_library", + "view_fiat_balance", + "workspace_analytics_full_read", + "service_accounts_manage", + "webhooks_manage", + "group_members_manage", + "workspace_members_invite", + "workspace_members_remove", + "terms_of_service_accept", +]); + +export declare namespace WorkspaceGroupPermission { + export type Raw = + | "text_to_speech" + | "speech_to_speech" + | "speech_to_text" + | "voice_lab" + | "sound_effects" + | "projects" + | "voiceover_studio" + | "dubbing" + | "audio_native" + | "conversational_ai" + | "voice_isolator" + | "ai_speech_classifier" + | "add_voice_from_voice_library" + | "create_instant_voice_clone" + | "create_professional_voice_clone" + | "create_user_api_key" + | "publish_studio_project" + | "music" + | "share_voice_externally" + | "publish_voice_to_voice_library" + | "view_fiat_balance" + | "workspace_analytics_full_read" + | "service_accounts_manage" + | "webhooks_manage" + | "group_members_manage" + | "workspace_members_invite" + | "workspace_members_remove" + | "terms_of_service_accept"; +} diff --git a/src/serialization/types/WorkspaceGroupResponseModel.ts b/src/serialization/types/WorkspaceGroupResponseModel.ts new file mode 100644 index 00000000..1c04fcd4 --- /dev/null +++ b/src/serialization/types/WorkspaceGroupResponseModel.ts @@ -0,0 +1,33 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { WorkspaceGroupPermission } from "./WorkspaceGroupPermission"; +import { WorkspaceGroupResponseModelGroupUsageLimit } from "./WorkspaceGroupResponseModelGroupUsageLimit"; + +export const WorkspaceGroupResponseModel: core.serialization.ObjectSchema< + serializers.WorkspaceGroupResponseModel.Raw, + ElevenLabs.WorkspaceGroupResponseModel +> = core.serialization.object({ + name: core.serialization.string(), + id: core.serialization.string(), + members: core.serialization.list(core.serialization.string()), + permissions: core.serialization.list(WorkspaceGroupPermission).optional(), + groupUsageLimit: core.serialization.property( + "group_usage_limit", + WorkspaceGroupResponseModelGroupUsageLimit.optional(), + ), + characterCount: core.serialization.property("character_count", core.serialization.number().optional()), +}); + +export declare namespace WorkspaceGroupResponseModel { + export interface Raw { + name: string; + id: string; + members: string[]; + permissions?: WorkspaceGroupPermission.Raw[] | null; + group_usage_limit?: WorkspaceGroupResponseModelGroupUsageLimit.Raw | null; + character_count?: number | null; + } +} diff --git a/src/serialization/types/WorkspaceGroupResponseModelGroupUsageLimit.ts b/src/serialization/types/WorkspaceGroupResponseModelGroupUsageLimit.ts new file mode 100644 index 00000000..26c68215 --- /dev/null +++ b/src/serialization/types/WorkspaceGroupResponseModelGroupUsageLimit.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as ElevenLabs from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const WorkspaceGroupResponseModelGroupUsageLimit: core.serialization.Schema< + serializers.WorkspaceGroupResponseModelGroupUsageLimit.Raw, + ElevenLabs.WorkspaceGroupResponseModelGroupUsageLimit +> = core.serialization.undiscriminatedUnion([ + core.serialization.number(), + core.serialization.stringLiteral("unlimited"), +]); + +export declare namespace WorkspaceGroupResponseModelGroupUsageLimit { + export type Raw = number | "unlimited"; +} diff --git a/src/serialization/types/WorkspaceServiceAccountResponseModel.ts b/src/serialization/types/WorkspaceServiceAccountResponseModel.ts index 5715850a..6c346190 100644 --- a/src/serialization/types/WorkspaceServiceAccountResponseModel.ts +++ b/src/serialization/types/WorkspaceServiceAccountResponseModel.ts @@ -3,6 +3,7 @@ import type * as ElevenLabs from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { DefaultSharingGroupResponseModel } from "./DefaultSharingGroupResponseModel"; import { WorkspaceApiKeyResponseModel } from "./WorkspaceApiKeyResponseModel"; export const WorkspaceServiceAccountResponseModel: core.serialization.ObjectSchema< @@ -13,6 +14,10 @@ export const WorkspaceServiceAccountResponseModel: core.serialization.ObjectSche name: core.serialization.string(), createdAtUnix: core.serialization.property("created_at_unix", core.serialization.number().optional()), apiKeys: core.serialization.property("api-keys", core.serialization.list(WorkspaceApiKeyResponseModel)), + defaultSharingGroups: core.serialization.property( + "default_sharing_groups", + core.serialization.list(DefaultSharingGroupResponseModel).optional(), + ), }); export declare namespace WorkspaceServiceAccountResponseModel { @@ -21,5 +26,6 @@ export declare namespace WorkspaceServiceAccountResponseModel { name: string; created_at_unix?: number | null; "api-keys": WorkspaceApiKeyResponseModel.Raw[]; + default_sharing_groups?: DefaultSharingGroupResponseModel.Raw[] | null; } } diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index a5c008cf..f050f361 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -203,6 +203,9 @@ export * from "./CloseContext"; export * from "./CloseSocket"; export * from "./CommittedTranscriptPayload"; export * from "./CommittedTranscriptWithTimestampsPayload"; +export * from "./ContentConfig"; +export * from "./ContentGuardrailInput"; +export * from "./ContentGuardrailOutput"; export * from "./Contributor"; export * from "./ConvAiDynamicVariable"; export * from "./ConvAiSecretLocator"; @@ -287,18 +290,30 @@ export * from "./ConversationSummaryResponseModelStatus"; export * from "./ConversationTokenDbModel"; export * from "./ConversationTokenPurpose"; export * from "./ConversationTurnMetrics"; +export * from "./ConversationUserResponseModel"; export * from "./ConvertChapterResponseModel"; export * from "./ConvertProjectResponseModel"; export * from "./CreateAgentBranchResponseModel"; export * from "./CreateAgentResponseModel"; +export * from "./CreateAgentTestResponseModel"; export * from "./CreateAudioNativeProjectRequest"; export * from "./CreatePhoneNumberResponseModel"; export * from "./CreatePreviouslyGeneratedVoiceRequest"; export * from "./CreatePronunciationDictionaryResponseModel"; +export * from "./CreateResponseUnitTestRequest"; +export * from "./CreateResponseUnitTestRequestDynamicVariablesValue"; +export * from "./CreateSimulationTestRequest"; +export * from "./CreateSimulationTestRequestDynamicVariablesValue"; export * from "./CreateSipTrunkPhoneNumberRequest"; +export * from "./CreateToolCallUnitTestRequest"; +export * from "./CreateToolCallUnitTestRequestDynamicVariablesValue"; export * from "./CreateTranscriptRequest"; export * from "./CreateTwilioPhoneNumberRequest"; -export * from "./CreateUnitTestResponseModel"; +export * from "./CustomGuardrailConfig"; +export * from "./CustomGuardrailConfigModel"; +export * from "./CustomGuardrailInput"; +export * from "./CustomGuardrailOutput"; +export * from "./CustomGuardrailsConfig"; export * from "./CustomLlm"; export * from "./CustomLlmapiType"; export * from "./CustomLlmRequestHeadersValue"; @@ -308,6 +323,8 @@ export * from "./DashboardCallSuccessChartModel"; export * from "./DashboardCriteriaChartModel"; export * from "./DashboardDataCollectionChartModel"; export * from "./DataCollectionResultCommonModel"; +export * from "./DefaultSharingGroupResponseModel"; +export * from "./DefaultSharingGroupResponseModelPermissionLevel"; export * from "./DeleteChapterRequest"; export * from "./DeleteChapterResponseModel"; export * from "./DeleteDubbingResponseModel"; @@ -407,6 +424,7 @@ export * from "./GetConvAiSettingsResponseModel"; export * from "./GetConversationResponseModel"; export * from "./GetConversationResponseModelStatus"; export * from "./GetConversationsPageResponseModel"; +export * from "./GetConversationUsersPageResponseModel"; export * from "./GetKnowledgeBaseDependentAgentsResponseModel"; export * from "./GetKnowledgeBaseDependentAgentsResponseModelAgentsItem"; export * from "./GetKnowledgeBaseFileResponseModel"; @@ -439,15 +457,22 @@ export * from "./GetPronunciationDictionariesResponse"; export * from "./GetPronunciationDictionaryMetadataResponse"; export * from "./GetPronunciationDictionaryMetadataResponseModelPermissionOnResource"; export * from "./GetPronunciationDictionaryResponse"; +export * from "./GetPronunciationDictionaryWithRulesResponseModel"; +export * from "./GetPronunciationDictionaryWithRulesResponseModelPermissionOnResource"; +export * from "./GetPronunciationDictionaryWithRulesResponseModelRulesItem"; +export * from "./GetResponseUnitTestResponseModel"; +export * from "./GetResponseUnitTestResponseModelDynamicVariablesValue"; +export * from "./GetSimulationTestResponseModel"; +export * from "./GetSimulationTestResponseModelDynamicVariablesValue"; export * from "./GetSpeechHistoryResponse"; export * from "./GetTestInvocationsPageResponseModel"; export * from "./GetTestSuiteInvocationResponseModel"; export * from "./GetTestsPageResponseModel"; export * from "./GetTestsSummariesByIdsResponseModel"; +export * from "./GetToolCallUnitTestResponseModel"; +export * from "./GetToolCallUnitTestResponseModelDynamicVariablesValue"; export * from "./GetToolDependentAgentsResponseModel"; export * from "./GetToolDependentAgentsResponseModelAgentsItem"; -export * from "./GetUnitTestResponseModel"; -export * from "./GetUnitTestResponseModelDynamicVariablesValue"; export * from "./GetVoicesResponse"; export * from "./GetVoicesV2Response"; export * from "./GetWhatsAppAccountResponse"; @@ -530,6 +555,7 @@ export * from "./McpServerTransport"; export * from "./McpToolApprovalHash"; export * from "./McpToolApprovalPolicy"; export * from "./McpToolConfigOverride"; +export * from "./MergingStrategy"; export * from "./MetricRecord"; export * from "./MetricType"; export * from "./Model"; @@ -540,6 +566,7 @@ export * from "./ModerationGuardrailInput"; export * from "./ModerationGuardrailOutput"; export * from "./MultichannelSpeechToTextResponseModel"; export * from "./MultipartMusicResponse"; +export * from "./MultiSourceConfigJson"; export * from "./MusicPrompt"; export * from "./NonStreamingOutputFormats"; export * from "./NormalizedAlignment"; @@ -560,6 +587,8 @@ export * from "./PartialTranscriptPayload"; export * from "./PatchWorkspaceWebhookResponseModel"; export * from "./PdfExportOptions"; export * from "./PendingCancellationResponseModel"; +export * from "./PendingClipTask"; +export * from "./PendingClipTaskType"; export * from "./PendingSubscriptionSwitchResponseModel"; export * from "./PendingSubscriptionSwitchResponseModelNextTier"; export * from "./PermissionType"; @@ -568,6 +597,7 @@ export * from "./PhoneNumberDynamicVariableTransferDestination"; export * from "./PhoneNumberTransfer"; export * from "./PhoneNumberTransferCustomSipHeadersItem"; export * from "./PhoneNumberTransferDestination"; +export * from "./PhoneNumberTransferPostDialDigits"; export * from "./PhoneNumberTransferTransferDestination"; export * from "./PlayDtmfResultErrorModel"; export * from "./PlayDtmfResultSuccessModel"; @@ -582,6 +612,8 @@ export * from "./PodcastUrlSource"; export * from "./PositionInput"; export * from "./PositionOutput"; export * from "./PostAgentAvatarResponseModel"; +export * from "./PostDialDigitsDynamicVariable"; +export * from "./PostDialDigitsStatic"; export * from "./PostWorkspaceSecretResponseModel"; export * from "./PreviewAudioDbModel"; export * from "./PrivacyConfig"; @@ -633,9 +665,11 @@ export * from "./PromptAgentApiModelWorkflowOverrideOutputToolsItem"; export * from "./PromptAgentDbModel"; export * from "./PromptEvaluationCriteria"; export * from "./PronunciationDictionaryAliasRuleRequestModel"; +export * from "./PronunciationDictionaryAliasRuleResponseModel"; export * from "./PronunciationDictionaryLocator"; export * from "./PronunciationDictionaryLocatorResponseModel"; export * from "./PronunciationDictionaryPhonemeRuleRequestModel"; +export * from "./PronunciationDictionaryPhonemeRuleResponseModel"; export * from "./PronunciationDictionaryRulesResponseModel"; export * from "./PronunciationDictionaryVersionLocator"; export * from "./PronunciationDictionaryVersionResponseModel"; @@ -674,6 +708,8 @@ export * from "./ResourceAccessInfoRole"; export * from "./ResourceMetadataResponseModel"; export * from "./ResourceMetadataResponseModelAnonymousAccessLevelOverride"; export * from "./ResponseFilterMode"; +export * from "./ResponseUnitTestModel"; +export * from "./ResponseUnitTestModelDynamicVariablesValue"; export * from "./ReviewResponseModel"; export * from "./ReviewResponseModelRejectReasonsItem"; export * from "./ReviewResponseModelReviewStatus"; @@ -698,6 +734,8 @@ export * from "./ScribeSessionTimeLimitExceededErrorPayload"; export * from "./ScribeThrottledErrorPayload"; export * from "./ScribeTranscriberErrorPayload"; export * from "./ScribeUnacceptedTermsErrorPayload"; +export * from "./SearchDocumentationToolConfigInput"; +export * from "./SearchDocumentationToolConfigOutput"; export * from "./SeatType"; export * from "./SecretDependencyType"; export * from "./SectionSource"; @@ -718,8 +756,9 @@ export * from "./SessionStartedPayloadConfigCommitStrategy"; export * from "./ShareOptionResponseModel"; export * from "./ShareOptionResponseModelType"; export * from "./SimilarVoice"; -export * from "./SimilarVoiceCategory"; export * from "./SimilarVoicesForSpeakerResponse"; +export * from "./SimulationTestModel"; +export * from "./SimulationTestModelDynamicVariablesValue"; export * from "./SingleTestRunRequestModel"; export * from "./SingleUseTokenResponseModel"; export * from "./SingleUseTokenType"; @@ -738,6 +777,8 @@ export * from "./SoftTimeoutConfigWorkflowOverride"; export * from "./SongMetadata"; export * from "./SongSection"; export * from "./SortDirection"; +export * from "./SourceConfigJson"; +export * from "./SourceRetrievalConfig"; export * from "./SpeakerAudioResponseModel"; export * from "./SpeakerCreatedResponse"; export * from "./SpeakerResponseModel"; @@ -781,6 +822,7 @@ export * from "./TestRunMetadataTestType"; export * from "./TestRunStatus"; export * from "./TestsFeatureUsageCommonModel"; export * from "./TestToolResultModel"; +export * from "./TestType"; export * from "./TextNormalisationType"; export * from "./TextToSpeechApplyTextNormalizationEnum"; export * from "./TextToSpeechOutputFormatEnum"; @@ -795,6 +837,8 @@ export * from "./Tool"; export * from "./ToolAnnotations"; export * from "./ToolCallSoundBehavior"; export * from "./ToolCallSoundType"; +export * from "./ToolCallUnitTestModel"; +export * from "./ToolCallUnitTestModelDynamicVariablesValue"; export * from "./ToolErrorHandlingMode"; export * from "./ToolExecutionMode"; export * from "./ToolMockConfig"; @@ -842,10 +886,8 @@ export * from "./TwilioEdgeLocation"; export * from "./TwilioOutboundCallResponse"; export * from "./TwilioRegionId"; export * from "./TxtExportOptions"; -export * from "./UnitTestCommonModel"; -export * from "./UnitTestCommonModelDynamicVariablesValue"; -export * from "./UnitTestCommonModelType"; export * from "./UnitTestRunResponseModel"; +export * from "./UnitTestRunResponseModelTestInfo"; export * from "./UnitTestSummaryResponseModel"; export * from "./UnitTestToolCallEvaluationModelInput"; export * from "./UnitTestToolCallEvaluationModelOutput"; @@ -856,6 +898,12 @@ export * from "./UpdateAudioNativeProjectRequest"; export * from "./UpdateChapterRequest"; export * from "./UpdateProjectRequest"; export * from "./UpdatePronunciationDictionariesRequest"; +export * from "./UpdateResponseUnitTestRequest"; +export * from "./UpdateResponseUnitTestRequestDynamicVariablesValue"; +export * from "./UpdateSimulationTestRequest"; +export * from "./UpdateSimulationTestRequestDynamicVariablesValue"; +export * from "./UpdateToolCallUnitTestRequest"; +export * from "./UpdateToolCallUnitTestRequestDynamicVariablesValue"; export * from "./UpdateWorkspaceMemberResponseModel"; export * from "./UrlAvatar"; export * from "./UsageAggregationInterval"; @@ -872,6 +920,7 @@ export * from "./VerificationAttemptResponse"; export * from "./VerifiedVoiceLanguageResponseModel"; export * from "./VerifyPvcVoiceCaptchaResponseModel"; export * from "./Voice"; +export * from "./VoiceCategory"; export * from "./VoiceDesignPreviewResponse"; export * from "./VoiceGenerationParameterOptionResponse"; export * from "./VoiceGenerationParameterResponse"; @@ -956,9 +1005,11 @@ export * from "./WorkflowOverrideAgentNodeModelInput"; export * from "./WorkflowOverrideAgentNodeModelOutput"; export * from "./WorkflowPhoneNumberNodeModelInput"; export * from "./WorkflowPhoneNumberNodeModelInputCustomSipHeadersItem"; +export * from "./WorkflowPhoneNumberNodeModelInputPostDialDigits"; export * from "./WorkflowPhoneNumberNodeModelInputTransferDestination"; export * from "./WorkflowPhoneNumberNodeModelOutput"; export * from "./WorkflowPhoneNumberNodeModelOutputCustomSipHeadersItem"; +export * from "./WorkflowPhoneNumberNodeModelOutputPostDialDigits"; export * from "./WorkflowPhoneNumberNodeModelOutputTransferDestination"; export * from "./WorkflowResultConditionModelInput"; export * from "./WorkflowResultConditionModelOutput"; @@ -987,6 +1038,9 @@ export * from "./WorkspaceBatchCallsResponse"; export * from "./WorkspaceCreateApiKeyResponseModel"; export * from "./WorkspaceCreateWebhookResponseModel"; export * from "./WorkspaceGroupByNameResponseModel"; +export * from "./WorkspaceGroupPermission"; +export * from "./WorkspaceGroupResponseModel"; +export * from "./WorkspaceGroupResponseModelGroupUsageLimit"; export * from "./WorkspaceResourceType"; export * from "./WorkspaceServiceAccountListResponseModel"; export * from "./WorkspaceServiceAccountResponseModel"; diff --git a/src/version.ts b/src/version.ts index 3585a5fa..9b04da90 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "v2.35.0"; +export const SDK_VERSION = "v2.36.0"; diff --git a/tests/wire/conversationalAi/agents.test.ts b/tests/wire/conversationalAi/agents.test.ts index 3a2d8a5d..0723c5af 100644 --- a/tests/wire/conversationalAi/agents.test.ts +++ b/tests/wire/conversationalAi/agents.test.ts @@ -53,6 +53,7 @@ describe("AgentsClient", () => { model_id: "eleven_turbo_v2", voice_id: "cjVigY5qzO86Huf0OWal", supported_voices: [{ label: "label", voice_id: "voice_id" }], + expressive_mode: true, suggested_audio_tags: [{ tag: "tag" }], agent_output_audio_format: "pcm_16000", optimize_streaming_latency: 3, @@ -602,6 +603,7 @@ describe("AgentsClient", () => { edge_order: ["edge_order"], transfer_destination: { type: "phone", phone_number: "phone_number" }, transfer_type: "blind", + post_dial_digits: null, }, success_transfer: { type: "standalone_agent", @@ -646,7 +648,10 @@ describe("AgentsClient", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz"); + const response = await client.conversationalAi.agents.get("agent_3701k3ttaq12ewp8b7qv5rfyszkz", { + versionId: "version_id", + branchId: "branch_id", + }); expect(response).toEqual({ agentId: "agent_7101k5zvyjhmfg983brhmhkd98n6", name: "My Agent", @@ -678,6 +683,7 @@ describe("AgentsClient", () => { voiceId: "voice_id", }, ], + expressiveMode: true, suggestedAudioTags: [ { tag: "tag", @@ -1556,6 +1562,7 @@ describe("AgentsClient", () => { model_id: "eleven_turbo_v2", voice_id: "cjVigY5qzO86Huf0OWal", supported_voices: [{ label: "label", voice_id: "voice_id" }], + expressive_mode: true, suggested_audio_tags: [{ tag: "tag" }], agent_output_audio_format: "pcm_16000", optimize_streaming_latency: 3, @@ -2105,6 +2112,7 @@ describe("AgentsClient", () => { edge_order: ["edge_order"], transfer_destination: { type: "phone", phone_number: "phone_number" }, transfer_type: "blind", + post_dial_digits: null, }, success_transfer: { type: "standalone_agent", @@ -2150,7 +2158,9 @@ describe("AgentsClient", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.conversationalAi.agents.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz"); + const response = await client.conversationalAi.agents.update("agent_3701k3ttaq12ewp8b7qv5rfyszkz", { + branchId: "branch_id", + }); expect(response).toEqual({ agentId: "agent_7101k5zvyjhmfg983brhmhkd98n6", name: "My Agent", @@ -2182,6 +2192,7 @@ describe("AgentsClient", () => { voiceId: "voice_id", }, ], + expressiveMode: true, suggestedAudioTags: [ { tag: "tag", @@ -3337,12 +3348,7 @@ describe("AgentsClient", () => { test_runs: [ { test_run_id: "test_run_id", - test_info: { - chat_history: [{ role: "user", time_in_call_secs: 1 }], - success_condition: "success_condition", - success_examples: [{ response: "response", type: "success" }], - failure_examples: [{ response: "response", type: "failure" }], - }, + test_info: { type: "llm" }, test_invocation_id: "test_invocation_id", agent_id: "agent_id", branch_id: "branch_id", @@ -3386,25 +3392,7 @@ describe("AgentsClient", () => { { testRunId: "test_run_id", testInfo: { - chatHistory: [ - { - role: "user", - timeInCallSecs: 1, - }, - ], - successCondition: "success_condition", - successExamples: [ - { - response: "response", - type: "success", - }, - ], - failureExamples: [ - { - response: "response", - type: "failure", - }, - ], + type: "llm", }, testInvocationId: "test_invocation_id", agentId: "agent_id", diff --git a/tests/wire/conversationalAi/conversations.test.ts b/tests/wire/conversationalAi/conversations.test.ts index 285c34fe..c3570cdb 100644 --- a/tests/wire/conversationalAi/conversations.test.ts +++ b/tests/wire/conversationalAi/conversations.test.ts @@ -69,6 +69,9 @@ describe("ConversationsClient", () => { call_successful: "success", transcript_summary: "transcript_summary", call_summary_title: "call_summary_title", + main_language: "main_language", + conversation_initiation_source: "unknown", + tool_names: ["tool_names"], direction: "inbound", rating: 1.1, }, @@ -117,6 +120,9 @@ describe("ConversationsClient", () => { callSuccessful: "success", transcriptSummary: "transcript_summary", callSummaryTitle: "call_summary_title", + mainLanguage: "main_language", + conversationInitiationSource: "unknown", + toolNames: ["tool_names"], direction: "inbound", rating: 1.1, }, diff --git a/tests/wire/conversationalAi/tests.test.ts b/tests/wire/conversationalAi/tests.test.ts index d2e1aaab..327b079f 100644 --- a/tests/wire/conversationalAi/tests.test.ts +++ b/tests/wire/conversationalAi/tests.test.ts @@ -7,13 +7,7 @@ describe("TestsClient", () => { test("create", async () => { const server = mockServerPool.createServer(); const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { - chat_history: [{ role: "user", time_in_call_secs: 1 }], - success_condition: "success_condition", - success_examples: [{ response: "response", type: "success" }], - failure_examples: [{ response: "response", type: "failure" }], - name: "name", - }; + const rawRequestBody = { type: "llm", name: "name" }; const rawResponseBody = { id: "id" }; server .mockEndpoint() @@ -25,25 +19,7 @@ describe("TestsClient", () => { .build(); const response = await client.conversationalAi.tests.create({ - chatHistory: [ - { - role: "user", - timeInCallSecs: 1, - }, - ], - successCondition: "success_condition", - successExamples: [ - { - response: "response", - type: "success", - }, - ], - failureExamples: [ - { - response: "response", - type: "failure", - }, - ], + type: "llm", name: "name", }); expect(response).toEqual({ @@ -56,6 +32,15 @@ describe("TestsClient", () => { const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); const rawResponseBody = { + type: "llm", + from_conversation_metadata: { + conversation_id: "conversation_id", + agent_id: "agent_id", + branch_id: "branch_id", + workflow_node_id: "workflow_node_id", + original_agent_reply: [{ role: "user", time_in_call_secs: 1 }], + }, + dynamic_variables: { key: "value" }, chat_history: [ { role: "user", @@ -96,22 +81,6 @@ describe("TestsClient", () => { success_condition: "success_condition", success_examples: [{ response: "response", type: "success" }], failure_examples: [{ response: "response", type: "failure" }], - tool_call_parameters: { - parameters: [{ eval: { type: "anything" }, path: "path" }], - referenced_tool: { id: "id", type: "system" }, - verify_absence: true, - workflow_node_transition: { type: "node_id", agent_id: "agent_id", target_node_id: "target_node_id" }, - }, - check_any_tool_matches: true, - dynamic_variables: { key: "value" }, - type: "llm", - from_conversation_metadata: { - conversation_id: "conversation_id", - agent_id: "agent_id", - branch_id: "branch_id", - workflow_node_id: "workflow_node_id", - original_agent_reply: [{ role: "user", time_in_call_secs: 1 }], - }, id: "id", name: "name", }; @@ -125,6 +94,22 @@ describe("TestsClient", () => { const response = await client.conversationalAi.tests.get("TeaqRRdTcIfIu2i7BYfT"); expect(response).toEqual({ + type: "llm", + fromConversationMetadata: { + conversationId: "conversation_id", + agentId: "agent_id", + branchId: "branch_id", + workflowNodeId: "workflow_node_id", + originalAgentReply: [ + { + role: "user", + timeInCallSecs: 1, + }, + ], + }, + dynamicVariables: { + key: "value", + }, chatHistory: [ { role: "user", @@ -192,43 +177,6 @@ describe("TestsClient", () => { type: "failure", }, ], - toolCallParameters: { - parameters: [ - { - eval: { - type: "anything", - }, - path: "path", - }, - ], - referencedTool: { - id: "id", - type: "system", - }, - verifyAbsence: true, - workflowNodeTransition: { - type: "node_id", - agentId: "agent_id", - targetNodeId: "target_node_id", - }, - }, - checkAnyToolMatches: true, - dynamicVariables: { - key: "value", - }, - type: "llm", - fromConversationMetadata: { - conversationId: "conversation_id", - agentId: "agent_id", - branchId: "branch_id", - workflowNodeId: "workflow_node_id", - originalAgentReply: [ - { - role: "user", - timeInCallSecs: 1, - }, - ], - }, id: "id", name: "name", }); @@ -237,14 +185,17 @@ describe("TestsClient", () => { test("update", async () => { const server = mockServerPool.createServer(); const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); - const rawRequestBody = { - chat_history: [{ role: "user", time_in_call_secs: 1 }], - success_condition: "success_condition", - success_examples: [{ response: "response", type: "success" }], - failure_examples: [{ response: "response", type: "failure" }], - name: "name", - }; + const rawRequestBody = { type: "llm", name: "name" }; const rawResponseBody = { + type: "llm", + from_conversation_metadata: { + conversation_id: "conversation_id", + agent_id: "agent_id", + branch_id: "branch_id", + workflow_node_id: "workflow_node_id", + original_agent_reply: [{ role: "user", time_in_call_secs: 1 }], + }, + dynamic_variables: { key: "value" }, chat_history: [ { role: "user", @@ -285,22 +236,6 @@ describe("TestsClient", () => { success_condition: "success_condition", success_examples: [{ response: "response", type: "success" }], failure_examples: [{ response: "response", type: "failure" }], - tool_call_parameters: { - parameters: [{ eval: { type: "anything" }, path: "path" }], - referenced_tool: { id: "id", type: "system" }, - verify_absence: true, - workflow_node_transition: { type: "node_id", agent_id: "agent_id", target_node_id: "target_node_id" }, - }, - check_any_tool_matches: true, - dynamic_variables: { key: "value" }, - type: "llm", - from_conversation_metadata: { - conversation_id: "conversation_id", - agent_id: "agent_id", - branch_id: "branch_id", - workflow_node_id: "workflow_node_id", - original_agent_reply: [{ role: "user", time_in_call_secs: 1 }], - }, id: "id", name: "name", }; @@ -314,28 +249,26 @@ describe("TestsClient", () => { .build(); const response = await client.conversationalAi.tests.update("TeaqRRdTcIfIu2i7BYfT", { - chatHistory: [ - { - role: "user", - timeInCallSecs: 1, - }, - ], - successCondition: "success_condition", - successExamples: [ - { - response: "response", - type: "success", - }, - ], - failureExamples: [ - { - response: "response", - type: "failure", - }, - ], + type: "llm", name: "name", }); expect(response).toEqual({ + type: "llm", + fromConversationMetadata: { + conversationId: "conversation_id", + agentId: "agent_id", + branchId: "branch_id", + workflowNodeId: "workflow_node_id", + originalAgentReply: [ + { + role: "user", + timeInCallSecs: 1, + }, + ], + }, + dynamicVariables: { + key: "value", + }, chatHistory: [ { role: "user", @@ -403,43 +336,6 @@ describe("TestsClient", () => { type: "failure", }, ], - toolCallParameters: { - parameters: [ - { - eval: { - type: "anything", - }, - path: "path", - }, - ], - referencedTool: { - id: "id", - type: "system", - }, - verifyAbsence: true, - workflowNodeTransition: { - type: "node_id", - agentId: "agent_id", - targetNodeId: "target_node_id", - }, - }, - checkAnyToolMatches: true, - dynamicVariables: { - key: "value", - }, - type: "llm", - fromConversationMetadata: { - conversationId: "conversation_id", - agentId: "agent_id", - branchId: "branch_id", - workflowNodeId: "workflow_node_id", - originalAgentReply: [ - { - role: "user", - timeInCallSecs: 1, - }, - ], - }, id: "id", name: "name", }); diff --git a/tests/wire/conversationalAi/tests/invocations.test.ts b/tests/wire/conversationalAi/tests/invocations.test.ts index 56ad26a9..fbee77bd 100644 --- a/tests/wire/conversationalAi/tests/invocations.test.ts +++ b/tests/wire/conversationalAi/tests/invocations.test.ts @@ -87,12 +87,7 @@ describe("InvocationsClient", () => { test_runs: [ { test_run_id: "test_run_id", - test_info: { - chat_history: [{ role: "user", time_in_call_secs: 1 }], - success_condition: "success_condition", - success_examples: [{ response: "response", type: "success" }], - failure_examples: [{ response: "response", type: "failure" }], - }, + test_info: { type: "llm" }, test_invocation_id: "test_invocation_id", agent_id: "agent_id", branch_id: "branch_id", @@ -129,25 +124,7 @@ describe("InvocationsClient", () => { { testRunId: "test_run_id", testInfo: { - chatHistory: [ - { - role: "user", - timeInCallSecs: 1, - }, - ], - successCondition: "success_condition", - successExamples: [ - { - response: "response", - type: "success", - }, - ], - failureExamples: [ - { - response: "response", - type: "failure", - }, - ], + type: "llm", }, testInvocationId: "test_invocation_id", agentId: "agent_id", diff --git a/tests/wire/conversationalAi/users.test.ts b/tests/wire/conversationalAi/users.test.ts new file mode 100644 index 00000000..bbad46db --- /dev/null +++ b/tests/wire/conversationalAi/users.test.ts @@ -0,0 +1,50 @@ +// This file was auto-generated by Fern from our API Definition. + +import { ElevenLabsClient } from "../../../src/Client"; +import { mockServerPool } from "../../mock-server/MockServerPool"; + +describe("UsersClient", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new ElevenLabsClient({ maxRetries: 0, apiKey: "test", environment: server.baseUrl }); + + const rawResponseBody = { + users: [ + { + user_id: "user_id", + last_contact_unix_secs: 1, + first_contact_unix_secs: 1, + conversation_count: 1, + last_agent_id: "last_agent_id", + last_agent_name: "last_agent_name", + }, + ], + next_cursor: "next_cursor", + has_more: true, + }; + server.mockEndpoint().get("/v1/convai/users").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + + const response = await client.conversationalAi.users.list({ + agentId: "agent_id", + callStartBeforeUnix: 1, + callStartAfterUnix: 1, + search: "search", + pageSize: 1, + cursor: "cursor", + }); + expect(response).toEqual({ + users: [ + { + userId: "user_id", + lastContactUnixSecs: 1, + firstContactUnixSecs: 1, + conversationCount: 1, + lastAgentId: "last_agent_id", + lastAgentName: "last_agent_name", + }, + ], + nextCursor: "next_cursor", + hasMore: true, + }); + }); +}); diff --git a/tests/wire/pronunciationDictionaries.test.ts b/tests/wire/pronunciationDictionaries.test.ts index 39e9d503..9ff676f5 100644 --- a/tests/wire/pronunciationDictionaries.test.ts +++ b/tests/wire/pronunciationDictionaries.test.ts @@ -66,6 +66,10 @@ describe("PronunciationDictionariesClient", () => { creation_time_unix: 1714156800, archived_time_unix: 1, description: "This is a test dictionary", + rules: [ + { type: "alias", string_to_replace: "string_to_replace", alias: "alias" }, + { type: "phoneme", string_to_replace: "string_to_replace", phoneme: "phoneme", alphabet: "alphabet" }, + ], }; server .mockEndpoint() @@ -86,6 +90,19 @@ describe("PronunciationDictionariesClient", () => { creationTimeUnix: 1714156800, archivedTimeUnix: 1, description: "This is a test dictionary", + rules: [ + { + type: "alias", + stringToReplace: "string_to_replace", + alias: "alias", + }, + { + type: "phoneme", + stringToReplace: "string_to_replace", + phoneme: "phoneme", + alphabet: "alphabet", + }, + ], }); }); diff --git a/tests/wire/serviceAccounts.test.ts b/tests/wire/serviceAccounts.test.ts index 9208bfaf..b646b667 100644 --- a/tests/wire/serviceAccounts.test.ts +++ b/tests/wire/serviceAccounts.test.ts @@ -23,6 +23,9 @@ describe("ServiceAccountsClient", () => { hashed_xi_api_key: "hashed_xi_api_key", }, ], + default_sharing_groups: [ + { group: { name: "name", id: "id", members: ["members"] }, permission_level: "admin" }, + ], }, ], }; @@ -50,6 +53,16 @@ describe("ServiceAccountsClient", () => { hashedXiApiKey: "hashed_xi_api_key", }, ], + defaultSharingGroups: [ + { + group: { + name: "name", + id: "id", + members: ["members"], + }, + permissionLevel: "admin", + }, + ], }, ], }); diff --git a/tests/wire/studio/projects.test.ts b/tests/wire/studio/projects.test.ts index b1c094ca..8875b2a1 100644 --- a/tests/wire/studio/projects.test.ts +++ b/tests/wire/studio/projects.test.ts @@ -259,7 +259,9 @@ describe("ProjectsClient", () => { import_speech_progress: 1.1, speech_imported: true, dub_audio_progress: 1.1, + pending_task: { type: "preprocessing" }, audio_track_ready: true, + export_format_ready: true, current_snapshot_id: "current_snapshot_id", track_id: "track_id", }, @@ -450,7 +452,7 @@ describe("ProjectsClient", () => { publisher: "publisher", copyright: "copyright", subtitle: "subtitle", - distribution_territories: ["worldwide"], + distribution_territories: ["distribution_territories"], edition: "edition", contributors: [{ name: "name", role: "role" }], payout_type: "none", @@ -703,7 +705,11 @@ describe("ProjectsClient", () => { importSpeechProgress: 1.1, speechImported: true, dubAudioProgress: 1.1, + pendingTask: { + type: "preprocessing", + }, audioTrackReady: true, + exportFormatReady: true, currentSnapshotId: "current_snapshot_id", trackId: "track_id", }, @@ -925,7 +931,7 @@ describe("ProjectsClient", () => { publisher: "publisher", copyright: "copyright", subtitle: "subtitle", - distributionTerritories: ["worldwide"], + distributionTerritories: ["distribution_territories"], edition: "edition", contributors: [ { diff --git a/tests/wire/workspace/resources.test.ts b/tests/wire/workspace/resources.test.ts index cce3c675..df8e5dc3 100644 --- a/tests/wire/workspace/resources.test.ts +++ b/tests/wire/workspace/resources.test.ts @@ -10,6 +10,7 @@ describe("ResourcesClient", () => { const rawResponseBody = { resource_id: "4ZUqyldxf71HqUbcP2Lc", + resource_name: "My Custom Voice", resource_type: "voice", creator_user_id: "5zavrE1kZXv2lFw9BKgEkf0B5Wqo", anonymous_access_level_override: "viewer", @@ -36,6 +37,7 @@ describe("ResourcesClient", () => { }); expect(response).toEqual({ resourceId: "4ZUqyldxf71HqUbcP2Lc", + resourceName: "My Custom Voice", resourceType: "voice", creatorUserId: "5zavrE1kZXv2lFw9BKgEkf0B5Wqo", anonymousAccessLevelOverride: "viewer",