retell-sdk 4.9.0 → 4.11.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 +33 -0
- package/README.md +9 -0
- package/index.d.mts +2 -3
- package/index.d.ts +2 -3
- package/index.d.ts.map +1 -1
- package/index.js +11 -10
- package/index.js.map +1 -1
- package/index.mjs +2 -3
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/call.d.ts +556 -200
- package/resources/call.d.ts.map +1 -1
- package/resources/concurrency.d.ts +21 -3
- package/resources/concurrency.d.ts.map +1 -1
- package/resources/concurrency.js +1 -1
- package/resources/concurrency.mjs +1 -1
- package/resources/llm.d.ts +36 -0
- package/resources/llm.d.ts.map +1 -1
- package/src/index.ts +17 -20
- package/src/resources/call.ts +662 -206
- package/src/resources/concurrency.ts +25 -3
- package/src/resources/llm.ts +42 -0
- package/src/uploads.ts +8 -4
- package/src/version.ts +1 -1
- package/uploads.js +9 -2
- package/uploads.js.map +1 -1
- package/uploads.mjs +9 -2
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/call.d.ts
CHANGED
|
@@ -74,29 +74,15 @@ export interface PhoneCallResponse {
|
|
|
74
74
|
* [Disconnection Reason Doc](/get-started/debug-guide#disconnection-reason).
|
|
75
75
|
*/
|
|
76
76
|
disconnection_reason?: 'user_hangup' | 'agent_hangup' | 'call_transfer' | 'voicemail_reached' | 'inactivity' | 'machine_detected' | 'max_duration_reached' | 'concurrency_limit_reached' | 'no_valid_payment' | 'scam_detected' | 'error_inbound_webhook' | 'dial_busy' | 'dial_failed' | 'dial_no_answer' | 'error_llm_websocket_open' | 'error_llm_websocket_lost_connection' | 'error_llm_websocket_runtime' | 'error_llm_websocket_corrupt_payload' | 'error_frontend_corrupted_payload' | 'error_twilio' | 'error_no_audio_received' | 'error_asr' | 'error_retell' | 'error_unknown' | 'error_user_not_joined' | 'registered_call_timeout';
|
|
77
|
-
/**
|
|
78
|
-
* End to end latency (from user stops talking to agent start talking) tracking of
|
|
79
|
-
* the call, available after call ends. This latency does not account for the
|
|
80
|
-
* network trip time from Retell server to user frontend. The latency is tracked
|
|
81
|
-
* every time turn change between user and agent.
|
|
82
|
-
*/
|
|
83
|
-
e2e_latency?: PhoneCallResponse.E2ELatency;
|
|
84
77
|
/**
|
|
85
78
|
* End timestamp (milliseconds since epoch) of the call. Available after call ends.
|
|
86
79
|
*/
|
|
87
80
|
end_timestamp?: number;
|
|
88
81
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* LLM websocket roundtrip time between user server and Retell server.
|
|
82
|
+
* Latency tracking of the call, available after call ends. Not all fields here
|
|
83
|
+
* will be available, as it depends on the type of call and feature used.
|
|
92
84
|
*/
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* LLM websocket roundtrip latency (between user server and Retell server) tracking
|
|
96
|
-
* of the call, available after call ends. Only populated for calls using custom
|
|
97
|
-
* LLM.
|
|
98
|
-
*/
|
|
99
|
-
llm_websocket_network_rtt_latency?: PhoneCallResponse.LlmWebsocketNetworkRttLatency;
|
|
85
|
+
latency?: PhoneCallResponse.Latency;
|
|
100
86
|
/**
|
|
101
87
|
* An arbitrary object for storage purpose only. You can put anything here like
|
|
102
88
|
* your internal customer id associated with the call. Not used for processing. You
|
|
@@ -175,110 +161,280 @@ export declare namespace PhoneCallResponse {
|
|
|
175
161
|
user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
|
|
176
162
|
}
|
|
177
163
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* network trip time from Retell server to user frontend. The latency is tracked
|
|
181
|
-
* every time turn change between user and agent.
|
|
182
|
-
*/
|
|
183
|
-
interface E2ELatency {
|
|
184
|
-
/**
|
|
185
|
-
* Maximum latency in the call, measured in milliseconds.
|
|
186
|
-
*/
|
|
187
|
-
max?: number;
|
|
188
|
-
/**
|
|
189
|
-
* Minimum latency in the call, measured in milliseconds.
|
|
190
|
-
*/
|
|
191
|
-
min?: number;
|
|
192
|
-
/**
|
|
193
|
-
* Number of data points (number of times latency is tracked).
|
|
194
|
-
*/
|
|
195
|
-
num?: number;
|
|
196
|
-
/**
|
|
197
|
-
* 50 percentile of latency, measured in milliseconds.
|
|
198
|
-
*/
|
|
199
|
-
p50?: number;
|
|
200
|
-
/**
|
|
201
|
-
* 90 percentile of latency, measured in milliseconds.
|
|
202
|
-
*/
|
|
203
|
-
p90?: number;
|
|
204
|
-
/**
|
|
205
|
-
* 95 percentile of latency, measured in milliseconds.
|
|
206
|
-
*/
|
|
207
|
-
p95?: number;
|
|
208
|
-
/**
|
|
209
|
-
* 99 percentile of latency, measured in milliseconds.
|
|
210
|
-
*/
|
|
211
|
-
p99?: number;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* LLM latency (from issue of LLM call to first token received) tracking of the
|
|
215
|
-
* call, available after call ends. When using custom LLM. this latency includes
|
|
216
|
-
* LLM websocket roundtrip time between user server and Retell server.
|
|
164
|
+
* Latency tracking of the call, available after call ends. Not all fields here
|
|
165
|
+
* will be available, as it depends on the type of call and feature used.
|
|
217
166
|
*/
|
|
218
|
-
interface
|
|
219
|
-
/**
|
|
220
|
-
* Maximum latency in the call, measured in milliseconds.
|
|
221
|
-
*/
|
|
222
|
-
max?: number;
|
|
167
|
+
interface Latency {
|
|
223
168
|
/**
|
|
224
|
-
*
|
|
169
|
+
* End to end latency (from user stops talking to agent start talking) tracking of
|
|
170
|
+
* the call. This latency does not account for the network trip time from Retell
|
|
171
|
+
* server to user frontend. The latency is tracked every time turn change between
|
|
172
|
+
* user and agent.
|
|
225
173
|
*/
|
|
226
|
-
|
|
174
|
+
e2e?: Latency.E2E;
|
|
227
175
|
/**
|
|
228
|
-
*
|
|
176
|
+
* Knowledge base latency (from the triggering of knowledge base retrival to all
|
|
177
|
+
* relevant context received) tracking of the call. Only populated when using
|
|
178
|
+
* knowledge base feature for the agent of the call.
|
|
229
179
|
*/
|
|
230
|
-
|
|
180
|
+
knowledge_base?: Latency.KnowledgeBase;
|
|
231
181
|
/**
|
|
232
|
-
*
|
|
182
|
+
* LLM latency (from issue of LLM call to first speakable chunk received) tracking
|
|
183
|
+
* of the call. When using custom LLM. this latency includes LLM websocket
|
|
184
|
+
* roundtrip time between user server and Retell server.
|
|
233
185
|
*/
|
|
234
|
-
|
|
186
|
+
llm?: Latency.Llm;
|
|
235
187
|
/**
|
|
236
|
-
*
|
|
188
|
+
* LLM websocket roundtrip latency (between user server and Retell server) tracking
|
|
189
|
+
* of the call. Only populated for calls using custom LLM.
|
|
237
190
|
*/
|
|
238
|
-
|
|
191
|
+
llm_websocket_network_rtt?: Latency.LlmWebsocketNetworkRtt;
|
|
239
192
|
/**
|
|
240
|
-
*
|
|
193
|
+
* Speech-to-speech latency (from requesting responses of a S2S model to first byte
|
|
194
|
+
* received) tracking of the call. Only populated for calls that uses S2S model
|
|
195
|
+
* like Realtime API.
|
|
241
196
|
*/
|
|
242
|
-
|
|
197
|
+
s2s?: Latency.S2s;
|
|
243
198
|
/**
|
|
244
|
-
*
|
|
199
|
+
* Text-to-speech latency (from the triggering of TTS to first byte received)
|
|
200
|
+
* tracking of the call.
|
|
245
201
|
*/
|
|
246
|
-
|
|
202
|
+
tts?: Latency.Tts;
|
|
247
203
|
}
|
|
248
|
-
|
|
249
|
-
* LLM websocket roundtrip latency (between user server and Retell server) tracking
|
|
250
|
-
* of the call, available after call ends. Only populated for calls using custom
|
|
251
|
-
* LLM.
|
|
252
|
-
*/
|
|
253
|
-
interface LlmWebsocketNetworkRttLatency {
|
|
254
|
-
/**
|
|
255
|
-
* Maximum latency in the call, measured in milliseconds.
|
|
256
|
-
*/
|
|
257
|
-
max?: number;
|
|
204
|
+
namespace Latency {
|
|
258
205
|
/**
|
|
259
|
-
*
|
|
206
|
+
* End to end latency (from user stops talking to agent start talking) tracking of
|
|
207
|
+
* the call. This latency does not account for the network trip time from Retell
|
|
208
|
+
* server to user frontend. The latency is tracked every time turn change between
|
|
209
|
+
* user and agent.
|
|
260
210
|
*/
|
|
261
|
-
|
|
211
|
+
interface E2E {
|
|
212
|
+
/**
|
|
213
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
214
|
+
*/
|
|
215
|
+
max?: number;
|
|
216
|
+
/**
|
|
217
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
218
|
+
*/
|
|
219
|
+
min?: number;
|
|
220
|
+
/**
|
|
221
|
+
* Number of data points (number of times latency is tracked).
|
|
222
|
+
*/
|
|
223
|
+
num?: number;
|
|
224
|
+
/**
|
|
225
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
226
|
+
*/
|
|
227
|
+
p50?: number;
|
|
228
|
+
/**
|
|
229
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
230
|
+
*/
|
|
231
|
+
p90?: number;
|
|
232
|
+
/**
|
|
233
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
234
|
+
*/
|
|
235
|
+
p95?: number;
|
|
236
|
+
/**
|
|
237
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
238
|
+
*/
|
|
239
|
+
p99?: number;
|
|
240
|
+
/**
|
|
241
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
242
|
+
*/
|
|
243
|
+
values?: Array<number>;
|
|
244
|
+
}
|
|
262
245
|
/**
|
|
263
|
-
*
|
|
246
|
+
* Knowledge base latency (from the triggering of knowledge base retrival to all
|
|
247
|
+
* relevant context received) tracking of the call. Only populated when using
|
|
248
|
+
* knowledge base feature for the agent of the call.
|
|
264
249
|
*/
|
|
265
|
-
|
|
250
|
+
interface KnowledgeBase {
|
|
251
|
+
/**
|
|
252
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
253
|
+
*/
|
|
254
|
+
max?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
257
|
+
*/
|
|
258
|
+
min?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Number of data points (number of times latency is tracked).
|
|
261
|
+
*/
|
|
262
|
+
num?: number;
|
|
263
|
+
/**
|
|
264
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
265
|
+
*/
|
|
266
|
+
p50?: number;
|
|
267
|
+
/**
|
|
268
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
269
|
+
*/
|
|
270
|
+
p90?: number;
|
|
271
|
+
/**
|
|
272
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
273
|
+
*/
|
|
274
|
+
p95?: number;
|
|
275
|
+
/**
|
|
276
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
277
|
+
*/
|
|
278
|
+
p99?: number;
|
|
279
|
+
/**
|
|
280
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
281
|
+
*/
|
|
282
|
+
values?: Array<number>;
|
|
283
|
+
}
|
|
266
284
|
/**
|
|
267
|
-
*
|
|
285
|
+
* LLM latency (from issue of LLM call to first speakable chunk received) tracking
|
|
286
|
+
* of the call. When using custom LLM. this latency includes LLM websocket
|
|
287
|
+
* roundtrip time between user server and Retell server.
|
|
268
288
|
*/
|
|
269
|
-
|
|
289
|
+
interface Llm {
|
|
290
|
+
/**
|
|
291
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
292
|
+
*/
|
|
293
|
+
max?: number;
|
|
294
|
+
/**
|
|
295
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
296
|
+
*/
|
|
297
|
+
min?: number;
|
|
298
|
+
/**
|
|
299
|
+
* Number of data points (number of times latency is tracked).
|
|
300
|
+
*/
|
|
301
|
+
num?: number;
|
|
302
|
+
/**
|
|
303
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
304
|
+
*/
|
|
305
|
+
p50?: number;
|
|
306
|
+
/**
|
|
307
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
308
|
+
*/
|
|
309
|
+
p90?: number;
|
|
310
|
+
/**
|
|
311
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
312
|
+
*/
|
|
313
|
+
p95?: number;
|
|
314
|
+
/**
|
|
315
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
316
|
+
*/
|
|
317
|
+
p99?: number;
|
|
318
|
+
/**
|
|
319
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
320
|
+
*/
|
|
321
|
+
values?: Array<number>;
|
|
322
|
+
}
|
|
270
323
|
/**
|
|
271
|
-
*
|
|
324
|
+
* LLM websocket roundtrip latency (between user server and Retell server) tracking
|
|
325
|
+
* of the call. Only populated for calls using custom LLM.
|
|
272
326
|
*/
|
|
273
|
-
|
|
327
|
+
interface LlmWebsocketNetworkRtt {
|
|
328
|
+
/**
|
|
329
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
330
|
+
*/
|
|
331
|
+
max?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
334
|
+
*/
|
|
335
|
+
min?: number;
|
|
336
|
+
/**
|
|
337
|
+
* Number of data points (number of times latency is tracked).
|
|
338
|
+
*/
|
|
339
|
+
num?: number;
|
|
340
|
+
/**
|
|
341
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
342
|
+
*/
|
|
343
|
+
p50?: number;
|
|
344
|
+
/**
|
|
345
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
346
|
+
*/
|
|
347
|
+
p90?: number;
|
|
348
|
+
/**
|
|
349
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
350
|
+
*/
|
|
351
|
+
p95?: number;
|
|
352
|
+
/**
|
|
353
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
354
|
+
*/
|
|
355
|
+
p99?: number;
|
|
356
|
+
/**
|
|
357
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
358
|
+
*/
|
|
359
|
+
values?: Array<number>;
|
|
360
|
+
}
|
|
274
361
|
/**
|
|
275
|
-
*
|
|
362
|
+
* Speech-to-speech latency (from requesting responses of a S2S model to first byte
|
|
363
|
+
* received) tracking of the call. Only populated for calls that uses S2S model
|
|
364
|
+
* like Realtime API.
|
|
276
365
|
*/
|
|
277
|
-
|
|
366
|
+
interface S2s {
|
|
367
|
+
/**
|
|
368
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
369
|
+
*/
|
|
370
|
+
max?: number;
|
|
371
|
+
/**
|
|
372
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
373
|
+
*/
|
|
374
|
+
min?: number;
|
|
375
|
+
/**
|
|
376
|
+
* Number of data points (number of times latency is tracked).
|
|
377
|
+
*/
|
|
378
|
+
num?: number;
|
|
379
|
+
/**
|
|
380
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
381
|
+
*/
|
|
382
|
+
p50?: number;
|
|
383
|
+
/**
|
|
384
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
385
|
+
*/
|
|
386
|
+
p90?: number;
|
|
387
|
+
/**
|
|
388
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
389
|
+
*/
|
|
390
|
+
p95?: number;
|
|
391
|
+
/**
|
|
392
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
393
|
+
*/
|
|
394
|
+
p99?: number;
|
|
395
|
+
/**
|
|
396
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
397
|
+
*/
|
|
398
|
+
values?: Array<number>;
|
|
399
|
+
}
|
|
278
400
|
/**
|
|
279
|
-
*
|
|
401
|
+
* Text-to-speech latency (from the triggering of TTS to first byte received)
|
|
402
|
+
* tracking of the call.
|
|
280
403
|
*/
|
|
281
|
-
|
|
404
|
+
interface Tts {
|
|
405
|
+
/**
|
|
406
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
407
|
+
*/
|
|
408
|
+
max?: number;
|
|
409
|
+
/**
|
|
410
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
411
|
+
*/
|
|
412
|
+
min?: number;
|
|
413
|
+
/**
|
|
414
|
+
* Number of data points (number of times latency is tracked).
|
|
415
|
+
*/
|
|
416
|
+
num?: number;
|
|
417
|
+
/**
|
|
418
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
419
|
+
*/
|
|
420
|
+
p50?: number;
|
|
421
|
+
/**
|
|
422
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
423
|
+
*/
|
|
424
|
+
p90?: number;
|
|
425
|
+
/**
|
|
426
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
427
|
+
*/
|
|
428
|
+
p95?: number;
|
|
429
|
+
/**
|
|
430
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
431
|
+
*/
|
|
432
|
+
p99?: number;
|
|
433
|
+
/**
|
|
434
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
435
|
+
*/
|
|
436
|
+
values?: Array<number>;
|
|
437
|
+
}
|
|
282
438
|
}
|
|
283
439
|
interface TranscriptObject {
|
|
284
440
|
/**
|
|
@@ -425,29 +581,15 @@ export interface WebCallResponse {
|
|
|
425
581
|
* [Disconnection Reason Doc](/get-started/debug-guide#disconnection-reason).
|
|
426
582
|
*/
|
|
427
583
|
disconnection_reason?: 'user_hangup' | 'agent_hangup' | 'call_transfer' | 'voicemail_reached' | 'inactivity' | 'machine_detected' | 'max_duration_reached' | 'concurrency_limit_reached' | 'no_valid_payment' | 'scam_detected' | 'error_inbound_webhook' | 'dial_busy' | 'dial_failed' | 'dial_no_answer' | 'error_llm_websocket_open' | 'error_llm_websocket_lost_connection' | 'error_llm_websocket_runtime' | 'error_llm_websocket_corrupt_payload' | 'error_frontend_corrupted_payload' | 'error_twilio' | 'error_no_audio_received' | 'error_asr' | 'error_retell' | 'error_unknown' | 'error_user_not_joined' | 'registered_call_timeout';
|
|
428
|
-
/**
|
|
429
|
-
* End to end latency (from user stops talking to agent start talking) tracking of
|
|
430
|
-
* the call, available after call ends. This latency does not account for the
|
|
431
|
-
* network trip time from Retell server to user frontend. The latency is tracked
|
|
432
|
-
* every time turn change between user and agent.
|
|
433
|
-
*/
|
|
434
|
-
e2e_latency?: WebCallResponse.E2ELatency;
|
|
435
584
|
/**
|
|
436
585
|
* End timestamp (milliseconds since epoch) of the call. Available after call ends.
|
|
437
586
|
*/
|
|
438
587
|
end_timestamp?: number;
|
|
439
588
|
/**
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
* LLM websocket roundtrip time between user server and Retell server.
|
|
443
|
-
*/
|
|
444
|
-
llm_latency?: WebCallResponse.LlmLatency;
|
|
445
|
-
/**
|
|
446
|
-
* LLM websocket roundtrip latency (between user server and Retell server) tracking
|
|
447
|
-
* of the call, available after call ends. Only populated for calls using custom
|
|
448
|
-
* LLM.
|
|
589
|
+
* Latency tracking of the call, available after call ends. Not all fields here
|
|
590
|
+
* will be available, as it depends on the type of call and feature used.
|
|
449
591
|
*/
|
|
450
|
-
|
|
592
|
+
latency?: WebCallResponse.Latency;
|
|
451
593
|
/**
|
|
452
594
|
* An arbitrary object for storage purpose only. You can put anything here like
|
|
453
595
|
* your internal customer id associated with the call. Not used for processing. You
|
|
@@ -526,110 +668,280 @@ export declare namespace WebCallResponse {
|
|
|
526
668
|
user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
|
|
527
669
|
}
|
|
528
670
|
/**
|
|
529
|
-
*
|
|
530
|
-
*
|
|
531
|
-
* network trip time from Retell server to user frontend. The latency is tracked
|
|
532
|
-
* every time turn change between user and agent.
|
|
671
|
+
* Latency tracking of the call, available after call ends. Not all fields here
|
|
672
|
+
* will be available, as it depends on the type of call and feature used.
|
|
533
673
|
*/
|
|
534
|
-
interface
|
|
674
|
+
interface Latency {
|
|
535
675
|
/**
|
|
536
|
-
*
|
|
676
|
+
* End to end latency (from user stops talking to agent start talking) tracking of
|
|
677
|
+
* the call. This latency does not account for the network trip time from Retell
|
|
678
|
+
* server to user frontend. The latency is tracked every time turn change between
|
|
679
|
+
* user and agent.
|
|
537
680
|
*/
|
|
538
|
-
|
|
681
|
+
e2e?: Latency.E2E;
|
|
539
682
|
/**
|
|
540
|
-
*
|
|
683
|
+
* Knowledge base latency (from the triggering of knowledge base retrival to all
|
|
684
|
+
* relevant context received) tracking of the call. Only populated when using
|
|
685
|
+
* knowledge base feature for the agent of the call.
|
|
541
686
|
*/
|
|
542
|
-
|
|
687
|
+
knowledge_base?: Latency.KnowledgeBase;
|
|
543
688
|
/**
|
|
544
|
-
*
|
|
689
|
+
* LLM latency (from issue of LLM call to first speakable chunk received) tracking
|
|
690
|
+
* of the call. When using custom LLM. this latency includes LLM websocket
|
|
691
|
+
* roundtrip time between user server and Retell server.
|
|
545
692
|
*/
|
|
546
|
-
|
|
693
|
+
llm?: Latency.Llm;
|
|
547
694
|
/**
|
|
548
|
-
*
|
|
695
|
+
* LLM websocket roundtrip latency (between user server and Retell server) tracking
|
|
696
|
+
* of the call. Only populated for calls using custom LLM.
|
|
549
697
|
*/
|
|
550
|
-
|
|
698
|
+
llm_websocket_network_rtt?: Latency.LlmWebsocketNetworkRtt;
|
|
551
699
|
/**
|
|
552
|
-
*
|
|
700
|
+
* Speech-to-speech latency (from requesting responses of a S2S model to first byte
|
|
701
|
+
* received) tracking of the call. Only populated for calls that uses S2S model
|
|
702
|
+
* like Realtime API.
|
|
553
703
|
*/
|
|
554
|
-
|
|
704
|
+
s2s?: Latency.S2s;
|
|
555
705
|
/**
|
|
556
|
-
*
|
|
706
|
+
* Text-to-speech latency (from the triggering of TTS to first byte received)
|
|
707
|
+
* tracking of the call.
|
|
557
708
|
*/
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* 99 percentile of latency, measured in milliseconds.
|
|
561
|
-
*/
|
|
562
|
-
p99?: number;
|
|
709
|
+
tts?: Latency.Tts;
|
|
563
710
|
}
|
|
564
|
-
|
|
565
|
-
* LLM latency (from issue of LLM call to first token received) tracking of the
|
|
566
|
-
* call, available after call ends. When using custom LLM. this latency includes
|
|
567
|
-
* LLM websocket roundtrip time between user server and Retell server.
|
|
568
|
-
*/
|
|
569
|
-
interface LlmLatency {
|
|
570
|
-
/**
|
|
571
|
-
* Maximum latency in the call, measured in milliseconds.
|
|
572
|
-
*/
|
|
573
|
-
max?: number;
|
|
574
|
-
/**
|
|
575
|
-
* Minimum latency in the call, measured in milliseconds.
|
|
576
|
-
*/
|
|
577
|
-
min?: number;
|
|
711
|
+
namespace Latency {
|
|
578
712
|
/**
|
|
579
|
-
*
|
|
713
|
+
* End to end latency (from user stops talking to agent start talking) tracking of
|
|
714
|
+
* the call. This latency does not account for the network trip time from Retell
|
|
715
|
+
* server to user frontend. The latency is tracked every time turn change between
|
|
716
|
+
* user and agent.
|
|
580
717
|
*/
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
718
|
+
interface E2E {
|
|
719
|
+
/**
|
|
720
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
721
|
+
*/
|
|
722
|
+
max?: number;
|
|
723
|
+
/**
|
|
724
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
725
|
+
*/
|
|
726
|
+
min?: number;
|
|
727
|
+
/**
|
|
728
|
+
* Number of data points (number of times latency is tracked).
|
|
729
|
+
*/
|
|
730
|
+
num?: number;
|
|
731
|
+
/**
|
|
732
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
733
|
+
*/
|
|
734
|
+
p50?: number;
|
|
735
|
+
/**
|
|
736
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
737
|
+
*/
|
|
738
|
+
p90?: number;
|
|
739
|
+
/**
|
|
740
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
741
|
+
*/
|
|
742
|
+
p95?: number;
|
|
743
|
+
/**
|
|
744
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
745
|
+
*/
|
|
746
|
+
p99?: number;
|
|
747
|
+
/**
|
|
748
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
749
|
+
*/
|
|
750
|
+
values?: Array<number>;
|
|
751
|
+
}
|
|
613
752
|
/**
|
|
614
|
-
*
|
|
753
|
+
* Knowledge base latency (from the triggering of knowledge base retrival to all
|
|
754
|
+
* relevant context received) tracking of the call. Only populated when using
|
|
755
|
+
* knowledge base feature for the agent of the call.
|
|
615
756
|
*/
|
|
616
|
-
|
|
757
|
+
interface KnowledgeBase {
|
|
758
|
+
/**
|
|
759
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
760
|
+
*/
|
|
761
|
+
max?: number;
|
|
762
|
+
/**
|
|
763
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
764
|
+
*/
|
|
765
|
+
min?: number;
|
|
766
|
+
/**
|
|
767
|
+
* Number of data points (number of times latency is tracked).
|
|
768
|
+
*/
|
|
769
|
+
num?: number;
|
|
770
|
+
/**
|
|
771
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
772
|
+
*/
|
|
773
|
+
p50?: number;
|
|
774
|
+
/**
|
|
775
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
776
|
+
*/
|
|
777
|
+
p90?: number;
|
|
778
|
+
/**
|
|
779
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
780
|
+
*/
|
|
781
|
+
p95?: number;
|
|
782
|
+
/**
|
|
783
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
784
|
+
*/
|
|
785
|
+
p99?: number;
|
|
786
|
+
/**
|
|
787
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
788
|
+
*/
|
|
789
|
+
values?: Array<number>;
|
|
790
|
+
}
|
|
617
791
|
/**
|
|
618
|
-
*
|
|
792
|
+
* LLM latency (from issue of LLM call to first speakable chunk received) tracking
|
|
793
|
+
* of the call. When using custom LLM. this latency includes LLM websocket
|
|
794
|
+
* roundtrip time between user server and Retell server.
|
|
619
795
|
*/
|
|
620
|
-
|
|
796
|
+
interface Llm {
|
|
797
|
+
/**
|
|
798
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
799
|
+
*/
|
|
800
|
+
max?: number;
|
|
801
|
+
/**
|
|
802
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
803
|
+
*/
|
|
804
|
+
min?: number;
|
|
805
|
+
/**
|
|
806
|
+
* Number of data points (number of times latency is tracked).
|
|
807
|
+
*/
|
|
808
|
+
num?: number;
|
|
809
|
+
/**
|
|
810
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
811
|
+
*/
|
|
812
|
+
p50?: number;
|
|
813
|
+
/**
|
|
814
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
815
|
+
*/
|
|
816
|
+
p90?: number;
|
|
817
|
+
/**
|
|
818
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
819
|
+
*/
|
|
820
|
+
p95?: number;
|
|
821
|
+
/**
|
|
822
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
823
|
+
*/
|
|
824
|
+
p99?: number;
|
|
825
|
+
/**
|
|
826
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
827
|
+
*/
|
|
828
|
+
values?: Array<number>;
|
|
829
|
+
}
|
|
621
830
|
/**
|
|
622
|
-
*
|
|
831
|
+
* LLM websocket roundtrip latency (between user server and Retell server) tracking
|
|
832
|
+
* of the call. Only populated for calls using custom LLM.
|
|
623
833
|
*/
|
|
624
|
-
|
|
834
|
+
interface LlmWebsocketNetworkRtt {
|
|
835
|
+
/**
|
|
836
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
837
|
+
*/
|
|
838
|
+
max?: number;
|
|
839
|
+
/**
|
|
840
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
841
|
+
*/
|
|
842
|
+
min?: number;
|
|
843
|
+
/**
|
|
844
|
+
* Number of data points (number of times latency is tracked).
|
|
845
|
+
*/
|
|
846
|
+
num?: number;
|
|
847
|
+
/**
|
|
848
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
849
|
+
*/
|
|
850
|
+
p50?: number;
|
|
851
|
+
/**
|
|
852
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
853
|
+
*/
|
|
854
|
+
p90?: number;
|
|
855
|
+
/**
|
|
856
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
857
|
+
*/
|
|
858
|
+
p95?: number;
|
|
859
|
+
/**
|
|
860
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
861
|
+
*/
|
|
862
|
+
p99?: number;
|
|
863
|
+
/**
|
|
864
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
865
|
+
*/
|
|
866
|
+
values?: Array<number>;
|
|
867
|
+
}
|
|
625
868
|
/**
|
|
626
|
-
*
|
|
869
|
+
* Speech-to-speech latency (from requesting responses of a S2S model to first byte
|
|
870
|
+
* received) tracking of the call. Only populated for calls that uses S2S model
|
|
871
|
+
* like Realtime API.
|
|
627
872
|
*/
|
|
628
|
-
|
|
873
|
+
interface S2s {
|
|
874
|
+
/**
|
|
875
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
876
|
+
*/
|
|
877
|
+
max?: number;
|
|
878
|
+
/**
|
|
879
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
880
|
+
*/
|
|
881
|
+
min?: number;
|
|
882
|
+
/**
|
|
883
|
+
* Number of data points (number of times latency is tracked).
|
|
884
|
+
*/
|
|
885
|
+
num?: number;
|
|
886
|
+
/**
|
|
887
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
888
|
+
*/
|
|
889
|
+
p50?: number;
|
|
890
|
+
/**
|
|
891
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
892
|
+
*/
|
|
893
|
+
p90?: number;
|
|
894
|
+
/**
|
|
895
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
896
|
+
*/
|
|
897
|
+
p95?: number;
|
|
898
|
+
/**
|
|
899
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
900
|
+
*/
|
|
901
|
+
p99?: number;
|
|
902
|
+
/**
|
|
903
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
904
|
+
*/
|
|
905
|
+
values?: Array<number>;
|
|
906
|
+
}
|
|
629
907
|
/**
|
|
630
|
-
*
|
|
908
|
+
* Text-to-speech latency (from the triggering of TTS to first byte received)
|
|
909
|
+
* tracking of the call.
|
|
631
910
|
*/
|
|
632
|
-
|
|
911
|
+
interface Tts {
|
|
912
|
+
/**
|
|
913
|
+
* Maximum latency in the call, measured in milliseconds.
|
|
914
|
+
*/
|
|
915
|
+
max?: number;
|
|
916
|
+
/**
|
|
917
|
+
* Minimum latency in the call, measured in milliseconds.
|
|
918
|
+
*/
|
|
919
|
+
min?: number;
|
|
920
|
+
/**
|
|
921
|
+
* Number of data points (number of times latency is tracked).
|
|
922
|
+
*/
|
|
923
|
+
num?: number;
|
|
924
|
+
/**
|
|
925
|
+
* 50 percentile of latency, measured in milliseconds.
|
|
926
|
+
*/
|
|
927
|
+
p50?: number;
|
|
928
|
+
/**
|
|
929
|
+
* 90 percentile of latency, measured in milliseconds.
|
|
930
|
+
*/
|
|
931
|
+
p90?: number;
|
|
932
|
+
/**
|
|
933
|
+
* 95 percentile of latency, measured in milliseconds.
|
|
934
|
+
*/
|
|
935
|
+
p95?: number;
|
|
936
|
+
/**
|
|
937
|
+
* 99 percentile of latency, measured in milliseconds.
|
|
938
|
+
*/
|
|
939
|
+
p99?: number;
|
|
940
|
+
/**
|
|
941
|
+
* All the latency data points in the call, measured in milliseconds.
|
|
942
|
+
*/
|
|
943
|
+
values?: Array<number>;
|
|
944
|
+
}
|
|
633
945
|
}
|
|
634
946
|
interface TranscriptObject {
|
|
635
947
|
/**
|
|
@@ -755,25 +1067,69 @@ export interface CallListParams {
|
|
|
755
1067
|
export declare namespace CallListParams {
|
|
756
1068
|
interface FilterCriteria {
|
|
757
1069
|
/**
|
|
758
|
-
*
|
|
1070
|
+
* Only retrieve calls that are made with specific agent(s).
|
|
759
1071
|
*/
|
|
760
|
-
|
|
1072
|
+
agent_id?: Array<string>;
|
|
761
1073
|
/**
|
|
762
|
-
*
|
|
1074
|
+
* Only retrieve calls with specific call status(es).
|
|
763
1075
|
*/
|
|
764
|
-
|
|
1076
|
+
call_status?: Array<'registered' | 'ongoing' | 'ended' | 'error'>;
|
|
765
1077
|
/**
|
|
766
|
-
* Only retrieve calls
|
|
1078
|
+
* Only retrieve calls with specific call successful(s).
|
|
767
1079
|
*/
|
|
768
|
-
|
|
1080
|
+
call_successful?: Array<boolean>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Only retrieve calls with specific call type(s).
|
|
1083
|
+
*/
|
|
1084
|
+
call_type?: Array<'web_call' | 'phone_call'>;
|
|
1085
|
+
/**
|
|
1086
|
+
* Only retrieve calls with specific direction(s).
|
|
1087
|
+
*/
|
|
1088
|
+
direction?: Array<'inbound' | 'outbound'>;
|
|
769
1089
|
/**
|
|
770
|
-
*
|
|
1090
|
+
* Only retrieve calls with specific disconnection reason(s).
|
|
771
1091
|
*/
|
|
772
|
-
|
|
1092
|
+
disconnection_reason?: Array<'user_hangup' | 'agent_hangup' | 'call_transfer' | 'voicemail_reached' | 'inactivity' | 'machine_detected' | 'max_duration_reached' | 'concurrency_limit_reached' | 'no_valid_payment' | 'scam_detected' | 'error_inbound_webhook' | 'dial_busy' | 'dial_failed' | 'dial_no_answer' | 'error_llm_websocket_open' | 'error_llm_websocket_lost_connection' | 'error_llm_websocket_runtime' | 'error_llm_websocket_corrupt_payload' | 'error_frontend_corrupted_payload' | 'error_twilio' | 'error_no_audio_received' | 'error_asr' | 'error_retell' | 'error_unknown' | 'error_user_not_joined' | 'registered_call_timeout'>;
|
|
773
1093
|
/**
|
|
774
|
-
*
|
|
1094
|
+
* Only retrieve calls with specific range of duration(s).
|
|
775
1095
|
*/
|
|
776
|
-
|
|
1096
|
+
duration_ms?: FilterCriteria.DurationMs;
|
|
1097
|
+
/**
|
|
1098
|
+
* Only retrieve calls with specific from number(s).
|
|
1099
|
+
*/
|
|
1100
|
+
from_number?: Array<string>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Only retrieve calls that are in voicemail or not in voicemail.
|
|
1103
|
+
*/
|
|
1104
|
+
in_voicemail?: Array<boolean>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Only retrieve calls with specific range of start timestamp(s).
|
|
1107
|
+
*/
|
|
1108
|
+
start_timestamp?: FilterCriteria.StartTimestamp;
|
|
1109
|
+
/**
|
|
1110
|
+
* Only retrieve calls with specific to number(s).
|
|
1111
|
+
*/
|
|
1112
|
+
to_number?: Array<string>;
|
|
1113
|
+
/**
|
|
1114
|
+
* Only retrieve calls with specific user sentiment(s).
|
|
1115
|
+
*/
|
|
1116
|
+
user_sentiment?: Array<'Negative' | 'Positive' | 'Neutral' | 'Unknown'>;
|
|
1117
|
+
}
|
|
1118
|
+
namespace FilterCriteria {
|
|
1119
|
+
/**
|
|
1120
|
+
* Only retrieve calls with specific range of duration(s).
|
|
1121
|
+
*/
|
|
1122
|
+
interface DurationMs {
|
|
1123
|
+
lower_threshold?: number;
|
|
1124
|
+
upper_threshold?: number;
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* Only retrieve calls with specific range of start timestamp(s).
|
|
1128
|
+
*/
|
|
1129
|
+
interface StartTimestamp {
|
|
1130
|
+
lower_threshold?: number;
|
|
1131
|
+
upper_threshold?: number;
|
|
1132
|
+
}
|
|
777
1133
|
}
|
|
778
1134
|
}
|
|
779
1135
|
export interface CallCreatePhoneCallParams {
|