phonic 0.31.2 → 0.31.3
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 +102 -15
- 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 +309 -325
package/dist/esm/api/resources/agents/client/requests/AgentsAddCustomPhoneNumberRequest.d.mts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
/**
|
|
5
2
|
* @example
|
|
6
3
|
* {
|
|
@@ -37,8 +34,8 @@ export declare namespace AgentsAddCustomPhoneNumberRequest {
|
|
|
37
34
|
/** URL to call */
|
|
38
35
|
url: string;
|
|
39
36
|
/** Object of key-value pairs. */
|
|
40
|
-
headers?: Record<string, string
|
|
37
|
+
headers?: Record<string, string> | undefined;
|
|
41
38
|
/** Timeout in milliseconds for the endpoint call. */
|
|
42
|
-
timeout_ms?: number;
|
|
39
|
+
timeout_ms?: number | undefined;
|
|
43
40
|
}
|
|
44
41
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
1
|
/**
|
|
5
2
|
* @example
|
|
6
3
|
* {
|
|
@@ -31,8 +28,8 @@ export declare namespace AgentsUpdatePhoneNumberRequest {
|
|
|
31
28
|
/** URL to call */
|
|
32
29
|
url: string;
|
|
33
30
|
/** Object of key-value pairs. */
|
|
34
|
-
headers?: Record<string, string
|
|
31
|
+
headers?: Record<string, string> | undefined;
|
|
35
32
|
/** Timeout in milliseconds for the endpoint call. */
|
|
36
|
-
timeout_ms?: number;
|
|
33
|
+
timeout_ms?: number | undefined;
|
|
37
34
|
}
|
|
38
35
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Phonic from "../../../../index.mjs";
|
|
1
|
+
import type * as Phonic from "../../../../index.mjs";
|
|
5
2
|
/**
|
|
6
3
|
* @example
|
|
7
4
|
* {
|
|
@@ -101,34 +98,30 @@ export interface UpdateAgentRequest {
|
|
|
101
98
|
vad_threshold?: number;
|
|
102
99
|
}
|
|
103
100
|
export declare namespace UpdateAgentRequest {
|
|
104
|
-
type PhoneNumber = "assign-automatically" | "custom";
|
|
105
101
|
const PhoneNumber: {
|
|
106
102
|
readonly AssignAutomatically: "assign-automatically";
|
|
107
103
|
readonly Custom: "custom";
|
|
108
104
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*/
|
|
112
|
-
type AudioFormat = "pcm_44100" | "pcm_16000" | "pcm_8000" | "mulaw_8000";
|
|
105
|
+
type PhoneNumber = (typeof PhoneNumber)[keyof typeof PhoneNumber];
|
|
106
|
+
/** The audio format of the agent. */
|
|
113
107
|
const AudioFormat: {
|
|
114
108
|
readonly Pcm44100: "pcm_44100";
|
|
115
109
|
readonly Pcm16000: "pcm_16000";
|
|
116
110
|
readonly Pcm8000: "pcm_8000";
|
|
117
111
|
readonly Mulaw8000: "mulaw_8000";
|
|
118
112
|
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*/
|
|
122
|
-
type BackgroundNoise = "office" | "call-center" | "coffee-shop";
|
|
113
|
+
type AudioFormat = (typeof AudioFormat)[keyof typeof AudioFormat];
|
|
114
|
+
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
123
115
|
const BackgroundNoise: {
|
|
124
116
|
readonly Office: "office";
|
|
125
117
|
readonly CallCenter: "call-center";
|
|
126
118
|
readonly CoffeeShop: "coffee-shop";
|
|
127
119
|
};
|
|
120
|
+
type BackgroundNoise = (typeof BackgroundNoise)[keyof typeof BackgroundNoise];
|
|
128
121
|
namespace TemplateVariables {
|
|
129
122
|
interface Value {
|
|
130
123
|
default_value: string;
|
|
131
|
-
is_boosted_keyword?: boolean;
|
|
124
|
+
is_boosted_keyword?: boolean | undefined;
|
|
132
125
|
}
|
|
133
126
|
}
|
|
134
127
|
type Tools = Tools.Item[];
|
|
@@ -145,8 +138,8 @@ export declare namespace UpdateAgentRequest {
|
|
|
145
138
|
/** URL to call */
|
|
146
139
|
url: string;
|
|
147
140
|
/** Object of key-value pairs. */
|
|
148
|
-
headers?: Record<string, string
|
|
141
|
+
headers?: Record<string, string> | undefined;
|
|
149
142
|
/** Timeout in milliseconds for the endpoint call. */
|
|
150
|
-
timeout_ms?: number;
|
|
143
|
+
timeout_ms?: number | undefined;
|
|
151
144
|
}
|
|
152
145
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
4
2
|
export var UpdateAgentRequest;
|
|
5
3
|
(function (UpdateAgentRequest) {
|
|
6
4
|
UpdateAgentRequest.PhoneNumber = {
|
|
7
5
|
AssignAutomatically: "assign-automatically",
|
|
8
6
|
Custom: "custom",
|
|
9
7
|
};
|
|
8
|
+
/** The audio format of the agent. */
|
|
10
9
|
UpdateAgentRequest.AudioFormat = {
|
|
11
10
|
Pcm44100: "pcm_44100",
|
|
12
11
|
Pcm16000: "pcm_16000",
|
|
13
12
|
Pcm8000: "pcm_8000",
|
|
14
13
|
Mulaw8000: "mulaw_8000",
|
|
15
14
|
};
|
|
15
|
+
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
16
16
|
UpdateAgentRequest.BackgroundNoise = {
|
|
17
17
|
Office: "office",
|
|
18
18
|
CallCenter: "call-center",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
1
|
+
export type { AgentsAddCustomPhoneNumberRequest } from "./AgentsAddCustomPhoneNumberRequest.mjs";
|
|
2
|
+
export type { AgentsCreateRequest } from "./AgentsCreateRequest.mjs";
|
|
3
|
+
export type { AgentsDeleteCustomPhoneNumberRequest } from "./AgentsDeleteCustomPhoneNumberRequest.mjs";
|
|
4
|
+
export type { AgentsDeleteRequest } from "./AgentsDeleteRequest.mjs";
|
|
5
|
+
export type { AgentsGetRequest } from "./AgentsGetRequest.mjs";
|
|
6
|
+
export type { AgentsListRequest } from "./AgentsListRequest.mjs";
|
|
7
|
+
export type { AgentsUpdatePhoneNumberRequest } from "./AgentsUpdatePhoneNumberRequest.mjs";
|
|
8
|
+
export { UpdateAgentRequest } from "./UpdateAgentRequest.mjs";
|
|
9
|
+
export type { UpsertAgentRequest } from "./UpsertAgentRequest.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { UpdateAgentRequest } from "./UpdateAgentRequest.mjs";
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Phonic from "../../../index.mjs";
|
|
1
|
+
import type * as Phonic from "../../../index.mjs";
|
|
5
2
|
export interface AgentsUpsertResponse {
|
|
6
3
|
agent: Phonic.Agent;
|
|
7
4
|
/** Whether the agent was inserted. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./AgentsListResponse.mjs";
|
|
2
|
-
export * from "./AgentsCreateResponse.mjs";
|
|
3
|
-
export * from "./AgentsUpsertResponse.mjs";
|
|
4
|
-
export * from "./AgentsGetResponse.mjs";
|
|
5
|
-
export * from "./AgentsDeleteResponse.mjs";
|
|
6
|
-
export * from "./AgentsUpdateResponse.mjs";
|
|
7
1
|
export * from "./AgentsAddCustomPhoneNumberResponse.mjs";
|
|
2
|
+
export * from "./AgentsCreateResponse.mjs";
|
|
8
3
|
export * from "./AgentsDeleteCustomPhoneNumberResponse.mjs";
|
|
4
|
+
export * from "./AgentsDeleteResponse.mjs";
|
|
5
|
+
export * from "./AgentsGetResponse.mjs";
|
|
6
|
+
export * from "./AgentsListResponse.mjs";
|
|
9
7
|
export * from "./AgentsUpdatePhoneNumberResponse.mjs";
|
|
8
|
+
export * from "./AgentsUpdateResponse.mjs";
|
|
9
|
+
export * from "./AgentsUpsertResponse.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from "./AgentsListResponse.mjs";
|
|
2
|
-
export * from "./AgentsCreateResponse.mjs";
|
|
3
|
-
export * from "./AgentsUpsertResponse.mjs";
|
|
4
|
-
export * from "./AgentsGetResponse.mjs";
|
|
5
|
-
export * from "./AgentsDeleteResponse.mjs";
|
|
6
|
-
export * from "./AgentsUpdateResponse.mjs";
|
|
7
1
|
export * from "./AgentsAddCustomPhoneNumberResponse.mjs";
|
|
2
|
+
export * from "./AgentsCreateResponse.mjs";
|
|
8
3
|
export * from "./AgentsDeleteCustomPhoneNumberResponse.mjs";
|
|
4
|
+
export * from "./AgentsDeleteResponse.mjs";
|
|
5
|
+
export * from "./AgentsGetResponse.mjs";
|
|
6
|
+
export * from "./AgentsListResponse.mjs";
|
|
9
7
|
export * from "./AgentsUpdatePhoneNumberResponse.mjs";
|
|
8
|
+
export * from "./AgentsUpdateResponse.mjs";
|
|
9
|
+
export * from "./AgentsUpsertResponse.mjs";
|
|
@@ -1,40 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "../../../../environments.mjs";
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
5
3
|
import * as core from "../../../../core/index.mjs";
|
|
6
4
|
import * as Phonic from "../../../index.mjs";
|
|
7
|
-
export declare namespace
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Specify a custom URL to connect the client to. */
|
|
11
|
-
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
-
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
-
fetcher?: core.FetchFunction;
|
|
16
|
-
}
|
|
17
|
-
interface RequestOptions {
|
|
18
|
-
/** The maximum time to wait for a response in seconds. */
|
|
19
|
-
timeoutInSeconds?: number;
|
|
20
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
-
maxRetries?: number;
|
|
22
|
-
/** A hook to abort the request. */
|
|
23
|
-
abortSignal?: AbortSignal;
|
|
24
|
-
/** Additional query string parameters to include in the request. */
|
|
25
|
-
queryParams?: Record<string, unknown>;
|
|
26
|
-
/** Additional headers to include in the request. */
|
|
27
|
-
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
5
|
+
export declare namespace AuthClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
28
8
|
}
|
|
29
9
|
}
|
|
30
|
-
export declare class
|
|
31
|
-
protected readonly _options:
|
|
32
|
-
constructor(
|
|
10
|
+
export declare class AuthClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AuthClient.Options>;
|
|
12
|
+
constructor(options?: AuthClient.Options);
|
|
33
13
|
/**
|
|
34
14
|
* Creates a short-lived session token that can be used to authenticate WebSocket connections. Session tokens are useful for client-side applications where you don't want to expose your API key.
|
|
35
15
|
*
|
|
36
16
|
* @param {Phonic.CreateSessionTokenRequest} request
|
|
37
|
-
* @param {
|
|
17
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
18
|
*
|
|
39
19
|
* @throws {@link Phonic.BadRequestError}
|
|
40
20
|
* @throws {@link Phonic.UnauthorizedError}
|
|
@@ -46,7 +26,6 @@ export declare class Auth {
|
|
|
46
26
|
* ttl_seconds: 300
|
|
47
27
|
* })
|
|
48
28
|
*/
|
|
49
|
-
createSessionToken(request?: Phonic.CreateSessionTokenRequest, requestOptions?:
|
|
29
|
+
createSessionToken(request?: Phonic.CreateSessionTokenRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<Phonic.AuthCreateSessionTokenResponse>;
|
|
50
30
|
private __createSessionToken;
|
|
51
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
52
31
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
4
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -10,20 +8,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
9
|
});
|
|
12
10
|
};
|
|
13
|
-
import
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
14
13
|
import * as core from "../../../../core/index.mjs";
|
|
15
|
-
import * as
|
|
16
|
-
import {
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
17
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
import * as Phonic from "../../../index.mjs";
|
|
18
|
+
export class AuthClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Creates a short-lived session token that can be used to authenticate WebSocket connections. Session tokens are useful for client-side applications where you don't want to expose your API key.
|
|
24
24
|
*
|
|
25
25
|
* @param {Phonic.CreateSessionTokenRequest} request
|
|
26
|
-
* @param {
|
|
26
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
27
|
*
|
|
28
28
|
* @throws {@link Phonic.BadRequestError}
|
|
29
29
|
* @throws {@link Phonic.UnauthorizedError}
|
|
@@ -40,8 +40,9 @@ export class Auth {
|
|
|
40
40
|
}
|
|
41
41
|
__createSessionToken() {
|
|
42
42
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
43
|
-
var _a, _b, _c, _d;
|
|
44
|
-
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
44
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
45
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
46
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
47
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.PhonicEnvironment.Default)
|
|
47
48
|
.base, "auth/session_token"),
|
|
@@ -51,9 +52,11 @@ export class Auth {
|
|
|
51
52
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
52
53
|
requestType: "json",
|
|
53
54
|
body: request,
|
|
54
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
55
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
55
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
56
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
56
57
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
58
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
59
|
+
logging: this._options.logging,
|
|
57
60
|
});
|
|
58
61
|
if (_response.ok) {
|
|
59
62
|
return {
|
|
@@ -79,33 +82,7 @@ export class Auth {
|
|
|
79
82
|
});
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
|
-
|
|
83
|
-
case "non-json":
|
|
84
|
-
throw new errors.PhonicError({
|
|
85
|
-
statusCode: _response.error.statusCode,
|
|
86
|
-
body: _response.error.rawBody,
|
|
87
|
-
rawResponse: _response.rawResponse,
|
|
88
|
-
});
|
|
89
|
-
case "timeout":
|
|
90
|
-
throw new errors.PhonicTimeoutError("Timeout exceeded when calling POST /auth/session_token.");
|
|
91
|
-
case "unknown":
|
|
92
|
-
throw new errors.PhonicError({
|
|
93
|
-
message: _response.error.errorMessage,
|
|
94
|
-
rawResponse: _response.rawResponse,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
_getAuthorizationHeader() {
|
|
100
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
var _a;
|
|
102
|
-
const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["PHONIC_API_KEY"];
|
|
103
|
-
if (bearer == null) {
|
|
104
|
-
throw new errors.PhonicError({
|
|
105
|
-
message: "Please specify a bearer by either passing it in to the constructor or initializing a PHONIC_API_KEY environment variable",
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return `Bearer ${bearer}`;
|
|
85
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/auth/session_token");
|
|
109
86
|
});
|
|
110
87
|
}
|
|
111
88
|
}
|