retell-sdk 5.64.0 → 5.66.0
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/CHANGELOG.md +42 -0
- package/README.md +29 -0
- package/client.d.mts +9 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -6
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +43 -13
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +43 -13
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +21 -2
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +21 -2
- package/resources/agent.mjs.map +1 -1
- package/resources/app.d.mts +28 -46
- package/resources/app.d.mts.map +1 -1
- package/resources/app.d.ts +28 -46
- package/resources/app.d.ts.map +1 -1
- package/resources/app.js +7 -5
- package/resources/app.js.map +1 -1
- package/resources/app.mjs +7 -5
- package/resources/app.mjs.map +1 -1
- package/resources/asset.d.mts +53 -0
- package/resources/asset.d.mts.map +1 -0
- package/resources/asset.d.ts +53 -0
- package/resources/asset.d.ts.map +1 -0
- package/resources/asset.js +20 -0
- package/resources/asset.js.map +1 -0
- package/resources/asset.mjs +16 -0
- package/resources/asset.mjs.map +1 -0
- package/resources/batch-call.d.mts +4 -2
- package/resources/batch-call.d.mts.map +1 -1
- package/resources/batch-call.d.ts +4 -2
- package/resources/batch-call.d.ts.map +1 -1
- package/resources/call.d.mts +155 -21
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +155 -21
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +37 -5
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +37 -5
- package/resources/call.mjs.map +1 -1
- package/resources/chat-agent.d.mts +2 -2
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +2 -2
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat.d.mts +24 -11
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +24 -11
- package/resources/chat.d.ts.map +1 -1
- package/resources/contact.d.mts +137 -26
- package/resources/contact.d.mts.map +1 -1
- package/resources/contact.d.ts +137 -26
- package/resources/contact.d.ts.map +1 -1
- package/resources/contact.js +23 -4
- package/resources/contact.js.map +1 -1
- package/resources/contact.mjs +23 -4
- package/resources/contact.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +182 -2
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +182 -2
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow.d.mts +362 -2
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +362 -2
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/crm.d.mts +4 -0
- package/resources/crm.d.mts.map +1 -1
- package/resources/crm.d.ts +4 -0
- package/resources/crm.d.ts.map +1 -1
- package/resources/export-request.d.mts +2 -2
- package/resources/export-request.d.mts.map +1 -1
- package/resources/export-request.d.ts +2 -2
- package/resources/export-request.d.ts.map +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge-base.d.mts +7 -7
- package/resources/knowledge-base.d.ts +7 -7
- package/resources/llm.d.mts +38 -2
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +38 -2
- package/resources/llm.d.ts.map +1 -1
- package/resources/phone-number.d.mts +14 -8
- package/resources/phone-number.d.mts.map +1 -1
- package/resources/phone-number.d.ts +14 -8
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/tests.d.mts +6 -6
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +6 -6
- package/resources/tests.d.ts.map +1 -1
- package/resources/voice.d.mts +4 -4
- package/resources/voice.d.mts.map +1 -1
- package/resources/voice.d.ts +4 -4
- package/resources/voice.d.ts.map +1 -1
- package/src/client.ts +31 -0
- package/src/resources/agent.ts +60 -9
- package/src/resources/app.ts +29 -58
- package/src/resources/asset.ts +69 -0
- package/src/resources/batch-call.ts +6 -1
- package/src/resources/call.ts +196 -18
- package/src/resources/chat-agent.ts +2 -2
- package/src/resources/chat.ts +28 -11
- package/src/resources/contact.ts +187 -26
- package/src/resources/conversation-flow-component.ts +206 -2
- package/src/resources/conversation-flow.ts +410 -2
- package/src/resources/crm.ts +5 -0
- package/src/resources/export-request.ts +2 -2
- package/src/resources/index.ts +12 -0
- package/src/resources/knowledge-base.ts +7 -7
- package/src/resources/llm.ts +38 -2
- package/src/resources/phone-number.ts +14 -8
- package/src/resources/tests.ts +6 -6
- package/src/resources/voice.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { type Uploadable } from '../core/uploads';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { multipartFormRequestOptions } from '../internal/uploads';
|
|
8
|
+
|
|
9
|
+
export class Asset extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Upload an image or audio asset. Audio is normalized to headerless mono PCM16 at
|
|
12
|
+
* 24 kHz and can be referenced by `custom_on_hold_music_asset_id` on warm and
|
|
13
|
+
* agentic-warm transfer options. Accepted audio formats are MP3, WAV, WebM, OGG,
|
|
14
|
+
* M4A, AAC, and FLAC. The maximum upload size is 10 MB and audio duration is
|
|
15
|
+
* limited to 210 seconds.
|
|
16
|
+
*/
|
|
17
|
+
create(body: AssetCreateParams, options?: RequestOptions): APIPromise<AssetCreateResponse> {
|
|
18
|
+
return this._client.post(
|
|
19
|
+
'/create-asset',
|
|
20
|
+
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface AssetCreateResponse {
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for the asset.
|
|
28
|
+
*/
|
|
29
|
+
asset_id?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* MIME type of the asset.
|
|
33
|
+
*/
|
|
34
|
+
content_type?: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Unix timestamp of when the asset was created.
|
|
38
|
+
*/
|
|
39
|
+
created_timestamp?: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Stored file name. Uploaded audio is normalized to headerless PCM and uses a
|
|
43
|
+
* `.pcm` extension.
|
|
44
|
+
*/
|
|
45
|
+
file_name?: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* File size in bytes.
|
|
49
|
+
*/
|
|
50
|
+
file_size?: number;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* CDN URL to access the asset.
|
|
54
|
+
*/
|
|
55
|
+
url?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface AssetCreateParams {
|
|
59
|
+
/**
|
|
60
|
+
* Image or audio file to upload. Images support PNG, JPEG, GIF, WebP, and SVG.
|
|
61
|
+
* Audio supports MP3, WAV, WebM, OGG, M4A, AAC, and FLAC. Maximum size is 10 MB;
|
|
62
|
+
* audio is limited to 210 seconds.
|
|
63
|
+
*/
|
|
64
|
+
file: Uploadable;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export declare namespace Asset {
|
|
68
|
+
export { type AssetCreateResponse as AssetCreateResponse, type AssetCreateParams as AssetCreateParams };
|
|
69
|
+
}
|
|
@@ -758,6 +758,7 @@ export namespace BatchCallCreateBatchCallParams {
|
|
|
758
758
|
| 'sonic-3'
|
|
759
759
|
| 'sonic-3-latest'
|
|
760
760
|
| 'sonic-3.5'
|
|
761
|
+
| 'sonic-3.6'
|
|
761
762
|
| 'tts-1'
|
|
762
763
|
| 'gpt-4o-mini-tts'
|
|
763
764
|
| 'speech-02-turbo'
|
|
@@ -765,6 +766,8 @@ export namespace BatchCallCreateBatchCallParams {
|
|
|
765
766
|
| 's1'
|
|
766
767
|
| 's2-pro'
|
|
767
768
|
| 's2.1-pro'
|
|
769
|
+
| 'inworld-tts-2'
|
|
770
|
+
| 'inworld-tts-2-flash'
|
|
768
771
|
| null;
|
|
769
772
|
|
|
770
773
|
/**
|
|
@@ -853,7 +856,9 @@ export namespace BatchCallCreateBatchCallParams {
|
|
|
853
856
|
export interface CustomSttConfig {
|
|
854
857
|
/**
|
|
855
858
|
* Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
|
|
856
|
-
* 500 for Soniox, 100 for AssemblyAI.
|
|
859
|
+
* 500 for Soniox, 100 for AssemblyAI. For AssemblyAI, this sets min_turn_silence
|
|
860
|
+
* (100-3000 ms). max_turn_silence adds half of this value, rounded to the nearest
|
|
861
|
+
* millisecond and bounded to 500-1000 ms, with a total cap of 3000 ms.
|
|
857
862
|
*/
|
|
858
863
|
endpointing_ms: number;
|
|
859
864
|
|
package/src/resources/call.ts
CHANGED
|
@@ -97,17 +97,34 @@ export class Call extends APIResource {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* Create a new web call
|
|
100
|
+
* Create a new web call and return browser connection details.
|
|
101
101
|
*
|
|
102
102
|
* @example
|
|
103
103
|
* ```ts
|
|
104
|
-
* const
|
|
105
|
-
*
|
|
106
|
-
*
|
|
104
|
+
* const createWebCallResponse =
|
|
105
|
+
* await client.call.createWebCall({
|
|
106
|
+
* agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
createWebCall(body: CallCreateWebCallParams, options?: RequestOptions): APIPromise<CreateWebCallResponse> {
|
|
111
|
+
return this._client.post('/v3/create-web-call', { body, ...options });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Mint a subscribe-only access token for an in-progress call so a client can
|
|
116
|
+
* listen to live audio. The returned token grants join + subscribe on the call's
|
|
117
|
+
* existing audio room; it cannot publish. The call must be in ONGOING status.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const response = await client.call.listenLive(
|
|
122
|
+
* '119c3f8e47135a29e65947eeb34cf12d',
|
|
123
|
+
* );
|
|
107
124
|
* ```
|
|
108
125
|
*/
|
|
109
|
-
|
|
110
|
-
return this._client.post(
|
|
126
|
+
listenLive(callID: string, options?: RequestOptions): APIPromise<CallListenLiveResponse> {
|
|
127
|
+
return this._client.post(path`/v2/listen-live-call/${callID}`, options);
|
|
111
128
|
}
|
|
112
129
|
|
|
113
130
|
/**
|
|
@@ -157,6 +174,27 @@ export class Call extends APIResource {
|
|
|
157
174
|
});
|
|
158
175
|
}
|
|
159
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Take over an in-progress call from the AI agent. The agent stops responding and
|
|
179
|
+
* the specified live-listen participant is allowed to speak directly to the
|
|
180
|
+
* caller. The call must be in ONGOING status.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```ts
|
|
184
|
+
* const response = await client.call.takeOverLive(
|
|
185
|
+
* '119c3f8e47135a29e65947eeb34cf12d',
|
|
186
|
+
* { participant_id: 'listener_a1b2c3d4e5f6g7h8i9j0' },
|
|
187
|
+
* );
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
takeOverLive(
|
|
191
|
+
callID: string,
|
|
192
|
+
body: CallTakeOverLiveParams,
|
|
193
|
+
options?: RequestOptions,
|
|
194
|
+
): APIPromise<CallTakeOverLiveResponse> {
|
|
195
|
+
return this._client.post(path`/v2/take-over-live-call/${callID}`, { body, ...options });
|
|
196
|
+
}
|
|
197
|
+
|
|
160
198
|
/**
|
|
161
199
|
* Update an ongoing call at runtime. Supports overriding dynamic variables,
|
|
162
200
|
* metadata, and the data storage setting on the running call, and controlling the
|
|
@@ -195,6 +233,43 @@ export class Call extends APIResource {
|
|
|
195
233
|
|
|
196
234
|
export type CallResponse = WebCallResponse | PhoneCallResponse;
|
|
197
235
|
|
|
236
|
+
export interface CreateWebCallResponse {
|
|
237
|
+
/**
|
|
238
|
+
* Token authorizing this browser to join the web call. Pass it to your frontend.
|
|
239
|
+
*/
|
|
240
|
+
access_token: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Unique identifier for the web call.
|
|
244
|
+
*/
|
|
245
|
+
call_id: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Unix epoch ms when the access_token expires.
|
|
249
|
+
*/
|
|
250
|
+
expires_at: number;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* ICE servers to configure before the browser creates its peer connection.
|
|
254
|
+
*/
|
|
255
|
+
ice_servers: Array<CreateWebCallResponse.IceServer>;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Connection transport to select in the web client.
|
|
259
|
+
*/
|
|
260
|
+
transport: 'gateway';
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export namespace CreateWebCallResponse {
|
|
264
|
+
export interface IceServer {
|
|
265
|
+
urls: string | Array<string>;
|
|
266
|
+
|
|
267
|
+
credential?: string;
|
|
268
|
+
|
|
269
|
+
username?: string;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
198
273
|
export interface PhoneCallResponse {
|
|
199
274
|
/**
|
|
200
275
|
* Corresponding agent id of this call.
|
|
@@ -2595,9 +2670,9 @@ export interface CallListResponse {
|
|
|
2595
2670
|
/**
|
|
2596
2671
|
* Whether more results are available.
|
|
2597
2672
|
*/
|
|
2598
|
-
has_more
|
|
2673
|
+
has_more: boolean;
|
|
2599
2674
|
|
|
2600
|
-
items
|
|
2675
|
+
items: Array<CallListResponse.V3WebCallResponse | CallListResponse.V3PhoneCallResponse>;
|
|
2601
2676
|
|
|
2602
2677
|
/**
|
|
2603
2678
|
* Pagination key for the next page.
|
|
@@ -4071,6 +4146,76 @@ export namespace CallListResponse {
|
|
|
4071
4146
|
}
|
|
4072
4147
|
}
|
|
4073
4148
|
|
|
4149
|
+
export interface CallListenLiveResponse {
|
|
4150
|
+
/**
|
|
4151
|
+
* Subscribe-only JWT scoped to the call's room. Cannot publish. Listener
|
|
4152
|
+
* participant is hidden from other participants.
|
|
4153
|
+
*/
|
|
4154
|
+
access_token: string;
|
|
4155
|
+
|
|
4156
|
+
/**
|
|
4157
|
+
* Unix epoch ms when the access_token expires.
|
|
4158
|
+
*/
|
|
4159
|
+
expires_at: number;
|
|
4160
|
+
|
|
4161
|
+
/**
|
|
4162
|
+
* Identity this listener joins as, and the value to hand back to
|
|
4163
|
+
* /v2/take-over-live-call. Returned on both transports; a `livekit` client can
|
|
4164
|
+
* equally read it off its own room object, a `gateway` one has no equivalent to
|
|
4165
|
+
* read.
|
|
4166
|
+
*/
|
|
4167
|
+
participant_id: string;
|
|
4168
|
+
|
|
4169
|
+
/**
|
|
4170
|
+
* Room name to join. Always the call's original room — does not follow warm
|
|
4171
|
+
* transfers.
|
|
4172
|
+
*/
|
|
4173
|
+
room_name: string;
|
|
4174
|
+
|
|
4175
|
+
/**
|
|
4176
|
+
* Public side of the gateway instance handling this call, for diagnostics only —
|
|
4177
|
+
* the client's media address comes from the SDP answer's ICE candidates. `gateway`
|
|
4178
|
+
* transport only.
|
|
4179
|
+
*/
|
|
4180
|
+
gateway_ip?: string;
|
|
4181
|
+
|
|
4182
|
+
/**
|
|
4183
|
+
* ICE servers the client must configure before creating its PeerConnection — they
|
|
4184
|
+
* cannot be added afterwards. `gateway` transport only.
|
|
4185
|
+
*/
|
|
4186
|
+
ice_servers?: Array<CallListenLiveResponse.IceServer>;
|
|
4187
|
+
|
|
4188
|
+
/**
|
|
4189
|
+
* Which media stack issued the access_token, and therefore where the client
|
|
4190
|
+
* signals. The two tokens are indistinguishable, so a client must read this rather
|
|
4191
|
+
* than infer it. `gateway` clients address Retell itself; `livekit` clients
|
|
4192
|
+
* connect to the returned `url`. Optional only because a server predating the
|
|
4193
|
+
* field omits it during a rollout; treat absent as `livekit`.
|
|
4194
|
+
*/
|
|
4195
|
+
transport?: 'livekit' | 'gateway';
|
|
4196
|
+
|
|
4197
|
+
/**
|
|
4198
|
+
* Server URL the client should connect to with the access_token. Present only when
|
|
4199
|
+
* `transport` is `livekit`; a `gateway` listener signals to Retell and needs no
|
|
4200
|
+
* address.
|
|
4201
|
+
*/
|
|
4202
|
+
url?: string;
|
|
4203
|
+
}
|
|
4204
|
+
|
|
4205
|
+
export namespace CallListenLiveResponse {
|
|
4206
|
+
export interface IceServer {
|
|
4207
|
+
urls: string | Array<string>;
|
|
4208
|
+
|
|
4209
|
+
credential?: string;
|
|
4210
|
+
|
|
4211
|
+
username?: string;
|
|
4212
|
+
}
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
export interface CallTakeOverLiveResponse {
|
|
4216
|
+
success: boolean;
|
|
4217
|
+
}
|
|
4218
|
+
|
|
4074
4219
|
export interface CallUpdateLiveResponse {
|
|
4075
4220
|
success: boolean;
|
|
4076
4221
|
}
|
|
@@ -4172,12 +4317,13 @@ export namespace CallListParams {
|
|
|
4172
4317
|
call_type?: FilterCriteria.CallType;
|
|
4173
4318
|
|
|
4174
4319
|
/**
|
|
4175
|
-
* Filter by
|
|
4320
|
+
* Filter by total call cost in cents.
|
|
4176
4321
|
*/
|
|
4177
4322
|
combined_cost?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
|
|
4178
4323
|
|
|
4179
4324
|
/**
|
|
4180
|
-
* Filter by custom analysis
|
|
4325
|
+
* Filter by custom post-call analysis outputs. Each filter `key` matches the
|
|
4326
|
+
* configured output's `name`.
|
|
4181
4327
|
*/
|
|
4182
4328
|
custom_analysis_data?: Array<
|
|
4183
4329
|
| FilterCriteria.StringFilter
|
|
@@ -4189,7 +4335,10 @@ export namespace CallListParams {
|
|
|
4189
4335
|
>;
|
|
4190
4336
|
|
|
4191
4337
|
/**
|
|
4192
|
-
* Filter by
|
|
4338
|
+
* Filter by organization-level attributes that attach business context to calls,
|
|
4339
|
+
* such as customer tier or campaign, so calls can be organized and filtered
|
|
4340
|
+
* consistently in Call History. Use the attribute ID as `key` and the call's
|
|
4341
|
+
* attribute value as `value`.
|
|
4193
4342
|
*/
|
|
4194
4343
|
custom_attributes?: Array<
|
|
4195
4344
|
| FilterCriteria.StringFilter
|
|
@@ -4212,7 +4361,8 @@ export namespace CallListParams {
|
|
|
4212
4361
|
duration_ms?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
|
|
4213
4362
|
|
|
4214
4363
|
/**
|
|
4215
|
-
* Filter by dynamic variables.
|
|
4364
|
+
* Filter by dynamic variables stored on the call. Each filter `key` matches a
|
|
4365
|
+
* dynamic-variable name.
|
|
4216
4366
|
*/
|
|
4217
4367
|
dynamic_variables?: Array<
|
|
4218
4368
|
| FilterCriteria.StringFilter
|
|
@@ -4224,7 +4374,7 @@ export namespace CallListParams {
|
|
|
4224
4374
|
>;
|
|
4225
4375
|
|
|
4226
4376
|
/**
|
|
4227
|
-
* Filter by end-to-end latency
|
|
4377
|
+
* Filter by per-call p50 end-to-end latency in milliseconds.
|
|
4228
4378
|
*/
|
|
4229
4379
|
e2e_latency_p50?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
|
|
4230
4380
|
|
|
@@ -4244,7 +4394,8 @@ export namespace CallListParams {
|
|
|
4244
4394
|
in_voicemail?: FilterCriteria.InVoicemail;
|
|
4245
4395
|
|
|
4246
4396
|
/**
|
|
4247
|
-
* Filter by metadata
|
|
4397
|
+
* Filter by values stored in the call's `metadata`. Each filter `key` matches a
|
|
4398
|
+
* top-level metadata key.
|
|
4248
4399
|
*/
|
|
4249
4400
|
metadata?: Array<
|
|
4250
4401
|
| FilterCriteria.StringFilter
|
|
@@ -4281,7 +4432,7 @@ export namespace CallListParams {
|
|
|
4281
4432
|
agent_id: string;
|
|
4282
4433
|
|
|
4283
4434
|
/**
|
|
4284
|
-
* Specific versions to filter on. If
|
|
4435
|
+
* Specific versions to filter on. If omitted or empty, all versions are included.
|
|
4285
4436
|
*/
|
|
4286
4437
|
version?: Array<number>;
|
|
4287
4438
|
}
|
|
@@ -5689,6 +5840,7 @@ export namespace CallCreatePhoneCallParams {
|
|
|
5689
5840
|
| 'sonic-3'
|
|
5690
5841
|
| 'sonic-3-latest'
|
|
5691
5842
|
| 'sonic-3.5'
|
|
5843
|
+
| 'sonic-3.6'
|
|
5692
5844
|
| 'tts-1'
|
|
5693
5845
|
| 'gpt-4o-mini-tts'
|
|
5694
5846
|
| 'speech-02-turbo'
|
|
@@ -5696,6 +5848,8 @@ export namespace CallCreatePhoneCallParams {
|
|
|
5696
5848
|
| 's1'
|
|
5697
5849
|
| 's2-pro'
|
|
5698
5850
|
| 's2.1-pro'
|
|
5851
|
+
| 'inworld-tts-2'
|
|
5852
|
+
| 'inworld-tts-2-flash'
|
|
5699
5853
|
| null;
|
|
5700
5854
|
|
|
5701
5855
|
/**
|
|
@@ -5784,7 +5938,9 @@ export namespace CallCreatePhoneCallParams {
|
|
|
5784
5938
|
export interface CustomSttConfig {
|
|
5785
5939
|
/**
|
|
5786
5940
|
* Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
|
|
5787
|
-
* 500 for Soniox, 100 for AssemblyAI.
|
|
5941
|
+
* 500 for Soniox, 100 for AssemblyAI. For AssemblyAI, this sets min_turn_silence
|
|
5942
|
+
* (100-3000 ms). max_turn_silence adds half of this value, rounded to the nearest
|
|
5943
|
+
* millisecond and bounded to 500-1000 ms, with a total cap of 3000 ms.
|
|
5788
5944
|
*/
|
|
5789
5945
|
endpointing_ms: number;
|
|
5790
5946
|
|
|
@@ -7079,6 +7235,7 @@ export namespace CallCreateWebCallParams {
|
|
|
7079
7235
|
| 'sonic-3'
|
|
7080
7236
|
| 'sonic-3-latest'
|
|
7081
7237
|
| 'sonic-3.5'
|
|
7238
|
+
| 'sonic-3.6'
|
|
7082
7239
|
| 'tts-1'
|
|
7083
7240
|
| 'gpt-4o-mini-tts'
|
|
7084
7241
|
| 'speech-02-turbo'
|
|
@@ -7086,6 +7243,8 @@ export namespace CallCreateWebCallParams {
|
|
|
7086
7243
|
| 's1'
|
|
7087
7244
|
| 's2-pro'
|
|
7088
7245
|
| 's2.1-pro'
|
|
7246
|
+
| 'inworld-tts-2'
|
|
7247
|
+
| 'inworld-tts-2-flash'
|
|
7089
7248
|
| null;
|
|
7090
7249
|
|
|
7091
7250
|
/**
|
|
@@ -7174,7 +7333,9 @@ export namespace CallCreateWebCallParams {
|
|
|
7174
7333
|
export interface CustomSttConfig {
|
|
7175
7334
|
/**
|
|
7176
7335
|
* Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
|
|
7177
|
-
* 500 for Soniox, 100 for AssemblyAI.
|
|
7336
|
+
* 500 for Soniox, 100 for AssemblyAI. For AssemblyAI, this sets min_turn_silence
|
|
7337
|
+
* (100-3000 ms). max_turn_silence adds half of this value, rounded to the nearest
|
|
7338
|
+
* millisecond and bounded to 500-1000 ms, with a total cap of 3000 ms.
|
|
7178
7339
|
*/
|
|
7179
7340
|
endpointing_ms: number;
|
|
7180
7341
|
|
|
@@ -8469,6 +8630,7 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
8469
8630
|
| 'sonic-3'
|
|
8470
8631
|
| 'sonic-3-latest'
|
|
8471
8632
|
| 'sonic-3.5'
|
|
8633
|
+
| 'sonic-3.6'
|
|
8472
8634
|
| 'tts-1'
|
|
8473
8635
|
| 'gpt-4o-mini-tts'
|
|
8474
8636
|
| 'speech-02-turbo'
|
|
@@ -8476,6 +8638,8 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
8476
8638
|
| 's1'
|
|
8477
8639
|
| 's2-pro'
|
|
8478
8640
|
| 's2.1-pro'
|
|
8641
|
+
| 'inworld-tts-2'
|
|
8642
|
+
| 'inworld-tts-2-flash'
|
|
8479
8643
|
| null;
|
|
8480
8644
|
|
|
8481
8645
|
/**
|
|
@@ -8564,7 +8728,9 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
8564
8728
|
export interface CustomSttConfig {
|
|
8565
8729
|
/**
|
|
8566
8730
|
* Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
|
|
8567
|
-
* 500 for Soniox, 100 for AssemblyAI.
|
|
8731
|
+
* 500 for Soniox, 100 for AssemblyAI. For AssemblyAI, this sets min_turn_silence
|
|
8732
|
+
* (100-3000 ms). max_turn_silence adds half of this value, rounded to the nearest
|
|
8733
|
+
* millisecond and bounded to 500-1000 ms, with a total cap of 3000 ms.
|
|
8568
8734
|
*/
|
|
8569
8735
|
endpointing_ms: number;
|
|
8570
8736
|
|
|
@@ -9243,6 +9409,14 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
9243
9409
|
}
|
|
9244
9410
|
}
|
|
9245
9411
|
|
|
9412
|
+
export interface CallTakeOverLiveParams {
|
|
9413
|
+
/**
|
|
9414
|
+
* The id of the live-listen participant to upgrade, obtained when joining via
|
|
9415
|
+
* /v2/listen-live-call.
|
|
9416
|
+
*/
|
|
9417
|
+
participant_id: string;
|
|
9418
|
+
}
|
|
9419
|
+
|
|
9246
9420
|
export interface CallUpdateLiveParams {
|
|
9247
9421
|
/**
|
|
9248
9422
|
* Live agent control. At least one of `additional_context` or `trigger_response`
|
|
@@ -9315,15 +9489,19 @@ export namespace CallUpdateLiveParams {
|
|
|
9315
9489
|
export declare namespace Call {
|
|
9316
9490
|
export {
|
|
9317
9491
|
type CallResponse as CallResponse,
|
|
9492
|
+
type CreateWebCallResponse as CreateWebCallResponse,
|
|
9318
9493
|
type PhoneCallResponse as PhoneCallResponse,
|
|
9319
9494
|
type WebCallResponse as WebCallResponse,
|
|
9320
9495
|
type CallListResponse as CallListResponse,
|
|
9496
|
+
type CallListenLiveResponse as CallListenLiveResponse,
|
|
9497
|
+
type CallTakeOverLiveResponse as CallTakeOverLiveResponse,
|
|
9321
9498
|
type CallUpdateLiveResponse as CallUpdateLiveResponse,
|
|
9322
9499
|
type CallUpdateParams as CallUpdateParams,
|
|
9323
9500
|
type CallListParams as CallListParams,
|
|
9324
9501
|
type CallCreatePhoneCallParams as CallCreatePhoneCallParams,
|
|
9325
9502
|
type CallCreateWebCallParams as CallCreateWebCallParams,
|
|
9326
9503
|
type CallRegisterPhoneCallParams as CallRegisterPhoneCallParams,
|
|
9504
|
+
type CallTakeOverLiveParams as CallTakeOverLiveParams,
|
|
9327
9505
|
type CallUpdateLiveParams as CallUpdateLiveParams,
|
|
9328
9506
|
};
|
|
9329
9507
|
}
|
|
@@ -796,9 +796,9 @@ export interface ChatAgentListResponse {
|
|
|
796
796
|
/**
|
|
797
797
|
* Whether more results are available.
|
|
798
798
|
*/
|
|
799
|
-
has_more
|
|
799
|
+
has_more: boolean;
|
|
800
800
|
|
|
801
|
-
items
|
|
801
|
+
items: Array<ChatAgentListResponse.Item>;
|
|
802
802
|
|
|
803
803
|
/**
|
|
804
804
|
* Pagination key for the next page.
|
package/src/resources/chat.ts
CHANGED
|
@@ -183,6 +183,11 @@ export interface ChatResponse {
|
|
|
183
183
|
*/
|
|
184
184
|
chat_status: 'ongoing' | 'ended' | 'error';
|
|
185
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Tag pointing at the agent version used for this chat
|
|
188
|
+
*/
|
|
189
|
+
agent_tag?: string | null;
|
|
190
|
+
|
|
186
191
|
/**
|
|
187
192
|
* Post chat analysis that includes information such as sentiment, status, summary,
|
|
188
193
|
* and custom defined data to extract. Available after chat ends. Subscribe to
|
|
@@ -580,9 +585,9 @@ export interface ChatListResponse {
|
|
|
580
585
|
/**
|
|
581
586
|
* Whether more results are available.
|
|
582
587
|
*/
|
|
583
|
-
has_more
|
|
588
|
+
has_more: boolean;
|
|
584
589
|
|
|
585
|
-
items
|
|
590
|
+
items: Array<ChatListResponse.Item>;
|
|
586
591
|
|
|
587
592
|
/**
|
|
588
593
|
* Pagination key for the next page.
|
|
@@ -990,7 +995,7 @@ export namespace ChatListParams {
|
|
|
990
995
|
/**
|
|
991
996
|
* Filter by chat ID.
|
|
992
997
|
*/
|
|
993
|
-
chat_id?: FilterCriteria.
|
|
998
|
+
chat_id?: FilterCriteria.StringFilter | FilterCriteria.EnumFilter;
|
|
994
999
|
|
|
995
1000
|
chat_status?: FilterCriteria.ChatStatus;
|
|
996
1001
|
|
|
@@ -1000,12 +1005,13 @@ export namespace ChatListParams {
|
|
|
1000
1005
|
chat_successful?: FilterCriteria.ChatSuccessful;
|
|
1001
1006
|
|
|
1002
1007
|
/**
|
|
1003
|
-
* Filter by
|
|
1008
|
+
* Filter by total chat cost in cents.
|
|
1004
1009
|
*/
|
|
1005
1010
|
combined_cost?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
|
|
1006
1011
|
|
|
1007
1012
|
/**
|
|
1008
|
-
* Filter by custom analysis
|
|
1013
|
+
* Filter by custom post-chat analysis outputs. Each filter `key` matches the
|
|
1014
|
+
* configured output's `name`.
|
|
1009
1015
|
*/
|
|
1010
1016
|
custom_analysis_data?: Array<
|
|
1011
1017
|
| FilterCriteria.StringFilter
|
|
@@ -1017,7 +1023,10 @@ export namespace ChatListParams {
|
|
|
1017
1023
|
>;
|
|
1018
1024
|
|
|
1019
1025
|
/**
|
|
1020
|
-
* Filter by
|
|
1026
|
+
* Filter by organization-level attributes that attach business context to chats,
|
|
1027
|
+
* such as customer tier or campaign, so chats can be organized and filtered
|
|
1028
|
+
* consistently in Chat History. Use the attribute ID as `key` and the chat's
|
|
1029
|
+
* attribute value as `value`.
|
|
1021
1030
|
*/
|
|
1022
1031
|
custom_attributes?: Array<
|
|
1023
1032
|
| FilterCriteria.StringFilter
|
|
@@ -1056,7 +1065,7 @@ export namespace ChatListParams {
|
|
|
1056
1065
|
agent_id: string;
|
|
1057
1066
|
|
|
1058
1067
|
/**
|
|
1059
|
-
* Specific versions to filter on. If
|
|
1068
|
+
* Specific versions to filter on. If omitted or empty, all versions are included.
|
|
1060
1069
|
*/
|
|
1061
1070
|
version?: Array<number>;
|
|
1062
1071
|
}
|
|
@@ -1075,10 +1084,7 @@ export namespace ChatListParams {
|
|
|
1075
1084
|
value: Array<string>;
|
|
1076
1085
|
}
|
|
1077
1086
|
|
|
1078
|
-
|
|
1079
|
-
* Filter by chat ID.
|
|
1080
|
-
*/
|
|
1081
|
-
export interface ChatID {
|
|
1087
|
+
export interface StringFilter {
|
|
1082
1088
|
/**
|
|
1083
1089
|
* eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
|
|
1084
1090
|
*/
|
|
@@ -1089,6 +1095,17 @@ export namespace ChatListParams {
|
|
|
1089
1095
|
value: string;
|
|
1090
1096
|
}
|
|
1091
1097
|
|
|
1098
|
+
export interface EnumFilter {
|
|
1099
|
+
/**
|
|
1100
|
+
* in: value is one of the listed values
|
|
1101
|
+
*/
|
|
1102
|
+
op: 'in';
|
|
1103
|
+
|
|
1104
|
+
type: 'enum';
|
|
1105
|
+
|
|
1106
|
+
value: Array<string>;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1092
1109
|
export interface ChatStatus {
|
|
1093
1110
|
/**
|
|
1094
1111
|
* in: value is one of the listed values
|