phonic 0.32.1 → 0.32.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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +23 -18
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +6 -0
- package/dist/cjs/api/errors/TooManyRequestsError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +1 -0
- package/dist/cjs/api/errors/index.js +1 -0
- package/dist/cjs/api/resources/agents/client/requests/AgentsCreateRequest.d.ts +8 -0
- package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +14 -0
- package/dist/cjs/api/resources/agents/client/requests/UpsertAgentRequest.d.ts +6 -0
- package/dist/cjs/api/resources/agents/types/AgentsUpdateResponse.d.ts +5 -0
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +79 -0
- package/dist/cjs/api/resources/apiKeys/client/Client.js +293 -0
- package/dist/cjs/api/resources/apiKeys/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/client/index.js +17 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/CreateApiKeyRequest.d.ts +10 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/CreateApiKeyRequest.js +3 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.d.ts +10 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.js +3 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/apiKeys/exports.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/exports.js +21 -0
- package/dist/cjs/api/resources/apiKeys/index.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/index.js +18 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeysDeleteResponse.d.ts +3 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeysDeleteResponse.js +3 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeysUpdateResponse.d.ts +3 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeysUpdateResponse.js +3 -0
- package/dist/cjs/api/resources/apiKeys/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/apiKeys/types/index.js +18 -0
- package/dist/cjs/api/resources/auth/client/Client.d.ts +20 -0
- package/dist/cjs/api/resources/auth/client/Client.js +70 -0
- package/dist/cjs/api/resources/auth/client/requests/CreateConversationTokenRequest.d.ts +13 -0
- package/dist/cjs/api/resources/auth/client/requests/CreateConversationTokenRequest.js +3 -0
- package/dist/cjs/api/resources/auth/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/auth/types/AuthCreateConversationTokenResponse.d.ts +6 -0
- package/dist/cjs/api/resources/auth/types/AuthCreateConversationTokenResponse.js +3 -0
- package/dist/cjs/api/resources/auth/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/auth/types/index.js +1 -0
- package/dist/cjs/api/resources/conversations/client/Client.d.ts +26 -1
- package/dist/cjs/api/resources/conversations/client/Client.js +78 -0
- package/dist/cjs/api/resources/conversations/client/requests/ReplayConversationRequest.d.ts +10 -0
- package/dist/cjs/api/resources/conversations/client/requests/ReplayConversationRequest.js +3 -0
- package/dist/cjs/api/resources/conversations/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsEvaluateResponse.d.ts +19 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsEvaluateResponse.js +17 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsReplayResponse.d.ts +4 -0
- package/dist/cjs/api/resources/conversations/types/ConversationsReplayResponse.js +3 -0
- package/dist/cjs/api/resources/conversations/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/conversations/types/index.js +2 -0
- package/dist/cjs/api/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/index.js +5 -1
- package/dist/cjs/api/resources/projects/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/projects/client/Client.js +58 -0
- package/dist/cjs/api/resources/projects/types/ProjectsListEvalsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/projects/types/ProjectsListEvalsResponse.js +3 -0
- package/dist/cjs/api/resources/projects/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/projects/types/index.js +1 -0
- package/dist/cjs/api/resources/tools/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/tools/client/Client.js +2 -1
- package/dist/cjs/api/resources/tools/client/requests/CreateToolRequest.d.ts +4 -1
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.d.ts +5 -13
- package/dist/cjs/api/resources/tools/client/requests/UpdateToolRequest.js +0 -8
- package/dist/cjs/api/resources/workspace/client/Client.d.ts +20 -0
- package/dist/cjs/api/resources/workspace/client/Client.js +65 -0
- package/dist/cjs/api/resources/workspace/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/workspace/client/index.js +15 -0
- package/dist/cjs/api/resources/workspace/client/requests/UpdateWorkspaceRequest.d.ts +16 -0
- package/dist/cjs/api/resources/workspace/client/requests/UpdateWorkspaceRequest.js +3 -0
- package/dist/cjs/api/resources/workspace/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/workspace/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/workspace/types/WorkspaceGetResponse.d.ts +6 -0
- package/dist/cjs/api/resources/workspace/types/WorkspaceUpdateResponse.d.ts +3 -0
- package/dist/cjs/api/resources/workspace/types/WorkspaceUpdateResponse.js +3 -0
- package/dist/cjs/api/resources/workspace/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/workspace/types/index.js +1 -0
- package/dist/cjs/api/types/Agent.d.ts +9 -0
- package/dist/cjs/api/types/AgentIntegration.d.ts +13 -0
- package/dist/cjs/api/types/AgentIntegration.js +3 -0
- package/dist/cjs/api/types/ApiKeyWithSecret.d.ts +8 -0
- package/dist/cjs/api/types/ApiKeyWithSecret.js +3 -0
- package/dist/cjs/api/types/AudioChunkResponsePayload.d.ts +2 -0
- package/dist/cjs/api/types/ConfigOptions.d.ts +67 -0
- package/dist/cjs/api/types/Conversation.d.ts +27 -0
- package/dist/cjs/api/types/Conversation.js +4 -0
- package/dist/cjs/api/types/ConversationEval.d.ts +22 -1
- package/dist/cjs/api/types/ConversationEval.js +11 -0
- package/dist/cjs/api/types/ConversationEvalPromptInfo.d.ts +7 -0
- package/dist/cjs/api/types/ConversationEvalPromptInfo.js +3 -0
- package/dist/cjs/api/types/ConversationExtraction.d.ts +2 -4
- package/dist/cjs/api/types/ConversationItem.d.ts +4 -2
- package/dist/cjs/api/types/CreateAgentRequest.d.ts +8 -0
- package/dist/cjs/api/types/DataRetentionPolicy.d.ts +21 -0
- package/dist/cjs/api/types/DataRetentionPolicy.js +3 -0
- package/dist/cjs/api/types/DtmfPayload.d.ts +2 -0
- package/dist/cjs/api/types/ExtractionField.d.ts +2 -2
- package/dist/cjs/api/types/OutboundCallConfig.d.ts +45 -1
- package/dist/cjs/api/types/OutboundCallConfig.js +6 -0
- package/dist/cjs/api/types/OutboundNumberPool.d.ts +9 -0
- package/dist/cjs/api/types/OutboundNumberPool.js +3 -0
- package/dist/cjs/api/types/Tool.d.ts +3 -1
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +6 -0
- package/dist/esm/api/errors/TooManyRequestsError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +1 -0
- package/dist/esm/api/errors/index.mjs +1 -0
- package/dist/esm/api/resources/agents/client/requests/AgentsCreateRequest.d.mts +8 -0
- package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +14 -0
- package/dist/esm/api/resources/agents/client/requests/UpsertAgentRequest.d.mts +6 -0
- package/dist/esm/api/resources/agents/types/AgentsUpdateResponse.d.mts +5 -0
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +79 -0
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +256 -0
- package/dist/esm/api/resources/apiKeys/client/index.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/client/index.mjs +1 -0
- package/dist/esm/api/resources/apiKeys/client/requests/CreateApiKeyRequest.d.mts +10 -0
- package/dist/esm/api/resources/apiKeys/client/requests/CreateApiKeyRequest.mjs +2 -0
- package/dist/esm/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.d.mts +10 -0
- package/dist/esm/api/resources/apiKeys/client/requests/UpdateApiKeyRequest.mjs +2 -0
- package/dist/esm/api/resources/apiKeys/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/apiKeys/exports.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/exports.mjs +3 -0
- package/dist/esm/api/resources/apiKeys/index.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/index.mjs +2 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeysDeleteResponse.d.mts +3 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeysDeleteResponse.mjs +2 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeysUpdateResponse.d.mts +3 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeysUpdateResponse.mjs +2 -0
- package/dist/esm/api/resources/apiKeys/types/index.d.mts +2 -0
- package/dist/esm/api/resources/apiKeys/types/index.mjs +2 -0
- package/dist/esm/api/resources/auth/client/Client.d.mts +20 -0
- package/dist/esm/api/resources/auth/client/Client.mjs +70 -0
- package/dist/esm/api/resources/auth/client/requests/CreateConversationTokenRequest.d.mts +13 -0
- package/dist/esm/api/resources/auth/client/requests/CreateConversationTokenRequest.mjs +2 -0
- package/dist/esm/api/resources/auth/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/auth/types/AuthCreateConversationTokenResponse.d.mts +6 -0
- package/dist/esm/api/resources/auth/types/AuthCreateConversationTokenResponse.mjs +2 -0
- package/dist/esm/api/resources/auth/types/index.d.mts +1 -0
- package/dist/esm/api/resources/auth/types/index.mjs +1 -0
- package/dist/esm/api/resources/conversations/client/Client.d.mts +26 -1
- package/dist/esm/api/resources/conversations/client/Client.mjs +78 -0
- package/dist/esm/api/resources/conversations/client/requests/ReplayConversationRequest.d.mts +10 -0
- package/dist/esm/api/resources/conversations/client/requests/ReplayConversationRequest.mjs +2 -0
- package/dist/esm/api/resources/conversations/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/conversations/types/ConversationsEvaluateResponse.d.mts +19 -0
- package/dist/esm/api/resources/conversations/types/ConversationsEvaluateResponse.mjs +14 -0
- package/dist/esm/api/resources/conversations/types/ConversationsReplayResponse.d.mts +4 -0
- package/dist/esm/api/resources/conversations/types/ConversationsReplayResponse.mjs +2 -0
- package/dist/esm/api/resources/conversations/types/index.d.mts +2 -0
- package/dist/esm/api/resources/conversations/types/index.mjs +2 -0
- package/dist/esm/api/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/index.mjs +4 -0
- package/dist/esm/api/resources/projects/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/projects/client/Client.mjs +58 -0
- package/dist/esm/api/resources/projects/types/ProjectsListEvalsResponse.d.mts +4 -0
- package/dist/esm/api/resources/projects/types/ProjectsListEvalsResponse.mjs +2 -0
- package/dist/esm/api/resources/projects/types/index.d.mts +1 -0
- package/dist/esm/api/resources/projects/types/index.mjs +1 -0
- package/dist/esm/api/resources/tools/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/tools/client/Client.mjs +2 -1
- package/dist/esm/api/resources/tools/client/requests/CreateToolRequest.d.mts +4 -1
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.d.mts +5 -13
- package/dist/esm/api/resources/tools/client/requests/UpdateToolRequest.mjs +0 -8
- package/dist/esm/api/resources/workspace/client/Client.d.mts +20 -0
- package/dist/esm/api/resources/workspace/client/Client.mjs +65 -0
- package/dist/esm/api/resources/workspace/client/index.d.mts +1 -1
- package/dist/esm/api/resources/workspace/client/index.mjs +1 -1
- package/dist/esm/api/resources/workspace/client/requests/UpdateWorkspaceRequest.d.mts +16 -0
- package/dist/esm/api/resources/workspace/client/requests/UpdateWorkspaceRequest.mjs +2 -0
- package/dist/esm/api/resources/workspace/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/workspace/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/workspace/types/WorkspaceGetResponse.d.mts +6 -0
- package/dist/esm/api/resources/workspace/types/WorkspaceUpdateResponse.d.mts +3 -0
- package/dist/esm/api/resources/workspace/types/WorkspaceUpdateResponse.mjs +2 -0
- package/dist/esm/api/resources/workspace/types/index.d.mts +1 -0
- package/dist/esm/api/resources/workspace/types/index.mjs +1 -0
- package/dist/esm/api/types/Agent.d.mts +9 -0
- package/dist/esm/api/types/AgentIntegration.d.mts +13 -0
- package/dist/esm/api/types/AgentIntegration.mjs +2 -0
- package/dist/esm/api/types/ApiKeyWithSecret.d.mts +8 -0
- package/dist/esm/api/types/ApiKeyWithSecret.mjs +2 -0
- package/dist/esm/api/types/AudioChunkResponsePayload.d.mts +2 -0
- package/dist/esm/api/types/ConfigOptions.d.mts +67 -0
- package/dist/esm/api/types/Conversation.d.mts +27 -0
- package/dist/esm/api/types/Conversation.mjs +4 -0
- package/dist/esm/api/types/ConversationEval.d.mts +22 -1
- package/dist/esm/api/types/ConversationEval.mjs +10 -1
- package/dist/esm/api/types/ConversationEvalPromptInfo.d.mts +7 -0
- package/dist/esm/api/types/ConversationEvalPromptInfo.mjs +2 -0
- package/dist/esm/api/types/ConversationExtraction.d.mts +2 -4
- package/dist/esm/api/types/ConversationItem.d.mts +4 -2
- package/dist/esm/api/types/CreateAgentRequest.d.mts +8 -0
- package/dist/esm/api/types/DataRetentionPolicy.d.mts +21 -0
- package/dist/esm/api/types/DataRetentionPolicy.mjs +2 -0
- package/dist/esm/api/types/DtmfPayload.d.mts +2 -0
- package/dist/esm/api/types/ExtractionField.d.mts +2 -2
- package/dist/esm/api/types/OutboundCallConfig.d.mts +45 -1
- package/dist/esm/api/types/OutboundCallConfig.mjs +6 -0
- package/dist/esm/api/types/OutboundNumberPool.d.mts +9 -0
- package/dist/esm/api/types/OutboundNumberPool.mjs +2 -0
- package/dist/esm/api/types/Tool.d.mts +3 -1
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +540 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ConversationsEvaluateResponse {
|
|
2
|
+
evaluation: ConversationsEvaluateResponse.Evaluation;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace ConversationsEvaluateResponse {
|
|
5
|
+
interface Evaluation {
|
|
6
|
+
/** The evaluation result. */
|
|
7
|
+
result: Evaluation.Result;
|
|
8
|
+
}
|
|
9
|
+
namespace Evaluation {
|
|
10
|
+
/** The evaluation result. */
|
|
11
|
+
const Result: {
|
|
12
|
+
readonly Successful: "successful";
|
|
13
|
+
readonly Unsuccessful: "unsuccessful";
|
|
14
|
+
readonly Undecided: "undecided";
|
|
15
|
+
readonly Error: "error";
|
|
16
|
+
};
|
|
17
|
+
type Result = (typeof Result)[keyof typeof Result];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var ConversationsEvaluateResponse;
|
|
3
|
+
(function (ConversationsEvaluateResponse) {
|
|
4
|
+
let Evaluation;
|
|
5
|
+
(function (Evaluation) {
|
|
6
|
+
/** The evaluation result. */
|
|
7
|
+
Evaluation.Result = {
|
|
8
|
+
Successful: "successful",
|
|
9
|
+
Unsuccessful: "unsuccessful",
|
|
10
|
+
Undecided: "undecided",
|
|
11
|
+
Error: "error",
|
|
12
|
+
};
|
|
13
|
+
})(Evaluation = ConversationsEvaluateResponse.Evaluation || (ConversationsEvaluateResponse.Evaluation = {}));
|
|
14
|
+
})(ConversationsEvaluateResponse || (ConversationsEvaluateResponse = {}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./ConversationsCancelResponse.mjs";
|
|
2
|
+
export * from "./ConversationsEvaluateResponse.mjs";
|
|
2
3
|
export * from "./ConversationsExtractDataResponse.mjs";
|
|
3
4
|
export * from "./ConversationsGetAnalysisResponse.mjs";
|
|
4
5
|
export * from "./ConversationsGetRequestAudioContainer.mjs";
|
|
@@ -8,4 +9,5 @@ export * from "./ConversationsListExtractionsResponse.mjs";
|
|
|
8
9
|
export * from "./ConversationsListRequestAudioContainer.mjs";
|
|
9
10
|
export * from "./ConversationsListResponse.mjs";
|
|
10
11
|
export * from "./ConversationsOutboundCallResponse.mjs";
|
|
12
|
+
export * from "./ConversationsReplayResponse.mjs";
|
|
11
13
|
export * from "./ConversationsSipOutboundCallResponse.mjs";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./ConversationsCancelResponse.mjs";
|
|
2
|
+
export * from "./ConversationsEvaluateResponse.mjs";
|
|
2
3
|
export * from "./ConversationsExtractDataResponse.mjs";
|
|
3
4
|
export * from "./ConversationsGetAnalysisResponse.mjs";
|
|
4
5
|
export * from "./ConversationsGetRequestAudioContainer.mjs";
|
|
@@ -8,4 +9,5 @@ export * from "./ConversationsListExtractionsResponse.mjs";
|
|
|
8
9
|
export * from "./ConversationsListRequestAudioContainer.mjs";
|
|
9
10
|
export * from "./ConversationsListResponse.mjs";
|
|
10
11
|
export * from "./ConversationsOutboundCallResponse.mjs";
|
|
12
|
+
export * from "./ConversationsReplayResponse.mjs";
|
|
11
13
|
export * from "./ConversationsSipOutboundCallResponse.mjs";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from "./agents/client/requests/index.mjs";
|
|
2
2
|
export * as agents from "./agents/index.mjs";
|
|
3
3
|
export * from "./agents/types/index.mjs";
|
|
4
|
+
export * from "./apiKeys/client/requests/index.mjs";
|
|
5
|
+
export * as apiKeys from "./apiKeys/index.mjs";
|
|
6
|
+
export * from "./apiKeys/types/index.mjs";
|
|
4
7
|
export * from "./auth/client/requests/index.mjs";
|
|
5
8
|
export * as auth from "./auth/index.mjs";
|
|
6
9
|
export * from "./auth/types/index.mjs";
|
|
@@ -23,5 +26,6 @@ export * as tts from "./tts/index.mjs";
|
|
|
23
26
|
export * from "./voices/client/requests/index.mjs";
|
|
24
27
|
export * as voices from "./voices/index.mjs";
|
|
25
28
|
export * from "./voices/types/index.mjs";
|
|
29
|
+
export * from "./workspace/client/requests/index.mjs";
|
|
26
30
|
export * as workspace from "./workspace/index.mjs";
|
|
27
31
|
export * from "./workspace/types/index.mjs";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from "./agents/client/requests/index.mjs";
|
|
2
2
|
export * as agents from "./agents/index.mjs";
|
|
3
3
|
export * from "./agents/types/index.mjs";
|
|
4
|
+
export * from "./apiKeys/client/requests/index.mjs";
|
|
5
|
+
export * as apiKeys from "./apiKeys/index.mjs";
|
|
6
|
+
export * from "./apiKeys/types/index.mjs";
|
|
4
7
|
export * from "./auth/client/requests/index.mjs";
|
|
5
8
|
export * as auth from "./auth/index.mjs";
|
|
6
9
|
export * from "./auth/types/index.mjs";
|
|
@@ -23,5 +26,6 @@ export * as tts from "./tts/index.mjs";
|
|
|
23
26
|
export * from "./voices/client/requests/index.mjs";
|
|
24
27
|
export * as voices from "./voices/index.mjs";
|
|
25
28
|
export * from "./voices/types/index.mjs";
|
|
29
|
+
export * from "./workspace/client/requests/index.mjs";
|
|
26
30
|
export * as workspace from "./workspace/index.mjs";
|
|
27
31
|
export * from "./workspace/types/index.mjs";
|
|
@@ -133,4 +133,20 @@ export declare class ProjectsClient {
|
|
|
133
133
|
*/
|
|
134
134
|
createEvalPrompt(id: string, request: Phonic.CreateConversationEvalPromptRequest, requestOptions?: ProjectsClient.RequestOptions): core.HttpResponsePromise<Phonic.ProjectsCreateEvalPromptResponse>;
|
|
135
135
|
private __createEvalPrompt;
|
|
136
|
+
/**
|
|
137
|
+
* Returns all conversation evaluation results for a project.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} id - The ID of the project.
|
|
140
|
+
* @param {ProjectsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
|
+
*
|
|
142
|
+
* @throws {@link Phonic.UnauthorizedError}
|
|
143
|
+
* @throws {@link Phonic.ForbiddenError}
|
|
144
|
+
* @throws {@link Phonic.NotFoundError}
|
|
145
|
+
* @throws {@link Phonic.InternalServerError}
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* await client.projects.listEvals("id")
|
|
149
|
+
*/
|
|
150
|
+
listEvals(id: string, requestOptions?: ProjectsClient.RequestOptions): core.HttpResponsePromise<Phonic.ProjectsListEvalsResponse>;
|
|
151
|
+
private __listEvals;
|
|
136
152
|
}
|
|
@@ -455,4 +455,62 @@ export class ProjectsClient {
|
|
|
455
455
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/projects/{id}/conversation_eval_prompts");
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* Returns all conversation evaluation results for a project.
|
|
460
|
+
*
|
|
461
|
+
* @param {string} id - The ID of the project.
|
|
462
|
+
* @param {ProjectsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
463
|
+
*
|
|
464
|
+
* @throws {@link Phonic.UnauthorizedError}
|
|
465
|
+
* @throws {@link Phonic.ForbiddenError}
|
|
466
|
+
* @throws {@link Phonic.NotFoundError}
|
|
467
|
+
* @throws {@link Phonic.InternalServerError}
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* await client.projects.listEvals("id")
|
|
471
|
+
*/
|
|
472
|
+
listEvals(id, requestOptions) {
|
|
473
|
+
return core.HttpResponsePromise.fromPromise(this.__listEvals(id, requestOptions));
|
|
474
|
+
}
|
|
475
|
+
__listEvals(id, requestOptions) {
|
|
476
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
477
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
478
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
479
|
+
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);
|
|
480
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
481
|
+
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)
|
|
482
|
+
.base, `projects/${core.url.encodePathParam(id)}/conversation_evals`),
|
|
483
|
+
method: "GET",
|
|
484
|
+
headers: _headers,
|
|
485
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
486
|
+
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,
|
|
487
|
+
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,
|
|
488
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
489
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
490
|
+
logging: this._options.logging,
|
|
491
|
+
});
|
|
492
|
+
if (_response.ok) {
|
|
493
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
494
|
+
}
|
|
495
|
+
if (_response.error.reason === "status-code") {
|
|
496
|
+
switch (_response.error.statusCode) {
|
|
497
|
+
case 401:
|
|
498
|
+
throw new Phonic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
499
|
+
case 403:
|
|
500
|
+
throw new Phonic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
501
|
+
case 404:
|
|
502
|
+
throw new Phonic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
503
|
+
case 500:
|
|
504
|
+
throw new Phonic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
505
|
+
default:
|
|
506
|
+
throw new errors.PhonicError({
|
|
507
|
+
statusCode: _response.error.statusCode,
|
|
508
|
+
body: _response.error.body,
|
|
509
|
+
rawResponse: _response.rawResponse,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/projects/{id}/conversation_evals");
|
|
514
|
+
});
|
|
515
|
+
}
|
|
458
516
|
}
|
|
@@ -3,5 +3,6 @@ export * from "./ProjectsCreateResponse.mjs";
|
|
|
3
3
|
export * from "./ProjectsDeleteResponse.mjs";
|
|
4
4
|
export * from "./ProjectsGetResponse.mjs";
|
|
5
5
|
export * from "./ProjectsListEvalPromptsResponse.mjs";
|
|
6
|
+
export * from "./ProjectsListEvalsResponse.mjs";
|
|
6
7
|
export * from "./ProjectsListResponse.mjs";
|
|
7
8
|
export * from "./ProjectsUpdateResponse.mjs";
|
|
@@ -3,5 +3,6 @@ export * from "./ProjectsCreateResponse.mjs";
|
|
|
3
3
|
export * from "./ProjectsDeleteResponse.mjs";
|
|
4
4
|
export * from "./ProjectsGetResponse.mjs";
|
|
5
5
|
export * from "./ProjectsListEvalPromptsResponse.mjs";
|
|
6
|
+
export * from "./ProjectsListEvalsResponse.mjs";
|
|
6
7
|
export * from "./ProjectsListResponse.mjs";
|
|
7
8
|
export * from "./ProjectsUpdateResponse.mjs";
|
|
@@ -50,7 +50,8 @@ export declare class ToolsClient {
|
|
|
50
50
|
* }],
|
|
51
51
|
* require_speech_before_tool_call: false,
|
|
52
52
|
* forbid_speech_after_tool_call: false,
|
|
53
|
-
* allow_tool_chaining: true
|
|
53
|
+
* allow_tool_chaining: true,
|
|
54
|
+
* context: "Press the A button 5 times then gently shake the printer."
|
|
54
55
|
* })
|
|
55
56
|
*
|
|
56
57
|
* @example
|
|
@@ -110,7 +110,8 @@ export class ToolsClient {
|
|
|
110
110
|
* }],
|
|
111
111
|
* require_speech_before_tool_call: false,
|
|
112
112
|
* forbid_speech_after_tool_call: false,
|
|
113
|
-
* allow_tool_chaining: true
|
|
113
|
+
* allow_tool_chaining: true,
|
|
114
|
+
* context: "Press the A button 5 times then gently shake the printer."
|
|
114
115
|
* })
|
|
115
116
|
*
|
|
116
117
|
* @example
|
|
@@ -15,7 +15,8 @@ import type * as Phonic from "../../../../index.mjs";
|
|
|
15
15
|
* }],
|
|
16
16
|
* require_speech_before_tool_call: false,
|
|
17
17
|
* forbid_speech_after_tool_call: false,
|
|
18
|
-
* allow_tool_chaining: true
|
|
18
|
+
* allow_tool_chaining: true,
|
|
19
|
+
* context: "Press the A button 5 times then gently shake the printer."
|
|
19
20
|
* }
|
|
20
21
|
*
|
|
21
22
|
* @example
|
|
@@ -145,6 +146,8 @@ export interface CreateToolRequest {
|
|
|
145
146
|
allow_tool_chaining?: boolean;
|
|
146
147
|
/** The agent doesn't typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools. */
|
|
147
148
|
wait_for_response?: boolean;
|
|
149
|
+
/** The static context returned to the agent. Required for custom_context tools. */
|
|
150
|
+
context?: string;
|
|
148
151
|
}
|
|
149
152
|
export declare namespace CreateToolRequest {
|
|
150
153
|
/** The type of tool. */
|
|
@@ -17,13 +17,13 @@ export interface UpdateToolRequest {
|
|
|
17
17
|
name?: string;
|
|
18
18
|
/** A description of what the tool does. */
|
|
19
19
|
description?: string;
|
|
20
|
-
/** The type of tool. */
|
|
21
|
-
type?: UpdateToolRequest.Type;
|
|
22
20
|
/** Mode of operation. */
|
|
23
21
|
execution_mode?: UpdateToolRequest.ExecutionMode;
|
|
22
|
+
/** The static context returned to the agent. Only applicable to custom_context tools. */
|
|
23
|
+
context?: string;
|
|
24
24
|
/**
|
|
25
25
|
* Array of parameter definitions.
|
|
26
|
-
* When updating `
|
|
26
|
+
* When updating `endpoint_method`, all parameters must include explicit `location` values.
|
|
27
27
|
* For `custom_webhook` tools: `location` is required for POST, defaults to `"query_string"` for GET.
|
|
28
28
|
* For `custom_websocket`, `built_in_transfer_to_phone_number`, and `built_in_transfer_to_agent` tools: `location` must not be specified.
|
|
29
29
|
*/
|
|
@@ -31,7 +31,8 @@ export interface UpdateToolRequest {
|
|
|
31
31
|
/** HTTP method for webhook tools. When changing this value, all parameters must include explicit `location` values. */
|
|
32
32
|
endpoint_method?: UpdateToolRequest.EndpointMethod;
|
|
33
33
|
endpoint_url?: string;
|
|
34
|
-
|
|
34
|
+
/** Headers for webhook tools. Set to null to clear existing headers. */
|
|
35
|
+
endpoint_headers?: Record<string, string | null> | null;
|
|
35
36
|
endpoint_timeout_ms?: number;
|
|
36
37
|
tool_call_output_timeout_ms?: number;
|
|
37
38
|
/** The E.164 formatted phone number to transfer calls to. Set to null if the agent should determine the phone number. */
|
|
@@ -56,15 +57,6 @@ export interface UpdateToolRequest {
|
|
|
56
57
|
wait_for_response?: boolean;
|
|
57
58
|
}
|
|
58
59
|
export declare namespace UpdateToolRequest {
|
|
59
|
-
/** The type of tool. */
|
|
60
|
-
const Type: {
|
|
61
|
-
readonly CustomContext: "custom_context";
|
|
62
|
-
readonly CustomWebhook: "custom_webhook";
|
|
63
|
-
readonly CustomWebsocket: "custom_websocket";
|
|
64
|
-
readonly BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number";
|
|
65
|
-
readonly BuiltInTransferToAgent: "built_in_transfer_to_agent";
|
|
66
|
-
};
|
|
67
|
-
type Type = (typeof Type)[keyof typeof Type];
|
|
68
60
|
/** Mode of operation. */
|
|
69
61
|
const ExecutionMode: {
|
|
70
62
|
readonly Sync: "sync";
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
export var UpdateToolRequest;
|
|
3
3
|
(function (UpdateToolRequest) {
|
|
4
|
-
/** The type of tool. */
|
|
5
|
-
UpdateToolRequest.Type = {
|
|
6
|
-
CustomContext: "custom_context",
|
|
7
|
-
CustomWebhook: "custom_webhook",
|
|
8
|
-
CustomWebsocket: "custom_websocket",
|
|
9
|
-
BuiltInTransferToPhoneNumber: "built_in_transfer_to_phone_number",
|
|
10
|
-
BuiltInTransferToAgent: "built_in_transfer_to_agent",
|
|
11
|
-
};
|
|
12
4
|
/** Mode of operation. */
|
|
13
5
|
UpdateToolRequest.ExecutionMode = {
|
|
14
6
|
Sync: "sync",
|
|
@@ -23,4 +23,24 @@ export declare class WorkspaceClient {
|
|
|
23
23
|
*/
|
|
24
24
|
get(requestOptions?: WorkspaceClient.RequestOptions): core.HttpResponsePromise<Phonic.WorkspaceGetResponse>;
|
|
25
25
|
private __get;
|
|
26
|
+
/**
|
|
27
|
+
* Updates the workspace.
|
|
28
|
+
*
|
|
29
|
+
* @param {Phonic.UpdateWorkspaceRequest} request
|
|
30
|
+
* @param {WorkspaceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link Phonic.BadRequestError}
|
|
33
|
+
* @throws {@link Phonic.UnauthorizedError}
|
|
34
|
+
* @throws {@link Phonic.ForbiddenError}
|
|
35
|
+
* @throws {@link Phonic.InternalServerError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.workspace.update({
|
|
39
|
+
* logo_url: "https://example.com/logo.png",
|
|
40
|
+
* invite_link_allowed_domains: ["example.com"],
|
|
41
|
+
* ip_allowlist: ["203.0.113.0/24"]
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
update(request?: Phonic.UpdateWorkspaceRequest, requestOptions?: WorkspaceClient.RequestOptions): core.HttpResponsePromise<Phonic.WorkspaceUpdateResponse>;
|
|
45
|
+
private __update;
|
|
26
46
|
}
|
|
@@ -70,4 +70,69 @@ export class WorkspaceClient {
|
|
|
70
70
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/workspace");
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Updates the workspace.
|
|
75
|
+
*
|
|
76
|
+
* @param {Phonic.UpdateWorkspaceRequest} request
|
|
77
|
+
* @param {WorkspaceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link Phonic.BadRequestError}
|
|
80
|
+
* @throws {@link Phonic.UnauthorizedError}
|
|
81
|
+
* @throws {@link Phonic.ForbiddenError}
|
|
82
|
+
* @throws {@link Phonic.InternalServerError}
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* await client.workspace.update({
|
|
86
|
+
* logo_url: "https://example.com/logo.png",
|
|
87
|
+
* invite_link_allowed_domains: ["example.com"],
|
|
88
|
+
* ip_allowlist: ["203.0.113.0/24"]
|
|
89
|
+
* })
|
|
90
|
+
*/
|
|
91
|
+
update(request = {}, requestOptions) {
|
|
92
|
+
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
93
|
+
}
|
|
94
|
+
__update() {
|
|
95
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
96
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
97
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
98
|
+
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);
|
|
99
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
100
|
+
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)
|
|
101
|
+
.base, "workspace"),
|
|
102
|
+
method: "PATCH",
|
|
103
|
+
headers: _headers,
|
|
104
|
+
contentType: "application/json",
|
|
105
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
106
|
+
requestType: "json",
|
|
107
|
+
body: request,
|
|
108
|
+
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,
|
|
109
|
+
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,
|
|
110
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
112
|
+
logging: this._options.logging,
|
|
113
|
+
});
|
|
114
|
+
if (_response.ok) {
|
|
115
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
116
|
+
}
|
|
117
|
+
if (_response.error.reason === "status-code") {
|
|
118
|
+
switch (_response.error.statusCode) {
|
|
119
|
+
case 400:
|
|
120
|
+
throw new Phonic.BadRequestError(_response.error.body, _response.rawResponse);
|
|
121
|
+
case 401:
|
|
122
|
+
throw new Phonic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
123
|
+
case 403:
|
|
124
|
+
throw new Phonic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
125
|
+
case 500:
|
|
126
|
+
throw new Phonic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
127
|
+
default:
|
|
128
|
+
throw new errors.PhonicError({
|
|
129
|
+
statusCode: _response.error.statusCode,
|
|
130
|
+
body: _response.error.body,
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/workspace");
|
|
136
|
+
});
|
|
137
|
+
}
|
|
73
138
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* logo_url: "https://example.com/logo.png",
|
|
5
|
+
* invite_link_allowed_domains: ["example.com"],
|
|
6
|
+
* ip_allowlist: ["203.0.113.0/24"]
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface UpdateWorkspaceRequest {
|
|
10
|
+
/** URL of the workspace logo. Must be an https URL ending in .png or .svg, or null to clear it. */
|
|
11
|
+
logo_url?: string | null;
|
|
12
|
+
/** Email domains allowed to join the workspace via invite link. */
|
|
13
|
+
invite_link_allowed_domains?: string[];
|
|
14
|
+
/** IP addresses or CIDR ranges allowed to access the workspace. */
|
|
15
|
+
ip_allowlist?: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { UpdateWorkspaceRequest } from "./UpdateWorkspaceRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,4 +3,10 @@ export interface WorkspaceGetResponse {
|
|
|
3
3
|
active_conversations: number;
|
|
4
4
|
/** Maximum number of concurrent conversations allowed for this workspace. */
|
|
5
5
|
max_active_conversations: number;
|
|
6
|
+
/** URL of the workspace logo (PNG or SVG), or null if not set. */
|
|
7
|
+
logo_url: string | null;
|
|
8
|
+
/** Email domains allowed to join the workspace via invite link. */
|
|
9
|
+
invite_link_allowed_domains: string[];
|
|
10
|
+
/** IP addresses or CIDR ranges allowed to access the workspace. */
|
|
11
|
+
ip_allowlist: string[];
|
|
6
12
|
}
|
|
@@ -76,6 +76,15 @@ export interface Agent {
|
|
|
76
76
|
vad_threshold?: number | undefined;
|
|
77
77
|
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
78
78
|
enable_redaction?: boolean | undefined;
|
|
79
|
+
/** The URL-friendly slug of the agent. */
|
|
80
|
+
slug?: string | undefined;
|
|
81
|
+
/** When `true`, the assistant emits backchannel cues (e.g. "mm-hmm") while the user is speaking. */
|
|
82
|
+
enable_assistant_backchannel?: boolean | undefined;
|
|
83
|
+
/** How aggressively the assistant backchannels, from 0 to 1. */
|
|
84
|
+
assistant_backchannel_aggressiveness?: number | undefined;
|
|
85
|
+
/** Third-party integrations enabled for the agent. */
|
|
86
|
+
integrations?: Phonic.AgentIntegration[] | undefined;
|
|
87
|
+
data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
|
|
79
88
|
}
|
|
80
89
|
export declare namespace Agent {
|
|
81
90
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A third-party integration enabled for an agent.
|
|
3
|
+
*/
|
|
4
|
+
export interface AgentIntegration {
|
|
5
|
+
/** The connected account ID. */
|
|
6
|
+
account_id: string;
|
|
7
|
+
/** The connected account name. */
|
|
8
|
+
account_name: string | null;
|
|
9
|
+
/** The integration actions available to the agent. */
|
|
10
|
+
action_names: string[];
|
|
11
|
+
/** The slug identifying the integration app. */
|
|
12
|
+
app_slug: string;
|
|
13
|
+
}
|
|
@@ -4,4 +4,6 @@ export interface AudioChunkResponsePayload {
|
|
|
4
4
|
audio: string;
|
|
5
5
|
/** Text corresponding to audio chunk */
|
|
6
6
|
text: string;
|
|
7
|
+
/** Optional latency-breakdown metrics for the audio chunk, expressed as named millisecond durations. Only present on the first audio chunk of a turn. */
|
|
8
|
+
timings?: Record<string, number> | undefined;
|
|
7
9
|
}
|
|
@@ -65,6 +65,23 @@ export interface ConfigOptions {
|
|
|
65
65
|
template_variables?: Record<string, string> | undefined;
|
|
66
66
|
/** When `true`, PII and PHI are redacted from text transcripts (e.g. replaced with tags like `[PHONE NUMBER]`) and bleeped from audio recordings after the conversation ends. */
|
|
67
67
|
enable_redaction?: boolean | undefined;
|
|
68
|
+
/** Names of pre-configured MCP servers to make available to the assistant. Names must be unique. */
|
|
69
|
+
mcp_servers?: string[] | undefined;
|
|
70
|
+
/** Tasks the assistant should accomplish during the conversation. */
|
|
71
|
+
tasks?: ConfigOptions.Tasks.Item[] | undefined;
|
|
72
|
+
/** Pool of phone numbers to use as the caller ID for outbound calls. */
|
|
73
|
+
outbound_number_pool?: (ConfigOptions.OutboundNumberPool | null) | undefined;
|
|
74
|
+
/** When `true`, the assistant will produce backchannel responses (e.g. "mm-hmm", "yeah") while the user is speaking. */
|
|
75
|
+
enable_assistant_backchannel?: boolean | undefined;
|
|
76
|
+
/** How aggressively the assistant produces backchannel responses. Only applies when `enable_assistant_backchannel` is `true`. */
|
|
77
|
+
assistant_backchannel_aggressiveness?: number | undefined;
|
|
78
|
+
/** When not `null`, the agent will call this endpoint to get configuration options for the conversation. */
|
|
79
|
+
configuration_endpoint?: (ConfigOptions.ConfigurationEndpoint | null) | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Policy controlling how long transcripts and audio recordings are retained before being deleted.
|
|
82
|
+
* When `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.
|
|
83
|
+
*/
|
|
84
|
+
data_retention_policy?: ConfigOptions.DataRetentionPolicy | undefined;
|
|
68
85
|
}
|
|
69
86
|
export declare namespace ConfigOptions {
|
|
70
87
|
/** Background noise type for the conversation */
|
|
@@ -104,4 +121,54 @@ export declare namespace ConfigOptions {
|
|
|
104
121
|
pronunciation: string;
|
|
105
122
|
}
|
|
106
123
|
}
|
|
124
|
+
type Tasks = Tasks.Item[];
|
|
125
|
+
namespace Tasks {
|
|
126
|
+
interface Item {
|
|
127
|
+
/** Name of the task. */
|
|
128
|
+
name: string;
|
|
129
|
+
/** Description of the task. */
|
|
130
|
+
description: string;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Pool of phone numbers to use as the caller ID for outbound calls.
|
|
135
|
+
*/
|
|
136
|
+
interface OutboundNumberPool {
|
|
137
|
+
/** Active E.164 phone numbers to use for outbound calls. Numbers must be unique. */
|
|
138
|
+
active: string[];
|
|
139
|
+
/** Blocked E.164 phone numbers that should not be used for outbound calls. */
|
|
140
|
+
blocked: string[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* When not `null`, the agent will call this endpoint to get configuration options for the conversation.
|
|
144
|
+
*/
|
|
145
|
+
interface ConfigurationEndpoint {
|
|
146
|
+
/** URL to call. */
|
|
147
|
+
url: string;
|
|
148
|
+
/** Object of key-value pairs sent as headers when calling the endpoint. */
|
|
149
|
+
headers?: Record<string, string> | undefined;
|
|
150
|
+
/** Timeout in milliseconds for the endpoint call. */
|
|
151
|
+
timeout_ms?: number | undefined;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Policy controlling how long transcripts and audio recordings are retained before being deleted.
|
|
155
|
+
* When `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.
|
|
156
|
+
*/
|
|
157
|
+
type DataRetentionPolicy =
|
|
158
|
+
/**
|
|
159
|
+
* Zero data retention mode. No transcripts or audio recordings are retained. */
|
|
160
|
+
{
|
|
161
|
+
zero_data_retention: true;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Standard data retention with configurable deletion windows. */
|
|
165
|
+
| {
|
|
166
|
+
zero_data_retention: false;
|
|
167
|
+
transcripts: {
|
|
168
|
+
delete_after_hours: number | null;
|
|
169
|
+
};
|
|
170
|
+
audio_recordings: {
|
|
171
|
+
delete_after_hours: number | null;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
107
174
|
}
|