retell-sdk 5.63.0 → 5.65.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 +20 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +20 -8
- package/client.d.ts.map +1 -1
- package/client.js +12 -0
- package/client.js.map +1 -1
- package/client.mjs +12 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.mts +102 -12
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +102 -12
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +32 -4
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +32 -4
- package/resources/agent.mjs.map +1 -1
- package/resources/app.d.mts +439 -0
- package/resources/app.d.mts.map +1 -0
- package/resources/app.d.ts +439 -0
- package/resources/app.d.ts.map +1 -0
- package/resources/app.js +69 -0
- package/resources/app.js.map +1 -0
- package/resources/app.mjs +65 -0
- package/resources/app.mjs.map +1 -0
- 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 +221 -27
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +221 -27
- 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 +4 -10
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +4 -10
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +2 -8
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +2 -8
- package/resources/chat-agent.mjs.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 +669 -0
- package/resources/contact.d.mts.map +1 -0
- package/resources/contact.d.ts +669 -0
- package/resources/contact.d.ts.map +1 -0
- package/resources/contact.js +100 -0
- package/resources/contact.js.map +1 -0
- package/resources/contact.mjs +96 -0
- package/resources/contact.mjs.map +1 -0
- package/resources/conversation-flow-component.d.mts +56 -8
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +56 -8
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow.d.mts +120 -16
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +120 -16
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +3 -1
- package/resources/conversation-flow.js.map +1 -1
- package/resources/conversation-flow.mjs +3 -1
- package/resources/conversation-flow.mjs.map +1 -1
- package/resources/crm.d.mts +226 -0
- package/resources/crm.d.mts.map +1 -0
- package/resources/crm.d.ts +226 -0
- package/resources/crm.d.ts.map +1 -0
- package/resources/crm.js +46 -0
- package/resources/crm.js.map +1 -0
- package/resources/crm.mjs +42 -0
- package/resources/crm.mjs.map +1 -0
- 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 +8 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge-base.d.mts +16 -8
- package/resources/knowledge-base.d.mts.map +1 -1
- package/resources/knowledge-base.d.ts +16 -8
- package/resources/knowledge-base.d.ts.map +1 -1
- package/resources/llm.d.mts +66 -10
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +66 -10
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +3 -1
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +3 -1
- package/resources/llm.mjs.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 +116 -0
- package/src/resources/agent.ts +141 -9
- package/src/resources/app.ts +593 -0
- package/src/resources/asset.ts +69 -0
- package/src/resources/batch-call.ts +6 -1
- package/src/resources/call.ts +289 -25
- package/src/resources/chat-agent.ts +4 -10
- package/src/resources/chat.ts +28 -11
- package/src/resources/contact.ts +910 -0
- package/src/resources/conversation-flow-component.ts +56 -8
- package/src/resources/conversation-flow.ts +127 -15
- package/src/resources/crm.ts +298 -0
- package/src/resources/export-request.ts +2 -2
- package/src/resources/index.ts +50 -0
- package/src/resources/knowledge-base.ts +16 -8
- package/src/resources/llm.ts +73 -9
- 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
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,12 +4361,20 @@ 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
|
-
dynamic_variables?: Array<
|
|
4367
|
+
dynamic_variables?: Array<
|
|
4368
|
+
| FilterCriteria.StringFilter
|
|
4369
|
+
| FilterCriteria.NumberFilter
|
|
4370
|
+
| FilterCriteria.BooleanFilter
|
|
4371
|
+
| FilterCriteria.RangeFilter
|
|
4372
|
+
| FilterCriteria.EnumFilter
|
|
4373
|
+
| FilterCriteria.PresentFilter
|
|
4374
|
+
>;
|
|
4218
4375
|
|
|
4219
4376
|
/**
|
|
4220
|
-
* Filter by end-to-end latency
|
|
4377
|
+
* Filter by per-call p50 end-to-end latency in milliseconds.
|
|
4221
4378
|
*/
|
|
4222
4379
|
e2e_latency_p50?: FilterCriteria.NumberFilter | FilterCriteria.RangeFilter;
|
|
4223
4380
|
|
|
@@ -4237,7 +4394,8 @@ export namespace CallListParams {
|
|
|
4237
4394
|
in_voicemail?: FilterCriteria.InVoicemail;
|
|
4238
4395
|
|
|
4239
4396
|
/**
|
|
4240
|
-
* Filter by metadata
|
|
4397
|
+
* Filter by values stored in the call's `metadata`. Each filter `key` matches a
|
|
4398
|
+
* top-level metadata key.
|
|
4241
4399
|
*/
|
|
4242
4400
|
metadata?: Array<
|
|
4243
4401
|
| FilterCriteria.StringFilter
|
|
@@ -4274,7 +4432,7 @@ export namespace CallListParams {
|
|
|
4274
4432
|
agent_id: string;
|
|
4275
4433
|
|
|
4276
4434
|
/**
|
|
4277
|
-
* Specific versions to filter on. If
|
|
4435
|
+
* Specific versions to filter on. If omitted or empty, all versions are included.
|
|
4278
4436
|
*/
|
|
4279
4437
|
version?: Array<number>;
|
|
4280
4438
|
}
|
|
@@ -4672,12 +4830,7 @@ export namespace CallListParams {
|
|
|
4672
4830
|
value: Array<number>;
|
|
4673
4831
|
}
|
|
4674
4832
|
|
|
4675
|
-
export interface
|
|
4676
|
-
/**
|
|
4677
|
-
* The dynamic variable name to filter on.
|
|
4678
|
-
*/
|
|
4679
|
-
key: string;
|
|
4680
|
-
|
|
4833
|
+
export interface StringFilter {
|
|
4681
4834
|
/**
|
|
4682
4835
|
* eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
|
|
4683
4836
|
*/
|
|
@@ -4686,6 +4839,90 @@ export namespace CallListParams {
|
|
|
4686
4839
|
type: 'string';
|
|
4687
4840
|
|
|
4688
4841
|
value: string;
|
|
4842
|
+
|
|
4843
|
+
/**
|
|
4844
|
+
* The field name to filter on.
|
|
4845
|
+
*/
|
|
4846
|
+
key?: string;
|
|
4847
|
+
}
|
|
4848
|
+
|
|
4849
|
+
export interface NumberFilter {
|
|
4850
|
+
/**
|
|
4851
|
+
* eq: equal, ne: not equal, gt: greater than, ge: greater than or equal, lt: less
|
|
4852
|
+
* than, le: less than or equal
|
|
4853
|
+
*/
|
|
4854
|
+
op: 'eq' | 'ne' | 'gt' | 'ge' | 'lt' | 'le';
|
|
4855
|
+
|
|
4856
|
+
type: 'number';
|
|
4857
|
+
|
|
4858
|
+
value: number;
|
|
4859
|
+
|
|
4860
|
+
/**
|
|
4861
|
+
* The field name to filter on.
|
|
4862
|
+
*/
|
|
4863
|
+
key?: string;
|
|
4864
|
+
}
|
|
4865
|
+
|
|
4866
|
+
export interface BooleanFilter {
|
|
4867
|
+
op: 'eq';
|
|
4868
|
+
|
|
4869
|
+
type: 'boolean';
|
|
4870
|
+
|
|
4871
|
+
value: boolean;
|
|
4872
|
+
|
|
4873
|
+
/**
|
|
4874
|
+
* The field name to filter on.
|
|
4875
|
+
*/
|
|
4876
|
+
key?: string;
|
|
4877
|
+
}
|
|
4878
|
+
|
|
4879
|
+
export interface RangeFilter {
|
|
4880
|
+
/**
|
|
4881
|
+
* bt: between
|
|
4882
|
+
*/
|
|
4883
|
+
op: 'bt';
|
|
4884
|
+
|
|
4885
|
+
type: 'range';
|
|
4886
|
+
|
|
4887
|
+
/**
|
|
4888
|
+
* [lower_bound, upper_bound]
|
|
4889
|
+
*/
|
|
4890
|
+
value: Array<number>;
|
|
4891
|
+
|
|
4892
|
+
/**
|
|
4893
|
+
* The field name to filter on.
|
|
4894
|
+
*/
|
|
4895
|
+
key?: string;
|
|
4896
|
+
}
|
|
4897
|
+
|
|
4898
|
+
export interface EnumFilter {
|
|
4899
|
+
/**
|
|
4900
|
+
* in: value is one of the listed values
|
|
4901
|
+
*/
|
|
4902
|
+
op: 'in';
|
|
4903
|
+
|
|
4904
|
+
type: 'enum';
|
|
4905
|
+
|
|
4906
|
+
value: Array<string>;
|
|
4907
|
+
|
|
4908
|
+
/**
|
|
4909
|
+
* The field name to filter on.
|
|
4910
|
+
*/
|
|
4911
|
+
key?: string;
|
|
4912
|
+
}
|
|
4913
|
+
|
|
4914
|
+
export interface PresentFilter {
|
|
4915
|
+
/**
|
|
4916
|
+
* pr: present (has value), np: not present
|
|
4917
|
+
*/
|
|
4918
|
+
op: 'pr' | 'np';
|
|
4919
|
+
|
|
4920
|
+
type: 'present';
|
|
4921
|
+
|
|
4922
|
+
/**
|
|
4923
|
+
* The field name to filter on.
|
|
4924
|
+
*/
|
|
4925
|
+
key?: string;
|
|
4689
4926
|
}
|
|
4690
4927
|
|
|
4691
4928
|
export interface NumberFilter {
|
|
@@ -5603,6 +5840,7 @@ export namespace CallCreatePhoneCallParams {
|
|
|
5603
5840
|
| 'sonic-3'
|
|
5604
5841
|
| 'sonic-3-latest'
|
|
5605
5842
|
| 'sonic-3.5'
|
|
5843
|
+
| 'sonic-3.6'
|
|
5606
5844
|
| 'tts-1'
|
|
5607
5845
|
| 'gpt-4o-mini-tts'
|
|
5608
5846
|
| 'speech-02-turbo'
|
|
@@ -5610,6 +5848,8 @@ export namespace CallCreatePhoneCallParams {
|
|
|
5610
5848
|
| 's1'
|
|
5611
5849
|
| 's2-pro'
|
|
5612
5850
|
| 's2.1-pro'
|
|
5851
|
+
| 'inworld-tts-2'
|
|
5852
|
+
| 'inworld-tts-2-flash'
|
|
5613
5853
|
| null;
|
|
5614
5854
|
|
|
5615
5855
|
/**
|
|
@@ -5698,7 +5938,9 @@ export namespace CallCreatePhoneCallParams {
|
|
|
5698
5938
|
export interface CustomSttConfig {
|
|
5699
5939
|
/**
|
|
5700
5940
|
* Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
|
|
5701
|
-
* 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.
|
|
5702
5944
|
*/
|
|
5703
5945
|
endpointing_ms: number;
|
|
5704
5946
|
|
|
@@ -6993,6 +7235,7 @@ export namespace CallCreateWebCallParams {
|
|
|
6993
7235
|
| 'sonic-3'
|
|
6994
7236
|
| 'sonic-3-latest'
|
|
6995
7237
|
| 'sonic-3.5'
|
|
7238
|
+
| 'sonic-3.6'
|
|
6996
7239
|
| 'tts-1'
|
|
6997
7240
|
| 'gpt-4o-mini-tts'
|
|
6998
7241
|
| 'speech-02-turbo'
|
|
@@ -7000,6 +7243,8 @@ export namespace CallCreateWebCallParams {
|
|
|
7000
7243
|
| 's1'
|
|
7001
7244
|
| 's2-pro'
|
|
7002
7245
|
| 's2.1-pro'
|
|
7246
|
+
| 'inworld-tts-2'
|
|
7247
|
+
| 'inworld-tts-2-flash'
|
|
7003
7248
|
| null;
|
|
7004
7249
|
|
|
7005
7250
|
/**
|
|
@@ -7088,7 +7333,9 @@ export namespace CallCreateWebCallParams {
|
|
|
7088
7333
|
export interface CustomSttConfig {
|
|
7089
7334
|
/**
|
|
7090
7335
|
* Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
|
|
7091
|
-
* 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.
|
|
7092
7339
|
*/
|
|
7093
7340
|
endpointing_ms: number;
|
|
7094
7341
|
|
|
@@ -8383,6 +8630,7 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
8383
8630
|
| 'sonic-3'
|
|
8384
8631
|
| 'sonic-3-latest'
|
|
8385
8632
|
| 'sonic-3.5'
|
|
8633
|
+
| 'sonic-3.6'
|
|
8386
8634
|
| 'tts-1'
|
|
8387
8635
|
| 'gpt-4o-mini-tts'
|
|
8388
8636
|
| 'speech-02-turbo'
|
|
@@ -8390,6 +8638,8 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
8390
8638
|
| 's1'
|
|
8391
8639
|
| 's2-pro'
|
|
8392
8640
|
| 's2.1-pro'
|
|
8641
|
+
| 'inworld-tts-2'
|
|
8642
|
+
| 'inworld-tts-2-flash'
|
|
8393
8643
|
| null;
|
|
8394
8644
|
|
|
8395
8645
|
/**
|
|
@@ -8478,7 +8728,9 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
8478
8728
|
export interface CustomSttConfig {
|
|
8479
8729
|
/**
|
|
8480
8730
|
* Endpointing timeout in milliseconds. Minimum is 100 for Azure, 10 for Deepgram,
|
|
8481
|
-
* 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.
|
|
8482
8734
|
*/
|
|
8483
8735
|
endpointing_ms: number;
|
|
8484
8736
|
|
|
@@ -9157,6 +9409,14 @@ export namespace CallRegisterPhoneCallParams {
|
|
|
9157
9409
|
}
|
|
9158
9410
|
}
|
|
9159
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
|
+
|
|
9160
9420
|
export interface CallUpdateLiveParams {
|
|
9161
9421
|
/**
|
|
9162
9422
|
* Live agent control. At least one of `additional_context` or `trigger_response`
|
|
@@ -9229,15 +9489,19 @@ export namespace CallUpdateLiveParams {
|
|
|
9229
9489
|
export declare namespace Call {
|
|
9230
9490
|
export {
|
|
9231
9491
|
type CallResponse as CallResponse,
|
|
9492
|
+
type CreateWebCallResponse as CreateWebCallResponse,
|
|
9232
9493
|
type PhoneCallResponse as PhoneCallResponse,
|
|
9233
9494
|
type WebCallResponse as WebCallResponse,
|
|
9234
9495
|
type CallListResponse as CallListResponse,
|
|
9496
|
+
type CallListenLiveResponse as CallListenLiveResponse,
|
|
9497
|
+
type CallTakeOverLiveResponse as CallTakeOverLiveResponse,
|
|
9235
9498
|
type CallUpdateLiveResponse as CallUpdateLiveResponse,
|
|
9236
9499
|
type CallUpdateParams as CallUpdateParams,
|
|
9237
9500
|
type CallListParams as CallListParams,
|
|
9238
9501
|
type CallCreatePhoneCallParams as CallCreatePhoneCallParams,
|
|
9239
9502
|
type CallCreateWebCallParams as CallCreateWebCallParams,
|
|
9240
9503
|
type CallRegisterPhoneCallParams as CallRegisterPhoneCallParams,
|
|
9504
|
+
type CallTakeOverLiveParams as CallTakeOverLiveParams,
|
|
9241
9505
|
type CallUpdateLiveParams as CallUpdateLiveParams,
|
|
9242
9506
|
};
|
|
9243
9507
|
}
|
|
@@ -150,15 +150,9 @@ export class ChatAgent extends APIResource {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* Get
|
|
153
|
+
* Get chat agent versions. Large version histories may be truncated.
|
|
154
154
|
*
|
|
155
|
-
* @
|
|
156
|
-
* ```ts
|
|
157
|
-
* const chatAgentResponses =
|
|
158
|
-
* await client.chatAgent.getVersions(
|
|
159
|
-
* '16b980523634a6dc504898cda492e939',
|
|
160
|
-
* );
|
|
161
|
-
* ```
|
|
155
|
+
* @deprecated
|
|
162
156
|
*/
|
|
163
157
|
getVersions(agentID: string, options?: RequestOptions): APIPromise<ChatAgentGetVersionsResponse> {
|
|
164
158
|
return this._client.get(path`/get-chat-agent-versions/${agentID}`, options);
|
|
@@ -802,9 +796,9 @@ export interface ChatAgentListResponse {
|
|
|
802
796
|
/**
|
|
803
797
|
* Whether more results are available.
|
|
804
798
|
*/
|
|
805
|
-
has_more
|
|
799
|
+
has_more: boolean;
|
|
806
800
|
|
|
807
|
-
items
|
|
801
|
+
items: Array<ChatAgentListResponse.Item>;
|
|
808
802
|
|
|
809
803
|
/**
|
|
810
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
|