phonic 0.31.2 → 0.31.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -16
- package/dist/cjs/BaseClient.d.ts +40 -0
- package/dist/cjs/BaseClient.js +62 -0
- package/dist/cjs/Client.d.ts +27 -48
- package/dist/cjs/Client.js +17 -60
- package/dist/cjs/api/errors/BadRequestError.d.ts +1 -4
- package/dist/cjs/api/errors/BadRequestError.js +6 -4
- package/dist/cjs/api/errors/ConflictError.d.ts +1 -4
- package/dist/cjs/api/errors/ConflictError.js +6 -4
- package/dist/cjs/api/errors/ForbiddenError.d.ts +1 -4
- package/dist/cjs/api/errors/ForbiddenError.js +6 -4
- package/dist/cjs/api/errors/GatewayTimeoutError.d.ts +2 -5
- package/dist/cjs/api/errors/GatewayTimeoutError.js +6 -4
- package/dist/cjs/api/errors/InternalServerError.d.ts +2 -5
- package/dist/cjs/api/errors/InternalServerError.js +6 -4
- package/dist/cjs/api/errors/NotFoundError.d.ts +1 -4
- package/dist/cjs/api/errors/NotFoundError.js +6 -4
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +2 -5
- package/dist/cjs/api/errors/UnauthorizedError.js +6 -4
- package/dist/cjs/api/errors/index.d.ts +4 -4
- package/dist/cjs/api/errors/index.js +4 -4
- package/dist/cjs/api/resources/agents/client/Client.d.ts +26 -47
- package/dist/cjs/api/resources/agents/client/Client.js +128 -249
- package/dist/cjs/api/resources/agents/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.ts +2 -5
- package/dist/cjs/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +1 -4
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.d.ts +0 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteRequest.d.ts +0 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsGetRequest.d.ts +0 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsGetRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsListRequest.d.ts +0 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsListRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.ts +2 -5
- package/dist/cjs/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +9 -16
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.js +3 -3
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +1 -4
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.js +1 -3
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +9 -9
- package/dist/cjs/api/resources/agents/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/agents/exports.d.ts +2 -0
- package/dist/cjs/api/resources/agents/exports.js +21 -0
- package/dist/cjs/api/resources/agents/index.d.ts +1 -1
- package/dist/cjs/api/resources/agents/index.js +1 -1
- package/dist/cjs/api/resources/agents/types/AgentsAddCustomPhoneNumberResponse.d.ts +0 -3
- package/dist/cjs/api/resources/agents/types/AgentsAddCustomPhoneNumberResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsCreateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/agents/types/AgentsCreateResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.d.ts +0 -3
- package/dist/cjs/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsDeleteResponse.d.ts +0 -3
- package/dist/cjs/api/resources/agents/types/AgentsDeleteResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsGetResponse.d.ts +1 -4
- package/dist/cjs/api/resources/agents/types/AgentsGetResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsListResponse.d.ts +1 -4
- package/dist/cjs/api/resources/agents/types/AgentsListResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.d.ts +0 -3
- package/dist/cjs/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsUpdateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/agents/types/AgentsUpdateResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/AgentsUpsertResponse.d.ts +1 -4
- package/dist/cjs/api/resources/agents/types/AgentsUpsertResponse.js +1 -3
- package/dist/cjs/api/resources/agents/types/index.d.ts +6 -6
- package/dist/cjs/api/resources/agents/types/index.js +6 -6
- package/dist/cjs/api/resources/auth/client/Client.d.ts +10 -31
- package/dist/cjs/api/resources/auth/client/Client.js +20 -43
- package/dist/cjs/api/resources/auth/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/auth/client/requests/CreateSessionTokenRequest.d.ts +0 -3
- package/dist/cjs/api/resources/auth/client/requests/CreateSessionTokenRequest.js +1 -3
- package/dist/cjs/api/resources/auth/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/auth/exports.d.ts +2 -0
- package/dist/cjs/api/resources/auth/exports.js +21 -0
- package/dist/cjs/api/resources/auth/index.d.ts +1 -1
- package/dist/cjs/api/resources/auth/index.js +1 -1
- package/dist/cjs/api/resources/auth/types/AuthCreateSessionTokenResponse.d.ts +0 -3
- package/dist/cjs/api/resources/auth/types/AuthCreateSessionTokenResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +36 -51
- package/dist/cjs/api/resources/conversations/client/Client.js +134 -270
- package/dist/cjs/api/resources/conversations/client/Socket.d.ts +2 -12
- package/dist/cjs/api/resources/conversations/client/Socket.js +15 -40
- package/dist/cjs/api/resources/conversations/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsListRequest.d.ts +0 -6
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsListRequest.js +1 -3
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.ts +1 -4
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.js +1 -3
- package/dist/cjs/api/resources/conversations/client/requests/EvaluateConversationRequest.d.ts +0 -3
- package/dist/cjs/api/resources/conversations/client/requests/EvaluateConversationRequest.js +1 -3
- package/dist/cjs/api/resources/conversations/client/requests/ExtractDataRequest.d.ts +0 -3
- package/dist/cjs/api/resources/conversations/client/requests/ExtractDataRequest.js +1 -3
- package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +1 -4
- package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.js +1 -3
- package/dist/cjs/api/resources/conversations/client/requests/index.d.ts +5 -5
- package/dist/cjs/api/resources/conversations/exports.d.ts +2 -0
- package/dist/cjs/api/resources/conversations/exports.js +21 -0
- package/dist/cjs/api/resources/conversations/index.d.ts +1 -1
- package/dist/cjs/api/resources/conversations/index.js +1 -1
- package/dist/cjs/api/resources/conversations/types/ConversationsCancelResponse.d.ts +0 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsCancelResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsExtractDataResponse.d.ts +0 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsExtractDataResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsGetAnalysisResponse.d.ts +1 -4
- package/dist/cjs/api/resources/conversations/types/ConversationsGetAnalysisResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsGetResponse.d.ts +1 -4
- package/dist/cjs/api/resources/conversations/types/ConversationsGetResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsListEvaluationsResponse.d.ts +1 -4
- package/dist/cjs/api/resources/conversations/types/ConversationsListEvaluationsResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsListExtractionsResponse.d.ts +1 -4
- package/dist/cjs/api/resources/conversations/types/ConversationsListExtractionsResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsListResponse.d.ts +1 -4
- package/dist/cjs/api/resources/conversations/types/ConversationsListResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsOutboundCallResponse.d.ts +0 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsOutboundCallResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsSipOutboundCallResponse.d.ts +0 -3
- package/dist/cjs/api/resources/conversations/types/ConversationsSipOutboundCallResponse.js +1 -3
- package/dist/cjs/api/resources/conversations/types/index.d.ts +4 -4
- package/dist/cjs/api/resources/conversations/types/index.js +4 -4
- package/dist/cjs/api/resources/extractionSchemas/client/Client.d.ts +18 -39
- package/dist/cjs/api/resources/extractionSchemas/client/Client.js +74 -146
- package/dist/cjs/api/resources/extractionSchemas/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.ts +1 -4
- package/dist/cjs/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.ts +0 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.ts +0 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.ts +0 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.ts +1 -4
- package/dist/cjs/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/index.d.ts +5 -5
- package/dist/cjs/api/resources/extractionSchemas/exports.d.ts +2 -0
- package/dist/cjs/api/resources/extractionSchemas/exports.js +21 -0
- package/dist/cjs/api/resources/extractionSchemas/index.d.ts +1 -1
- package/dist/cjs/api/resources/extractionSchemas/index.js +1 -1
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasCreateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasCreateResponse.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasDeleteResponse.d.ts +0 -3
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasDeleteResponse.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasGetResponse.d.ts +1 -4
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasGetResponse.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasListResponse.d.ts +1 -4
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasListResponse.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasUpdateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/extractionSchemas/types/ExtractionSchemasUpdateResponse.js +1 -3
- package/dist/cjs/api/resources/extractionSchemas/types/index.d.ts +2 -2
- package/dist/cjs/api/resources/extractionSchemas/types/index.js +2 -2
- package/dist/cjs/api/resources/index.d.ts +13 -13
- package/dist/cjs/api/resources/index.js +17 -17
- package/dist/cjs/api/resources/projects/client/Client.d.ts +22 -43
- package/dist/cjs/api/resources/projects/client/Client.js +79 -168
- package/dist/cjs/api/resources/projects/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/projects/client/requests/CreateConversationEvalPromptRequest.d.ts +0 -3
- package/dist/cjs/api/resources/projects/client/requests/CreateConversationEvalPromptRequest.js +1 -3
- package/dist/cjs/api/resources/projects/client/requests/CreateProjectRequest.d.ts +0 -3
- package/dist/cjs/api/resources/projects/client/requests/CreateProjectRequest.js +1 -3
- package/dist/cjs/api/resources/projects/client/requests/UpdateProjectRequest.d.ts +0 -3
- package/dist/cjs/api/resources/projects/client/requests/UpdateProjectRequest.js +1 -3
- package/dist/cjs/api/resources/projects/client/requests/index.d.ts +3 -3
- package/dist/cjs/api/resources/projects/exports.d.ts +2 -0
- package/dist/cjs/api/resources/projects/exports.js +21 -0
- package/dist/cjs/api/resources/projects/index.d.ts +1 -1
- package/dist/cjs/api/resources/projects/index.js +1 -1
- package/dist/cjs/api/resources/projects/types/ProjectsCreateEvalPromptResponse.d.ts +0 -3
- package/dist/cjs/api/resources/projects/types/ProjectsCreateEvalPromptResponse.js +1 -3
- package/dist/cjs/api/resources/projects/types/ProjectsCreateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/projects/types/ProjectsCreateResponse.js +1 -3
- package/dist/cjs/api/resources/projects/types/ProjectsDeleteResponse.d.ts +0 -3
- package/dist/cjs/api/resources/projects/types/ProjectsDeleteResponse.js +1 -3
- package/dist/cjs/api/resources/projects/types/ProjectsGetResponse.d.ts +1 -4
- package/dist/cjs/api/resources/projects/types/ProjectsGetResponse.js +1 -3
- package/dist/cjs/api/resources/projects/types/ProjectsListEvalPromptsResponse.d.ts +1 -4
- package/dist/cjs/api/resources/projects/types/ProjectsListEvalPromptsResponse.js +1 -3
- package/dist/cjs/api/resources/projects/types/ProjectsListResponse.d.ts +1 -4
- package/dist/cjs/api/resources/projects/types/ProjectsListResponse.js +1 -3
- package/dist/cjs/api/resources/projects/types/ProjectsUpdateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/projects/types/ProjectsUpdateResponse.js +1 -3
- package/dist/cjs/api/resources/projects/types/index.d.ts +4 -4
- package/dist/cjs/api/resources/projects/types/index.js +4 -4
- package/dist/cjs/api/resources/tools/client/Client.d.ts +18 -39
- package/dist/cjs/api/resources/tools/client/Client.js +74 -146
- package/dist/cjs/api/resources/tools/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +7 -16
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +4 -3
- package/dist/cjs/api/resources/tools/client/requests/ToolsDeleteRequest.d.ts +0 -3
- package/dist/cjs/api/resources/tools/client/requests/ToolsDeleteRequest.js +1 -3
- package/dist/cjs/api/resources/tools/client/requests/ToolsGetRequest.d.ts +0 -23
- package/dist/cjs/api/resources/tools/client/requests/ToolsGetRequest.js +1 -3
- package/dist/cjs/api/resources/tools/client/requests/ToolsListRequest.d.ts +0 -3
- package/dist/cjs/api/resources/tools/client/requests/ToolsListRequest.js +1 -3
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +7 -16
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +4 -3
- package/dist/cjs/api/resources/tools/client/requests/index.d.ts +5 -5
- package/dist/cjs/api/resources/tools/client/requests/index.js +5 -0
- package/dist/cjs/api/resources/tools/exports.d.ts +2 -0
- package/dist/cjs/api/resources/tools/exports.js +21 -0
- package/dist/cjs/api/resources/tools/index.d.ts +1 -1
- package/dist/cjs/api/resources/tools/index.js +1 -1
- package/dist/cjs/api/resources/tools/types/ToolsCreateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/tools/types/ToolsCreateResponse.js +1 -3
- package/dist/cjs/api/resources/tools/types/ToolsDeleteResponse.d.ts +0 -3
- package/dist/cjs/api/resources/tools/types/ToolsDeleteResponse.js +1 -3
- package/dist/cjs/api/resources/tools/types/ToolsGetResponse.d.ts +1 -4
- package/dist/cjs/api/resources/tools/types/ToolsGetResponse.js +1 -3
- package/dist/cjs/api/resources/tools/types/ToolsListResponse.d.ts +1 -4
- package/dist/cjs/api/resources/tools/types/ToolsListResponse.js +1 -3
- package/dist/cjs/api/resources/tools/types/ToolsUpdateResponse.d.ts +0 -3
- package/dist/cjs/api/resources/tools/types/ToolsUpdateResponse.js +1 -3
- package/dist/cjs/api/resources/tools/types/index.d.ts +2 -2
- package/dist/cjs/api/resources/tools/types/index.js +2 -2
- package/dist/cjs/api/resources/voices/client/Client.d.ts +12 -33
- package/dist/cjs/api/resources/voices/client/Client.js +33 -66
- package/dist/cjs/api/resources/voices/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/voices/client/requests/VoicesListRequest.d.ts +0 -3
- package/dist/cjs/api/resources/voices/client/requests/VoicesListRequest.js +1 -3
- package/dist/cjs/api/resources/voices/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/voices/exports.d.ts +2 -0
- package/dist/cjs/api/resources/voices/exports.js +21 -0
- package/dist/cjs/api/resources/voices/index.d.ts +1 -1
- package/dist/cjs/api/resources/voices/index.js +1 -1
- package/dist/cjs/api/resources/voices/types/VoicesGetResponse.d.ts +1 -4
- package/dist/cjs/api/resources/voices/types/VoicesGetResponse.js +1 -3
- package/dist/cjs/api/resources/voices/types/VoicesListResponse.d.ts +1 -4
- package/dist/cjs/api/resources/voices/types/VoicesListResponse.js +1 -3
- package/dist/cjs/api/resources/voices/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/voices/types/index.js +1 -1
- package/dist/cjs/api/types/AddSystemMessagePayload.d.ts +0 -3
- package/dist/cjs/api/types/AddSystemMessagePayload.js +1 -3
- package/dist/cjs/api/types/Agent.d.ts +11 -18
- package/dist/cjs/api/types/Agent.js +3 -3
- package/dist/cjs/api/types/AssistantChoseNotToRespondPayload.d.ts +0 -3
- package/dist/cjs/api/types/AssistantChoseNotToRespondPayload.js +1 -3
- package/dist/cjs/api/types/AssistantEndedConversationPayload.d.ts +0 -3
- package/dist/cjs/api/types/AssistantEndedConversationPayload.js +1 -3
- package/dist/cjs/api/types/AssistantFinishedSpeakingPayload.d.ts +0 -3
- package/dist/cjs/api/types/AssistantFinishedSpeakingPayload.js +1 -3
- package/dist/cjs/api/types/AssistantStartedSpeakingPayload.d.ts +0 -3
- package/dist/cjs/api/types/AssistantStartedSpeakingPayload.js +1 -3
- package/dist/cjs/api/types/AudioChunkPayload.d.ts +1 -4
- package/dist/cjs/api/types/AudioChunkPayload.js +1 -3
- package/dist/cjs/api/types/AudioChunkResponsePayload.d.ts +0 -3
- package/dist/cjs/api/types/AudioChunkResponsePayload.js +1 -3
- package/dist/cjs/api/types/BadRequestErrorBody.d.ts +1 -4
- package/dist/cjs/api/types/BadRequestErrorBody.js +1 -3
- package/dist/cjs/api/types/BasicError.d.ts +2 -5
- package/dist/cjs/api/types/BasicError.js +1 -3
- package/dist/cjs/api/types/ConfigPayload.d.ts +30 -39
- package/dist/cjs/api/types/ConfigPayload.js +4 -3
- package/dist/cjs/api/types/Conversation.d.ts +10 -19
- package/dist/cjs/api/types/Conversation.js +4 -3
- package/dist/cjs/api/types/ConversationAnalysis.d.ts +0 -3
- package/dist/cjs/api/types/ConversationAnalysis.js +1 -3
- package/dist/cjs/api/types/ConversationCreatedPayload.d.ts +0 -3
- package/dist/cjs/api/types/ConversationCreatedPayload.js +1 -3
- package/dist/cjs/api/types/ConversationEval.d.ts +0 -3
- package/dist/cjs/api/types/ConversationEval.js +1 -3
- package/dist/cjs/api/types/ConversationEvalPrompt.d.ts +0 -3
- package/dist/cjs/api/types/ConversationEvalPrompt.js +1 -3
- package/dist/cjs/api/types/ConversationEvaluation.d.ts +1 -4
- package/dist/cjs/api/types/ConversationEvaluation.js +1 -3
- package/dist/cjs/api/types/ConversationEvaluationResult.d.ts +2 -7
- package/dist/cjs/api/types/ConversationEvaluationResult.js +2 -3
- package/dist/cjs/api/types/ConversationExtraction.d.ts +1 -4
- package/dist/cjs/api/types/ConversationExtraction.js +1 -3
- package/dist/cjs/api/types/ConversationItem.d.ts +14 -19
- package/dist/cjs/api/types/ConversationItem.js +2 -3
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +37 -44
- package/dist/cjs/api/types/CreateAgentRequest.js +3 -3
- package/dist/cjs/api/types/DtmfPayload.d.ts +0 -3
- package/dist/cjs/api/types/DtmfPayload.js +1 -3
- package/dist/cjs/api/types/ErrorPayload.d.ts +2 -5
- package/dist/cjs/api/types/ErrorPayload.js +1 -3
- package/dist/cjs/api/types/Error_.d.ts +1 -4
- package/dist/cjs/api/types/Error_.js +1 -3
- package/dist/cjs/api/types/ExtractionField.d.ts +3 -8
- package/dist/cjs/api/types/ExtractionField.js +2 -3
- package/dist/cjs/api/types/ExtractionSchema.d.ts +1 -4
- package/dist/cjs/api/types/ExtractionSchema.js +1 -3
- package/dist/cjs/api/types/GenerateReplyPayload.d.ts +1 -4
- package/dist/cjs/api/types/GenerateReplyPayload.js +1 -3
- package/dist/cjs/api/types/InputCancelledPayload.d.ts +0 -3
- package/dist/cjs/api/types/InputCancelledPayload.js +1 -3
- package/dist/cjs/api/types/InputTextPayload.d.ts +0 -3
- package/dist/cjs/api/types/InputTextPayload.js +1 -3
- package/dist/cjs/api/types/LanguageCode.d.ts +2 -7
- package/dist/cjs/api/types/LanguageCode.js +2 -3
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +14 -17
- package/dist/cjs/api/types/OutboundCallConfig.js +1 -3
- package/dist/cjs/api/types/Project.d.ts +0 -3
- package/dist/cjs/api/types/Project.js +1 -3
- package/dist/cjs/api/types/ReadyToStartConversationPayload.d.ts +0 -3
- package/dist/cjs/api/types/ReadyToStartConversationPayload.js +1 -3
- package/dist/cjs/api/types/SetExternalIdPayload.d.ts +0 -3
- package/dist/cjs/api/types/SetExternalIdPayload.js +1 -3
- package/dist/cjs/api/types/Task.d.ts +0 -3
- package/dist/cjs/api/types/Task.js +1 -3
- package/dist/cjs/api/types/Tool.d.ts +22 -31
- package/dist/cjs/api/types/Tool.js +4 -3
- package/dist/cjs/api/types/ToolCallInterruptedPayload.d.ts +0 -3
- package/dist/cjs/api/types/ToolCallInterruptedPayload.js +1 -3
- package/dist/cjs/api/types/ToolCallOutputPayload.d.ts +1 -4
- package/dist/cjs/api/types/ToolCallOutputPayload.js +1 -3
- package/dist/cjs/api/types/ToolCallOutputProcessedPayload.d.ts +14 -17
- package/dist/cjs/api/types/ToolCallOutputProcessedPayload.js +1 -3
- package/dist/cjs/api/types/ToolCallPayload.d.ts +0 -3
- package/dist/cjs/api/types/ToolCallPayload.js +1 -3
- package/dist/cjs/api/types/ToolParameter.d.ts +7 -14
- package/dist/cjs/api/types/ToolParameter.js +10 -3
- package/dist/cjs/api/types/UpdateSystemPromptPayload.d.ts +0 -3
- package/dist/cjs/api/types/UpdateSystemPromptPayload.js +1 -3
- package/dist/cjs/api/types/UserFinishedSpeakingPayload.d.ts +0 -3
- package/dist/cjs/api/types/UserFinishedSpeakingPayload.js +1 -3
- package/dist/cjs/api/types/UserStartedSpeakingPayload.d.ts +0 -3
- package/dist/cjs/api/types/UserStartedSpeakingPayload.js +1 -3
- package/dist/cjs/api/types/ValidationError.d.ts +0 -3
- package/dist/cjs/api/types/ValidationError.js +1 -3
- package/dist/cjs/api/types/Voice.d.ts +0 -3
- package/dist/cjs/api/types/Voice.js +1 -3
- package/dist/cjs/api/types/WarningPayload.d.ts +1 -4
- package/dist/cjs/api/types/WarningPayload.js +1 -3
- package/dist/cjs/api/types/index.d.ts +38 -38
- package/dist/cjs/api/types/index.js +38 -38
- package/dist/cjs/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/cjs/auth/BearerAuthProvider.js +82 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +5 -2
- package/dist/cjs/core/auth/BasicAuth.js +2 -1
- package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
- package/dist/cjs/core/auth/BearerToken.js +7 -6
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +3 -2
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/exports.d.ts +2 -0
- package/dist/cjs/core/exports.js +18 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +5 -6
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +13 -5
- package/dist/cjs/core/fetcher/Fetcher.js +213 -11
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +1 -1
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +21 -7
- package/dist/cjs/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/index.js +3 -1
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/core/fetcher/makeRequest.js +32 -13
- package/dist/cjs/core/fetcher/requestWithRetries.js +3 -12
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.d.ts +2 -3
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/core/index.d.ts +3 -2
- package/dist/cjs/core/index.js +4 -3
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/runtime/runtime.js +17 -15
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/join.js +3 -4
- package/dist/cjs/core/websocket/exports.d.ts +8 -0
- package/dist/cjs/core/websocket/exports.js +2 -0
- package/dist/cjs/core/websocket/ws.d.ts +14 -11
- package/dist/cjs/core/websocket/ws.js +42 -29
- package/dist/cjs/environments.d.ts +0 -3
- package/dist/cjs/environments.js +1 -3
- package/dist/cjs/errors/PhonicError.d.ts +1 -4
- package/dist/cjs/errors/PhonicError.js +7 -5
- package/dist/cjs/errors/PhonicTimeoutError.d.ts +0 -3
- package/dist/cjs/errors/PhonicTimeoutError.js +6 -4
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +4 -2
- package/dist/cjs/index.js +8 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +40 -0
- package/dist/esm/BaseClient.mjs +25 -0
- package/dist/esm/Client.d.mts +27 -48
- package/dist/esm/Client.mjs +18 -28
- package/dist/esm/api/errors/BadRequestError.d.mts +1 -4
- package/dist/esm/api/errors/BadRequestError.mjs +6 -4
- package/dist/esm/api/errors/ConflictError.d.mts +1 -4
- package/dist/esm/api/errors/ConflictError.mjs +6 -4
- package/dist/esm/api/errors/ForbiddenError.d.mts +1 -4
- package/dist/esm/api/errors/ForbiddenError.mjs +6 -4
- package/dist/esm/api/errors/GatewayTimeoutError.d.mts +2 -5
- package/dist/esm/api/errors/GatewayTimeoutError.mjs +6 -4
- package/dist/esm/api/errors/InternalServerError.d.mts +2 -5
- package/dist/esm/api/errors/InternalServerError.mjs +6 -4
- package/dist/esm/api/errors/NotFoundError.d.mts +1 -4
- package/dist/esm/api/errors/NotFoundError.mjs +6 -4
- package/dist/esm/api/errors/UnauthorizedError.d.mts +2 -5
- package/dist/esm/api/errors/UnauthorizedError.mjs +6 -4
- package/dist/esm/api/errors/index.d.mts +4 -4
- package/dist/esm/api/errors/index.mjs +4 -4
- package/dist/esm/api/resources/agents/client/Client.d.mts +26 -47
- package/dist/esm/api/resources/agents/client/Client.mjs +126 -247
- package/dist/esm/api/resources/agents/client/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.mts +2 -5
- package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +1 -4
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.d.mts +0 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsDeleteCustomPhoneNumberRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsDeleteRequest.d.mts +0 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsDeleteRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsGetRequest.d.mts +0 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsGetRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsListRequest.d.mts +0 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsListRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.d.mts +2 -5
- package/dist/esm/api/resources/agents/client/requests/AgentsUpdatePhoneNumberRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +9 -16
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +3 -3
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +1 -4
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.mjs +1 -3
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +9 -9
- package/dist/esm/api/resources/agents/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/agents/exports.d.mts +2 -0
- package/dist/esm/api/resources/agents/exports.mjs +3 -0
- package/dist/esm/api/resources/agents/index.d.mts +1 -1
- package/dist/esm/api/resources/agents/index.mjs +1 -1
- package/dist/esm/api/resources/agents/types/AgentsAddCustomPhoneNumberResponse.d.mts +0 -3
- package/dist/esm/api/resources/agents/types/AgentsAddCustomPhoneNumberResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsCreateResponse.d.mts +0 -3
- package/dist/esm/api/resources/agents/types/AgentsCreateResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.d.mts +0 -3
- package/dist/esm/api/resources/agents/types/AgentsDeleteCustomPhoneNumberResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsDeleteResponse.d.mts +0 -3
- package/dist/esm/api/resources/agents/types/AgentsDeleteResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsGetResponse.d.mts +1 -4
- package/dist/esm/api/resources/agents/types/AgentsGetResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsListResponse.d.mts +1 -4
- package/dist/esm/api/resources/agents/types/AgentsListResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.d.mts +0 -3
- package/dist/esm/api/resources/agents/types/AgentsUpdatePhoneNumberResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsUpdateResponse.d.mts +0 -3
- package/dist/esm/api/resources/agents/types/AgentsUpdateResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/AgentsUpsertResponse.d.mts +1 -4
- package/dist/esm/api/resources/agents/types/AgentsUpsertResponse.mjs +1 -3
- package/dist/esm/api/resources/agents/types/index.d.mts +6 -6
- package/dist/esm/api/resources/agents/types/index.mjs +6 -6
- package/dist/esm/api/resources/auth/client/Client.d.mts +10 -31
- package/dist/esm/api/resources/auth/client/Client.mjs +18 -41
- package/dist/esm/api/resources/auth/client/index.d.mts +0 -1
- package/dist/esm/api/resources/auth/client/requests/CreateSessionTokenRequest.d.mts +0 -3
- package/dist/esm/api/resources/auth/client/requests/CreateSessionTokenRequest.mjs +1 -3
- package/dist/esm/api/resources/auth/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/auth/exports.d.mts +2 -0
- package/dist/esm/api/resources/auth/exports.mjs +3 -0
- package/dist/esm/api/resources/auth/index.d.mts +1 -1
- package/dist/esm/api/resources/auth/index.mjs +1 -1
- package/dist/esm/api/resources/auth/types/AuthCreateSessionTokenResponse.d.mts +0 -3
- package/dist/esm/api/resources/auth/types/AuthCreateSessionTokenResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/client/Client.d.mts +36 -51
- package/dist/esm/api/resources/conversations/client/Client.mjs +132 -268
- package/dist/esm/api/resources/conversations/client/Socket.d.mts +2 -12
- package/dist/esm/api/resources/conversations/client/Socket.mjs +15 -40
- package/dist/esm/api/resources/conversations/client/index.d.mts +0 -1
- package/dist/esm/api/resources/conversations/client/requests/ConversationsListRequest.d.mts +0 -6
- package/dist/esm/api/resources/conversations/client/requests/ConversationsListRequest.mjs +1 -3
- package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.mts +1 -4
- package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.mjs +1 -3
- package/dist/esm/api/resources/conversations/client/requests/EvaluateConversationRequest.d.mts +0 -3
- package/dist/esm/api/resources/conversations/client/requests/EvaluateConversationRequest.mjs +1 -3
- package/dist/esm/api/resources/conversations/client/requests/ExtractDataRequest.d.mts +0 -3
- package/dist/esm/api/resources/conversations/client/requests/ExtractDataRequest.mjs +1 -3
- package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +1 -4
- package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.mjs +1 -3
- package/dist/esm/api/resources/conversations/client/requests/index.d.mts +5 -5
- package/dist/esm/api/resources/conversations/exports.d.mts +2 -0
- package/dist/esm/api/resources/conversations/exports.mjs +3 -0
- package/dist/esm/api/resources/conversations/index.d.mts +1 -1
- package/dist/esm/api/resources/conversations/index.mjs +1 -1
- package/dist/esm/api/resources/conversations/types/ConversationsCancelResponse.d.mts +0 -3
- package/dist/esm/api/resources/conversations/types/ConversationsCancelResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsExtractDataResponse.d.mts +0 -3
- package/dist/esm/api/resources/conversations/types/ConversationsExtractDataResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsGetAnalysisResponse.d.mts +1 -4
- package/dist/esm/api/resources/conversations/types/ConversationsGetAnalysisResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsGetResponse.d.mts +1 -4
- package/dist/esm/api/resources/conversations/types/ConversationsGetResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsListEvaluationsResponse.d.mts +1 -4
- package/dist/esm/api/resources/conversations/types/ConversationsListEvaluationsResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsListExtractionsResponse.d.mts +1 -4
- package/dist/esm/api/resources/conversations/types/ConversationsListExtractionsResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsListResponse.d.mts +1 -4
- package/dist/esm/api/resources/conversations/types/ConversationsListResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsOutboundCallResponse.d.mts +0 -3
- package/dist/esm/api/resources/conversations/types/ConversationsOutboundCallResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/ConversationsSipOutboundCallResponse.d.mts +0 -3
- package/dist/esm/api/resources/conversations/types/ConversationsSipOutboundCallResponse.mjs +1 -3
- package/dist/esm/api/resources/conversations/types/index.d.mts +4 -4
- package/dist/esm/api/resources/conversations/types/index.mjs +4 -4
- package/dist/esm/api/resources/extractionSchemas/client/Client.d.mts +18 -39
- package/dist/esm/api/resources/extractionSchemas/client/Client.mjs +72 -144
- package/dist/esm/api/resources/extractionSchemas/client/index.d.mts +0 -1
- package/dist/esm/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.mts +1 -4
- package/dist/esm/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.mts +0 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.mts +0 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.mts +0 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.mts +1 -4
- package/dist/esm/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/client/requests/index.d.mts +5 -5
- package/dist/esm/api/resources/extractionSchemas/exports.d.mts +2 -0
- package/dist/esm/api/resources/extractionSchemas/exports.mjs +3 -0
- package/dist/esm/api/resources/extractionSchemas/index.d.mts +1 -1
- package/dist/esm/api/resources/extractionSchemas/index.mjs +1 -1
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasCreateResponse.d.mts +0 -3
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasCreateResponse.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasDeleteResponse.d.mts +0 -3
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasDeleteResponse.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasGetResponse.d.mts +1 -4
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasGetResponse.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasListResponse.d.mts +1 -4
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasListResponse.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasUpdateResponse.d.mts +0 -3
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasUpdateResponse.mjs +1 -3
- package/dist/esm/api/resources/extractionSchemas/types/index.d.mts +2 -2
- package/dist/esm/api/resources/extractionSchemas/types/index.mjs +2 -2
- package/dist/esm/api/resources/index.d.mts +13 -13
- package/dist/esm/api/resources/index.mjs +13 -13
- package/dist/esm/api/resources/projects/client/Client.d.mts +22 -43
- package/dist/esm/api/resources/projects/client/Client.mjs +77 -166
- package/dist/esm/api/resources/projects/client/index.d.mts +0 -1
- package/dist/esm/api/resources/projects/client/requests/CreateConversationEvalPromptRequest.d.mts +0 -3
- package/dist/esm/api/resources/projects/client/requests/CreateConversationEvalPromptRequest.mjs +1 -3
- package/dist/esm/api/resources/projects/client/requests/CreateProjectRequest.d.mts +0 -3
- package/dist/esm/api/resources/projects/client/requests/CreateProjectRequest.mjs +1 -3
- package/dist/esm/api/resources/projects/client/requests/UpdateProjectRequest.d.mts +0 -3
- package/dist/esm/api/resources/projects/client/requests/UpdateProjectRequest.mjs +1 -3
- package/dist/esm/api/resources/projects/client/requests/index.d.mts +3 -3
- package/dist/esm/api/resources/projects/exports.d.mts +2 -0
- package/dist/esm/api/resources/projects/exports.mjs +3 -0
- package/dist/esm/api/resources/projects/index.d.mts +1 -1
- package/dist/esm/api/resources/projects/index.mjs +1 -1
- package/dist/esm/api/resources/projects/types/ProjectsCreateEvalPromptResponse.d.mts +0 -3
- package/dist/esm/api/resources/projects/types/ProjectsCreateEvalPromptResponse.mjs +1 -3
- package/dist/esm/api/resources/projects/types/ProjectsCreateResponse.d.mts +0 -3
- package/dist/esm/api/resources/projects/types/ProjectsCreateResponse.mjs +1 -3
- package/dist/esm/api/resources/projects/types/ProjectsDeleteResponse.d.mts +0 -3
- package/dist/esm/api/resources/projects/types/ProjectsDeleteResponse.mjs +1 -3
- package/dist/esm/api/resources/projects/types/ProjectsGetResponse.d.mts +1 -4
- package/dist/esm/api/resources/projects/types/ProjectsGetResponse.mjs +1 -3
- package/dist/esm/api/resources/projects/types/ProjectsListEvalPromptsResponse.d.mts +1 -4
- package/dist/esm/api/resources/projects/types/ProjectsListEvalPromptsResponse.mjs +1 -3
- package/dist/esm/api/resources/projects/types/ProjectsListResponse.d.mts +1 -4
- package/dist/esm/api/resources/projects/types/ProjectsListResponse.mjs +1 -3
- package/dist/esm/api/resources/projects/types/ProjectsUpdateResponse.d.mts +0 -3
- package/dist/esm/api/resources/projects/types/ProjectsUpdateResponse.mjs +1 -3
- package/dist/esm/api/resources/projects/types/index.d.mts +4 -4
- package/dist/esm/api/resources/projects/types/index.mjs +4 -4
- package/dist/esm/api/resources/tools/client/Client.d.mts +18 -39
- package/dist/esm/api/resources/tools/client/Client.mjs +72 -144
- package/dist/esm/api/resources/tools/client/index.d.mts +0 -1
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +7 -16
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +4 -3
- package/dist/esm/api/resources/tools/client/requests/ToolsDeleteRequest.d.mts +0 -3
- package/dist/esm/api/resources/tools/client/requests/ToolsDeleteRequest.mjs +1 -3
- package/dist/esm/api/resources/tools/client/requests/ToolsGetRequest.d.mts +0 -23
- package/dist/esm/api/resources/tools/client/requests/ToolsGetRequest.mjs +1 -3
- package/dist/esm/api/resources/tools/client/requests/ToolsListRequest.d.mts +0 -3
- package/dist/esm/api/resources/tools/client/requests/ToolsListRequest.mjs +1 -3
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +7 -16
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +4 -3
- package/dist/esm/api/resources/tools/client/requests/index.d.mts +5 -5
- package/dist/esm/api/resources/tools/client/requests/index.mjs +2 -1
- package/dist/esm/api/resources/tools/exports.d.mts +2 -0
- package/dist/esm/api/resources/tools/exports.mjs +3 -0
- package/dist/esm/api/resources/tools/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/index.mjs +1 -1
- package/dist/esm/api/resources/tools/types/ToolsCreateResponse.d.mts +0 -3
- package/dist/esm/api/resources/tools/types/ToolsCreateResponse.mjs +1 -3
- package/dist/esm/api/resources/tools/types/ToolsDeleteResponse.d.mts +0 -3
- package/dist/esm/api/resources/tools/types/ToolsDeleteResponse.mjs +1 -3
- package/dist/esm/api/resources/tools/types/ToolsGetResponse.d.mts +1 -4
- package/dist/esm/api/resources/tools/types/ToolsGetResponse.mjs +1 -3
- package/dist/esm/api/resources/tools/types/ToolsListResponse.d.mts +1 -4
- package/dist/esm/api/resources/tools/types/ToolsListResponse.mjs +1 -3
- package/dist/esm/api/resources/tools/types/ToolsUpdateResponse.d.mts +0 -3
- package/dist/esm/api/resources/tools/types/ToolsUpdateResponse.mjs +1 -3
- package/dist/esm/api/resources/tools/types/index.d.mts +2 -2
- package/dist/esm/api/resources/tools/types/index.mjs +2 -2
- package/dist/esm/api/resources/voices/client/Client.d.mts +12 -33
- package/dist/esm/api/resources/voices/client/Client.mjs +31 -64
- package/dist/esm/api/resources/voices/client/index.d.mts +0 -1
- package/dist/esm/api/resources/voices/client/requests/VoicesListRequest.d.mts +0 -3
- package/dist/esm/api/resources/voices/client/requests/VoicesListRequest.mjs +1 -3
- package/dist/esm/api/resources/voices/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/voices/exports.d.mts +2 -0
- package/dist/esm/api/resources/voices/exports.mjs +3 -0
- package/dist/esm/api/resources/voices/index.d.mts +1 -1
- package/dist/esm/api/resources/voices/index.mjs +1 -1
- package/dist/esm/api/resources/voices/types/VoicesGetResponse.d.mts +1 -4
- package/dist/esm/api/resources/voices/types/VoicesGetResponse.mjs +1 -3
- package/dist/esm/api/resources/voices/types/VoicesListResponse.d.mts +1 -4
- package/dist/esm/api/resources/voices/types/VoicesListResponse.mjs +1 -3
- package/dist/esm/api/resources/voices/types/index.d.mts +1 -1
- package/dist/esm/api/resources/voices/types/index.mjs +1 -1
- package/dist/esm/api/types/AddSystemMessagePayload.d.mts +0 -3
- package/dist/esm/api/types/AddSystemMessagePayload.mjs +1 -3
- package/dist/esm/api/types/Agent.d.mts +11 -18
- package/dist/esm/api/types/Agent.mjs +3 -3
- package/dist/esm/api/types/AssistantChoseNotToRespondPayload.d.mts +0 -3
- package/dist/esm/api/types/AssistantChoseNotToRespondPayload.mjs +1 -3
- package/dist/esm/api/types/AssistantEndedConversationPayload.d.mts +0 -3
- package/dist/esm/api/types/AssistantEndedConversationPayload.mjs +1 -3
- package/dist/esm/api/types/AssistantFinishedSpeakingPayload.d.mts +0 -3
- package/dist/esm/api/types/AssistantFinishedSpeakingPayload.mjs +1 -3
- package/dist/esm/api/types/AssistantStartedSpeakingPayload.d.mts +0 -3
- package/dist/esm/api/types/AssistantStartedSpeakingPayload.mjs +1 -3
- package/dist/esm/api/types/AudioChunkPayload.d.mts +1 -4
- package/dist/esm/api/types/AudioChunkPayload.mjs +1 -3
- package/dist/esm/api/types/AudioChunkResponsePayload.d.mts +0 -3
- package/dist/esm/api/types/AudioChunkResponsePayload.mjs +1 -3
- package/dist/esm/api/types/BadRequestErrorBody.d.mts +1 -4
- package/dist/esm/api/types/BadRequestErrorBody.mjs +1 -3
- package/dist/esm/api/types/BasicError.d.mts +2 -5
- package/dist/esm/api/types/BasicError.mjs +1 -3
- package/dist/esm/api/types/ConfigPayload.d.mts +30 -39
- package/dist/esm/api/types/ConfigPayload.mjs +4 -3
- package/dist/esm/api/types/Conversation.d.mts +10 -19
- package/dist/esm/api/types/Conversation.mjs +4 -3
- package/dist/esm/api/types/ConversationAnalysis.d.mts +0 -3
- package/dist/esm/api/types/ConversationAnalysis.mjs +1 -3
- package/dist/esm/api/types/ConversationCreatedPayload.d.mts +0 -3
- package/dist/esm/api/types/ConversationCreatedPayload.mjs +1 -3
- package/dist/esm/api/types/ConversationEval.d.mts +0 -3
- package/dist/esm/api/types/ConversationEval.mjs +1 -3
- package/dist/esm/api/types/ConversationEvalPrompt.d.mts +0 -3
- package/dist/esm/api/types/ConversationEvalPrompt.mjs +1 -3
- package/dist/esm/api/types/ConversationEvaluation.d.mts +1 -4
- package/dist/esm/api/types/ConversationEvaluation.mjs +1 -3
- package/dist/esm/api/types/ConversationEvaluationResult.d.mts +2 -7
- package/dist/esm/api/types/ConversationEvaluationResult.mjs +2 -3
- package/dist/esm/api/types/ConversationExtraction.d.mts +1 -4
- package/dist/esm/api/types/ConversationExtraction.mjs +1 -3
- package/dist/esm/api/types/ConversationItem.d.mts +14 -19
- package/dist/esm/api/types/ConversationItem.mjs +2 -3
- package/dist/esm/api/types/CreateAgentRequest.d.mts +37 -44
- package/dist/esm/api/types/CreateAgentRequest.mjs +3 -3
- package/dist/esm/api/types/DtmfPayload.d.mts +0 -3
- package/dist/esm/api/types/DtmfPayload.mjs +1 -3
- package/dist/esm/api/types/ErrorPayload.d.mts +2 -5
- package/dist/esm/api/types/ErrorPayload.mjs +1 -3
- package/dist/esm/api/types/Error_.d.mts +1 -4
- package/dist/esm/api/types/Error_.mjs +1 -3
- package/dist/esm/api/types/ExtractionField.d.mts +3 -8
- package/dist/esm/api/types/ExtractionField.mjs +2 -3
- package/dist/esm/api/types/ExtractionSchema.d.mts +1 -4
- package/dist/esm/api/types/ExtractionSchema.mjs +1 -3
- package/dist/esm/api/types/GenerateReplyPayload.d.mts +1 -4
- package/dist/esm/api/types/GenerateReplyPayload.mjs +1 -3
- package/dist/esm/api/types/InputCancelledPayload.d.mts +0 -3
- package/dist/esm/api/types/InputCancelledPayload.mjs +1 -3
- package/dist/esm/api/types/InputTextPayload.d.mts +0 -3
- package/dist/esm/api/types/InputTextPayload.mjs +1 -3
- package/dist/esm/api/types/LanguageCode.d.mts +2 -7
- package/dist/esm/api/types/LanguageCode.mjs +2 -3
- package/dist/esm/api/types/OutboundCallConfig.d.mts +14 -17
- package/dist/esm/api/types/OutboundCallConfig.mjs +1 -3
- package/dist/esm/api/types/Project.d.mts +0 -3
- package/dist/esm/api/types/Project.mjs +1 -3
- package/dist/esm/api/types/ReadyToStartConversationPayload.d.mts +0 -3
- package/dist/esm/api/types/ReadyToStartConversationPayload.mjs +1 -3
- package/dist/esm/api/types/SetExternalIdPayload.d.mts +0 -3
- package/dist/esm/api/types/SetExternalIdPayload.mjs +1 -3
- package/dist/esm/api/types/Task.d.mts +0 -3
- package/dist/esm/api/types/Task.mjs +1 -3
- package/dist/esm/api/types/Tool.d.mts +22 -31
- package/dist/esm/api/types/Tool.mjs +4 -3
- package/dist/esm/api/types/ToolCallInterruptedPayload.d.mts +0 -3
- package/dist/esm/api/types/ToolCallInterruptedPayload.mjs +1 -3
- package/dist/esm/api/types/ToolCallOutputPayload.d.mts +1 -4
- package/dist/esm/api/types/ToolCallOutputPayload.mjs +1 -3
- package/dist/esm/api/types/ToolCallOutputProcessedPayload.d.mts +14 -17
- package/dist/esm/api/types/ToolCallOutputProcessedPayload.mjs +1 -3
- package/dist/esm/api/types/ToolCallPayload.d.mts +0 -3
- package/dist/esm/api/types/ToolCallPayload.mjs +1 -3
- package/dist/esm/api/types/ToolParameter.d.mts +7 -14
- package/dist/esm/api/types/ToolParameter.mjs +10 -3
- package/dist/esm/api/types/UpdateSystemPromptPayload.d.mts +0 -3
- package/dist/esm/api/types/UpdateSystemPromptPayload.mjs +1 -3
- package/dist/esm/api/types/UserFinishedSpeakingPayload.d.mts +0 -3
- package/dist/esm/api/types/UserFinishedSpeakingPayload.mjs +1 -3
- package/dist/esm/api/types/UserStartedSpeakingPayload.d.mts +0 -3
- package/dist/esm/api/types/UserStartedSpeakingPayload.mjs +1 -3
- package/dist/esm/api/types/ValidationError.d.mts +0 -3
- package/dist/esm/api/types/ValidationError.mjs +1 -3
- package/dist/esm/api/types/Voice.d.mts +0 -3
- package/dist/esm/api/types/Voice.mjs +1 -3
- package/dist/esm/api/types/WarningPayload.d.mts +1 -4
- package/dist/esm/api/types/WarningPayload.mjs +1 -3
- package/dist/esm/api/types/index.d.mts +38 -38
- package/dist/esm/api/types/index.mjs +38 -38
- package/dist/esm/auth/BearerAuthProvider.d.mts +20 -0
- package/dist/esm/auth/BearerAuthProvider.mjs +45 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +5 -2
- package/dist/esm/core/auth/BasicAuth.mjs +2 -1
- package/dist/esm/core/auth/BearerToken.d.mts +3 -1
- package/dist/esm/core/auth/BearerToken.mjs +7 -6
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +3 -2
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/exports.d.mts +2 -0
- package/dist/esm/core/exports.mjs +2 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +5 -6
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +13 -5
- package/dist/esm/core/fetcher/Fetcher.mjs +213 -11
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +1 -1
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +21 -7
- package/dist/esm/core/fetcher/index.d.mts +2 -0
- package/dist/esm/core/fetcher/index.mjs +1 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +30 -13
- package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -12
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.d.mts +2 -3
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/core/index.d.mts +3 -2
- package/dist/esm/core/index.mjs +3 -2
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/runtime/runtime.mjs +17 -15
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/join.mjs +3 -4
- package/dist/esm/core/websocket/exports.d.mts +8 -0
- package/dist/esm/core/websocket/exports.mjs +1 -0
- package/dist/esm/core/websocket/ws.d.mts +14 -11
- package/dist/esm/core/websocket/ws.mjs +42 -29
- package/dist/esm/environments.d.mts +0 -3
- package/dist/esm/environments.mjs +1 -3
- package/dist/esm/errors/PhonicError.d.mts +1 -4
- package/dist/esm/errors/PhonicError.mjs +7 -5
- package/dist/esm/errors/PhonicTimeoutError.d.mts +0 -3
- package/dist/esm/errors/PhonicTimeoutError.mjs +6 -4
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +4 -2
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +92 -8
- package/reference.md +321 -329
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
export interface ConversationEvaluationResult {
|
|
5
2
|
/** The evaluation ID. */
|
|
6
3
|
id: string;
|
|
@@ -12,16 +9,14 @@ export interface ConversationEvaluationResult {
|
|
|
12
9
|
created_at: string;
|
|
13
10
|
}
|
|
14
11
|
export declare namespace ConversationEvaluationResult {
|
|
15
|
-
/**
|
|
16
|
-
* The evaluation result.
|
|
17
|
-
*/
|
|
18
|
-
type Result = "successful" | "unsuccessful" | "undecided" | "error";
|
|
12
|
+
/** The evaluation result. */
|
|
19
13
|
const Result: {
|
|
20
14
|
readonly Successful: "successful";
|
|
21
15
|
readonly Unsuccessful: "unsuccessful";
|
|
22
16
|
readonly Undecided: "undecided";
|
|
23
17
|
readonly Error: "error";
|
|
24
18
|
};
|
|
19
|
+
type Result = (typeof Result)[keyof typeof Result];
|
|
25
20
|
/**
|
|
26
21
|
* The evaluation prompt information.
|
|
27
22
|
*/
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.ConversationEvaluationResult = void 0;
|
|
7
5
|
var ConversationEvaluationResult;
|
|
8
6
|
(function (ConversationEvaluationResult) {
|
|
7
|
+
/** The evaluation result. */
|
|
9
8
|
ConversationEvaluationResult.Result = {
|
|
10
9
|
Successful: "successful",
|
|
11
10
|
Unsuccessful: "unsuccessful",
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
export interface ConversationExtraction {
|
|
5
2
|
/** The extraction ID. */
|
|
6
3
|
id: string;
|
|
7
4
|
/** The conversation ID. */
|
|
8
|
-
conversation_id?: string;
|
|
5
|
+
conversation_id?: string | undefined;
|
|
9
6
|
schema: ConversationExtraction.Schema;
|
|
10
7
|
/** The extracted data. */
|
|
11
8
|
result: Record<string, unknown>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
export interface ConversationItem {
|
|
5
2
|
/** Index of the item in the conversation. */
|
|
6
3
|
item_idx: number;
|
|
@@ -15,23 +12,21 @@ export interface ConversationItem {
|
|
|
15
12
|
/** When this turn started. */
|
|
16
13
|
started_at: string;
|
|
17
14
|
/** Voice ID used (assistant only). */
|
|
18
|
-
voice_id?: string;
|
|
15
|
+
voice_id?: string | undefined;
|
|
19
16
|
/** Audio speed used (assistant only). */
|
|
20
|
-
audio_speed?: number;
|
|
17
|
+
audio_speed?: number | undefined;
|
|
21
18
|
/** System prompt used for this assistant turn. */
|
|
22
|
-
system_prompt?: string;
|
|
19
|
+
system_prompt?: string | undefined;
|
|
23
20
|
/** Tool calls made by the assistant. */
|
|
24
|
-
tool_calls?: ConversationItem.ToolCalls.Item[];
|
|
21
|
+
tool_calls?: ConversationItem.ToolCalls.Item[] | undefined;
|
|
25
22
|
}
|
|
26
23
|
export declare namespace ConversationItem {
|
|
27
|
-
/**
|
|
28
|
-
* Who spoke in this turn.
|
|
29
|
-
*/
|
|
30
|
-
type Role = "user" | "assistant";
|
|
24
|
+
/** Who spoke in this turn. */
|
|
31
25
|
const Role: {
|
|
32
26
|
readonly User: "user";
|
|
33
27
|
readonly Assistant: "assistant";
|
|
34
28
|
};
|
|
29
|
+
type Role = (typeof Role)[keyof typeof Role];
|
|
35
30
|
type ToolCalls = ToolCalls.Item[];
|
|
36
31
|
namespace ToolCalls {
|
|
37
32
|
interface Item {
|
|
@@ -39,21 +34,21 @@ export declare namespace ConversationItem {
|
|
|
39
34
|
id: string;
|
|
40
35
|
tool: Item.Tool;
|
|
41
36
|
/** HTTP method for webhook tool calls. */
|
|
42
|
-
endpoint_method?: string | null;
|
|
37
|
+
endpoint_method?: (string | null) | undefined;
|
|
43
38
|
/** URL for webhook tool calls. */
|
|
44
|
-
endpoint_url?: string | null;
|
|
39
|
+
endpoint_url?: (string | null) | undefined;
|
|
45
40
|
/** Headers for webhook tool calls. */
|
|
46
|
-
endpoint_headers?: Record<string, string | null> | null;
|
|
41
|
+
endpoint_headers?: (Record<string, string | null> | null) | undefined;
|
|
47
42
|
/** Timeout in milliseconds for webhook tool calls. */
|
|
48
|
-
endpoint_timeout_ms?: number | null;
|
|
43
|
+
endpoint_timeout_ms?: (number | null) | undefined;
|
|
49
44
|
/** When the webhook endpoint was called (null on error). */
|
|
50
|
-
endpoint_called_at?: string | null;
|
|
45
|
+
endpoint_called_at?: (string | null) | undefined;
|
|
51
46
|
/** Query parameters for webhook tool calls (null on error or when no params). */
|
|
52
|
-
query_params?: Record<string, unknown> | null;
|
|
47
|
+
query_params?: (Record<string, unknown> | null) | undefined;
|
|
53
48
|
/** HTTP response status code for webhook tool calls (null on error). */
|
|
54
|
-
response_status_code?: number | null;
|
|
49
|
+
response_status_code?: (number | null) | undefined;
|
|
55
50
|
/** Timeout in milliseconds for websocket tool calls. */
|
|
56
|
-
tool_call_output_timeout_ms?: number | null;
|
|
51
|
+
tool_call_output_timeout_ms?: (number | null) | undefined;
|
|
57
52
|
/** The request body sent to the tool. Can be any JSON-serializable value. */
|
|
58
53
|
request_body: Item.RequestBody | null;
|
|
59
54
|
/** The response body received from the tool. */
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.ConversationItem = void 0;
|
|
7
5
|
var ConversationItem;
|
|
8
6
|
(function (ConversationItem) {
|
|
7
|
+
/** Who spoke in this turn. */
|
|
9
8
|
ConversationItem.Role = {
|
|
10
9
|
User: "user",
|
|
11
10
|
Assistant: "assistant",
|
|
@@ -1,96 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Phonic from "../index.js";
|
|
1
|
+
import type * as Phonic from "../index.js";
|
|
5
2
|
export interface CreateAgentRequest {
|
|
6
3
|
/** The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
|
|
7
4
|
name: string;
|
|
8
5
|
/** When set to `null`, the agent will not be associated with a phone number. When set to `"assign-automatically"`, the agent will be assigned a random phone number. When set to `"custom"`, you must provide `custom_phone_numbers`. */
|
|
9
|
-
phone_number?: CreateAgentRequest.PhoneNumber | null;
|
|
6
|
+
phone_number?: (CreateAgentRequest.PhoneNumber | null) | undefined;
|
|
10
7
|
/** The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead. */
|
|
11
|
-
custom_phone_number?: string | null;
|
|
8
|
+
custom_phone_number?: (string | null) | undefined;
|
|
12
9
|
/** Array of custom phone numbers in E.164 format (e.g., ["+1234567890", "+0987654321"]). The agent will be able to receive phone calls on any of these numbers. Required when `phone_number` is set to `"custom"`. All phone numbers must be unique. */
|
|
13
|
-
custom_phone_numbers?: string[];
|
|
10
|
+
custom_phone_numbers?: string[] | undefined;
|
|
14
11
|
/** The timezone of the agent. Used to format system variables like `{{system_time}}`. */
|
|
15
|
-
timezone?: string;
|
|
12
|
+
timezone?: string | undefined;
|
|
16
13
|
/** The voice ID to use. */
|
|
17
|
-
voice_id?: string;
|
|
14
|
+
voice_id?: string | undefined;
|
|
18
15
|
/** The audio format of the agent. */
|
|
19
|
-
audio_format?: CreateAgentRequest.AudioFormat;
|
|
16
|
+
audio_format?: CreateAgentRequest.AudioFormat | undefined;
|
|
20
17
|
/** The audio speed of the agent. */
|
|
21
|
-
audio_speed?: number;
|
|
18
|
+
audio_speed?: number | undefined;
|
|
22
19
|
/** The background noise level of the agent. */
|
|
23
|
-
background_noise_level?: number;
|
|
20
|
+
background_noise_level?: number | undefined;
|
|
24
21
|
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
25
|
-
background_noise?: CreateAgentRequest.BackgroundNoise | null;
|
|
22
|
+
background_noise?: (CreateAgentRequest.BackgroundNoise | null) | undefined;
|
|
26
23
|
/** When `true`, the welcome message will be automatically generated and the `welcome_message` field will be ignored. */
|
|
27
|
-
generate_welcome_message?: boolean;
|
|
24
|
+
generate_welcome_message?: boolean | undefined;
|
|
28
25
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. Ignored when `generate_welcome_message` is `true`. */
|
|
29
|
-
welcome_message?: string;
|
|
26
|
+
welcome_message?: string | undefined;
|
|
30
27
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
31
|
-
system_prompt?: string;
|
|
28
|
+
system_prompt?: string | undefined;
|
|
32
29
|
/** Variables that can be used in the welcome message and the system prompt. */
|
|
33
|
-
template_variables?: Record<string, CreateAgentRequest.TemplateVariables.Value
|
|
30
|
+
template_variables?: Record<string, CreateAgentRequest.TemplateVariables.Value> | undefined;
|
|
34
31
|
/** Array of built-in or custom tool names to use. */
|
|
35
|
-
tools?: CreateAgentRequest.Tools.Item[];
|
|
32
|
+
tools?: CreateAgentRequest.Tools.Item[] | undefined;
|
|
36
33
|
/** Array of task objects with `name` and `description` fields. */
|
|
37
|
-
tasks?: Phonic.Task[];
|
|
34
|
+
tasks?: Phonic.Task[] | undefined;
|
|
38
35
|
/** Whether to have the no-input poke text be generated by AI. */
|
|
39
|
-
generate_no_input_poke_text?: boolean;
|
|
36
|
+
generate_no_input_poke_text?: boolean | undefined;
|
|
40
37
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
41
|
-
no_input_poke_sec?: number | null;
|
|
38
|
+
no_input_poke_sec?: (number | null) | undefined;
|
|
42
39
|
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
43
|
-
no_input_poke_text?: string;
|
|
40
|
+
no_input_poke_text?: string | undefined;
|
|
44
41
|
/** Seconds of silence before ending the conversation. */
|
|
45
|
-
no_input_end_conversation_sec?: number;
|
|
42
|
+
no_input_end_conversation_sec?: number | undefined;
|
|
46
43
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize */
|
|
47
|
-
languages?: Phonic.LanguageCode[];
|
|
44
|
+
languages?: Phonic.LanguageCode[] | undefined;
|
|
48
45
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
49
|
-
boosted_keywords?: string[];
|
|
46
|
+
boosted_keywords?: string[] | undefined;
|
|
50
47
|
/** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options. */
|
|
51
|
-
configuration_endpoint?: CreateAgentRequest.ConfigurationEndpoint | null;
|
|
48
|
+
configuration_endpoint?: (CreateAgentRequest.ConfigurationEndpoint | null) | undefined;
|
|
52
49
|
/** Float between 0.0 and 1.0 representing the percentage of inbound calls handled by Agent. Defaults to `1.0`. Requires `phone_number` to be set when less than 1.0. */
|
|
53
|
-
inbound_rollout?: number;
|
|
50
|
+
inbound_rollout?: number | undefined;
|
|
54
51
|
/** E.164 formatted phone number where non-agent calls will be forwarded. Required when `inbound_rollout < 1.0`, must be `null` when `inbound_rollout = 1.0`. Defaults to `null`. */
|
|
55
|
-
inbound_rollout_forward_phone_number?: string | null;
|
|
52
|
+
inbound_rollout_forward_phone_number?: (string | null) | undefined;
|
|
56
53
|
/** Voice activity detection prebuffer duration in milliseconds. */
|
|
57
|
-
vad_prebuffer_duration_ms?: number;
|
|
54
|
+
vad_prebuffer_duration_ms?: number | undefined;
|
|
58
55
|
/** Minimum speech duration for voice activity detection in milliseconds. */
|
|
59
|
-
vad_min_speech_duration_ms?: number;
|
|
56
|
+
vad_min_speech_duration_ms?: number | undefined;
|
|
60
57
|
/** Minimum silence duration for voice activity detection in milliseconds. */
|
|
61
|
-
vad_min_silence_duration_ms?: number;
|
|
58
|
+
vad_min_silence_duration_ms?: number | undefined;
|
|
62
59
|
/** Voice activity detection threshold. */
|
|
63
|
-
vad_threshold?: number;
|
|
60
|
+
vad_threshold?: number | undefined;
|
|
64
61
|
}
|
|
65
62
|
export declare namespace CreateAgentRequest {
|
|
66
|
-
type PhoneNumber = "assign-automatically" | "custom";
|
|
67
63
|
const PhoneNumber: {
|
|
68
64
|
readonly AssignAutomatically: "assign-automatically";
|
|
69
65
|
readonly Custom: "custom";
|
|
70
66
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*/
|
|
74
|
-
type AudioFormat = "pcm_44100" | "pcm_16000" | "pcm_8000" | "mulaw_8000";
|
|
67
|
+
type PhoneNumber = (typeof PhoneNumber)[keyof typeof PhoneNumber];
|
|
68
|
+
/** The audio format of the agent. */
|
|
75
69
|
const AudioFormat: {
|
|
76
70
|
readonly Pcm44100: "pcm_44100";
|
|
77
71
|
readonly Pcm16000: "pcm_16000";
|
|
78
72
|
readonly Pcm8000: "pcm_8000";
|
|
79
73
|
readonly Mulaw8000: "mulaw_8000";
|
|
80
74
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
*/
|
|
84
|
-
type BackgroundNoise = "office" | "call-center" | "coffee-shop";
|
|
75
|
+
type AudioFormat = (typeof AudioFormat)[keyof typeof AudioFormat];
|
|
76
|
+
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
85
77
|
const BackgroundNoise: {
|
|
86
78
|
readonly Office: "office";
|
|
87
79
|
readonly CallCenter: "call-center";
|
|
88
80
|
readonly CoffeeShop: "coffee-shop";
|
|
89
81
|
};
|
|
82
|
+
type BackgroundNoise = (typeof BackgroundNoise)[keyof typeof BackgroundNoise];
|
|
90
83
|
namespace TemplateVariables {
|
|
91
84
|
interface Value {
|
|
92
85
|
default_value: string;
|
|
93
|
-
is_boosted_keyword?: boolean;
|
|
86
|
+
is_boosted_keyword?: boolean | undefined;
|
|
94
87
|
}
|
|
95
88
|
}
|
|
96
89
|
type Tools = Tools.Item[];
|
|
@@ -107,8 +100,8 @@ export declare namespace CreateAgentRequest {
|
|
|
107
100
|
/** URL to call */
|
|
108
101
|
url: string;
|
|
109
102
|
/** Object of key-value pairs. */
|
|
110
|
-
headers?: Record<string, string
|
|
103
|
+
headers?: Record<string, string> | undefined;
|
|
111
104
|
/** Timeout in milliseconds for the endpoint call. */
|
|
112
|
-
timeout_ms?: number;
|
|
105
|
+
timeout_ms?: number | undefined;
|
|
113
106
|
}
|
|
114
107
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.CreateAgentRequest = void 0;
|
|
7
5
|
var CreateAgentRequest;
|
|
@@ -10,12 +8,14 @@ var CreateAgentRequest;
|
|
|
10
8
|
AssignAutomatically: "assign-automatically",
|
|
11
9
|
Custom: "custom",
|
|
12
10
|
};
|
|
11
|
+
/** The audio format of the agent. */
|
|
13
12
|
CreateAgentRequest.AudioFormat = {
|
|
14
13
|
Pcm44100: "pcm_44100",
|
|
15
14
|
Pcm16000: "pcm_16000",
|
|
16
15
|
Pcm8000: "pcm_8000",
|
|
17
16
|
Mulaw8000: "mulaw_8000",
|
|
18
17
|
};
|
|
18
|
+
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
19
19
|
CreateAgentRequest.BackgroundNoise = {
|
|
20
20
|
Office: "office",
|
|
21
21
|
CallCenter: "call-center",
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
export interface ErrorPayload {
|
|
5
2
|
type: "error";
|
|
6
3
|
error: ErrorPayload.Error_;
|
|
7
4
|
/** Parameter-specific validation errors */
|
|
8
|
-
param_errors?: Record<string, string
|
|
5
|
+
param_errors?: Record<string, string> | undefined;
|
|
9
6
|
}
|
|
10
7
|
export declare namespace ErrorPayload {
|
|
11
8
|
interface Error_ {
|
|
12
9
|
/** Error message */
|
|
13
10
|
message: string;
|
|
14
11
|
/** Error code */
|
|
15
|
-
code?: string;
|
|
12
|
+
code?: string | undefined;
|
|
16
13
|
}
|
|
17
14
|
}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
export interface ExtractionField {
|
|
5
2
|
/** The field name. */
|
|
6
3
|
name: string;
|
|
7
4
|
/** The field type. */
|
|
8
5
|
type: ExtractionField.Type;
|
|
9
6
|
/** Description of the field. */
|
|
10
|
-
description?: string | null;
|
|
7
|
+
description?: (string | null) | undefined;
|
|
11
8
|
}
|
|
12
9
|
export declare namespace ExtractionField {
|
|
13
|
-
/**
|
|
14
|
-
* The field type.
|
|
15
|
-
*/
|
|
16
|
-
type Type = "string" | "int" | "float" | "bool";
|
|
10
|
+
/** The field type. */
|
|
17
11
|
const Type: {
|
|
18
12
|
readonly String: "string";
|
|
19
13
|
readonly Int: "int";
|
|
20
14
|
readonly Float: "float";
|
|
21
15
|
readonly Bool: "bool";
|
|
22
16
|
};
|
|
17
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
23
18
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.ExtractionField = void 0;
|
|
7
5
|
var ExtractionField;
|
|
8
6
|
(function (ExtractionField) {
|
|
7
|
+
/** The field type. */
|
|
9
8
|
ExtractionField.Type = {
|
|
10
9
|
String: "string",
|
|
11
10
|
Int: "int",
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
export interface GenerateReplyPayload {
|
|
5
2
|
type: "generate_reply";
|
|
6
3
|
/** Optional system message to guide the assistant's reply */
|
|
7
|
-
system_message?: string | null;
|
|
4
|
+
system_message?: (string | null) | undefined;
|
|
8
5
|
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* ISO 639-1 language codes supported by the agent
|
|
6
|
-
*/
|
|
7
|
-
export type LanguageCode = "ar" | "zh" | "cs" | "da" | "nl" | "en" | "fr" | "de" | "id" | "it" | "ja" | "ko" | "pl" | "pt" | "ru" | "es" | "sv" | "tr" | "vi";
|
|
1
|
+
/** ISO 639-1 language codes supported by the agent */
|
|
8
2
|
export declare const LanguageCode: {
|
|
9
3
|
readonly Ar: "ar";
|
|
10
4
|
readonly Zh: "zh";
|
|
@@ -26,3 +20,4 @@ export declare const LanguageCode: {
|
|
|
26
20
|
readonly Tr: "tr";
|
|
27
21
|
readonly Vi: "vi";
|
|
28
22
|
};
|
|
23
|
+
export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
5
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
4
|
exports.LanguageCode = void 0;
|
|
5
|
+
/** ISO 639-1 language codes supported by the agent */
|
|
7
6
|
exports.LanguageCode = {
|
|
8
7
|
Ar: "ar",
|
|
9
8
|
Zh: "zh",
|
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Phonic from "../index.js";
|
|
1
|
+
import type * as Phonic from "../index.js";
|
|
5
2
|
/**
|
|
6
3
|
* When an `agent` is provided, these `config` options override the agent settings.
|
|
7
4
|
*/
|
|
8
5
|
export interface OutboundCallConfig {
|
|
9
6
|
/** The name of the agent to use for the call. */
|
|
10
|
-
agent?: string;
|
|
7
|
+
agent?: string | undefined;
|
|
11
8
|
/** The name of the project to use for the call. */
|
|
12
|
-
project?: string;
|
|
9
|
+
project?: string | undefined;
|
|
13
10
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
|
|
14
|
-
welcome_message?: string | null;
|
|
11
|
+
welcome_message?: (string | null) | undefined;
|
|
15
12
|
/** Instructions for the conversation. Can contain template variables like `{{subject}}`. */
|
|
16
|
-
system_prompt?: string;
|
|
13
|
+
system_prompt?: string | undefined;
|
|
17
14
|
/** Variables that can be used in the welcome message and the system prompt. */
|
|
18
|
-
template_variables?: Record<string, string
|
|
15
|
+
template_variables?: Record<string, string> | undefined;
|
|
19
16
|
/** The voice ID to use for the agent. */
|
|
20
|
-
voice_id?: string;
|
|
17
|
+
voice_id?: string | undefined;
|
|
21
18
|
/** Whether to have the no-input poke text be generated by AI. */
|
|
22
|
-
generate_no_input_poke_text?: boolean;
|
|
19
|
+
generate_no_input_poke_text?: boolean | undefined;
|
|
23
20
|
/** Number of seconds of silence before sending a poke message. `null` disables the poke message. */
|
|
24
|
-
no_input_poke_sec?: number | null;
|
|
21
|
+
no_input_poke_sec?: (number | null) | undefined;
|
|
25
22
|
/** The message to send after the specified silence. Ignored when generate_no_input_poke_text is true. */
|
|
26
|
-
no_input_poke_text?: string;
|
|
23
|
+
no_input_poke_text?: string | undefined;
|
|
27
24
|
/** Seconds of silence before ending the conversation. */
|
|
28
|
-
no_input_end_conversation_sec?: number;
|
|
25
|
+
no_input_end_conversation_sec?: number | undefined;
|
|
29
26
|
/** Array of ISO 639-1 language codes that the agent should be able to recognize */
|
|
30
|
-
languages?: Phonic.LanguageCode[];
|
|
27
|
+
languages?: Phonic.LanguageCode[] | undefined;
|
|
31
28
|
/** These words, or short phrases, will be more accurately recognized by the agent. */
|
|
32
|
-
boosted_keywords?: string[];
|
|
29
|
+
boosted_keywords?: string[] | undefined;
|
|
33
30
|
/** Array of built-in or custom tool names to use. */
|
|
34
|
-
tools?: OutboundCallConfig.Tools.Item[];
|
|
31
|
+
tools?: OutboundCallConfig.Tools.Item[] | undefined;
|
|
35
32
|
}
|
|
36
33
|
export declare namespace OutboundCallConfig {
|
|
37
34
|
type Tools = Tools.Item[];
|