phonic 0.32.2 → 0.32.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +31 -0
- package/dist/cjs/api/types/Conversation.js +8 -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 +40 -0
- 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 +31 -0
- package/dist/esm/api/types/Conversation.mjs +8 -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 +40 -0
- 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
|
@@ -86,6 +86,20 @@ export interface Conversation {
|
|
|
86
86
|
call_info: Conversation.CallInfo | null;
|
|
87
87
|
/** Analysis of the conversation including latencies and interruptions. */
|
|
88
88
|
analysis: Phonic.ConversationAnalysis;
|
|
89
|
+
/** Whether PII and PHI have been redacted from the conversation. */
|
|
90
|
+
is_redacted?: boolean | undefined;
|
|
91
|
+
/** The redacted transcript of the conversation. `null` when the conversation is not redacted. */
|
|
92
|
+
redacted_transcript?: (string | null) | undefined;
|
|
93
|
+
/** Arbitrary metadata associated with the conversation. */
|
|
94
|
+
metadata?: (Record<string, unknown> | null) | undefined;
|
|
95
|
+
/** Controls how long transcripts and audio recordings are retained before deletion. */
|
|
96
|
+
data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
|
|
97
|
+
/** Information about when transcripts and audio recordings are or were scheduled to be deleted. */
|
|
98
|
+
deletion_info?: Conversation.DeletionInfo | undefined;
|
|
99
|
+
/** Whether the assistant produced backchannel responses during the conversation. */
|
|
100
|
+
enable_assistant_backchannel?: boolean | undefined;
|
|
101
|
+
/** How aggressively the assistant produced backchannel responses during the conversation. */
|
|
102
|
+
assistant_backchannel_aggressiveness?: number | undefined;
|
|
89
103
|
}
|
|
90
104
|
export declare namespace Conversation {
|
|
91
105
|
/**
|
|
@@ -111,9 +125,17 @@ export declare namespace Conversation {
|
|
|
111
125
|
/** The origin of the conversation. */
|
|
112
126
|
const Origin: {
|
|
113
127
|
readonly Web: "web";
|
|
128
|
+
readonly WebPlayground: "web-playground";
|
|
129
|
+
readonly WebDemo: "web-demo";
|
|
114
130
|
readonly Direct: "direct";
|
|
131
|
+
readonly LivekitAgentsPy: "livekit-agents-py";
|
|
132
|
+
readonly LivekitAgentsJs: "livekit-agents-js";
|
|
133
|
+
readonly SdkPy: "sdk-py";
|
|
134
|
+
readonly SdkJs: "sdk-js";
|
|
115
135
|
readonly Inbound: "inbound";
|
|
136
|
+
readonly TelephonyInbound: "telephony-inbound";
|
|
116
137
|
readonly Outbound: "outbound";
|
|
138
|
+
readonly TelephonyOutbound: "telephony-outbound";
|
|
117
139
|
readonly Replay: "replay";
|
|
118
140
|
};
|
|
119
141
|
type Origin = (typeof Origin)[keyof typeof Origin];
|
|
@@ -162,4 +184,13 @@ export declare namespace Conversation {
|
|
|
162
184
|
/** Twilio Call SID. Only present for user SIP trunking calls. */
|
|
163
185
|
twilio_call_sid?: string | undefined;
|
|
164
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Information about when transcripts and audio recordings are or were scheduled to be deleted.
|
|
189
|
+
*/
|
|
190
|
+
interface DeletionInfo {
|
|
191
|
+
/** When the transcripts were deleted. `null` if not deleted. */
|
|
192
|
+
transcripts_deleted_at: string | null;
|
|
193
|
+
/** When the audio recordings were deleted. `null` if not deleted. */
|
|
194
|
+
audio_recordings_deleted_at: string | null;
|
|
195
|
+
}
|
|
165
196
|
}
|
|
@@ -4,9 +4,17 @@ export var Conversation;
|
|
|
4
4
|
/** The origin of the conversation. */
|
|
5
5
|
Conversation.Origin = {
|
|
6
6
|
Web: "web",
|
|
7
|
+
WebPlayground: "web-playground",
|
|
8
|
+
WebDemo: "web-demo",
|
|
7
9
|
Direct: "direct",
|
|
10
|
+
LivekitAgentsPy: "livekit-agents-py",
|
|
11
|
+
LivekitAgentsJs: "livekit-agents-js",
|
|
12
|
+
SdkPy: "sdk-py",
|
|
13
|
+
SdkJs: "sdk-js",
|
|
8
14
|
Inbound: "inbound",
|
|
15
|
+
TelephonyInbound: "telephony-inbound",
|
|
9
16
|
Outbound: "outbound",
|
|
17
|
+
TelephonyOutbound: "telephony-outbound",
|
|
10
18
|
Replay: "replay",
|
|
11
19
|
};
|
|
12
20
|
/** The background noise type used in the conversation. */
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import type * as Phonic from "../index.mjs";
|
|
2
|
+
export interface ConversationEval {
|
|
3
|
+
/** The evaluation ID. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The ID of the conversation that was evaluated. */
|
|
6
|
+
conversation_id: string;
|
|
7
|
+
prompt: Phonic.ConversationEvalPromptInfo;
|
|
8
|
+
/** The evaluation result. */
|
|
9
|
+
result: ConversationEval.Result;
|
|
10
|
+
/** When the evaluation was created. */
|
|
11
|
+
created_at: string;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ConversationEval {
|
|
14
|
+
/** The evaluation result. */
|
|
15
|
+
const Result: {
|
|
16
|
+
readonly Successful: "successful";
|
|
17
|
+
readonly Unsuccessful: "unsuccessful";
|
|
18
|
+
readonly Undecided: "undecided";
|
|
19
|
+
readonly Error: "error";
|
|
20
|
+
};
|
|
21
|
+
type Result = (typeof Result)[keyof typeof Result];
|
|
22
|
+
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var ConversationEval;
|
|
3
|
+
(function (ConversationEval) {
|
|
4
|
+
/** The evaluation result. */
|
|
5
|
+
ConversationEval.Result = {
|
|
6
|
+
Successful: "successful",
|
|
7
|
+
Unsuccessful: "unsuccessful",
|
|
8
|
+
Undecided: "undecided",
|
|
9
|
+
Error: "error",
|
|
10
|
+
};
|
|
11
|
+
})(ConversationEval || (ConversationEval = {}));
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
export interface ConversationExtraction {
|
|
2
2
|
/** The extraction ID. */
|
|
3
3
|
id: string;
|
|
4
|
-
/** The conversation ID. */
|
|
5
|
-
conversation_id?: string | undefined;
|
|
6
4
|
schema: ConversationExtraction.Schema;
|
|
7
5
|
/** The extracted data. */
|
|
8
6
|
result: Record<string, unknown>;
|
|
9
|
-
/** Error message if extraction failed. */
|
|
10
|
-
error: string | null;
|
|
11
7
|
/** When the extraction was created. */
|
|
12
8
|
created_at: string;
|
|
13
9
|
}
|
|
@@ -15,5 +11,7 @@ export declare namespace ConversationExtraction {
|
|
|
15
11
|
interface Schema {
|
|
16
12
|
id: string;
|
|
17
13
|
name: string;
|
|
14
|
+
/** Whether the extraction schema has been deleted. */
|
|
15
|
+
isDeleted: boolean;
|
|
18
16
|
}
|
|
19
17
|
}
|
|
@@ -5,10 +5,12 @@ export interface ConversationItem {
|
|
|
5
5
|
item_idx: number;
|
|
6
6
|
/** Who spoke in this turn. */
|
|
7
7
|
role: ConversationItem.Role;
|
|
8
|
-
/** Live transcript of this turn. */
|
|
9
|
-
live_transcript: string;
|
|
8
|
+
/** Live transcript of this turn. `null` when the turn has been redacted. */
|
|
9
|
+
live_transcript: string | null;
|
|
10
10
|
/** Post-call processed transcript. */
|
|
11
11
|
post_call_transcript: string | null;
|
|
12
|
+
/** The redacted transcript of this turn. `null` when the turn is not redacted. */
|
|
13
|
+
redacted_transcript?: (string | null) | undefined;
|
|
12
14
|
/** Duration of this turn in milliseconds. */
|
|
13
15
|
duration_ms: number;
|
|
14
16
|
/** When this turn started. */
|
|
@@ -2,6 +2,8 @@ import type * as Phonic from "../index.mjs";
|
|
|
2
2
|
export interface CreateAgentRequest {
|
|
3
3
|
/** The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
|
|
4
4
|
name: string;
|
|
5
|
+
/** URL-friendly agent slug. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project. */
|
|
6
|
+
slug?: string | undefined;
|
|
5
7
|
/** When set to `null`, the agent will not be associated with a phone number. When set to `"assign-automatically"`, the agent will be assigned a random phone number. When set to `"custom"`, you must provide `custom_phone_numbers`. */
|
|
6
8
|
phone_number?: (CreateAgentRequest.PhoneNumber | null) | undefined;
|
|
7
9
|
/** The custom phone number to use for the agent in E.164 format (e.g., +1234567890). This field is deprecated. Use `custom_phone_numbers` instead. */
|
|
@@ -42,6 +44,12 @@ export interface CreateAgentRequest {
|
|
|
42
44
|
no_input_poke_text?: string | undefined;
|
|
43
45
|
/** Seconds of silence before ending the conversation. */
|
|
44
46
|
no_input_end_conversation_sec?: number | undefined;
|
|
47
|
+
/** When `true`, the assistant will produce backchannel responses (e.g. "mm-hmm") while the user is speaking. */
|
|
48
|
+
enable_assistant_backchannel?: boolean | undefined;
|
|
49
|
+
/** How aggressively the assistant produces backchannel responses. Only relevant when `enable_assistant_backchannel` is `true`. */
|
|
50
|
+
assistant_backchannel_aggressiveness?: number | undefined;
|
|
51
|
+
/** Controls how long transcripts and audio recordings are retained before deletion. */
|
|
52
|
+
data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
|
|
45
53
|
/** ISO 639-1 language code that sets the agent's default language to recognize and speak. Welcome message and no input poke text should be in this language. */
|
|
46
54
|
default_language?: Phonic.LanguageCode | undefined;
|
|
47
55
|
/** Array of additional ISO 639-1 language codes that the agent should be able to recognize and speak. Should not include `default_language`. */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls how long transcripts and audio recordings are retained before deletion.
|
|
3
|
+
* When `zero_data_retention` is `true`, nothing is retained and `transcripts`/`audio_recordings` are omitted.
|
|
4
|
+
*/
|
|
5
|
+
export type DataRetentionPolicy =
|
|
6
|
+
/**
|
|
7
|
+
* Zero data retention mode. No transcripts or audio recordings are retained. */
|
|
8
|
+
{
|
|
9
|
+
zero_data_retention: true;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Standard data retention with configurable deletion windows. */
|
|
13
|
+
| {
|
|
14
|
+
zero_data_retention: false;
|
|
15
|
+
transcripts: {
|
|
16
|
+
delete_after_hours: number | null;
|
|
17
|
+
};
|
|
18
|
+
audio_recordings: {
|
|
19
|
+
delete_after_hours: number | null;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -3,8 +3,8 @@ export interface ExtractionField {
|
|
|
3
3
|
name: string;
|
|
4
4
|
/** The field type. */
|
|
5
5
|
type: ExtractionField.Type;
|
|
6
|
-
/** Description of the field. */
|
|
7
|
-
description
|
|
6
|
+
/** Description of the field. May be null, but the property must be present. */
|
|
7
|
+
description: string | null;
|
|
8
8
|
}
|
|
9
9
|
export declare namespace ExtractionField {
|
|
10
10
|
/** The field type. */
|
|
@@ -47,6 +47,28 @@ export interface OutboundCallConfig {
|
|
|
47
47
|
tools?: OutboundCallConfig.Tools.Item[] | undefined;
|
|
48
48
|
/** 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. */
|
|
49
49
|
enable_redaction?: boolean | undefined;
|
|
50
|
+
/** The speech-to-speech model to use. */
|
|
51
|
+
model?: "merritt" | undefined;
|
|
52
|
+
/** The audio speed of the agent. */
|
|
53
|
+
audio_speed?: number | undefined;
|
|
54
|
+
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
55
|
+
background_noise?: (OutboundCallConfig.BackgroundNoise | null) | undefined;
|
|
56
|
+
/** The background noise level of the agent. */
|
|
57
|
+
background_noise_level?: number | undefined;
|
|
58
|
+
/** Array of MCP server names to use. */
|
|
59
|
+
mcp_servers?: string[] | undefined;
|
|
60
|
+
/** Array of task objects with `name` and `description` fields. */
|
|
61
|
+
tasks?: Phonic.Task[] | undefined;
|
|
62
|
+
/** Pool of phone numbers used for outbound calls. */
|
|
63
|
+
outbound_number_pool?: (Phonic.OutboundNumberPool | null) | undefined;
|
|
64
|
+
/** When `true`, the assistant will produce backchannel responses (e.g. "mm-hmm") while the user is speaking. */
|
|
65
|
+
enable_assistant_backchannel?: boolean | undefined;
|
|
66
|
+
/** How aggressively the assistant produces backchannel responses. Only relevant when `enable_assistant_backchannel` is `true`. */
|
|
67
|
+
assistant_backchannel_aggressiveness?: number | undefined;
|
|
68
|
+
/** When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options. */
|
|
69
|
+
configuration_endpoint?: (OutboundCallConfig.ConfigurationEndpoint | null) | undefined;
|
|
70
|
+
/** Controls how long transcripts and audio recordings are retained before deletion. */
|
|
71
|
+
data_retention_policy?: Phonic.DataRetentionPolicy | undefined;
|
|
50
72
|
}
|
|
51
73
|
export declare namespace OutboundCallConfig {
|
|
52
74
|
/** If `"auto"`, each user audio is automatically identified for the language to respond in. If `"request"`, user must request to change language (recommended). If `"initial"` the first turn user audio determines the language for the rest of the conversation. */
|
|
@@ -70,4 +92,22 @@ export declare namespace OutboundCallConfig {
|
|
|
70
92
|
* Custom tool */
|
|
71
93
|
| string;
|
|
72
94
|
}
|
|
95
|
+
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
96
|
+
const BackgroundNoise: {
|
|
97
|
+
readonly Office: "office";
|
|
98
|
+
readonly CallCenter: "call-center";
|
|
99
|
+
readonly CoffeeShop: "coffee-shop";
|
|
100
|
+
};
|
|
101
|
+
type BackgroundNoise = (typeof BackgroundNoise)[keyof typeof BackgroundNoise];
|
|
102
|
+
/**
|
|
103
|
+
* When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint to get configuration options.
|
|
104
|
+
*/
|
|
105
|
+
interface ConfigurationEndpoint {
|
|
106
|
+
/** URL to call */
|
|
107
|
+
url: string;
|
|
108
|
+
/** Object of key-value pairs. */
|
|
109
|
+
headers?: Record<string, string> | undefined;
|
|
110
|
+
/** Timeout in milliseconds for the endpoint call. */
|
|
111
|
+
timeout_ms?: number | undefined;
|
|
112
|
+
}
|
|
73
113
|
}
|
|
@@ -7,4 +7,10 @@ export var OutboundCallConfig;
|
|
|
7
7
|
Request: "request",
|
|
8
8
|
Initial: "initial",
|
|
9
9
|
};
|
|
10
|
+
/** The background noise type. Can be "office", "call-center", "coffee-shop", or null. */
|
|
11
|
+
OutboundCallConfig.BackgroundNoise = {
|
|
12
|
+
Office: "office",
|
|
13
|
+
CallCenter: "call-center",
|
|
14
|
+
CoffeeShop: "coffee-shop",
|
|
15
|
+
};
|
|
10
16
|
})(OutboundCallConfig || (OutboundCallConfig = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pool of phone numbers used for outbound calls.
|
|
3
|
+
*/
|
|
4
|
+
export interface OutboundNumberPool {
|
|
5
|
+
/** E.164 formatted phone numbers available for outbound calls. */
|
|
6
|
+
active: string[];
|
|
7
|
+
/** E.164 formatted phone numbers that are blocked from being used. */
|
|
8
|
+
blocked: string[];
|
|
9
|
+
}
|
|
@@ -10,7 +10,7 @@ export interface Tool {
|
|
|
10
10
|
/** The type of tool. */
|
|
11
11
|
type: Tool.Type;
|
|
12
12
|
/** Mode of operation - sync waits for response, async continues without waiting. */
|
|
13
|
-
execution_mode
|
|
13
|
+
execution_mode?: Tool.ExecutionMode | undefined;
|
|
14
14
|
/** Array of parameter definitions for the tool. */
|
|
15
15
|
parameters: Phonic.ToolParameter[];
|
|
16
16
|
/** HTTP method for webhook tools. */
|
|
@@ -43,6 +43,8 @@ export interface Tool {
|
|
|
43
43
|
allow_tool_chaining?: boolean | undefined;
|
|
44
44
|
/** 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. */
|
|
45
45
|
wait_for_response?: boolean | undefined;
|
|
46
|
+
/** The static context returned to the agent. Only present for custom_context tools. */
|
|
47
|
+
context?: string | undefined;
|
|
46
48
|
}
|
|
47
49
|
export declare namespace Tool {
|
|
48
50
|
interface Project {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./AddSystemMessagePayload.mjs";
|
|
2
2
|
export * from "./Agent.mjs";
|
|
3
|
+
export * from "./AgentIntegration.mjs";
|
|
4
|
+
export * from "./ApiKeyWithSecret.mjs";
|
|
3
5
|
export * from "./AssistantChoseNotToRespondPayload.mjs";
|
|
4
6
|
export * from "./AssistantEndedConversationPayload.mjs";
|
|
5
7
|
export * from "./AssistantFinishedSpeakingPayload.mjs";
|
|
@@ -15,6 +17,7 @@ export * from "./ConversationAnalysis.mjs";
|
|
|
15
17
|
export * from "./ConversationCreatedPayload.mjs";
|
|
16
18
|
export * from "./ConversationEval.mjs";
|
|
17
19
|
export * from "./ConversationEvalPrompt.mjs";
|
|
20
|
+
export * from "./ConversationEvalPromptInfo.mjs";
|
|
18
21
|
export * from "./ConversationEvaluation.mjs";
|
|
19
22
|
export * from "./ConversationEvaluationResult.mjs";
|
|
20
23
|
export * from "./ConversationExtraction.mjs";
|
|
@@ -23,6 +26,7 @@ export * from "./ConversationsListResponseConversation.mjs";
|
|
|
23
26
|
export * from "./ConversationsListResponseConversations.mjs";
|
|
24
27
|
export * from "./ConversationsListResponseConversationsPagination.mjs";
|
|
25
28
|
export * from "./CreateAgentRequest.mjs";
|
|
29
|
+
export * from "./DataRetentionPolicy.mjs";
|
|
26
30
|
export * from "./DtmfPayload.mjs";
|
|
27
31
|
export * from "./Error_.mjs";
|
|
28
32
|
export * from "./ErrorPayload.mjs";
|
|
@@ -40,6 +44,7 @@ export * from "./OpenAiTool.mjs";
|
|
|
40
44
|
export * from "./OutboundCallConfig.mjs";
|
|
41
45
|
export * from "./OutboundCallInitiatedResponse.mjs";
|
|
42
46
|
export * from "./OutboundDryRunResponse.mjs";
|
|
47
|
+
export * from "./OutboundNumberPool.mjs";
|
|
43
48
|
export * from "./Project.mjs";
|
|
44
49
|
export * from "./ReadyToStartConversationPayload.mjs";
|
|
45
50
|
export * from "./ReplayConversationItemResponse.mjs";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./AddSystemMessagePayload.mjs";
|
|
2
2
|
export * from "./Agent.mjs";
|
|
3
|
+
export * from "./AgentIntegration.mjs";
|
|
4
|
+
export * from "./ApiKeyWithSecret.mjs";
|
|
3
5
|
export * from "./AssistantChoseNotToRespondPayload.mjs";
|
|
4
6
|
export * from "./AssistantEndedConversationPayload.mjs";
|
|
5
7
|
export * from "./AssistantFinishedSpeakingPayload.mjs";
|
|
@@ -15,6 +17,7 @@ export * from "./ConversationAnalysis.mjs";
|
|
|
15
17
|
export * from "./ConversationCreatedPayload.mjs";
|
|
16
18
|
export * from "./ConversationEval.mjs";
|
|
17
19
|
export * from "./ConversationEvalPrompt.mjs";
|
|
20
|
+
export * from "./ConversationEvalPromptInfo.mjs";
|
|
18
21
|
export * from "./ConversationEvaluation.mjs";
|
|
19
22
|
export * from "./ConversationEvaluationResult.mjs";
|
|
20
23
|
export * from "./ConversationExtraction.mjs";
|
|
@@ -23,6 +26,7 @@ export * from "./ConversationsListResponseConversation.mjs";
|
|
|
23
26
|
export * from "./ConversationsListResponseConversations.mjs";
|
|
24
27
|
export * from "./ConversationsListResponseConversationsPagination.mjs";
|
|
25
28
|
export * from "./CreateAgentRequest.mjs";
|
|
29
|
+
export * from "./DataRetentionPolicy.mjs";
|
|
26
30
|
export * from "./DtmfPayload.mjs";
|
|
27
31
|
export * from "./Error_.mjs";
|
|
28
32
|
export * from "./ErrorPayload.mjs";
|
|
@@ -40,6 +44,7 @@ export * from "./OpenAiTool.mjs";
|
|
|
40
44
|
export * from "./OutboundCallConfig.mjs";
|
|
41
45
|
export * from "./OutboundCallInitiatedResponse.mjs";
|
|
42
46
|
export * from "./OutboundDryRunResponse.mjs";
|
|
47
|
+
export * from "./OutboundNumberPool.mjs";
|
|
43
48
|
export * from "./Project.mjs";
|
|
44
49
|
export * from "./ReadyToStartConversationPayload.mjs";
|
|
45
50
|
export * from "./ReplayConversationItemResponse.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.32.
|
|
1
|
+
export declare const SDK_VERSION = "0.32.4";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.32.
|
|
1
|
+
export const SDK_VERSION = "0.32.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phonic",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -78,6 +78,17 @@
|
|
|
78
78
|
},
|
|
79
79
|
"default": "./dist/cjs/api/resources/workspace/exports.js"
|
|
80
80
|
},
|
|
81
|
+
"./apiKeys": {
|
|
82
|
+
"import": {
|
|
83
|
+
"types": "./dist/esm/api/resources/apiKeys/exports.d.mts",
|
|
84
|
+
"default": "./dist/esm/api/resources/apiKeys/exports.mjs"
|
|
85
|
+
},
|
|
86
|
+
"require": {
|
|
87
|
+
"types": "./dist/cjs/api/resources/apiKeys/exports.d.ts",
|
|
88
|
+
"default": "./dist/cjs/api/resources/apiKeys/exports.js"
|
|
89
|
+
},
|
|
90
|
+
"default": "./dist/cjs/api/resources/apiKeys/exports.js"
|
|
91
|
+
},
|
|
81
92
|
"./conversationItems": {
|
|
82
93
|
"import": {
|
|
83
94
|
"types": "./dist/esm/api/resources/conversationItems/exports.d.mts",
|