retell-sdk 4.28.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 +24 -0
- package/package.json +1 -1
- package/resources/agent.d.ts +138 -1
- 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 +58 -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 +38 -1
- 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 +45 -0
- 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 +157 -1
- package/src/resources/batch-call.ts +9 -0
- package/src/resources/call.ts +58 -0
- package/src/resources/knowledge-base.ts +40 -0
- package/src/resources/llm.ts +39 -1
- package/src/resources/phone-number.ts +45 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
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
|
|
@@ -359,10 +420,12 @@ export interface AgentResponse {
|
|
|
359
420
|
*/
|
|
360
421
|
stt_mode?: 'fast' | 'accurate';
|
|
361
422
|
|
|
423
|
+
user_dtmf_options?: AgentResponse.UserDtmfOptions | null;
|
|
424
|
+
|
|
362
425
|
/**
|
|
363
426
|
* Version of the agent.
|
|
364
427
|
*/
|
|
365
|
-
version?:
|
|
428
|
+
version?: unknown;
|
|
366
429
|
|
|
367
430
|
/**
|
|
368
431
|
* Optionally set the voice model used for the selected voice. Currently only
|
|
@@ -567,6 +630,27 @@ export namespace AgentResponse {
|
|
|
567
630
|
*/
|
|
568
631
|
word: string;
|
|
569
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
|
+
}
|
|
570
654
|
}
|
|
571
655
|
|
|
572
656
|
export type AgentListResponse = Array<AgentResponse>;
|
|
@@ -595,6 +679,12 @@ export interface AgentCreateParams {
|
|
|
595
679
|
*/
|
|
596
680
|
agent_name?: string | null;
|
|
597
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
|
+
|
|
598
688
|
/**
|
|
599
689
|
* If set, will add ambient environment sound to the call to make experience more
|
|
600
690
|
* realistic. Currently supports the following options:
|
|
@@ -669,6 +759,11 @@ export interface AgentCreateParams {
|
|
|
669
759
|
*/
|
|
670
760
|
boosted_keywords?: Array<string> | null;
|
|
671
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
|
+
|
|
672
767
|
/**
|
|
673
768
|
* Controls whether the agent would backchannel (agent interjects the speaker with
|
|
674
769
|
* phrases like "yeah", "uh-huh" to signify interest and engagement). Backchannel
|
|
@@ -848,6 +943,8 @@ export interface AgentCreateParams {
|
|
|
848
943
|
*/
|
|
849
944
|
stt_mode?: 'fast' | 'accurate';
|
|
850
945
|
|
|
946
|
+
user_dtmf_options?: AgentCreateParams.UserDtmfOptions | null;
|
|
947
|
+
|
|
851
948
|
/**
|
|
852
949
|
* Version of the agent.
|
|
853
950
|
*/
|
|
@@ -1056,6 +1153,27 @@ export namespace AgentCreateParams {
|
|
|
1056
1153
|
*/
|
|
1057
1154
|
word: string;
|
|
1058
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
|
+
}
|
|
1059
1177
|
}
|
|
1060
1178
|
|
|
1061
1179
|
export interface AgentRetrieveParams {
|
|
@@ -1077,6 +1195,12 @@ export interface AgentUpdateParams {
|
|
|
1077
1195
|
*/
|
|
1078
1196
|
agent_name?: string | null;
|
|
1079
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
|
+
|
|
1080
1204
|
/**
|
|
1081
1205
|
* Body param: If set, will add ambient environment sound to the call to make
|
|
1082
1206
|
* experience more realistic. Currently supports the following options:
|
|
@@ -1151,6 +1275,12 @@ export interface AgentUpdateParams {
|
|
|
1151
1275
|
*/
|
|
1152
1276
|
boosted_keywords?: Array<string> | null;
|
|
1153
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
|
+
|
|
1154
1284
|
/**
|
|
1155
1285
|
* Body param: Controls whether the agent would backchannel (agent interjects the
|
|
1156
1286
|
* speaker with phrases like "yeah", "uh-huh" to signify interest and engagement).
|
|
@@ -1344,6 +1474,11 @@ export interface AgentUpdateParams {
|
|
|
1344
1474
|
*/
|
|
1345
1475
|
stt_mode?: 'fast' | 'accurate';
|
|
1346
1476
|
|
|
1477
|
+
/**
|
|
1478
|
+
* Body param:
|
|
1479
|
+
*/
|
|
1480
|
+
user_dtmf_options?: AgentUpdateParams.UserDtmfOptions | null;
|
|
1481
|
+
|
|
1347
1482
|
/**
|
|
1348
1483
|
* Body param: Version of the agent.
|
|
1349
1484
|
*/
|
|
@@ -1558,6 +1693,27 @@ export namespace AgentUpdateParams {
|
|
|
1558
1693
|
*/
|
|
1559
1694
|
version?: number | null;
|
|
1560
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;
|
|
1716
|
+
}
|
|
1561
1717
|
}
|
|
1562
1718
|
|
|
1563
1719
|
export declare namespace Agent {
|
|
@@ -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,
|
|
@@ -6,6 +6,14 @@ import * as Core from '../core';
|
|
|
6
6
|
export class KnowledgeBase extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Create a new knowledge base
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const knowledgeBaseResponse =
|
|
13
|
+
* await client.knowledgeBase.create({
|
|
14
|
+
* knowledge_base_name: 'Sample KB',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
create(
|
|
11
19
|
body: KnowledgeBaseCreateParams,
|
|
@@ -19,6 +27,12 @@ export class KnowledgeBase extends APIResource {
|
|
|
19
27
|
|
|
20
28
|
/**
|
|
21
29
|
* Retrieve details of a specific knowledge base
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const knowledgeBaseResponse =
|
|
34
|
+
* await client.knowledgeBase.retrieve('kb_1234567890');
|
|
35
|
+
* ```
|
|
22
36
|
*/
|
|
23
37
|
retrieve(knowledgeBaseId: string, options?: Core.RequestOptions): Core.APIPromise<KnowledgeBaseResponse> {
|
|
24
38
|
return this._client.get(`/get-knowledge-base/${knowledgeBaseId}`, options);
|
|
@@ -26,6 +40,12 @@ export class KnowledgeBase extends APIResource {
|
|
|
26
40
|
|
|
27
41
|
/**
|
|
28
42
|
* List all knowledge bases
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const knowledgeBaseResponses =
|
|
47
|
+
* await client.knowledgeBase.list();
|
|
48
|
+
* ```
|
|
29
49
|
*/
|
|
30
50
|
list(options?: Core.RequestOptions): Core.APIPromise<KnowledgeBaseListResponse> {
|
|
31
51
|
return this._client.get('/list-knowledge-bases', options);
|
|
@@ -33,6 +53,11 @@ export class KnowledgeBase extends APIResource {
|
|
|
33
53
|
|
|
34
54
|
/**
|
|
35
55
|
* Delete an existing knowledge base
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* await client.knowledgeBase.delete('kb_1234567890');
|
|
60
|
+
* ```
|
|
36
61
|
*/
|
|
37
62
|
delete(knowledgeBaseId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
38
63
|
return this._client.delete(`/delete-knowledge-base/${knowledgeBaseId}`, {
|
|
@@ -43,6 +68,12 @@ export class KnowledgeBase extends APIResource {
|
|
|
43
68
|
|
|
44
69
|
/**
|
|
45
70
|
* Add sources to a knowledge base
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const knowledgeBaseResponse =
|
|
75
|
+
* await client.knowledgeBase.addSources('kb_1234567890');
|
|
76
|
+
* ```
|
|
46
77
|
*/
|
|
47
78
|
addSources(
|
|
48
79
|
knowledgeBaseId: string,
|
|
@@ -57,6 +88,15 @@ export class KnowledgeBase extends APIResource {
|
|
|
57
88
|
|
|
58
89
|
/**
|
|
59
90
|
* Delete an existing source from knowledge base
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const knowledgeBaseResponse =
|
|
95
|
+
* await client.knowledgeBase.deleteSource(
|
|
96
|
+
* 'kb_1234567890',
|
|
97
|
+
* 'source_1234567890',
|
|
98
|
+
* );
|
|
99
|
+
* ```
|
|
60
100
|
*/
|
|
61
101
|
deleteSource(
|
|
62
102
|
knowledgeBaseId: string,
|
package/src/resources/llm.ts
CHANGED
|
@@ -8,6 +8,11 @@ export class Llm extends APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Create a new Retell LLM Response Engine that can be attached to an agent. This
|
|
10
10
|
* is used to generate response output for the agent.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const llmResponse = await client.llm.create();
|
|
15
|
+
* ```
|
|
11
16
|
*/
|
|
12
17
|
create(body: LlmCreateParams, options?: Core.RequestOptions): Core.APIPromise<LlmResponse> {
|
|
13
18
|
return this._client.post('/create-retell-llm', { body, ...options });
|
|
@@ -15,6 +20,13 @@ export class Llm extends APIResource {
|
|
|
15
20
|
|
|
16
21
|
/**
|
|
17
22
|
* Retrieve details of a specific Retell LLM Response Engine
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const llmResponse = await client.llm.retrieve(
|
|
27
|
+
* '16b980523634a6dc504898cda492e939',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
18
30
|
*/
|
|
19
31
|
retrieve(
|
|
20
32
|
llmId: string,
|
|
@@ -35,6 +47,17 @@ export class Llm extends APIResource {
|
|
|
35
47
|
|
|
36
48
|
/**
|
|
37
49
|
* Update an existing Retell LLM Response Engine
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const llmResponse = await client.llm.update(
|
|
54
|
+
* '16b980523634a6dc504898cda492e939',
|
|
55
|
+
* {
|
|
56
|
+
* begin_message:
|
|
57
|
+
* 'Hey I am a virtual assistant calling from Retell Hospital.',
|
|
58
|
+
* },
|
|
59
|
+
* );
|
|
60
|
+
* ```
|
|
38
61
|
*/
|
|
39
62
|
update(
|
|
40
63
|
llmId: string,
|
|
@@ -51,6 +74,11 @@ export class Llm extends APIResource {
|
|
|
51
74
|
|
|
52
75
|
/**
|
|
53
76
|
* List all Retell LLM Response Engines that can be attached to an agent.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const llmResponses = await client.llm.list();
|
|
81
|
+
* ```
|
|
54
82
|
*/
|
|
55
83
|
list(options?: Core.RequestOptions): Core.APIPromise<LlmListResponse> {
|
|
56
84
|
return this._client.get('/list-retell-llms', options);
|
|
@@ -58,6 +86,11 @@ export class Llm extends APIResource {
|
|
|
58
86
|
|
|
59
87
|
/**
|
|
60
88
|
* Delete an existing Retell LLM Response Engine
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* await client.llm.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');
|
|
93
|
+
* ```
|
|
61
94
|
*/
|
|
62
95
|
delete(llmId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
63
96
|
return this._client.delete(`/delete-retell-llm/${llmId}`, {
|
|
@@ -119,6 +152,11 @@ export interface LlmResponse {
|
|
|
119
152
|
| LlmResponse.CustomTool
|
|
120
153
|
> | null;
|
|
121
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Whether the Retell LLM Response Engine is published.
|
|
157
|
+
*/
|
|
158
|
+
is_published?: boolean;
|
|
159
|
+
|
|
122
160
|
/**
|
|
123
161
|
* A list of knowledge base ids to use for this resource. Set to null to remove all
|
|
124
162
|
* knowledge bases.
|
|
@@ -186,7 +224,7 @@ export interface LlmResponse {
|
|
|
186
224
|
/**
|
|
187
225
|
* Version of the Retell LLM.
|
|
188
226
|
*/
|
|
189
|
-
version?:
|
|
227
|
+
version?: unknown;
|
|
190
228
|
}
|
|
191
229
|
|
|
192
230
|
export namespace LlmResponse {
|
|
@@ -6,6 +6,12 @@ import * as Core from '../core';
|
|
|
6
6
|
export class PhoneNumber extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Buy a new phone number & Bind agents
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const phoneNumberResponse =
|
|
13
|
+
* await client.phoneNumber.create();
|
|
14
|
+
* ```
|
|
9
15
|
*/
|
|
10
16
|
create(body: PhoneNumberCreateParams, options?: Core.RequestOptions): Core.APIPromise<PhoneNumberResponse> {
|
|
11
17
|
return this._client.post('/create-phone-number', { body, ...options });
|
|
@@ -13,6 +19,12 @@ export class PhoneNumber extends APIResource {
|
|
|
13
19
|
|
|
14
20
|
/**
|
|
15
21
|
* Retrieve details of a specific phone number
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const phoneNumberResponse =
|
|
26
|
+
* await client.phoneNumber.retrieve('+14157774444');
|
|
27
|
+
* ```
|
|
16
28
|
*/
|
|
17
29
|
retrieve(phoneNumber: string, options?: Core.RequestOptions): Core.APIPromise<PhoneNumberResponse> {
|
|
18
30
|
return this._client.get(`/get-phone-number/${phoneNumber}`, options);
|
|
@@ -20,6 +32,18 @@ export class PhoneNumber extends APIResource {
|
|
|
20
32
|
|
|
21
33
|
/**
|
|
22
34
|
* Update agent bound to a purchased phone number
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const phoneNumberResponse = await client.phoneNumber.update(
|
|
39
|
+
* '+14157774444',
|
|
40
|
+
* {
|
|
41
|
+
* inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
42
|
+
* nickname: 'Frontdesk Number',
|
|
43
|
+
* outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
44
|
+
* },
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
23
47
|
*/
|
|
24
48
|
update(
|
|
25
49
|
phoneNumber: string,
|
|
@@ -31,6 +55,12 @@ export class PhoneNumber extends APIResource {
|
|
|
31
55
|
|
|
32
56
|
/**
|
|
33
57
|
* List all phone numbers
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const phoneNumberResponses =
|
|
62
|
+
* await client.phoneNumber.list();
|
|
63
|
+
* ```
|
|
34
64
|
*/
|
|
35
65
|
list(options?: Core.RequestOptions): Core.APIPromise<PhoneNumberListResponse> {
|
|
36
66
|
return this._client.get('/list-phone-numbers', options);
|
|
@@ -38,6 +68,11 @@ export class PhoneNumber extends APIResource {
|
|
|
38
68
|
|
|
39
69
|
/**
|
|
40
70
|
* Delete an existing phone number
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* await client.phoneNumber.delete('+14157774444');
|
|
75
|
+
* ```
|
|
41
76
|
*/
|
|
42
77
|
delete(phoneNumber: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
43
78
|
return this._client.delete(`/delete-phone-number/${phoneNumber}`, {
|
|
@@ -48,6 +83,16 @@ export class PhoneNumber extends APIResource {
|
|
|
48
83
|
|
|
49
84
|
/**
|
|
50
85
|
* Import a phone number from custom telephony & Bind agents
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const phoneNumberResponse = await client.phoneNumber.import(
|
|
90
|
+
* {
|
|
91
|
+
* phone_number: '+14157774444',
|
|
92
|
+
* termination_uri: 'someuri.pstn.twilio.com',
|
|
93
|
+
* },
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
51
96
|
*/
|
|
52
97
|
import(body: PhoneNumberImportParams, options?: Core.RequestOptions): Core.APIPromise<PhoneNumberResponse> {
|
|
53
98
|
return this._client.post('/import-phone-number', { body, ...options });
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.29.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.29.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.29.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|