phonic 0.30.2 → 0.30.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 +1 -770
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/agents/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/agents/client/Client.js +27 -21
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +2 -4
- package/dist/cjs/api/resources/agents/client/requests/AgentsDeleteRequest.d.ts +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsGetRequest.d.ts +1 -3
- package/dist/cjs/api/resources/agents/client/requests/AgentsListRequest.d.ts +1 -3
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -4
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +2 -4
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsListRequest.d.ts +9 -27
- package/dist/cjs/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.ts +5 -15
- package/dist/cjs/api/resources/conversations/client/requests/OutboundCallRequest.d.ts +1 -1
- package/dist/cjs/api/resources/extractionSchemas/client/Client.js +20 -15
- package/dist/cjs/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.ts +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.ts +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.ts +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.ts +1 -3
- package/dist/cjs/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.ts +1 -3
- package/dist/cjs/api/resources/projects/client/Client.js +28 -21
- package/dist/cjs/api/resources/tools/client/Client.d.ts +10 -0
- package/dist/cjs/api/resources/tools/client/Client.js +30 -15
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +15 -4
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.js +1 -0
- package/dist/cjs/api/resources/tools/client/requests/ToolsDeleteRequest.d.ts +1 -3
- package/dist/cjs/api/resources/tools/client/requests/ToolsGetRequest.d.ts +6 -3
- package/dist/cjs/api/resources/tools/client/requests/ToolsListRequest.d.ts +1 -3
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +5 -4
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +1 -0
- package/dist/cjs/api/resources/voices/client/Client.js +8 -6
- package/dist/cjs/api/resources/voices/client/requests/VoicesListRequest.d.ts +1 -3
- package/dist/cjs/api/types/Conversation.d.ts +2 -0
- package/dist/cjs/api/types/ConversationItem.d.ts +0 -2
- package/dist/cjs/api/types/IsUserSpeakingPayload.d.ts +8 -0
- package/dist/cjs/api/types/IsUserSpeakingPayload.js +5 -0
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +1 -1
- package/dist/cjs/api/types/Tool.d.ts +4 -1
- package/dist/cjs/api/types/Tool.js +1 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/Fetcher.js +2 -2
- package/dist/cjs/core/fetcher/index.d.ts +5 -5
- package/dist/cjs/core/fetcher/index.js +5 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/index.d.mts +76 -122
- package/dist/index.d.ts +76 -122
- package/dist/index.js +37 -52
- package/dist/index.mjs +37 -52
- package/package.json +2 -2
- package/reference.md +4 -4
- package/dist/esm/Client.d.mts +0 -50
- package/dist/esm/Client.mjs +0 -47
- package/dist/esm/api/errors/BadRequestError.d.mts +0 -8
- package/dist/esm/api/errors/BadRequestError.mjs +0 -15
- package/dist/esm/api/errors/ConflictError.d.mts +0 -8
- package/dist/esm/api/errors/ConflictError.mjs +0 -15
- package/dist/esm/api/errors/ForbiddenError.d.mts +0 -8
- package/dist/esm/api/errors/ForbiddenError.mjs +0 -15
- package/dist/esm/api/errors/GatewayTimeoutError.d.mts +0 -9
- package/dist/esm/api/errors/GatewayTimeoutError.mjs +0 -15
- package/dist/esm/api/errors/InternalServerError.d.mts +0 -9
- package/dist/esm/api/errors/InternalServerError.mjs +0 -15
- package/dist/esm/api/errors/NotFoundError.d.mts +0 -8
- package/dist/esm/api/errors/NotFoundError.mjs +0 -15
- package/dist/esm/api/errors/UnauthorizedError.d.mts +0 -9
- package/dist/esm/api/errors/UnauthorizedError.mjs +0 -15
- package/dist/esm/api/errors/index.d.mts +0 -7
- package/dist/esm/api/errors/index.mjs +0 -7
- package/dist/esm/api/index.d.mts +0 -4
- package/dist/esm/api/index.mjs +0 -4
- package/dist/esm/api/resources/agents/client/Client.d.mts +0 -208
- package/dist/esm/api/resources/agents/client/Client.mjs +0 -552
- package/dist/esm/api/resources/agents/client/index.d.mts +0 -2
- package/dist/esm/api/resources/agents/client/index.mjs +0 -1
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +0 -43
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.mjs +0 -4
- package/dist/esm/api/resources/agents/client/requests/AgentsDeleteRequest.d.mts +0 -15
- package/dist/esm/api/resources/agents/client/requests/AgentsDeleteRequest.mjs +0 -4
- package/dist/esm/api/resources/agents/client/requests/AgentsGetRequest.d.mts +0 -15
- package/dist/esm/api/resources/agents/client/requests/AgentsGetRequest.mjs +0 -4
- package/dist/esm/api/resources/agents/client/requests/AgentsListRequest.d.mts +0 -13
- package/dist/esm/api/resources/agents/client/requests/AgentsListRequest.mjs +0 -4
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +0 -104
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.mjs +0 -10
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +0 -40
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.mjs +0 -4
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +0 -6
- package/dist/esm/api/resources/agents/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/agents/index.d.mts +0 -2
- package/dist/esm/api/resources/agents/index.mjs +0 -2
- package/dist/esm/api/resources/agents/types/AgentsCreateResponse.d.mts +0 -9
- package/dist/esm/api/resources/agents/types/AgentsCreateResponse.mjs +0 -4
- package/dist/esm/api/resources/agents/types/AgentsDeleteResponse.d.mts +0 -7
- package/dist/esm/api/resources/agents/types/AgentsDeleteResponse.mjs +0 -4
- package/dist/esm/api/resources/agents/types/AgentsGetResponse.d.mts +0 -7
- package/dist/esm/api/resources/agents/types/AgentsGetResponse.mjs +0 -4
- package/dist/esm/api/resources/agents/types/AgentsListResponse.d.mts +0 -7
- package/dist/esm/api/resources/agents/types/AgentsListResponse.mjs +0 -4
- package/dist/esm/api/resources/agents/types/AgentsUpdateResponse.d.mts +0 -7
- package/dist/esm/api/resources/agents/types/AgentsUpdateResponse.mjs +0 -4
- package/dist/esm/api/resources/agents/types/AgentsUpsertResponse.d.mts +0 -11
- package/dist/esm/api/resources/agents/types/AgentsUpsertResponse.mjs +0 -4
- package/dist/esm/api/resources/agents/types/index.d.mts +0 -6
- package/dist/esm/api/resources/agents/types/index.mjs +0 -6
- package/dist/esm/api/resources/conversations/client/Client.d.mts +0 -236
- package/dist/esm/api/resources/conversations/client/Client.mjs +0 -858
- package/dist/esm/api/resources/conversations/client/Socket.d.mts +0 -64
- package/dist/esm/api/resources/conversations/client/Socket.mjs +0 -159
- package/dist/esm/api/resources/conversations/client/index.d.mts +0 -2
- package/dist/esm/api/resources/conversations/client/index.mjs +0 -1
- package/dist/esm/api/resources/conversations/client/requests/ConversationsListRequest.d.mts +0 -48
- package/dist/esm/api/resources/conversations/client/requests/ConversationsListRequest.mjs +0 -4
- package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.d.mts +0 -39
- package/dist/esm/api/resources/conversations/client/requests/ConversationsSipOutboundCallRequest.mjs +0 -4
- package/dist/esm/api/resources/conversations/client/requests/EvaluateConversationRequest.d.mts +0 -13
- package/dist/esm/api/resources/conversations/client/requests/EvaluateConversationRequest.mjs +0 -4
- package/dist/esm/api/resources/conversations/client/requests/ExtractDataRequest.d.mts +0 -13
- package/dist/esm/api/resources/conversations/client/requests/ExtractDataRequest.mjs +0 -4
- package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.d.mts +0 -30
- package/dist/esm/api/resources/conversations/client/requests/OutboundCallRequest.mjs +0 -4
- package/dist/esm/api/resources/conversations/client/requests/index.d.mts +0 -5
- package/dist/esm/api/resources/conversations/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/conversations/index.d.mts +0 -2
- package/dist/esm/api/resources/conversations/index.mjs +0 -2
- package/dist/esm/api/resources/conversations/types/ConversationsCancelResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsCancelResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsExtractDataResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsExtractDataResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsGetAnalysisResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsGetAnalysisResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsGetResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsGetResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsListEvaluationsResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsListEvaluationsResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsListExtractionsResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsListExtractionsResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsListResponse.d.mts +0 -9
- package/dist/esm/api/resources/conversations/types/ConversationsListResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsOutboundCallResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsOutboundCallResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/ConversationsSipOutboundCallResponse.d.mts +0 -7
- package/dist/esm/api/resources/conversations/types/ConversationsSipOutboundCallResponse.mjs +0 -4
- package/dist/esm/api/resources/conversations/types/index.d.mts +0 -9
- package/dist/esm/api/resources/conversations/types/index.mjs +0 -9
- package/dist/esm/api/resources/extractionSchemas/client/Client.d.mts +0 -142
- package/dist/esm/api/resources/extractionSchemas/client/Client.mjs +0 -431
- package/dist/esm/api/resources/extractionSchemas/client/index.d.mts +0 -2
- package/dist/esm/api/resources/extractionSchemas/client/index.mjs +0 -1
- package/dist/esm/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.d.mts +0 -37
- package/dist/esm/api/resources/extractionSchemas/client/requests/CreateExtractionSchemaRequest.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.d.mts +0 -15
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasDeleteRequest.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.d.mts +0 -15
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasGetRequest.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.d.mts +0 -15
- package/dist/esm/api/resources/extractionSchemas/client/requests/ExtractionSchemasListRequest.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.d.mts +0 -33
- package/dist/esm/api/resources/extractionSchemas/client/requests/UpdateExtractionSchemaRequest.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/client/requests/index.d.mts +0 -5
- package/dist/esm/api/resources/extractionSchemas/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/extractionSchemas/index.d.mts +0 -2
- package/dist/esm/api/resources/extractionSchemas/index.mjs +0 -2
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasCreateResponse.d.mts +0 -9
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasCreateResponse.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasDeleteResponse.d.mts +0 -7
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasDeleteResponse.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasGetResponse.d.mts +0 -7
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasGetResponse.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasListResponse.d.mts +0 -7
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasListResponse.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasUpdateResponse.d.mts +0 -7
- package/dist/esm/api/resources/extractionSchemas/types/ExtractionSchemasUpdateResponse.mjs +0 -4
- package/dist/esm/api/resources/extractionSchemas/types/index.d.mts +0 -5
- package/dist/esm/api/resources/extractionSchemas/types/index.mjs +0 -5
- package/dist/esm/api/resources/index.d.mts +0 -18
- package/dist/esm/api/resources/index.mjs +0 -18
- package/dist/esm/api/resources/projects/client/Client.d.mts +0 -157
- package/dist/esm/api/resources/projects/client/Client.mjs +0 -540
- package/dist/esm/api/resources/projects/client/index.d.mts +0 -2
- package/dist/esm/api/resources/projects/client/index.mjs +0 -1
- package/dist/esm/api/resources/projects/client/requests/CreateConversationEvalPromptRequest.d.mts +0 -16
- package/dist/esm/api/resources/projects/client/requests/CreateConversationEvalPromptRequest.mjs +0 -4
- package/dist/esm/api/resources/projects/client/requests/CreateProjectRequest.d.mts +0 -13
- package/dist/esm/api/resources/projects/client/requests/CreateProjectRequest.mjs +0 -4
- package/dist/esm/api/resources/projects/client/requests/UpdateProjectRequest.d.mts +0 -15
- package/dist/esm/api/resources/projects/client/requests/UpdateProjectRequest.mjs +0 -4
- package/dist/esm/api/resources/projects/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/projects/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/projects/index.d.mts +0 -2
- package/dist/esm/api/resources/projects/index.mjs +0 -2
- package/dist/esm/api/resources/projects/types/ProjectsCreateEvalPromptResponse.d.mts +0 -7
- package/dist/esm/api/resources/projects/types/ProjectsCreateEvalPromptResponse.mjs +0 -4
- package/dist/esm/api/resources/projects/types/ProjectsCreateResponse.d.mts +0 -9
- package/dist/esm/api/resources/projects/types/ProjectsCreateResponse.mjs +0 -4
- package/dist/esm/api/resources/projects/types/ProjectsDeleteResponse.d.mts +0 -7
- package/dist/esm/api/resources/projects/types/ProjectsDeleteResponse.mjs +0 -4
- package/dist/esm/api/resources/projects/types/ProjectsGetResponse.d.mts +0 -7
- package/dist/esm/api/resources/projects/types/ProjectsGetResponse.mjs +0 -4
- package/dist/esm/api/resources/projects/types/ProjectsListEvalPromptsResponse.d.mts +0 -7
- package/dist/esm/api/resources/projects/types/ProjectsListEvalPromptsResponse.mjs +0 -4
- package/dist/esm/api/resources/projects/types/ProjectsListResponse.d.mts +0 -7
- package/dist/esm/api/resources/projects/types/ProjectsListResponse.mjs +0 -4
- package/dist/esm/api/resources/projects/types/ProjectsUpdateResponse.d.mts +0 -7
- package/dist/esm/api/resources/projects/types/ProjectsUpdateResponse.mjs +0 -4
- package/dist/esm/api/resources/projects/types/index.d.mts +0 -7
- package/dist/esm/api/resources/projects/types/index.mjs +0 -7
- package/dist/esm/api/resources/tools/client/Client.d.mts +0 -160
- package/dist/esm/api/resources/tools/client/Client.mjs +0 -442
- package/dist/esm/api/resources/tools/client/index.d.mts +0 -2
- package/dist/esm/api/resources/tools/client/index.mjs +0 -1
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +0 -92
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.mjs +0 -14
- package/dist/esm/api/resources/tools/client/requests/ToolsDeleteRequest.d.mts +0 -15
- package/dist/esm/api/resources/tools/client/requests/ToolsDeleteRequest.mjs +0 -4
- package/dist/esm/api/resources/tools/client/requests/ToolsGetRequest.d.mts +0 -20
- package/dist/esm/api/resources/tools/client/requests/ToolsGetRequest.mjs +0 -4
- package/dist/esm/api/resources/tools/client/requests/ToolsListRequest.d.mts +0 -15
- package/dist/esm/api/resources/tools/client/requests/ToolsListRequest.mjs +0 -4
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +0 -54
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +0 -14
- package/dist/esm/api/resources/tools/client/requests/index.d.mts +0 -5
- package/dist/esm/api/resources/tools/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/tools/index.d.mts +0 -2
- package/dist/esm/api/resources/tools/index.mjs +0 -2
- package/dist/esm/api/resources/tools/types/ToolsCreateResponse.d.mts +0 -9
- package/dist/esm/api/resources/tools/types/ToolsCreateResponse.mjs +0 -4
- package/dist/esm/api/resources/tools/types/ToolsDeleteResponse.d.mts +0 -7
- package/dist/esm/api/resources/tools/types/ToolsDeleteResponse.mjs +0 -4
- package/dist/esm/api/resources/tools/types/ToolsGetResponse.d.mts +0 -7
- package/dist/esm/api/resources/tools/types/ToolsGetResponse.mjs +0 -4
- package/dist/esm/api/resources/tools/types/ToolsListResponse.d.mts +0 -7
- package/dist/esm/api/resources/tools/types/ToolsListResponse.mjs +0 -4
- package/dist/esm/api/resources/tools/types/ToolsUpdateResponse.d.mts +0 -7
- package/dist/esm/api/resources/tools/types/ToolsUpdateResponse.mjs +0 -4
- package/dist/esm/api/resources/tools/types/index.d.mts +0 -5
- package/dist/esm/api/resources/tools/types/index.mjs +0 -5
- package/dist/esm/api/resources/voices/client/Client.d.mts +0 -65
- package/dist/esm/api/resources/voices/client/Client.mjs +0 -166
- package/dist/esm/api/resources/voices/client/index.d.mts +0 -2
- package/dist/esm/api/resources/voices/client/index.mjs +0 -1
- package/dist/esm/api/resources/voices/client/requests/VoicesListRequest.d.mts +0 -15
- package/dist/esm/api/resources/voices/client/requests/VoicesListRequest.mjs +0 -4
- package/dist/esm/api/resources/voices/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/voices/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/voices/index.d.mts +0 -2
- package/dist/esm/api/resources/voices/index.mjs +0 -2
- package/dist/esm/api/resources/voices/types/VoicesGetResponse.d.mts +0 -7
- package/dist/esm/api/resources/voices/types/VoicesGetResponse.mjs +0 -4
- package/dist/esm/api/resources/voices/types/VoicesListResponse.d.mts +0 -7
- package/dist/esm/api/resources/voices/types/VoicesListResponse.mjs +0 -4
- package/dist/esm/api/resources/voices/types/index.d.mts +0 -2
- package/dist/esm/api/resources/voices/types/index.mjs +0 -2
- package/dist/esm/api/types/Agent.d.mts +0 -80
- package/dist/esm/api/types/Agent.mjs +0 -10
- package/dist/esm/api/types/AssistantChoseNotToRespondPayload.d.mts +0 -6
- package/dist/esm/api/types/AssistantChoseNotToRespondPayload.mjs +0 -4
- package/dist/esm/api/types/AssistantEndedConversationPayload.d.mts +0 -6
- package/dist/esm/api/types/AssistantEndedConversationPayload.mjs +0 -4
- package/dist/esm/api/types/AudioChunkPayload.d.mts +0 -10
- package/dist/esm/api/types/AudioChunkPayload.mjs +0 -4
- package/dist/esm/api/types/AudioChunkResponsePayload.d.mts +0 -10
- package/dist/esm/api/types/AudioChunkResponsePayload.mjs +0 -4
- package/dist/esm/api/types/AudioFinishedPayload.d.mts +0 -6
- package/dist/esm/api/types/AudioFinishedPayload.mjs +0 -4
- package/dist/esm/api/types/BadRequestErrorBody.d.mts +0 -5
- package/dist/esm/api/types/BadRequestErrorBody.mjs +0 -4
- package/dist/esm/api/types/BasicError.d.mts +0 -14
- package/dist/esm/api/types/BasicError.mjs +0 -4
- package/dist/esm/api/types/ConfigPayload.d.mts +0 -66
- package/dist/esm/api/types/ConfigPayload.mjs +0 -14
- package/dist/esm/api/types/Conversation.d.mts +0 -49
- package/dist/esm/api/types/Conversation.mjs +0 -4
- package/dist/esm/api/types/ConversationAnalysis.d.mts +0 -9
- package/dist/esm/api/types/ConversationAnalysis.mjs +0 -4
- package/dist/esm/api/types/ConversationCreatedPayload.d.mts +0 -8
- package/dist/esm/api/types/ConversationCreatedPayload.mjs +0 -4
- package/dist/esm/api/types/ConversationEval.d.mts +0 -4
- package/dist/esm/api/types/ConversationEval.mjs +0 -4
- package/dist/esm/api/types/ConversationEvalPrompt.d.mts +0 -11
- package/dist/esm/api/types/ConversationEvalPrompt.mjs +0 -4
- package/dist/esm/api/types/ConversationEvaluation.d.mts +0 -8
- package/dist/esm/api/types/ConversationEvaluation.mjs +0 -4
- package/dist/esm/api/types/ConversationEvaluationResult.d.mts +0 -32
- package/dist/esm/api/types/ConversationEvaluationResult.mjs +0 -12
- package/dist/esm/api/types/ConversationExtraction.d.mts +0 -22
- package/dist/esm/api/types/ConversationExtraction.mjs +0 -4
- package/dist/esm/api/types/ConversationItem.d.mts +0 -33
- package/dist/esm/api/types/ConversationItem.mjs +0 -10
- package/dist/esm/api/types/CreateAgentRequest.d.mts +0 -70
- package/dist/esm/api/types/CreateAgentRequest.mjs +0 -10
- package/dist/esm/api/types/DtmfPayload.d.mts +0 -8
- package/dist/esm/api/types/DtmfPayload.mjs +0 -4
- package/dist/esm/api/types/ErrorPayload.d.mts +0 -17
- package/dist/esm/api/types/ErrorPayload.mjs +0 -4
- package/dist/esm/api/types/Error_.d.mts +0 -5
- package/dist/esm/api/types/Error_.mjs +0 -4
- package/dist/esm/api/types/ExtractionField.d.mts +0 -23
- package/dist/esm/api/types/ExtractionField.mjs +0 -12
- package/dist/esm/api/types/ExtractionSchema.d.mts +0 -14
- package/dist/esm/api/types/ExtractionSchema.mjs +0 -4
- package/dist/esm/api/types/InputCancelledPayload.d.mts +0 -6
- package/dist/esm/api/types/InputCancelledPayload.mjs +0 -4
- package/dist/esm/api/types/InputTextPayload.d.mts +0 -8
- package/dist/esm/api/types/InputTextPayload.mjs +0 -4
- package/dist/esm/api/types/InterruptedResponsePayload.d.mts +0 -8
- package/dist/esm/api/types/InterruptedResponsePayload.mjs +0 -4
- package/dist/esm/api/types/OutboundCallConfig.d.mts +0 -39
- package/dist/esm/api/types/OutboundCallConfig.mjs +0 -4
- package/dist/esm/api/types/Project.d.mts +0 -22
- package/dist/esm/api/types/Project.mjs +0 -4
- package/dist/esm/api/types/ReadyToStartConversationPayload.d.mts +0 -6
- package/dist/esm/api/types/ReadyToStartConversationPayload.mjs +0 -4
- package/dist/esm/api/types/SetExternalIdPayload.d.mts +0 -8
- package/dist/esm/api/types/SetExternalIdPayload.mjs +0 -4
- package/dist/esm/api/types/SetTwilioCallSidPayload.d.mts +0 -8
- package/dist/esm/api/types/SetTwilioCallSidPayload.mjs +0 -4
- package/dist/esm/api/types/Task.d.mts +0 -9
- package/dist/esm/api/types/Task.mjs +0 -4
- package/dist/esm/api/types/Tool.d.mts +0 -51
- package/dist/esm/api/types/Tool.mjs +0 -14
- package/dist/esm/api/types/ToolCallInterruptedPayload.d.mts +0 -12
- package/dist/esm/api/types/ToolCallInterruptedPayload.mjs +0 -4
- package/dist/esm/api/types/ToolCallOutputPayload.d.mts +0 -9
- package/dist/esm/api/types/ToolCallOutputPayload.mjs +0 -4
- package/dist/esm/api/types/ToolCallOutputProcessedPayload.d.mts +0 -35
- package/dist/esm/api/types/ToolCallOutputProcessedPayload.mjs +0 -4
- package/dist/esm/api/types/ToolCallPayload.d.mts +0 -12
- package/dist/esm/api/types/ToolCallPayload.mjs +0 -4
- package/dist/esm/api/types/ToolParameter.d.mts +0 -38
- package/dist/esm/api/types/ToolParameter.mjs +0 -19
- package/dist/esm/api/types/UpdateSystemPromptPayload.d.mts +0 -8
- package/dist/esm/api/types/UpdateSystemPromptPayload.mjs +0 -4
- package/dist/esm/api/types/UserFinishedSpeakingPayload.d.mts +0 -6
- package/dist/esm/api/types/UserFinishedSpeakingPayload.mjs +0 -4
- package/dist/esm/api/types/UserStartedSpeakingPayload.d.mts +0 -6
- package/dist/esm/api/types/UserStartedSpeakingPayload.mjs +0 -4
- package/dist/esm/api/types/ValidationError.d.mts +0 -14
- package/dist/esm/api/types/ValidationError.mjs +0 -4
- package/dist/esm/api/types/Voice.d.mts +0 -11
- package/dist/esm/api/types/Voice.mjs +0 -4
- package/dist/esm/api/types/index.d.mts +0 -44
- package/dist/esm/api/types/index.mjs +0 -44
- package/dist/esm/api/types/overrides.d.mts +0 -50
- package/dist/esm/api/types/overrides.mjs +0 -1
- package/dist/esm/core/auth/BasicAuth.d.mts +0 -8
- package/dist/esm/core/auth/BasicAuth.mjs +0 -23
- package/dist/esm/core/auth/BearerToken.d.mts +0 -5
- package/dist/esm/core/auth/BearerToken.mjs +0 -12
- package/dist/esm/core/auth/index.d.mts +0 -2
- package/dist/esm/core/auth/index.mjs +0 -2
- package/dist/esm/core/base64.d.mts +0 -2
- package/dist/esm/core/base64.mjs +0 -22
- package/dist/esm/core/fetcher/APIResponse.d.mts +0 -20
- package/dist/esm/core/fetcher/APIResponse.mjs +0 -1
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +0 -20
- package/dist/esm/core/fetcher/BinaryResponse.mjs +0 -14
- package/dist/esm/core/fetcher/Fetcher.d.mts +0 -40
- package/dist/esm/core/fetcher/Fetcher.mjs +0 -116
- package/dist/esm/core/fetcher/Headers.d.mts +0 -2
- package/dist/esm/core/fetcher/Headers.mjs +0 -82
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +0 -58
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +0 -99
- package/dist/esm/core/fetcher/RawResponse.d.mts +0 -29
- package/dist/esm/core/fetcher/RawResponse.mjs +0 -40
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
- package/dist/esm/core/fetcher/Supplier.d.mts +0 -4
- package/dist/esm/core/fetcher/Supplier.mjs +0 -19
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +0 -1
- package/dist/esm/core/fetcher/createRequestUrl.mjs +0 -5
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +0 -1
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +0 -41
- package/dist/esm/core/fetcher/getFetchFn.d.mts +0 -1
- package/dist/esm/core/fetcher/getFetchFn.mjs +0 -14
- package/dist/esm/core/fetcher/getHeader.d.mts +0 -1
- package/dist/esm/core/fetcher/getHeader.mjs +0 -8
- package/dist/esm/core/fetcher/getRequestBody.d.mts +0 -7
- package/dist/esm/core/fetcher/getRequestBody.mjs +0 -20
- package/dist/esm/core/fetcher/getResponseBody.d.mts +0 -1
- package/dist/esm/core/fetcher/getResponseBody.mjs +0 -52
- package/dist/esm/core/fetcher/index.d.mts +0 -9
- package/dist/esm/core/fetcher/index.mjs +0 -5
- package/dist/esm/core/fetcher/makeRequest.d.mts +0 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -38
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +0 -1
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -37
- package/dist/esm/core/fetcher/signals.d.mts +0 -11
- package/dist/esm/core/fetcher/signals.mjs +0 -32
- package/dist/esm/core/headers.d.mts +0 -3
- package/dist/esm/core/headers.mjs +0 -25
- package/dist/esm/core/index.d.mts +0 -6
- package/dist/esm/core/index.mjs +0 -6
- package/dist/esm/core/json.d.mts +0 -15
- package/dist/esm/core/json.mjs +0 -19
- package/dist/esm/core/runtime/index.d.mts +0 -1
- package/dist/esm/core/runtime/index.mjs +0 -1
- package/dist/esm/core/runtime/runtime.d.mts +0 -9
- package/dist/esm/core/runtime/runtime.mjs +0 -99
- package/dist/esm/core/url/index.d.mts +0 -2
- package/dist/esm/core/url/index.mjs +0 -2
- package/dist/esm/core/url/join.d.mts +0 -1
- package/dist/esm/core/url/join.mjs +0 -66
- package/dist/esm/core/url/qs.d.mts +0 -6
- package/dist/esm/core/url/qs.mjs +0 -61
- package/dist/esm/core/websocket/events.d.mts +0 -36
- package/dist/esm/core/websocket/events.mjs +0 -21
- package/dist/esm/core/websocket/index.d.mts +0 -1
- package/dist/esm/core/websocket/index.mjs +0 -1
- package/dist/esm/core/websocket/ws.d.mts +0 -147
- package/dist/esm/core/websocket/ws.mjs +0 -423
- package/dist/esm/environments.d.mts +0 -14
- package/dist/esm/environments.mjs +0 -9
- package/dist/esm/errors/PhonicError.d.mts +0 -15
- package/dist/esm/errors/PhonicError.mjs +0 -26
- package/dist/esm/errors/PhonicTimeoutError.d.mts +0 -6
- package/dist/esm/errors/PhonicTimeoutError.mjs +0 -9
- package/dist/esm/errors/index.d.mts +0 -2
- package/dist/esm/errors/index.mjs +0 -2
- package/dist/esm/index.d.mts +0 -4
- package/dist/esm/index.mjs +0 -4
- package/dist/esm/version.d.mts +0 -1
- package/dist/esm/version.mjs +0 -1
|
@@ -72,11 +72,12 @@ class Projects {
|
|
|
72
72
|
__list(requestOptions) {
|
|
73
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
74
|
var _a, _b, _c, _d;
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
76
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
77
|
+
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)
|
|
77
78
|
.base, "projects"),
|
|
78
79
|
method: "GET",
|
|
79
|
-
headers:
|
|
80
|
+
headers: _headers,
|
|
80
81
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
81
82
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
83
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -138,11 +139,12 @@ class Projects {
|
|
|
138
139
|
__create(request, requestOptions) {
|
|
139
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
140
141
|
var _a, _b, _c, _d;
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
143
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
144
|
+
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)
|
|
143
145
|
.base, "projects"),
|
|
144
146
|
method: "POST",
|
|
145
|
-
headers:
|
|
147
|
+
headers: _headers,
|
|
146
148
|
contentType: "application/json",
|
|
147
149
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
148
150
|
requestType: "json",
|
|
@@ -209,11 +211,12 @@ class Projects {
|
|
|
209
211
|
__get(nameOrId, requestOptions) {
|
|
210
212
|
return __awaiter(this, void 0, void 0, function* () {
|
|
211
213
|
var _a, _b, _c, _d;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
215
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
216
|
+
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)
|
|
214
217
|
.base, `projects/${encodeURIComponent(nameOrId)}`),
|
|
215
218
|
method: "GET",
|
|
216
|
-
headers:
|
|
219
|
+
headers: _headers,
|
|
217
220
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
218
221
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
219
222
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -277,11 +280,12 @@ class Projects {
|
|
|
277
280
|
__delete(nameOrId, requestOptions) {
|
|
278
281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
279
282
|
var _a, _b, _c, _d;
|
|
280
|
-
|
|
281
|
-
|
|
283
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
284
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
285
|
+
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)
|
|
282
286
|
.base, `projects/${encodeURIComponent(nameOrId)}`),
|
|
283
287
|
method: "DELETE",
|
|
284
|
-
headers:
|
|
288
|
+
headers: _headers,
|
|
285
289
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
286
290
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
287
291
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -351,11 +355,12 @@ class Projects {
|
|
|
351
355
|
__update(nameOrId_1) {
|
|
352
356
|
return __awaiter(this, arguments, void 0, function* (nameOrId, request = {}, requestOptions) {
|
|
353
357
|
var _a, _b, _c, _d;
|
|
354
|
-
|
|
355
|
-
|
|
358
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
359
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
360
|
+
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)
|
|
356
361
|
.base, `projects/${encodeURIComponent(nameOrId)}`),
|
|
357
362
|
method: "PATCH",
|
|
358
|
-
headers:
|
|
363
|
+
headers: _headers,
|
|
359
364
|
contentType: "application/json",
|
|
360
365
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
361
366
|
requestType: "json",
|
|
@@ -426,11 +431,12 @@ class Projects {
|
|
|
426
431
|
__listEvalPrompts(id, requestOptions) {
|
|
427
432
|
return __awaiter(this, void 0, void 0, function* () {
|
|
428
433
|
var _a, _b, _c, _d;
|
|
429
|
-
|
|
430
|
-
|
|
434
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
435
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
436
|
+
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)
|
|
431
437
|
.base, `projects/${encodeURIComponent(id)}/conversation_eval_prompts`),
|
|
432
438
|
method: "GET",
|
|
433
|
-
headers:
|
|
439
|
+
headers: _headers,
|
|
434
440
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
435
441
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
436
442
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -503,11 +509,12 @@ class Projects {
|
|
|
503
509
|
__createEvalPrompt(id, request, requestOptions) {
|
|
504
510
|
return __awaiter(this, void 0, void 0, function* () {
|
|
505
511
|
var _a, _b, _c, _d;
|
|
506
|
-
|
|
507
|
-
|
|
512
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
513
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
514
|
+
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)
|
|
508
515
|
.base, `projects/${encodeURIComponent(id)}/conversation_eval_prompts`),
|
|
509
516
|
method: "POST",
|
|
510
|
-
headers:
|
|
517
|
+
headers: _headers,
|
|
511
518
|
contentType: "application/json",
|
|
512
519
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
513
520
|
requestType: "json",
|
|
@@ -97,6 +97,16 @@ export declare class Tools {
|
|
|
97
97
|
* }],
|
|
98
98
|
* tool_call_output_timeout_ms: 5000
|
|
99
99
|
* })
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.tools.create({
|
|
103
|
+
* project: "main",
|
|
104
|
+
* name: "transfer_to_support",
|
|
105
|
+
* description: "Transfers the caller to the support team",
|
|
106
|
+
* type: "built_in_transfer_to_phone_number",
|
|
107
|
+
* execution_mode: "sync",
|
|
108
|
+
* phone_number: "+15551234567"
|
|
109
|
+
* })
|
|
100
110
|
*/
|
|
101
111
|
create(request: Phonic.CreateToolRequest, requestOptions?: Tools.RequestOptions): core.HttpResponsePromise<Phonic.ToolsCreateResponse>;
|
|
102
112
|
private __create;
|
|
@@ -90,11 +90,12 @@ class Tools {
|
|
|
90
90
|
if (project != null) {
|
|
91
91
|
_queryParams["project"] = project;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
94
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
95
|
+
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)
|
|
95
96
|
.base, "tools"),
|
|
96
97
|
method: "GET",
|
|
97
|
-
headers:
|
|
98
|
+
headers: _headers,
|
|
98
99
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
99
100
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
100
101
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -184,6 +185,16 @@ class Tools {
|
|
|
184
185
|
* }],
|
|
185
186
|
* tool_call_output_timeout_ms: 5000
|
|
186
187
|
* })
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* await client.tools.create({
|
|
191
|
+
* project: "main",
|
|
192
|
+
* name: "transfer_to_support",
|
|
193
|
+
* description: "Transfers the caller to the support team",
|
|
194
|
+
* type: "built_in_transfer_to_phone_number",
|
|
195
|
+
* execution_mode: "sync",
|
|
196
|
+
* phone_number: "+15551234567"
|
|
197
|
+
* })
|
|
187
198
|
*/
|
|
188
199
|
create(request, requestOptions) {
|
|
189
200
|
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
@@ -196,11 +207,12 @@ class Tools {
|
|
|
196
207
|
if (project != null) {
|
|
197
208
|
_queryParams["project"] = project;
|
|
198
209
|
}
|
|
199
|
-
|
|
200
|
-
|
|
210
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
211
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
212
|
+
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)
|
|
201
213
|
.base, "tools"),
|
|
202
214
|
method: "POST",
|
|
203
|
-
headers:
|
|
215
|
+
headers: _headers,
|
|
204
216
|
contentType: "application/json",
|
|
205
217
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
206
218
|
requestType: "json",
|
|
@@ -271,11 +283,12 @@ class Tools {
|
|
|
271
283
|
if (project != null) {
|
|
272
284
|
_queryParams["project"] = project;
|
|
273
285
|
}
|
|
274
|
-
|
|
275
|
-
|
|
286
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
287
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
288
|
+
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)
|
|
276
289
|
.base, `tools/${encodeURIComponent(nameOrId)}`),
|
|
277
290
|
method: "GET",
|
|
278
|
-
headers:
|
|
291
|
+
headers: _headers,
|
|
279
292
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
280
293
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
281
294
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -340,11 +353,12 @@ class Tools {
|
|
|
340
353
|
if (project != null) {
|
|
341
354
|
_queryParams["project"] = project;
|
|
342
355
|
}
|
|
343
|
-
|
|
344
|
-
|
|
356
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
357
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
358
|
+
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)
|
|
345
359
|
.base, `tools/${encodeURIComponent(nameOrId)}`),
|
|
346
360
|
method: "DELETE",
|
|
347
|
-
headers:
|
|
361
|
+
headers: _headers,
|
|
348
362
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
349
363
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
350
364
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -414,11 +428,12 @@ class Tools {
|
|
|
414
428
|
if (project != null) {
|
|
415
429
|
_queryParams["project"] = project;
|
|
416
430
|
}
|
|
417
|
-
|
|
418
|
-
|
|
431
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
432
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
433
|
+
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)
|
|
419
434
|
.base, `tools/${encodeURIComponent(nameOrId)}`),
|
|
420
435
|
method: "PATCH",
|
|
421
|
-
headers:
|
|
436
|
+
headers: _headers,
|
|
422
437
|
contentType: "application/json",
|
|
423
438
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
424
439
|
requestType: "json",
|
|
@@ -45,11 +45,19 @@ import * as Phonic from "../../../../index.js";
|
|
|
45
45
|
* }],
|
|
46
46
|
* tool_call_output_timeout_ms: 5000
|
|
47
47
|
* }
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* {
|
|
51
|
+
* project: "main",
|
|
52
|
+
* name: "transfer_to_support",
|
|
53
|
+
* description: "Transfers the caller to the support team",
|
|
54
|
+
* type: "built_in_transfer_to_phone_number",
|
|
55
|
+
* execution_mode: "sync",
|
|
56
|
+
* phone_number: "+15551234567"
|
|
57
|
+
* }
|
|
48
58
|
*/
|
|
49
59
|
export interface CreateToolRequest {
|
|
50
|
-
/**
|
|
51
|
-
* The name of the project to create the tool in.
|
|
52
|
-
*/
|
|
60
|
+
/** The name of the project to create the tool in. */
|
|
53
61
|
project?: string;
|
|
54
62
|
/** The name of the tool. Must be snake_case and unique within the organization. */
|
|
55
63
|
name: string;
|
|
@@ -71,15 +79,18 @@ export interface CreateToolRequest {
|
|
|
71
79
|
endpoint_timeout_ms?: number;
|
|
72
80
|
/** Timeout for WebSocket tool responses. */
|
|
73
81
|
tool_call_output_timeout_ms?: number;
|
|
82
|
+
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
83
|
+
phone_number?: string;
|
|
74
84
|
}
|
|
75
85
|
export declare namespace CreateToolRequest {
|
|
76
86
|
/**
|
|
77
87
|
* The type of tool.
|
|
78
88
|
*/
|
|
79
|
-
type Type = "custom_webhook" | "custom_websocket";
|
|
89
|
+
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number";
|
|
80
90
|
const Type: {
|
|
81
91
|
readonly CustomWebhook: "custom_webhook";
|
|
82
92
|
readonly CustomWebsocket: "custom_websocket";
|
|
93
|
+
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
83
94
|
};
|
|
84
95
|
/**
|
|
85
96
|
* Mode of operation.
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface ToolsDeleteRequest {
|
|
11
|
-
/**
|
|
12
|
-
* The name of the project containing the tool. Only used when `nameOrId` is a name.
|
|
13
|
-
*/
|
|
11
|
+
/** The name of the project containing the tool. Only used when `nameOrId` is a name. */
|
|
14
12
|
project?: string;
|
|
15
13
|
}
|
|
@@ -11,10 +11,13 @@
|
|
|
11
11
|
* {
|
|
12
12
|
* project: "main"
|
|
13
13
|
* }
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* {
|
|
17
|
+
* project: "main"
|
|
18
|
+
* }
|
|
14
19
|
*/
|
|
15
20
|
export interface ToolsGetRequest {
|
|
16
|
-
/**
|
|
17
|
-
* The name of the project containing the tool. Only used when `nameOrId` is a name.
|
|
18
|
-
*/
|
|
21
|
+
/** The name of the project containing the tool. Only used when `nameOrId` is a name. */
|
|
19
22
|
project?: string;
|
|
20
23
|
}
|
|
@@ -14,9 +14,7 @@ import * as Phonic from "../../../../index.js";
|
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
export interface UpdateToolRequest {
|
|
17
|
-
/**
|
|
18
|
-
* The name of the project containing the tool. Only used when `nameOrId` is a name.
|
|
19
|
-
*/
|
|
17
|
+
/** The name of the project containing the tool. Only used when `nameOrId` is a name. */
|
|
20
18
|
project?: string;
|
|
21
19
|
/** The name of the tool. Must be snake_case and unique within the organization. */
|
|
22
20
|
name?: string;
|
|
@@ -33,15 +31,18 @@ export interface UpdateToolRequest {
|
|
|
33
31
|
endpoint_headers?: Record<string, string>;
|
|
34
32
|
endpoint_timeout_ms?: number;
|
|
35
33
|
tool_call_output_timeout_ms?: number;
|
|
34
|
+
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
35
|
+
phone_number?: string;
|
|
36
36
|
}
|
|
37
37
|
export declare namespace UpdateToolRequest {
|
|
38
38
|
/**
|
|
39
39
|
* The type of tool.
|
|
40
40
|
*/
|
|
41
|
-
type Type = "custom_webhook" | "custom_websocket";
|
|
41
|
+
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number";
|
|
42
42
|
const Type: {
|
|
43
43
|
readonly CustomWebhook: "custom_webhook";
|
|
44
44
|
readonly CustomWebsocket: "custom_websocket";
|
|
45
|
+
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
45
46
|
};
|
|
46
47
|
/**
|
|
47
48
|
* Mode of operation.
|
|
@@ -79,11 +79,12 @@ class Voices {
|
|
|
79
79
|
const { model } = request;
|
|
80
80
|
const _queryParams = {};
|
|
81
81
|
_queryParams["model"] = model;
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
83
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
84
|
+
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)
|
|
84
85
|
.base, "voices"),
|
|
85
86
|
method: "GET",
|
|
86
|
-
headers:
|
|
87
|
+
headers: _headers,
|
|
87
88
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
88
89
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
89
90
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -143,11 +144,12 @@ class Voices {
|
|
|
143
144
|
__get(id, requestOptions) {
|
|
144
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
145
146
|
var _a, _b, _c, _d;
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
148
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
149
|
+
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)
|
|
148
150
|
.base, `voices/${encodeURIComponent(id)}`),
|
|
149
151
|
method: "GET",
|
|
150
|
-
headers:
|
|
152
|
+
headers: _headers,
|
|
151
153
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
152
154
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
153
155
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -31,6 +31,8 @@ export interface Conversation {
|
|
|
31
31
|
started_at: string;
|
|
32
32
|
/** When the conversation ended. */
|
|
33
33
|
ended_at?: string;
|
|
34
|
+
/** System prompt used for the conversation. */
|
|
35
|
+
system_prompt: string;
|
|
34
36
|
/** Array of conversation items (turns). */
|
|
35
37
|
items: Phonic.ConversationItem[];
|
|
36
38
|
/** Results from conversation evaluations and extractions. */
|
|
@@ -14,8 +14,6 @@ export interface ConversationItem {
|
|
|
14
14
|
duration_ms: number;
|
|
15
15
|
/** When this turn started. */
|
|
16
16
|
started_at: string;
|
|
17
|
-
/** System prompt used (assistant only). */
|
|
18
|
-
system_prompt?: string;
|
|
19
17
|
/** Voice ID used (assistant only). */
|
|
20
18
|
voice_id?: string;
|
|
21
19
|
/** Audio speed used (assistant only). */
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export interface OutboundCallConfig {
|
|
8
8
|
/** The name of the agent to use for the call. */
|
|
9
9
|
agent?: string;
|
|
10
|
-
/** The name of the project to use for the call.
|
|
10
|
+
/** The name of the project to use for the call. */
|
|
11
11
|
project?: string;
|
|
12
12
|
/** Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`. */
|
|
13
13
|
welcome_message?: string;
|
|
@@ -26,6 +26,8 @@ export interface Tool {
|
|
|
26
26
|
endpoint_timeout_ms?: number;
|
|
27
27
|
/** Timeout in milliseconds for WebSocket tool responses. */
|
|
28
28
|
tool_call_output_timeout_ms?: number;
|
|
29
|
+
/** The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools. */
|
|
30
|
+
phone_number?: string;
|
|
29
31
|
}
|
|
30
32
|
export declare namespace Tool {
|
|
31
33
|
interface Project {
|
|
@@ -35,10 +37,11 @@ export declare namespace Tool {
|
|
|
35
37
|
/**
|
|
36
38
|
* The type of tool.
|
|
37
39
|
*/
|
|
38
|
-
type Type = "custom_webhook" | "custom_websocket";
|
|
40
|
+
type Type = "custom_webhook" | "custom_websocket" | "built_in_transfer_to_phone_number";
|
|
39
41
|
const Type: {
|
|
40
42
|
readonly CustomWebhook: "custom_webhook";
|
|
41
43
|
readonly CustomWebsocket: "custom_websocket";
|
|
44
|
+
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
42
45
|
};
|
|
43
46
|
/**
|
|
44
47
|
* Mode of operation - sync waits for response, async continues without waiting.
|
|
@@ -34,6 +34,7 @@ export * from "./AudioChunkResponsePayload.js";
|
|
|
34
34
|
export * from "./AudioFinishedPayload.js";
|
|
35
35
|
export * from "./UserStartedSpeakingPayload.js";
|
|
36
36
|
export * from "./UserFinishedSpeakingPayload.js";
|
|
37
|
+
export * from "./IsUserSpeakingPayload.js";
|
|
37
38
|
export * from "./InterruptedResponsePayload.js";
|
|
38
39
|
export * from "./DtmfPayload.js";
|
|
39
40
|
export * from "./ToolCallPayload.js";
|
|
@@ -50,6 +50,7 @@ __exportStar(require("./AudioChunkResponsePayload.js"), exports);
|
|
|
50
50
|
__exportStar(require("./AudioFinishedPayload.js"), exports);
|
|
51
51
|
__exportStar(require("./UserStartedSpeakingPayload.js"), exports);
|
|
52
52
|
__exportStar(require("./UserFinishedSpeakingPayload.js"), exports);
|
|
53
|
+
__exportStar(require("./IsUserSpeakingPayload.js"), exports);
|
|
53
54
|
__exportStar(require("./InterruptedResponsePayload.js"), exports);
|
|
54
55
|
__exportStar(require("./DtmfPayload.js"), exports);
|
|
55
56
|
__exportStar(require("./ToolCallPayload.js"), exports);
|
|
@@ -12,15 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.fetcher = void 0;
|
|
13
13
|
exports.fetcherImpl = fetcherImpl;
|
|
14
14
|
const json_js_1 = require("../json.js");
|
|
15
|
-
const RawResponse_js_1 = require("./RawResponse.js");
|
|
16
|
-
const Supplier_js_1 = require("./Supplier.js");
|
|
17
15
|
const createRequestUrl_js_1 = require("./createRequestUrl.js");
|
|
18
16
|
const getErrorResponseBody_js_1 = require("./getErrorResponseBody.js");
|
|
19
17
|
const getFetchFn_js_1 = require("./getFetchFn.js");
|
|
20
18
|
const getRequestBody_js_1 = require("./getRequestBody.js");
|
|
21
19
|
const getResponseBody_js_1 = require("./getResponseBody.js");
|
|
22
20
|
const makeRequest_js_1 = require("./makeRequest.js");
|
|
21
|
+
const RawResponse_js_1 = require("./RawResponse.js");
|
|
23
22
|
const requestWithRetries_js_1 = require("./requestWithRetries.js");
|
|
23
|
+
const Supplier_js_1 = require("./Supplier.js");
|
|
24
24
|
function getHeaders(args) {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
const newHeaders = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type { APIResponse } from "./APIResponse.js";
|
|
2
|
-
export {
|
|
2
|
+
export type { BinaryResponse } from "./BinaryResponse.js";
|
|
3
3
|
export type { Fetcher, FetchFunction } from "./Fetcher.js";
|
|
4
|
+
export { fetcher } from "./Fetcher.js";
|
|
4
5
|
export { getHeader } from "./getHeader.js";
|
|
5
|
-
export { Supplier } from "./Supplier.js";
|
|
6
|
-
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js";
|
|
7
|
-
export type { RawResponse, WithRawResponse } from "./RawResponse.js";
|
|
8
6
|
export { HttpResponsePromise } from "./HttpResponsePromise.js";
|
|
9
|
-
export {
|
|
7
|
+
export type { RawResponse, WithRawResponse } from "./RawResponse.js";
|
|
8
|
+
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js";
|
|
9
|
+
export { Supplier } from "./Supplier.js";
|