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
package/README.md
CHANGED
|
@@ -13,13 +13,15 @@ The Phonic TypeScript library provides convenient access to the Phonic APIs from
|
|
|
13
13
|
- [Request and Response Types](#request-and-response-types)
|
|
14
14
|
- [Exception Handling](#exception-handling)
|
|
15
15
|
- [Advanced](#advanced)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
- [Subpackage Exports](#subpackage-exports)
|
|
17
|
+
- [Additional Headers](#additional-headers)
|
|
18
|
+
- [Additional Query String Parameters](#additional-query-string-parameters)
|
|
19
|
+
- [Retries](#retries)
|
|
20
|
+
- [Timeouts](#timeouts)
|
|
21
|
+
- [Aborting Requests](#aborting-requests)
|
|
22
|
+
- [Access Raw Response Data](#access-raw-response-data)
|
|
23
|
+
- [Logging](#logging)
|
|
24
|
+
- [Runtime Compatibility](#runtime-compatibility)
|
|
23
25
|
- [Contributing](#contributing)
|
|
24
26
|
|
|
25
27
|
## Installation
|
|
@@ -52,26 +54,28 @@ await client.agents.create({
|
|
|
52
54
|
welcome_message: "Hi {{customer_name}}. How can I help you today?",
|
|
53
55
|
system_prompt: "You are an expert in {{subject}}. Be friendly, helpful and concise.",
|
|
54
56
|
template_variables: {
|
|
55
|
-
customer_name: {
|
|
56
|
-
default_value: "David"
|
|
57
|
-
},
|
|
58
|
-
subject: {
|
|
59
|
-
default_value: "Chess",
|
|
57
|
+
"customer_name": {
|
|
58
|
+
default_value: "David"
|
|
60
59
|
},
|
|
60
|
+
"subject": {
|
|
61
|
+
default_value: "Chess"
|
|
62
|
+
}
|
|
61
63
|
},
|
|
62
64
|
tools: ["keypad_input"],
|
|
63
65
|
generate_no_input_poke_text: false,
|
|
64
66
|
no_input_poke_sec: 30,
|
|
65
67
|
no_input_poke_text: "Are you still there?",
|
|
66
|
-
|
|
68
|
+
default_language: "en",
|
|
69
|
+
additional_languages: ["es"],
|
|
70
|
+
multilingual_mode: "request",
|
|
67
71
|
boosted_keywords: ["Load ID", "dispatch"],
|
|
68
72
|
configuration_endpoint: {
|
|
69
73
|
url: "https://api.example.com/config",
|
|
70
74
|
headers: {
|
|
71
|
-
Authorization: "Bearer token123"
|
|
75
|
+
"Authorization": "Bearer token123"
|
|
72
76
|
},
|
|
73
|
-
timeout_ms: 7000
|
|
74
|
-
}
|
|
77
|
+
timeout_ms: 7000
|
|
78
|
+
}
|
|
75
79
|
});
|
|
76
80
|
```
|
|
77
81
|
|
|
@@ -110,11 +114,30 @@ try {
|
|
|
110
114
|
|
|
111
115
|
## Advanced
|
|
112
116
|
|
|
117
|
+
### Subpackage Exports
|
|
118
|
+
|
|
119
|
+
This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
import { AgentsClient } from 'phonic/agents';
|
|
123
|
+
|
|
124
|
+
const client = new AgentsClient({...});
|
|
125
|
+
```
|
|
126
|
+
|
|
113
127
|
### Additional Headers
|
|
114
128
|
|
|
115
129
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
116
130
|
|
|
117
131
|
```typescript
|
|
132
|
+
import { PhonicClient } from "phonic";
|
|
133
|
+
|
|
134
|
+
const client = new PhonicClient({
|
|
135
|
+
...
|
|
136
|
+
headers: {
|
|
137
|
+
'X-Custom-Header': 'custom value'
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
118
141
|
const response = await client.agents.create(..., {
|
|
119
142
|
headers: {
|
|
120
143
|
'X-Custom-Header': 'custom value'
|
|
@@ -188,10 +211,76 @@ console.log(data);
|
|
|
188
211
|
console.log(rawResponse.headers['X-My-Header']);
|
|
189
212
|
```
|
|
190
213
|
|
|
214
|
+
### Logging
|
|
215
|
+
|
|
216
|
+
The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
import { PhonicClient, logging } from "phonic";
|
|
220
|
+
|
|
221
|
+
const client = new PhonicClient({
|
|
222
|
+
...
|
|
223
|
+
logging: {
|
|
224
|
+
level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
|
|
225
|
+
logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger
|
|
226
|
+
silent: false, // defaults to true, set to false to enable logging
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
The `logging` object can have the following properties:
|
|
231
|
+
- `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
|
|
232
|
+
- `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.
|
|
233
|
+
- `silent`: Whether to silence the logger. Defaults to `true`.
|
|
234
|
+
|
|
235
|
+
The `level` property can be one of the following values:
|
|
236
|
+
- `logging.LogLevel.Debug`
|
|
237
|
+
- `logging.LogLevel.Info`
|
|
238
|
+
- `logging.LogLevel.Warn`
|
|
239
|
+
- `logging.LogLevel.Error`
|
|
240
|
+
|
|
241
|
+
To provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.
|
|
242
|
+
|
|
243
|
+
<details>
|
|
244
|
+
<summary>Custom logger examples</summary>
|
|
245
|
+
|
|
246
|
+
Here's an example using the popular `winston` logging library.
|
|
247
|
+
```ts
|
|
248
|
+
import winston from 'winston';
|
|
249
|
+
|
|
250
|
+
const winstonLogger = winston.createLogger({...});
|
|
251
|
+
|
|
252
|
+
const logger: logging.ILogger = {
|
|
253
|
+
debug: (msg, ...args) => winstonLogger.debug(msg, ...args),
|
|
254
|
+
info: (msg, ...args) => winstonLogger.info(msg, ...args),
|
|
255
|
+
warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
|
|
256
|
+
error: (msg, ...args) => winstonLogger.error(msg, ...args),
|
|
257
|
+
};
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Here's an example using the popular `pino` logging library.
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
import pino from 'pino';
|
|
264
|
+
|
|
265
|
+
const pinoLogger = pino({...});
|
|
266
|
+
|
|
267
|
+
const logger: logging.ILogger = {
|
|
268
|
+
debug: (msg, ...args) => pinoLogger.debug(args, msg),
|
|
269
|
+
info: (msg, ...args) => pinoLogger.info(args, msg),
|
|
270
|
+
warn: (msg, ...args) => pinoLogger.warn(args, msg),
|
|
271
|
+
error: (msg, ...args) => pinoLogger.error(args, msg),
|
|
272
|
+
};
|
|
273
|
+
```
|
|
274
|
+
</details>
|
|
275
|
+
|
|
276
|
+
|
|
191
277
|
### Runtime Compatibility
|
|
192
278
|
|
|
279
|
+
|
|
193
280
|
The SDK works in the following runtimes:
|
|
194
281
|
|
|
282
|
+
|
|
283
|
+
|
|
195
284
|
- Node.js 18+
|
|
196
285
|
- Vercel
|
|
197
286
|
- Cloudflare Workers
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BearerAuthProvider } from "./auth/BearerAuthProvider.js";
|
|
2
|
+
import * as core from "./core/index.js";
|
|
3
|
+
import type * as environments from "./environments.js";
|
|
4
|
+
export type BaseClientOptions = {
|
|
5
|
+
environment?: core.Supplier<environments.PhonicEnvironment | environments.PhonicEnvironmentUrls>;
|
|
6
|
+
/** Specify a custom URL to connect the client to. */
|
|
7
|
+
baseUrl?: core.Supplier<string>;
|
|
8
|
+
/** Additional headers to include in requests. */
|
|
9
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
10
|
+
/** The default maximum time to wait for a response in seconds. */
|
|
11
|
+
timeoutInSeconds?: number;
|
|
12
|
+
/** The default number of times to retry the request. Defaults to 2. */
|
|
13
|
+
maxRetries?: number;
|
|
14
|
+
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
15
|
+
fetch?: typeof fetch;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
/** Configure logging for the client. */
|
|
18
|
+
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
19
|
+
} & BearerAuthProvider.AuthOptions;
|
|
20
|
+
export interface BaseRequestOptions {
|
|
21
|
+
/** The maximum time to wait for a response in seconds. */
|
|
22
|
+
timeoutInSeconds?: number;
|
|
23
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
24
|
+
maxRetries?: number;
|
|
25
|
+
/** A hook to abort the request. */
|
|
26
|
+
abortSignal?: AbortSignal;
|
|
27
|
+
/** Additional query string parameters to include in the request. */
|
|
28
|
+
queryParams?: Record<string, unknown>;
|
|
29
|
+
/** Additional headers to include in the request. */
|
|
30
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
31
|
+
}
|
|
32
|
+
export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
|
|
33
|
+
logging: core.logging.Logger;
|
|
34
|
+
authProvider?: core.AuthProvider;
|
|
35
|
+
};
|
|
36
|
+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
37
|
+
authProvider: core.AuthProvider;
|
|
38
|
+
};
|
|
39
|
+
export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
40
|
+
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.normalizeClientOptions = normalizeClientOptions;
|
|
38
|
+
exports.normalizeClientOptionsWithAuth = normalizeClientOptionsWithAuth;
|
|
39
|
+
const BearerAuthProvider_js_1 = require("./auth/BearerAuthProvider.js");
|
|
40
|
+
const headers_js_1 = require("./core/headers.js");
|
|
41
|
+
const core = __importStar(require("./core/index.js"));
|
|
42
|
+
function normalizeClientOptions(options) {
|
|
43
|
+
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
|
+
"X-Fern-Language": "JavaScript",
|
|
45
|
+
"X-Fern-SDK-Name": "phonic",
|
|
46
|
+
"X-Fern-SDK-Version": "0.31.3",
|
|
47
|
+
"User-Agent": "phonic/0.31.3",
|
|
48
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
|
+
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
51
|
+
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
52
|
+
}
|
|
53
|
+
function normalizeClientOptionsWithAuth(options) {
|
|
54
|
+
var _a;
|
|
55
|
+
const normalized = normalizeClientOptions(options);
|
|
56
|
+
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
|
|
57
|
+
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = new BearerAuthProvider_js_1.BearerAuthProvider(normalizedWithNoOpAuthProvider));
|
|
58
|
+
return normalized;
|
|
59
|
+
}
|
|
60
|
+
function withNoOpAuthProvider(options) {
|
|
61
|
+
return Object.assign(Object.assign({}, options), { authProvider: new core.NoOpAuthProvider() });
|
|
62
|
+
}
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,53 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Conversations } from "./api/resources/conversations/client/Client.js";
|
|
11
|
-
import { Auth } from "./api/resources/auth/client/Client.js";
|
|
12
|
-
import { Projects } from "./api/resources/projects/client/Client.js";
|
|
1
|
+
import { AgentsClient } from "./api/resources/agents/client/Client.js";
|
|
2
|
+
import { AuthClient } from "./api/resources/auth/client/Client.js";
|
|
3
|
+
import { ConversationsClient } from "./api/resources/conversations/client/Client.js";
|
|
4
|
+
import { ExtractionSchemasClient } from "./api/resources/extractionSchemas/client/Client.js";
|
|
5
|
+
import { ProjectsClient } from "./api/resources/projects/client/Client.js";
|
|
6
|
+
import { ToolsClient } from "./api/resources/tools/client/Client.js";
|
|
7
|
+
import { VoicesClient } from "./api/resources/voices/client/Client.js";
|
|
8
|
+
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
9
|
+
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
13
10
|
export declare namespace PhonicClient {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/** Specify a custom URL to connect the client to. */
|
|
17
|
-
baseUrl?: core.Supplier<string>;
|
|
18
|
-
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
19
|
-
/** Additional headers to include in requests. */
|
|
20
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
21
|
-
fetcher?: core.FetchFunction;
|
|
22
|
-
}
|
|
23
|
-
interface RequestOptions {
|
|
24
|
-
/** The maximum time to wait for a response in seconds. */
|
|
25
|
-
timeoutInSeconds?: number;
|
|
26
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
27
|
-
maxRetries?: number;
|
|
28
|
-
/** A hook to abort the request. */
|
|
29
|
-
abortSignal?: AbortSignal;
|
|
30
|
-
/** Additional query string parameters to include in the request. */
|
|
31
|
-
queryParams?: Record<string, unknown>;
|
|
32
|
-
/** Additional headers to include in the request. */
|
|
33
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
11
|
+
type Options = BaseClientOptions;
|
|
12
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
34
13
|
}
|
|
35
14
|
}
|
|
36
15
|
export declare class PhonicClient {
|
|
37
|
-
protected readonly _options: PhonicClient.Options
|
|
38
|
-
protected _agents:
|
|
39
|
-
protected _tools:
|
|
40
|
-
protected _extractionSchemas:
|
|
41
|
-
protected _voices:
|
|
42
|
-
protected _conversations:
|
|
43
|
-
protected _auth:
|
|
44
|
-
protected _projects:
|
|
45
|
-
constructor(
|
|
46
|
-
get agents():
|
|
47
|
-
get tools():
|
|
48
|
-
get extractionSchemas():
|
|
49
|
-
get voices():
|
|
50
|
-
get conversations():
|
|
51
|
-
get auth():
|
|
52
|
-
get projects():
|
|
16
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PhonicClient.Options>;
|
|
17
|
+
protected _agents: AgentsClient | undefined;
|
|
18
|
+
protected _tools: ToolsClient | undefined;
|
|
19
|
+
protected _extractionSchemas: ExtractionSchemasClient | undefined;
|
|
20
|
+
protected _voices: VoicesClient | undefined;
|
|
21
|
+
protected _conversations: ConversationsClient | undefined;
|
|
22
|
+
protected _auth: AuthClient | undefined;
|
|
23
|
+
protected _projects: ProjectsClient | undefined;
|
|
24
|
+
constructor(options?: PhonicClient.Options);
|
|
25
|
+
get agents(): AgentsClient;
|
|
26
|
+
get tools(): ToolsClient;
|
|
27
|
+
get extractionSchemas(): ExtractionSchemasClient;
|
|
28
|
+
get voices(): VoicesClient;
|
|
29
|
+
get conversations(): ConversationsClient;
|
|
30
|
+
get auth(): AuthClient;
|
|
31
|
+
get projects(): ProjectsClient;
|
|
53
32
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -1,89 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
38
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
4
|
exports.PhonicClient = void 0;
|
|
40
|
-
const core = __importStar(require("./core/index.js"));
|
|
41
|
-
const headers_js_1 = require("./core/headers.js");
|
|
42
5
|
const Client_js_1 = require("./api/resources/agents/client/Client.js");
|
|
43
|
-
const Client_js_2 = require("./api/resources/
|
|
44
|
-
const Client_js_3 = require("./api/resources/
|
|
45
|
-
const Client_js_4 = require("./api/resources/
|
|
46
|
-
const Client_js_5 = require("./api/resources/
|
|
47
|
-
const Client_js_6 = require("./api/resources/
|
|
48
|
-
const Client_js_7 = require("./api/resources/
|
|
6
|
+
const Client_js_2 = require("./api/resources/auth/client/Client.js");
|
|
7
|
+
const Client_js_3 = require("./api/resources/conversations/client/Client.js");
|
|
8
|
+
const Client_js_4 = require("./api/resources/extractionSchemas/client/Client.js");
|
|
9
|
+
const Client_js_5 = require("./api/resources/projects/client/Client.js");
|
|
10
|
+
const Client_js_6 = require("./api/resources/tools/client/Client.js");
|
|
11
|
+
const Client_js_7 = require("./api/resources/voices/client/Client.js");
|
|
12
|
+
const BaseClient_js_1 = require("./BaseClient.js");
|
|
49
13
|
class PhonicClient {
|
|
50
|
-
constructor(
|
|
51
|
-
this._options =
|
|
52
|
-
"X-Fern-Language": "JavaScript",
|
|
53
|
-
"X-Fern-SDK-Name": "phonic",
|
|
54
|
-
"X-Fern-SDK-Version": "0.31.2",
|
|
55
|
-
"User-Agent": "phonic/0.31.2",
|
|
56
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
57
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
58
|
-
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
14
|
+
constructor(options = {}) {
|
|
15
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
59
16
|
}
|
|
60
17
|
get agents() {
|
|
61
18
|
var _a;
|
|
62
|
-
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_js_1.
|
|
19
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_js_1.AgentsClient(this._options)));
|
|
63
20
|
}
|
|
64
21
|
get tools() {
|
|
65
22
|
var _a;
|
|
66
|
-
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new
|
|
23
|
+
return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_6.ToolsClient(this._options)));
|
|
67
24
|
}
|
|
68
25
|
get extractionSchemas() {
|
|
69
26
|
var _a;
|
|
70
|
-
return ((_a = this._extractionSchemas) !== null && _a !== void 0 ? _a : (this._extractionSchemas = new
|
|
27
|
+
return ((_a = this._extractionSchemas) !== null && _a !== void 0 ? _a : (this._extractionSchemas = new Client_js_4.ExtractionSchemasClient(this._options)));
|
|
71
28
|
}
|
|
72
29
|
get voices() {
|
|
73
30
|
var _a;
|
|
74
|
-
return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new
|
|
31
|
+
return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_js_7.VoicesClient(this._options)));
|
|
75
32
|
}
|
|
76
33
|
get conversations() {
|
|
77
34
|
var _a;
|
|
78
|
-
return ((_a = this._conversations) !== null && _a !== void 0 ? _a : (this._conversations = new
|
|
35
|
+
return ((_a = this._conversations) !== null && _a !== void 0 ? _a : (this._conversations = new Client_js_3.ConversationsClient(this._options)));
|
|
79
36
|
}
|
|
80
37
|
get auth() {
|
|
81
38
|
var _a;
|
|
82
|
-
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new
|
|
39
|
+
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_2.AuthClient(this._options)));
|
|
83
40
|
}
|
|
84
41
|
get projects() {
|
|
85
42
|
var _a;
|
|
86
|
-
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new
|
|
43
|
+
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_5.ProjectsClient(this._options)));
|
|
87
44
|
}
|
|
88
45
|
}
|
|
89
46
|
exports.PhonicClient = PhonicClient;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class BadRequestError extends errors.PhonicError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|
|
@@ -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
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -46,7 +44,11 @@ class BadRequestError extends errors.PhonicError {
|
|
|
46
44
|
body: body,
|
|
47
45
|
rawResponse: rawResponse,
|
|
48
46
|
});
|
|
49
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.BadRequestError = BadRequestError;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class ConflictError extends errors.PhonicError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|
|
@@ -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
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -46,7 +44,11 @@ class ConflictError extends errors.PhonicError {
|
|
|
46
44
|
body: body,
|
|
47
45
|
rawResponse: rawResponse,
|
|
48
46
|
});
|
|
49
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.ConflictError = ConflictError;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class ForbiddenError extends errors.PhonicError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|
|
@@ -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
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -46,7 +44,11 @@ class ForbiddenError extends errors.PhonicError {
|
|
|
46
44
|
body: body,
|
|
47
45
|
rawResponse: rawResponse,
|
|
48
46
|
});
|
|
49
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.ForbiddenError = ForbiddenError;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as Phonic from "../index.js";
|
|
6
|
-
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as Phonic from "../index.js";
|
|
7
4
|
export declare class GatewayTimeoutError extends errors.PhonicError {
|
|
8
5
|
constructor(body: Phonic.Error_, rawResponse?: core.RawResponse);
|
|
9
6
|
}
|
|
@@ -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
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -46,7 +44,11 @@ class GatewayTimeoutError extends errors.PhonicError {
|
|
|
46
44
|
body: body,
|
|
47
45
|
rawResponse: rawResponse,
|
|
48
46
|
});
|
|
49
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.GatewayTimeoutError = GatewayTimeoutError;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as Phonic from "../index.js";
|
|
6
|
-
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as Phonic from "../index.js";
|
|
7
4
|
export declare class InternalServerError extends errors.PhonicError {
|
|
8
5
|
constructor(body: Phonic.BasicError, rawResponse?: core.RawResponse);
|
|
9
6
|
}
|
|
@@ -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
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
4
|
if (k2 === undefined) k2 = k;
|
|
7
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -46,7 +44,11 @@ class InternalServerError extends errors.PhonicError {
|
|
|
46
44
|
body: body,
|
|
47
45
|
rawResponse: rawResponse,
|
|
48
46
|
});
|
|
49
|
-
Object.setPrototypeOf(this,
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
exports.InternalServerError = InternalServerError;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
import type * as core from "../../core/index.js";
|
|
4
2
|
import * as errors from "../../errors/index.js";
|
|
5
|
-
import * as core from "../../core/index.js";
|
|
6
3
|
export declare class NotFoundError extends errors.PhonicError {
|
|
7
4
|
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
8
5
|
}
|