retell-sdk 4.27.0 → 4.29.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 +52 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/resources/agent.d.ts +183 -3
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +38 -0
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +38 -0
- package/resources/agent.mjs.map +1 -1
- package/resources/batch-call.d.ts +9 -0
- package/resources/batch-call.d.ts.map +1 -1
- package/resources/batch-call.js +9 -0
- package/resources/batch-call.js.map +1 -1
- package/resources/batch-call.mjs +9 -0
- package/resources/batch-call.mjs.map +1 -1
- package/resources/call.d.ts +70 -0
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +58 -0
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +58 -0
- package/resources/call.mjs.map +1 -1
- package/resources/knowledge-base.d.ts +40 -0
- package/resources/knowledge-base.d.ts.map +1 -1
- package/resources/knowledge-base.js +40 -0
- package/resources/knowledge-base.js.map +1 -1
- package/resources/knowledge-base.mjs +40 -0
- package/resources/knowledge-base.mjs.map +1 -1
- package/resources/llm.d.ts +41 -3
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +26 -0
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +26 -0
- package/resources/llm.mjs.map +1 -1
- package/resources/phone-number.d.ts +53 -8
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +45 -0
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +45 -0
- package/resources/phone-number.mjs.map +1 -1
- package/src/resources/agent.ts +211 -3
- package/src/resources/batch-call.ts +9 -0
- package/src/resources/call.ts +72 -0
- package/src/resources/knowledge-base.ts +40 -0
- package/src/resources/llm.ts +42 -3
- package/src/resources/phone-number.ts +53 -8
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,30 +3,65 @@ import { APIResource } from "../resource.mjs";
|
|
|
3
3
|
export class PhoneNumber extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Buy a new phone number & Bind agents
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const phoneNumberResponse =
|
|
10
|
+
* await client.phoneNumber.create();
|
|
11
|
+
* ```
|
|
6
12
|
*/
|
|
7
13
|
create(body, options) {
|
|
8
14
|
return this._client.post('/create-phone-number', { body, ...options });
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* Retrieve details of a specific phone number
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const phoneNumberResponse =
|
|
22
|
+
* await client.phoneNumber.retrieve('+14157774444');
|
|
23
|
+
* ```
|
|
12
24
|
*/
|
|
13
25
|
retrieve(phoneNumber, options) {
|
|
14
26
|
return this._client.get(`/get-phone-number/${phoneNumber}`, options);
|
|
15
27
|
}
|
|
16
28
|
/**
|
|
17
29
|
* Update agent bound to a purchased phone number
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const phoneNumberResponse = await client.phoneNumber.update(
|
|
34
|
+
* '+14157774444',
|
|
35
|
+
* {
|
|
36
|
+
* inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
37
|
+
* nickname: 'Frontdesk Number',
|
|
38
|
+
* outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
39
|
+
* },
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
18
42
|
*/
|
|
19
43
|
update(phoneNumber, body, options) {
|
|
20
44
|
return this._client.patch(`/update-phone-number/${phoneNumber}`, { body, ...options });
|
|
21
45
|
}
|
|
22
46
|
/**
|
|
23
47
|
* List all phone numbers
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const phoneNumberResponses =
|
|
52
|
+
* await client.phoneNumber.list();
|
|
53
|
+
* ```
|
|
24
54
|
*/
|
|
25
55
|
list(options) {
|
|
26
56
|
return this._client.get('/list-phone-numbers', options);
|
|
27
57
|
}
|
|
28
58
|
/**
|
|
29
59
|
* Delete an existing phone number
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* await client.phoneNumber.delete('+14157774444');
|
|
64
|
+
* ```
|
|
30
65
|
*/
|
|
31
66
|
delete(phoneNumber, options) {
|
|
32
67
|
return this._client.delete(`/delete-phone-number/${phoneNumber}`, {
|
|
@@ -36,6 +71,16 @@ export class PhoneNumber extends APIResource {
|
|
|
36
71
|
}
|
|
37
72
|
/**
|
|
38
73
|
* Import a phone number from custom telephony & Bind agents
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
78
|
+
* {
|
|
79
|
+
* phone_number: '+14157774444',
|
|
80
|
+
* termination_uri: 'someuri.pstn.twilio.com',
|
|
81
|
+
* },
|
|
82
|
+
* );
|
|
83
|
+
* ```
|
|
39
84
|
*/
|
|
40
85
|
import(body, options) {
|
|
41
86
|
return this._client.post('/import-phone-number', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-number.mjs","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"phone-number.mjs","sourceRoot":"","sources":["../src/resources/phone-number.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,MAAM,CAAC,IAA6B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,WAAmB,EACnB,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,wBAAwB,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,OAA6B;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,WAAmB,EAAE,OAA6B;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,wBAAwB,WAAW,EAAE,EAAE;YAChE,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAA6B,EAAE,OAA6B;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF"}
|
package/src/resources/agent.ts
CHANGED
|
@@ -7,6 +7,17 @@ import * as Core from '../core';
|
|
|
7
7
|
export class Agent extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Create a new agent
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const agentResponse = await client.agent.create({
|
|
14
|
+
* response_engine: {
|
|
15
|
+
* llm_id: 'llm_234sdertfsdsfsdf',
|
|
16
|
+
* type: 'retell-llm',
|
|
17
|
+
* },
|
|
18
|
+
* voice_id: '11labs-Adrian',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
10
21
|
*/
|
|
11
22
|
create(body: AgentCreateParams, options?: Core.RequestOptions): Core.APIPromise<AgentResponse> {
|
|
12
23
|
return this._client.post('/create-agent', { body, ...options });
|
|
@@ -14,6 +25,13 @@ export class Agent extends APIResource {
|
|
|
14
25
|
|
|
15
26
|
/**
|
|
16
27
|
* Retrieve details of a specific agent
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const agentResponse = await client.agent.retrieve(
|
|
32
|
+
* '16b980523634a6dc504898cda492e939',
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
17
35
|
*/
|
|
18
36
|
retrieve(
|
|
19
37
|
agentId: string,
|
|
@@ -34,6 +52,14 @@ export class Agent extends APIResource {
|
|
|
34
52
|
|
|
35
53
|
/**
|
|
36
54
|
* Update an existing agent
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const agentResponse = await client.agent.update(
|
|
59
|
+
* '16b980523634a6dc504898cda492e939',
|
|
60
|
+
* { agent_name: 'Jarvis' },
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
37
63
|
*/
|
|
38
64
|
update(
|
|
39
65
|
agentId: string,
|
|
@@ -50,6 +76,11 @@ export class Agent extends APIResource {
|
|
|
50
76
|
|
|
51
77
|
/**
|
|
52
78
|
* List all agents
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const agentResponses = await client.agent.list();
|
|
83
|
+
* ```
|
|
53
84
|
*/
|
|
54
85
|
list(options?: Core.RequestOptions): Core.APIPromise<AgentListResponse> {
|
|
55
86
|
return this._client.get('/list-agents', options);
|
|
@@ -57,6 +88,13 @@ export class Agent extends APIResource {
|
|
|
57
88
|
|
|
58
89
|
/**
|
|
59
90
|
* Delete an existing agent
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* await client.agent.delete(
|
|
95
|
+
* 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
96
|
+
* );
|
|
97
|
+
* ```
|
|
60
98
|
*/
|
|
61
99
|
delete(agentId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
62
100
|
return this._client.delete(`/delete-agent/${agentId}`, {
|
|
@@ -67,6 +105,13 @@ export class Agent extends APIResource {
|
|
|
67
105
|
|
|
68
106
|
/**
|
|
69
107
|
* Get all versions of an agent
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const agentResponses = await client.agent.getVersions(
|
|
112
|
+
* '16b980523634a6dc504898cda492e939',
|
|
113
|
+
* );
|
|
114
|
+
* ```
|
|
70
115
|
*/
|
|
71
116
|
getVersions(agentId: string, options?: Core.RequestOptions): Core.APIPromise<AgentGetVersionsResponse> {
|
|
72
117
|
return this._client.get(`/get-agent-versions/${agentId}`, options);
|
|
@@ -106,6 +151,12 @@ export interface AgentResponse {
|
|
|
106
151
|
*/
|
|
107
152
|
agent_name?: string | null;
|
|
108
153
|
|
|
154
|
+
/**
|
|
155
|
+
* If set to true, DTMF input will be accepted and processed. If false, any DTMF
|
|
156
|
+
* input will be ignored. Default to true.
|
|
157
|
+
*/
|
|
158
|
+
allow_user_dtmf?: boolean;
|
|
159
|
+
|
|
109
160
|
/**
|
|
110
161
|
* If set, will add ambient environment sound to the call to make experience more
|
|
111
162
|
* realistic. Currently supports the following options:
|
|
@@ -180,6 +231,11 @@ export interface AgentResponse {
|
|
|
180
231
|
*/
|
|
181
232
|
boosted_keywords?: Array<string> | null;
|
|
182
233
|
|
|
234
|
+
/**
|
|
235
|
+
* If set, determines what denoising mode to use. Default to noise-cancellation.
|
|
236
|
+
*/
|
|
237
|
+
denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
|
|
238
|
+
|
|
183
239
|
/**
|
|
184
240
|
* Controls whether the agent would backchannel (agent interjects the speaker with
|
|
185
241
|
* phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
|
|
@@ -225,6 +281,11 @@ export interface AgentResponse {
|
|
|
225
281
|
*/
|
|
226
282
|
interruption_sensitivity?: number;
|
|
227
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Whether the agent is published.
|
|
286
|
+
*/
|
|
287
|
+
is_published?: boolean;
|
|
288
|
+
|
|
228
289
|
/**
|
|
229
290
|
* Specifies what language (and dialect) the speech recognition will operate in.
|
|
230
291
|
* For instance, selecting `en-GB` optimizes speech recognition for British
|
|
@@ -285,6 +346,13 @@ export interface AgentResponse {
|
|
|
285
346
|
*/
|
|
286
347
|
normalize_for_speech?: boolean;
|
|
287
348
|
|
|
349
|
+
/**
|
|
350
|
+
* Whether this agent opts in for signed URLs for public logs and recordings. When
|
|
351
|
+
* enabled, the generated URLs will include security signatures that restrict
|
|
352
|
+
* access and automatically expire after 24 hours.
|
|
353
|
+
*/
|
|
354
|
+
opt_in_signed_url?: boolean;
|
|
355
|
+
|
|
288
356
|
/**
|
|
289
357
|
* Whether this agent opts out of sensitive data storage like transcript,
|
|
290
358
|
* recording, logging, inbound/outbound phone numbers, etc. These data can still be
|
|
@@ -352,10 +420,12 @@ export interface AgentResponse {
|
|
|
352
420
|
*/
|
|
353
421
|
stt_mode?: 'fast' | 'accurate';
|
|
354
422
|
|
|
423
|
+
user_dtmf_options?: AgentResponse.UserDtmfOptions | null;
|
|
424
|
+
|
|
355
425
|
/**
|
|
356
426
|
* Version of the agent.
|
|
357
427
|
*/
|
|
358
|
-
version?:
|
|
428
|
+
version?: unknown;
|
|
359
429
|
|
|
360
430
|
/**
|
|
361
431
|
* Optionally set the voice model used for the selected voice. Currently only
|
|
@@ -430,6 +500,11 @@ export namespace AgentResponse {
|
|
|
430
500
|
* type of the Response Engine.
|
|
431
501
|
*/
|
|
432
502
|
type: 'retell-llm';
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Version of the Retell LLM Response Engine.
|
|
506
|
+
*/
|
|
507
|
+
version?: number | null;
|
|
433
508
|
}
|
|
434
509
|
|
|
435
510
|
export interface ResponseEngineCustomLm {
|
|
@@ -454,6 +529,11 @@ export namespace AgentResponse {
|
|
|
454
529
|
* type of the Response Engine.
|
|
455
530
|
*/
|
|
456
531
|
type: 'conversation-flow';
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Version of the Conversation Flow Response Engine.
|
|
535
|
+
*/
|
|
536
|
+
version?: number | null;
|
|
457
537
|
}
|
|
458
538
|
|
|
459
539
|
export interface StringAnalysisData {
|
|
@@ -550,6 +630,27 @@ export namespace AgentResponse {
|
|
|
550
630
|
*/
|
|
551
631
|
word: string;
|
|
552
632
|
}
|
|
633
|
+
|
|
634
|
+
export interface UserDtmfOptions {
|
|
635
|
+
/**
|
|
636
|
+
* The maximum number of digits allowed in the user's DTMF (Dual-Tone
|
|
637
|
+
* Multi-Frequency) input per turn. Once this limit is reached, the input is
|
|
638
|
+
* considered complete and a response will be generated immediately.
|
|
639
|
+
*/
|
|
640
|
+
digit_limit?: number | null;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* A single key that signals the end of DTMF input. Acceptable values include any
|
|
644
|
+
* digit (0–9), the pound/hash symbol (#), or the asterisk (\*).
|
|
645
|
+
*/
|
|
646
|
+
termination_key?: string | null;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* The time (in milliseconds) to wait for user DTMF input before timing out. The
|
|
650
|
+
* timer resets with each digit received.
|
|
651
|
+
*/
|
|
652
|
+
timeout_ms?: number;
|
|
653
|
+
}
|
|
553
654
|
}
|
|
554
655
|
|
|
555
656
|
export type AgentListResponse = Array<AgentResponse>;
|
|
@@ -578,6 +679,12 @@ export interface AgentCreateParams {
|
|
|
578
679
|
*/
|
|
579
680
|
agent_name?: string | null;
|
|
580
681
|
|
|
682
|
+
/**
|
|
683
|
+
* If set to true, DTMF input will be accepted and processed. If false, any DTMF
|
|
684
|
+
* input will be ignored. Default to true.
|
|
685
|
+
*/
|
|
686
|
+
allow_user_dtmf?: boolean;
|
|
687
|
+
|
|
581
688
|
/**
|
|
582
689
|
* If set, will add ambient environment sound to the call to make experience more
|
|
583
690
|
* realistic. Currently supports the following options:
|
|
@@ -652,6 +759,11 @@ export interface AgentCreateParams {
|
|
|
652
759
|
*/
|
|
653
760
|
boosted_keywords?: Array<string> | null;
|
|
654
761
|
|
|
762
|
+
/**
|
|
763
|
+
* If set, determines what denoising mode to use. Default to noise-cancellation.
|
|
764
|
+
*/
|
|
765
|
+
denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
|
|
766
|
+
|
|
655
767
|
/**
|
|
656
768
|
* Controls whether the agent would backchannel (agent interjects the speaker with
|
|
657
769
|
* phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
|
|
@@ -757,6 +869,13 @@ export interface AgentCreateParams {
|
|
|
757
869
|
*/
|
|
758
870
|
normalize_for_speech?: boolean;
|
|
759
871
|
|
|
872
|
+
/**
|
|
873
|
+
* Whether this agent opts in for signed URLs for public logs and recordings. When
|
|
874
|
+
* enabled, the generated URLs will include security signatures that restrict
|
|
875
|
+
* access and automatically expire after 24 hours.
|
|
876
|
+
*/
|
|
877
|
+
opt_in_signed_url?: boolean;
|
|
878
|
+
|
|
760
879
|
/**
|
|
761
880
|
* Whether this agent opts out of sensitive data storage like transcript,
|
|
762
881
|
* recording, logging, inbound/outbound phone numbers, etc. These data can still be
|
|
@@ -824,6 +943,8 @@ export interface AgentCreateParams {
|
|
|
824
943
|
*/
|
|
825
944
|
stt_mode?: 'fast' | 'accurate';
|
|
826
945
|
|
|
946
|
+
user_dtmf_options?: AgentCreateParams.UserDtmfOptions | null;
|
|
947
|
+
|
|
827
948
|
/**
|
|
828
949
|
* Version of the agent.
|
|
829
950
|
*/
|
|
@@ -902,6 +1023,11 @@ export namespace AgentCreateParams {
|
|
|
902
1023
|
* type of the Response Engine.
|
|
903
1024
|
*/
|
|
904
1025
|
type: 'retell-llm';
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Version of the Retell LLM Response Engine.
|
|
1029
|
+
*/
|
|
1030
|
+
version?: number | null;
|
|
905
1031
|
}
|
|
906
1032
|
|
|
907
1033
|
export interface ResponseEngineCustomLm {
|
|
@@ -926,6 +1052,11 @@ export namespace AgentCreateParams {
|
|
|
926
1052
|
* type of the Response Engine.
|
|
927
1053
|
*/
|
|
928
1054
|
type: 'conversation-flow';
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* Version of the Conversation Flow Response Engine.
|
|
1058
|
+
*/
|
|
1059
|
+
version?: number | null;
|
|
929
1060
|
}
|
|
930
1061
|
|
|
931
1062
|
export interface StringAnalysisData {
|
|
@@ -1022,18 +1153,40 @@ export namespace AgentCreateParams {
|
|
|
1022
1153
|
*/
|
|
1023
1154
|
word: string;
|
|
1024
1155
|
}
|
|
1156
|
+
|
|
1157
|
+
export interface UserDtmfOptions {
|
|
1158
|
+
/**
|
|
1159
|
+
* The maximum number of digits allowed in the user's DTMF (Dual-Tone
|
|
1160
|
+
* Multi-Frequency) input per turn. Once this limit is reached, the input is
|
|
1161
|
+
* considered complete and a response will be generated immediately.
|
|
1162
|
+
*/
|
|
1163
|
+
digit_limit?: number | null;
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* A single key that signals the end of DTMF input. Acceptable values include any
|
|
1167
|
+
* digit (0–9), the pound/hash symbol (#), or the asterisk (\*).
|
|
1168
|
+
*/
|
|
1169
|
+
termination_key?: string | null;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* The time (in milliseconds) to wait for user DTMF input before timing out. The
|
|
1173
|
+
* timer resets with each digit received.
|
|
1174
|
+
*/
|
|
1175
|
+
timeout_ms?: number;
|
|
1176
|
+
}
|
|
1025
1177
|
}
|
|
1026
1178
|
|
|
1027
1179
|
export interface AgentRetrieveParams {
|
|
1028
1180
|
/**
|
|
1029
|
-
* Optional version of the API to use for this request. Default to
|
|
1181
|
+
* Optional version of the API to use for this request. Default to latest version.
|
|
1030
1182
|
*/
|
|
1031
1183
|
version?: number;
|
|
1032
1184
|
}
|
|
1033
1185
|
|
|
1034
1186
|
export interface AgentUpdateParams {
|
|
1035
1187
|
/**
|
|
1036
|
-
* Query param: Optional version of the API to use for this request. Default to
|
|
1188
|
+
* Query param: Optional version of the API to use for this request. Default to
|
|
1189
|
+
* latest version.
|
|
1037
1190
|
*/
|
|
1038
1191
|
query_version?: number;
|
|
1039
1192
|
|
|
@@ -1042,6 +1195,12 @@ export interface AgentUpdateParams {
|
|
|
1042
1195
|
*/
|
|
1043
1196
|
agent_name?: string | null;
|
|
1044
1197
|
|
|
1198
|
+
/**
|
|
1199
|
+
* Body param: If set to true, DTMF input will be accepted and processed. If false,
|
|
1200
|
+
* any DTMF input will be ignored. Default to true.
|
|
1201
|
+
*/
|
|
1202
|
+
allow_user_dtmf?: boolean;
|
|
1203
|
+
|
|
1045
1204
|
/**
|
|
1046
1205
|
* Body param: If set, will add ambient environment sound to the call to make
|
|
1047
1206
|
* experience more realistic. Currently supports the following options:
|
|
@@ -1116,6 +1275,12 @@ export interface AgentUpdateParams {
|
|
|
1116
1275
|
*/
|
|
1117
1276
|
boosted_keywords?: Array<string> | null;
|
|
1118
1277
|
|
|
1278
|
+
/**
|
|
1279
|
+
* Body param: If set, determines what denoising mode to use. Default to
|
|
1280
|
+
* noise-cancellation.
|
|
1281
|
+
*/
|
|
1282
|
+
denoising_mode?: 'noise-cancellation' | 'noise-and-background-speech-cancellation';
|
|
1283
|
+
|
|
1119
1284
|
/**
|
|
1120
1285
|
* Body param: Controls whether the agent would backchannel (agent interjects the
|
|
1121
1286
|
* speaker with phrases like "yeah", "uh-huh" to signify interest and engagement).
|
|
@@ -1222,6 +1387,13 @@ export interface AgentUpdateParams {
|
|
|
1222
1387
|
*/
|
|
1223
1388
|
normalize_for_speech?: boolean;
|
|
1224
1389
|
|
|
1390
|
+
/**
|
|
1391
|
+
* Body param: Whether this agent opts in for signed URLs for public logs and
|
|
1392
|
+
* recordings. When enabled, the generated URLs will include security signatures
|
|
1393
|
+
* that restrict access and automatically expire after 24 hours.
|
|
1394
|
+
*/
|
|
1395
|
+
opt_in_signed_url?: boolean;
|
|
1396
|
+
|
|
1225
1397
|
/**
|
|
1226
1398
|
* Body param: Whether this agent opts out of sensitive data storage like
|
|
1227
1399
|
* transcript, recording, logging, inbound/outbound phone numbers, etc. These data
|
|
@@ -1302,6 +1474,11 @@ export interface AgentUpdateParams {
|
|
|
1302
1474
|
*/
|
|
1303
1475
|
stt_mode?: 'fast' | 'accurate';
|
|
1304
1476
|
|
|
1477
|
+
/**
|
|
1478
|
+
* Body param:
|
|
1479
|
+
*/
|
|
1480
|
+
user_dtmf_options?: AgentUpdateParams.UserDtmfOptions | null;
|
|
1481
|
+
|
|
1305
1482
|
/**
|
|
1306
1483
|
* Body param: Version of the agent.
|
|
1307
1484
|
*/
|
|
@@ -1481,6 +1658,11 @@ export namespace AgentUpdateParams {
|
|
|
1481
1658
|
* type of the Response Engine.
|
|
1482
1659
|
*/
|
|
1483
1660
|
type: 'retell-llm';
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* Version of the Retell LLM Response Engine.
|
|
1664
|
+
*/
|
|
1665
|
+
version?: number | null;
|
|
1484
1666
|
}
|
|
1485
1667
|
|
|
1486
1668
|
export interface ResponseEngineCustomLm {
|
|
@@ -1505,6 +1687,32 @@ export namespace AgentUpdateParams {
|
|
|
1505
1687
|
* type of the Response Engine.
|
|
1506
1688
|
*/
|
|
1507
1689
|
type: 'conversation-flow';
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* Version of the Conversation Flow Response Engine.
|
|
1693
|
+
*/
|
|
1694
|
+
version?: number | null;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
export interface UserDtmfOptions {
|
|
1698
|
+
/**
|
|
1699
|
+
* The maximum number of digits allowed in the user's DTMF (Dual-Tone
|
|
1700
|
+
* Multi-Frequency) input per turn. Once this limit is reached, the input is
|
|
1701
|
+
* considered complete and a response will be generated immediately.
|
|
1702
|
+
*/
|
|
1703
|
+
digit_limit?: number | null;
|
|
1704
|
+
|
|
1705
|
+
/**
|
|
1706
|
+
* A single key that signals the end of DTMF input. Acceptable values include any
|
|
1707
|
+
* digit (0–9), the pound/hash symbol (#), or the asterisk (\*).
|
|
1708
|
+
*/
|
|
1709
|
+
termination_key?: string | null;
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* The time (in milliseconds) to wait for user DTMF input before timing out. The
|
|
1713
|
+
* timer resets with each digit received.
|
|
1714
|
+
*/
|
|
1715
|
+
timeout_ms?: number;
|
|
1508
1716
|
}
|
|
1509
1717
|
}
|
|
1510
1718
|
|
|
@@ -6,6 +6,15 @@ import * as Core from '../core';
|
|
|
6
6
|
export class BatchCall extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Create a batch call
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const batchCallResponse =
|
|
13
|
+
* await client.batchCall.createBatchCall({
|
|
14
|
+
* from_number: '+14157774444',
|
|
15
|
+
* tasks: [{ to_number: '+12137774445' }],
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
9
18
|
*/
|
|
10
19
|
createBatchCall(
|
|
11
20
|
body: BatchCallCreateBatchCallParams,
|
package/src/resources/call.ts
CHANGED
|
@@ -6,6 +6,13 @@ import * as Core from '../core';
|
|
|
6
6
|
export class Call extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Retrieve details of a specific call
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const callResponse = await client.call.retrieve(
|
|
13
|
+
* '119c3f8e47135a29e65947eeb34cf12d',
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
17
|
retrieve(callId: string, options?: Core.RequestOptions): Core.APIPromise<CallResponse> {
|
|
11
18
|
return this._client.get(`/v2/get-call/${callId}`, options);
|
|
@@ -13,6 +20,20 @@ export class Call extends APIResource {
|
|
|
13
20
|
|
|
14
21
|
/**
|
|
15
22
|
* Update metadata and sensitive data storage settings for an existing call
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const callResponse = await client.call.update(
|
|
27
|
+
* 'call_a4441234567890777c4a4a123e6',
|
|
28
|
+
* {
|
|
29
|
+
* metadata: {
|
|
30
|
+
* customer_id: 'cust_123',
|
|
31
|
+
* notes: 'Follow-up required',
|
|
32
|
+
* },
|
|
33
|
+
* opt_out_sensitive_data_storage: true,
|
|
34
|
+
* },
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
16
37
|
*/
|
|
17
38
|
update(
|
|
18
39
|
callId: string,
|
|
@@ -24,6 +45,11 @@ export class Call extends APIResource {
|
|
|
24
45
|
|
|
25
46
|
/**
|
|
26
47
|
* Retrieve call details
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const callResponses = await client.call.list();
|
|
52
|
+
* ```
|
|
27
53
|
*/
|
|
28
54
|
list(body: CallListParams, options?: Core.RequestOptions): Core.APIPromise<CallListResponse> {
|
|
29
55
|
return this._client.post('/v2/list-calls', { body, ...options });
|
|
@@ -31,6 +57,13 @@ export class Call extends APIResource {
|
|
|
31
57
|
|
|
32
58
|
/**
|
|
33
59
|
* Delete a specific call and its associated data
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* await client.call.delete(
|
|
64
|
+
* '119c3f8e47135a29e65947eeb34cf12d',
|
|
65
|
+
* );
|
|
66
|
+
* ```
|
|
34
67
|
*/
|
|
35
68
|
delete(callId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
36
69
|
return this._client.delete(`/v2/delete-call/${callId}`, {
|
|
@@ -41,6 +74,16 @@ export class Call extends APIResource {
|
|
|
41
74
|
|
|
42
75
|
/**
|
|
43
76
|
* Create a new outbound phone call
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const phoneCallResponse = await client.call.createPhoneCall(
|
|
81
|
+
* {
|
|
82
|
+
* from_number: '+14157774444',
|
|
83
|
+
* to_number: '+12137774445',
|
|
84
|
+
* },
|
|
85
|
+
* );
|
|
86
|
+
* ```
|
|
44
87
|
*/
|
|
45
88
|
createPhoneCall(
|
|
46
89
|
body: CallCreatePhoneCallParams,
|
|
@@ -51,6 +94,13 @@ export class Call extends APIResource {
|
|
|
51
94
|
|
|
52
95
|
/**
|
|
53
96
|
* Create a new web call
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const webCallResponse = await client.call.createWebCall({
|
|
101
|
+
* agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
54
104
|
*/
|
|
55
105
|
createWebCall(
|
|
56
106
|
body: CallCreateWebCallParams,
|
|
@@ -61,6 +111,14 @@ export class Call extends APIResource {
|
|
|
61
111
|
|
|
62
112
|
/**
|
|
63
113
|
* Register a new phone call for custom telephony
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* const phoneCallResponse =
|
|
118
|
+
* await client.call.registerPhoneCall({
|
|
119
|
+
* agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
120
|
+
* });
|
|
121
|
+
* ```
|
|
64
122
|
*/
|
|
65
123
|
registerPhoneCall(
|
|
66
124
|
body: CallRegisterPhoneCallParams,
|
|
@@ -181,6 +239,13 @@ export interface PhoneCallResponse {
|
|
|
181
239
|
*/
|
|
182
240
|
metadata?: unknown;
|
|
183
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Whether this agent opts in for signed URLs for public logs and recordings. When
|
|
244
|
+
* enabled, the generated URLs will include security signatures that restrict
|
|
245
|
+
* access and automatically expire after 24 hours.
|
|
246
|
+
*/
|
|
247
|
+
opt_in_signed_url?: boolean;
|
|
248
|
+
|
|
184
249
|
/**
|
|
185
250
|
* Whether this call opts out of sensitive data storage like transcript, recording,
|
|
186
251
|
* logging.
|
|
@@ -905,6 +970,13 @@ export interface WebCallResponse {
|
|
|
905
970
|
*/
|
|
906
971
|
metadata?: unknown;
|
|
907
972
|
|
|
973
|
+
/**
|
|
974
|
+
* Whether this agent opts in for signed URLs for public logs and recordings. When
|
|
975
|
+
* enabled, the generated URLs will include security signatures that restrict
|
|
976
|
+
* access and automatically expire after 24 hours.
|
|
977
|
+
*/
|
|
978
|
+
opt_in_signed_url?: boolean;
|
|
979
|
+
|
|
908
980
|
/**
|
|
909
981
|
* Whether this call opts out of sensitive data storage like transcript, recording,
|
|
910
982
|
* logging.
|