retell-sdk 4.48.0 → 4.50.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 +41 -0
- package/index.d.mts +3 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/index.mjs +3 -0
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent.d.ts +3 -3
- package/resources/agent.d.ts.map +1 -1
- package/resources/conversation-flow.d.ts +10685 -2558
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/llm.d.ts +121 -7
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +4 -1
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +4 -1
- package/resources/llm.mjs.map +1 -1
- package/resources/mcp-tool.d.ts +39 -0
- package/resources/mcp-tool.d.ts.map +1 -0
- package/resources/mcp-tool.js +15 -0
- package/resources/mcp-tool.js.map +1 -0
- package/resources/mcp-tool.mjs +11 -0
- package/resources/mcp-tool.mjs.map +1 -0
- package/src/index.ts +15 -0
- package/src/resources/agent.ts +3 -0
- package/src/resources/conversation-flow.ts +15358 -3649
- package/src/resources/index.ts +6 -0
- package/src/resources/llm.ts +142 -7
- package/src/resources/mcp-tool.ts +56 -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/index.ts
CHANGED
|
@@ -58,6 +58,12 @@ export {
|
|
|
58
58
|
type LlmUpdateParams,
|
|
59
59
|
type LlmListParams,
|
|
60
60
|
} from './llm';
|
|
61
|
+
export {
|
|
62
|
+
McpTool,
|
|
63
|
+
type McpToolDefinition,
|
|
64
|
+
type McpToolGetMcpToolsResponse,
|
|
65
|
+
type McpToolGetMcpToolsParams,
|
|
66
|
+
} from './mcp-tool';
|
|
61
67
|
export {
|
|
62
68
|
PhoneNumber,
|
|
63
69
|
type PhoneNumberResponse,
|
package/src/resources/llm.ts
CHANGED
|
@@ -11,7 +11,9 @@ export class Llm extends APIResource {
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
|
-
* const llmResponse = await client.llm.create(
|
|
14
|
+
* const llmResponse = await client.llm.create({
|
|
15
|
+
* start_speaker: 'user',
|
|
16
|
+
* });
|
|
15
17
|
* ```
|
|
16
18
|
*/
|
|
17
19
|
create(body: LlmCreateParams, options?: Core.RequestOptions): Core.APIPromise<LlmResponse> {
|
|
@@ -53,6 +55,7 @@ export class Llm extends APIResource {
|
|
|
53
55
|
* const llmResponse = await client.llm.update(
|
|
54
56
|
* '16b980523634a6dc504898cda492e939',
|
|
55
57
|
* {
|
|
58
|
+
* start_speaker: 'user',
|
|
56
59
|
* begin_message:
|
|
57
60
|
* 'Hey I am a virtual assistant calling from Retell Hospital.',
|
|
58
61
|
* },
|
|
@@ -120,6 +123,12 @@ export interface LlmResponse {
|
|
|
120
123
|
*/
|
|
121
124
|
llm_id: string;
|
|
122
125
|
|
|
126
|
+
/**
|
|
127
|
+
* The speaker who starts the conversation. Required. Must be either 'user' or
|
|
128
|
+
* 'agent'.
|
|
129
|
+
*/
|
|
130
|
+
start_speaker: 'user' | 'agent';
|
|
131
|
+
|
|
123
132
|
/**
|
|
124
133
|
* First utterance said by the agent in the call. If not set, LLM will dynamically
|
|
125
134
|
* generate a message. If set to "", agent will wait for user to speak first.
|
|
@@ -312,7 +321,7 @@ export namespace LlmResponse {
|
|
|
312
321
|
|
|
313
322
|
/**
|
|
314
323
|
* Extension digits to dial after the main number connects. Sent via DTMF. Allow
|
|
315
|
-
* digits, '\*', '#'.
|
|
324
|
+
* digits, '\*', '#', or a dynamic variable like {{extension}}.
|
|
316
325
|
*/
|
|
317
326
|
extension?: string;
|
|
318
327
|
}
|
|
@@ -357,6 +366,12 @@ export namespace LlmResponse {
|
|
|
357
366
|
*/
|
|
358
367
|
agent_detection_timeout_ms?: number;
|
|
359
368
|
|
|
369
|
+
/**
|
|
370
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
371
|
+
* the AI on how to navigate the IVR system.
|
|
372
|
+
*/
|
|
373
|
+
ivr_option?: TransferOptionWarmTransfer.IvrOption;
|
|
374
|
+
|
|
360
375
|
/**
|
|
361
376
|
* The music to play while the caller is being transferred.
|
|
362
377
|
*/
|
|
@@ -394,6 +409,19 @@ export namespace LlmResponse {
|
|
|
394
409
|
}
|
|
395
410
|
|
|
396
411
|
export namespace TransferOptionWarmTransfer {
|
|
412
|
+
/**
|
|
413
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
414
|
+
* the AI on how to navigate the IVR system.
|
|
415
|
+
*/
|
|
416
|
+
export interface IvrOption {
|
|
417
|
+
/**
|
|
418
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
419
|
+
*/
|
|
420
|
+
prompt?: string;
|
|
421
|
+
|
|
422
|
+
type?: 'prompt';
|
|
423
|
+
}
|
|
424
|
+
|
|
397
425
|
export interface WarmTransferPrompt {
|
|
398
426
|
/**
|
|
399
427
|
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
@@ -1060,7 +1088,7 @@ export namespace LlmResponse {
|
|
|
1060
1088
|
|
|
1061
1089
|
/**
|
|
1062
1090
|
* Extension digits to dial after the main number connects. Sent via DTMF. Allow
|
|
1063
|
-
* digits, '\*', '#'.
|
|
1091
|
+
* digits, '\*', '#', or a dynamic variable like {{extension}}.
|
|
1064
1092
|
*/
|
|
1065
1093
|
extension?: string;
|
|
1066
1094
|
}
|
|
@@ -1105,6 +1133,12 @@ export namespace LlmResponse {
|
|
|
1105
1133
|
*/
|
|
1106
1134
|
agent_detection_timeout_ms?: number;
|
|
1107
1135
|
|
|
1136
|
+
/**
|
|
1137
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
1138
|
+
* the AI on how to navigate the IVR system.
|
|
1139
|
+
*/
|
|
1140
|
+
ivr_option?: TransferOptionWarmTransfer.IvrOption;
|
|
1141
|
+
|
|
1108
1142
|
/**
|
|
1109
1143
|
* The music to play while the caller is being transferred.
|
|
1110
1144
|
*/
|
|
@@ -1142,6 +1176,19 @@ export namespace LlmResponse {
|
|
|
1142
1176
|
}
|
|
1143
1177
|
|
|
1144
1178
|
export namespace TransferOptionWarmTransfer {
|
|
1179
|
+
/**
|
|
1180
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
1181
|
+
* the AI on how to navigate the IVR system.
|
|
1182
|
+
*/
|
|
1183
|
+
export interface IvrOption {
|
|
1184
|
+
/**
|
|
1185
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
1186
|
+
*/
|
|
1187
|
+
prompt?: string;
|
|
1188
|
+
|
|
1189
|
+
type?: 'prompt';
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1145
1192
|
export interface WarmTransferPrompt {
|
|
1146
1193
|
/**
|
|
1147
1194
|
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
@@ -1637,6 +1684,12 @@ export namespace LlmResponse {
|
|
|
1637
1684
|
export type LlmListResponse = Array<LlmResponse>;
|
|
1638
1685
|
|
|
1639
1686
|
export interface LlmCreateParams {
|
|
1687
|
+
/**
|
|
1688
|
+
* The speaker who starts the conversation. Required. Must be either 'user' or
|
|
1689
|
+
* 'agent'.
|
|
1690
|
+
*/
|
|
1691
|
+
start_speaker: 'user' | 'agent';
|
|
1692
|
+
|
|
1640
1693
|
/**
|
|
1641
1694
|
* First utterance said by the agent in the call. If not set, LLM will dynamically
|
|
1642
1695
|
* generate a message. If set to "", agent will wait for user to speak first.
|
|
@@ -1824,7 +1877,7 @@ export namespace LlmCreateParams {
|
|
|
1824
1877
|
|
|
1825
1878
|
/**
|
|
1826
1879
|
* Extension digits to dial after the main number connects. Sent via DTMF. Allow
|
|
1827
|
-
* digits, '\*', '#'.
|
|
1880
|
+
* digits, '\*', '#', or a dynamic variable like {{extension}}.
|
|
1828
1881
|
*/
|
|
1829
1882
|
extension?: string;
|
|
1830
1883
|
}
|
|
@@ -1869,6 +1922,12 @@ export namespace LlmCreateParams {
|
|
|
1869
1922
|
*/
|
|
1870
1923
|
agent_detection_timeout_ms?: number;
|
|
1871
1924
|
|
|
1925
|
+
/**
|
|
1926
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
1927
|
+
* the AI on how to navigate the IVR system.
|
|
1928
|
+
*/
|
|
1929
|
+
ivr_option?: TransferOptionWarmTransfer.IvrOption;
|
|
1930
|
+
|
|
1872
1931
|
/**
|
|
1873
1932
|
* The music to play while the caller is being transferred.
|
|
1874
1933
|
*/
|
|
@@ -1906,6 +1965,19 @@ export namespace LlmCreateParams {
|
|
|
1906
1965
|
}
|
|
1907
1966
|
|
|
1908
1967
|
export namespace TransferOptionWarmTransfer {
|
|
1968
|
+
/**
|
|
1969
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
1970
|
+
* the AI on how to navigate the IVR system.
|
|
1971
|
+
*/
|
|
1972
|
+
export interface IvrOption {
|
|
1973
|
+
/**
|
|
1974
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
1975
|
+
*/
|
|
1976
|
+
prompt?: string;
|
|
1977
|
+
|
|
1978
|
+
type?: 'prompt';
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1909
1981
|
export interface WarmTransferPrompt {
|
|
1910
1982
|
/**
|
|
1911
1983
|
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
@@ -2572,7 +2644,7 @@ export namespace LlmCreateParams {
|
|
|
2572
2644
|
|
|
2573
2645
|
/**
|
|
2574
2646
|
* Extension digits to dial after the main number connects. Sent via DTMF. Allow
|
|
2575
|
-
* digits, '\*', '#'.
|
|
2647
|
+
* digits, '\*', '#', or a dynamic variable like {{extension}}.
|
|
2576
2648
|
*/
|
|
2577
2649
|
extension?: string;
|
|
2578
2650
|
}
|
|
@@ -2617,6 +2689,12 @@ export namespace LlmCreateParams {
|
|
|
2617
2689
|
*/
|
|
2618
2690
|
agent_detection_timeout_ms?: number;
|
|
2619
2691
|
|
|
2692
|
+
/**
|
|
2693
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
2694
|
+
* the AI on how to navigate the IVR system.
|
|
2695
|
+
*/
|
|
2696
|
+
ivr_option?: TransferOptionWarmTransfer.IvrOption;
|
|
2697
|
+
|
|
2620
2698
|
/**
|
|
2621
2699
|
* The music to play while the caller is being transferred.
|
|
2622
2700
|
*/
|
|
@@ -2654,6 +2732,19 @@ export namespace LlmCreateParams {
|
|
|
2654
2732
|
}
|
|
2655
2733
|
|
|
2656
2734
|
export namespace TransferOptionWarmTransfer {
|
|
2735
|
+
/**
|
|
2736
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
2737
|
+
* the AI on how to navigate the IVR system.
|
|
2738
|
+
*/
|
|
2739
|
+
export interface IvrOption {
|
|
2740
|
+
/**
|
|
2741
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
2742
|
+
*/
|
|
2743
|
+
prompt?: string;
|
|
2744
|
+
|
|
2745
|
+
type?: 'prompt';
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2657
2748
|
export interface WarmTransferPrompt {
|
|
2658
2749
|
/**
|
|
2659
2750
|
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
@@ -3154,6 +3245,12 @@ export interface LlmRetrieveParams {
|
|
|
3154
3245
|
}
|
|
3155
3246
|
|
|
3156
3247
|
export interface LlmUpdateParams {
|
|
3248
|
+
/**
|
|
3249
|
+
* Body param: The speaker who starts the conversation. Required. Must be either
|
|
3250
|
+
* 'user' or 'agent'.
|
|
3251
|
+
*/
|
|
3252
|
+
start_speaker: 'user' | 'agent';
|
|
3253
|
+
|
|
3157
3254
|
/**
|
|
3158
3255
|
* Query param: Optional version of the API to use for this request. Default to
|
|
3159
3256
|
* latest version.
|
|
@@ -3351,7 +3448,7 @@ export namespace LlmUpdateParams {
|
|
|
3351
3448
|
|
|
3352
3449
|
/**
|
|
3353
3450
|
* Extension digits to dial after the main number connects. Sent via DTMF. Allow
|
|
3354
|
-
* digits, '\*', '#'.
|
|
3451
|
+
* digits, '\*', '#', or a dynamic variable like {{extension}}.
|
|
3355
3452
|
*/
|
|
3356
3453
|
extension?: string;
|
|
3357
3454
|
}
|
|
@@ -3396,6 +3493,12 @@ export namespace LlmUpdateParams {
|
|
|
3396
3493
|
*/
|
|
3397
3494
|
agent_detection_timeout_ms?: number;
|
|
3398
3495
|
|
|
3496
|
+
/**
|
|
3497
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
3498
|
+
* the AI on how to navigate the IVR system.
|
|
3499
|
+
*/
|
|
3500
|
+
ivr_option?: TransferOptionWarmTransfer.IvrOption;
|
|
3501
|
+
|
|
3399
3502
|
/**
|
|
3400
3503
|
* The music to play while the caller is being transferred.
|
|
3401
3504
|
*/
|
|
@@ -3433,6 +3536,19 @@ export namespace LlmUpdateParams {
|
|
|
3433
3536
|
}
|
|
3434
3537
|
|
|
3435
3538
|
export namespace TransferOptionWarmTransfer {
|
|
3539
|
+
/**
|
|
3540
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
3541
|
+
* the AI on how to navigate the IVR system.
|
|
3542
|
+
*/
|
|
3543
|
+
export interface IvrOption {
|
|
3544
|
+
/**
|
|
3545
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
3546
|
+
*/
|
|
3547
|
+
prompt?: string;
|
|
3548
|
+
|
|
3549
|
+
type?: 'prompt';
|
|
3550
|
+
}
|
|
3551
|
+
|
|
3436
3552
|
export interface WarmTransferPrompt {
|
|
3437
3553
|
/**
|
|
3438
3554
|
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
@@ -4099,7 +4215,7 @@ export namespace LlmUpdateParams {
|
|
|
4099
4215
|
|
|
4100
4216
|
/**
|
|
4101
4217
|
* Extension digits to dial after the main number connects. Sent via DTMF. Allow
|
|
4102
|
-
* digits, '\*', '#'.
|
|
4218
|
+
* digits, '\*', '#', or a dynamic variable like {{extension}}.
|
|
4103
4219
|
*/
|
|
4104
4220
|
extension?: string;
|
|
4105
4221
|
}
|
|
@@ -4144,6 +4260,12 @@ export namespace LlmUpdateParams {
|
|
|
4144
4260
|
*/
|
|
4145
4261
|
agent_detection_timeout_ms?: number;
|
|
4146
4262
|
|
|
4263
|
+
/**
|
|
4264
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
4265
|
+
* the AI on how to navigate the IVR system.
|
|
4266
|
+
*/
|
|
4267
|
+
ivr_option?: TransferOptionWarmTransfer.IvrOption;
|
|
4268
|
+
|
|
4147
4269
|
/**
|
|
4148
4270
|
* The music to play while the caller is being transferred.
|
|
4149
4271
|
*/
|
|
@@ -4181,6 +4303,19 @@ export namespace LlmUpdateParams {
|
|
|
4181
4303
|
}
|
|
4182
4304
|
|
|
4183
4305
|
export namespace TransferOptionWarmTransfer {
|
|
4306
|
+
/**
|
|
4307
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
4308
|
+
* the AI on how to navigate the IVR system.
|
|
4309
|
+
*/
|
|
4310
|
+
export interface IvrOption {
|
|
4311
|
+
/**
|
|
4312
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
4313
|
+
*/
|
|
4314
|
+
prompt?: string;
|
|
4315
|
+
|
|
4316
|
+
type?: 'prompt';
|
|
4317
|
+
}
|
|
4318
|
+
|
|
4184
4319
|
export interface WarmTransferPrompt {
|
|
4185
4320
|
/**
|
|
4186
4321
|
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
|
+
|
|
6
|
+
export class McpTool extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get MCP tools for a specific agent
|
|
9
|
+
*/
|
|
10
|
+
getMcpTools(
|
|
11
|
+
agentId: string,
|
|
12
|
+
query: McpToolGetMcpToolsParams,
|
|
13
|
+
options?: Core.RequestOptions,
|
|
14
|
+
): Core.APIPromise<McpToolGetMcpToolsResponse> {
|
|
15
|
+
return this._client.get(`/get-mcp-tools/${agentId}`, { query, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface McpToolDefinition {
|
|
20
|
+
/**
|
|
21
|
+
* Description of what the MCP tool does.
|
|
22
|
+
*/
|
|
23
|
+
description: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* JSON schema defining the input parameters for the tool.
|
|
27
|
+
*/
|
|
28
|
+
inputSchema: { [key: string]: unknown };
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Name of the MCP tool.
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type McpToolGetMcpToolsResponse = Array<McpToolDefinition>;
|
|
37
|
+
|
|
38
|
+
export interface McpToolGetMcpToolsParams {
|
|
39
|
+
/**
|
|
40
|
+
* The ID of the MCP server to get tools from.
|
|
41
|
+
*/
|
|
42
|
+
mcp_id: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Optional version of the API to use for this request.
|
|
46
|
+
*/
|
|
47
|
+
version?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export declare namespace McpTool {
|
|
51
|
+
export {
|
|
52
|
+
type McpToolDefinition as McpToolDefinition,
|
|
53
|
+
type McpToolGetMcpToolsResponse as McpToolGetMcpToolsResponse,
|
|
54
|
+
type McpToolGetMcpToolsParams as McpToolGetMcpToolsParams,
|
|
55
|
+
};
|
|
56
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.50.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.50.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.50.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|