retell-sdk 5.31.0 → 5.32.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 +20 -0
- package/client.d.mts +9 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -11
- package/client.d.ts.map +1 -1
- package/client.js +0 -3
- package/client.js.map +1 -1
- package/client.mjs +0 -3
- package/client.mjs.map +1 -1
- package/index.d.mts +0 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -4
- package/index.js.map +1 -1
- package/index.mjs +0 -1
- package/index.mjs.map +1 -1
- package/internal/uploads.js +2 -12
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +2 -12
- package/internal/uploads.mjs.map +1 -1
- package/package.json +1 -11
- package/resources/agent.d.mts +44 -44
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +44 -44
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +25 -25
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +25 -25
- package/resources/agent.mjs.map +1 -1
- package/resources/call.d.mts +1367 -1367
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +1367 -1367
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +60 -60
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +60 -60
- package/resources/call.mjs.map +1 -1
- package/resources/chat-agent.d.mts +46 -46
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +46 -46
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +27 -27
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +27 -27
- package/resources/chat-agent.mjs.map +1 -1
- package/resources/chat.d.mts +92 -92
- package/resources/chat.d.mts.map +1 -1
- package/resources/chat.d.ts +92 -92
- package/resources/chat.d.ts.map +1 -1
- package/resources/chat.js +55 -55
- package/resources/chat.js.map +1 -1
- package/resources/chat.mjs +55 -55
- package/resources/chat.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +25 -25
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +25 -25
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow-component.js +12 -12
- package/resources/conversation-flow-component.js.map +1 -1
- package/resources/conversation-flow-component.mjs +12 -12
- package/resources/conversation-flow-component.mjs.map +1 -1
- package/resources/conversation-flow.d.mts +26 -26
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +26 -26
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +12 -12
- package/resources/conversation-flow.js.map +1 -1
- package/resources/conversation-flow.mjs +12 -12
- package/resources/conversation-flow.mjs.map +1 -1
- package/resources/index.d.mts +9 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/llm.d.mts +24 -24
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +24 -24
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +11 -11
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +11 -11
- package/resources/llm.mjs.map +1 -1
- package/resources/phone-number.d.mts +8 -8
- package/resources/phone-number.d.ts +8 -8
- package/resources/tests.d.mts +95 -95
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +95 -95
- package/resources/tests.d.ts.map +1 -1
- package/resources/tests.js +27 -27
- package/resources/tests.js.map +1 -1
- package/resources/tests.mjs +27 -27
- package/resources/tests.mjs.map +1 -1
- package/resources/voice.d.mts +8 -8
- package/resources/voice.d.mts.map +1 -1
- package/resources/voice.d.ts +8 -8
- package/resources/voice.d.ts.map +1 -1
- package/resources/voice.js +12 -12
- package/resources/voice.js.map +1 -1
- package/resources/voice.mjs +12 -12
- package/resources/voice.mjs.map +1 -1
- package/src/client.ts +18 -22
- package/src/index.ts +0 -1
- package/src/internal/uploads.ts +4 -12
- package/src/resources/agent.ts +61 -61
- package/src/resources/call.ts +2364 -2364
- package/src/resources/chat-agent.ts +63 -63
- package/src/resources/chat.ts +107 -107
- package/src/resources/conversation-flow-component.ts +34 -34
- package/src/resources/conversation-flow.ts +35 -35
- package/src/resources/index.ts +18 -18
- package/src/resources/llm.ts +30 -30
- package/src/resources/phone-number.ts +8 -8
- package/src/resources/tests.ts +136 -136
- package/src/resources/voice.ts +12 -12
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/lib/webhook_auth.d.mts +0 -11
- package/lib/webhook_auth.d.mts.map +0 -1
- package/lib/webhook_auth.d.ts +0 -11
- package/lib/webhook_auth.d.ts.map +0 -1
- package/lib/webhook_auth.js +0 -48
- package/lib/webhook_auth.js.map +0 -1
- package/lib/webhook_auth.mjs +0 -43
- package/lib/webhook_auth.mjs.map +0 -1
- package/src/lib/webhook_auth.ts +0 -76
|
@@ -43,6 +43,21 @@ export class ChatAgent extends APIResource {
|
|
|
43
43
|
return this._client.get(path`/get-chat-agent/${agentID}`, { query, ...options });
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* List all chat agents
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const chatAgentResponses = await client.chatAgent.list();
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
list(
|
|
55
|
+
query: ChatAgentListParams | null | undefined = {},
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): APIPromise<ChatAgentListResponse> {
|
|
58
|
+
return this._client.get('/list-chat-agents', { query, ...options });
|
|
59
|
+
}
|
|
60
|
+
|
|
46
61
|
/**
|
|
47
62
|
* Update an existing chat agent
|
|
48
63
|
*
|
|
@@ -63,32 +78,35 @@ export class ChatAgent extends APIResource {
|
|
|
63
78
|
}
|
|
64
79
|
|
|
65
80
|
/**
|
|
66
|
-
*
|
|
81
|
+
* Delete an existing chat agent
|
|
67
82
|
*
|
|
68
83
|
* @example
|
|
69
84
|
* ```ts
|
|
70
|
-
*
|
|
85
|
+
* await client.chatAgent.delete(
|
|
86
|
+
* 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
|
|
87
|
+
* );
|
|
71
88
|
* ```
|
|
72
89
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
90
|
+
delete(agentID: string, options?: RequestOptions): APIPromise<void> {
|
|
91
|
+
return this._client.delete(path`/delete-chat-agent/${agentID}`, {
|
|
92
|
+
...options,
|
|
93
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
94
|
+
});
|
|
78
95
|
}
|
|
79
96
|
|
|
80
97
|
/**
|
|
81
|
-
*
|
|
98
|
+
* Publish an existing draft version in place.
|
|
82
99
|
*
|
|
83
100
|
* @example
|
|
84
101
|
* ```ts
|
|
85
|
-
* await client.chatAgent.
|
|
86
|
-
*
|
|
87
|
-
* );
|
|
102
|
+
* await client.chatAgent.publish('agent_xxx', {
|
|
103
|
+
* version: 15,
|
|
104
|
+
* });
|
|
88
105
|
* ```
|
|
89
106
|
*/
|
|
90
|
-
|
|
91
|
-
return this._client.
|
|
107
|
+
publish(agentID: string, body: ChatAgentPublishParams, options?: RequestOptions): APIPromise<void> {
|
|
108
|
+
return this._client.post(path`/publish-agent-version/${agentID}`, {
|
|
109
|
+
body,
|
|
92
110
|
...options,
|
|
93
111
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
94
112
|
});
|
|
@@ -150,24 +168,6 @@ export class ChatAgent extends APIResource {
|
|
|
150
168
|
getVersions(agentID: string, options?: RequestOptions): APIPromise<ChatAgentGetVersionsResponse> {
|
|
151
169
|
return this._client.get(path`/get-chat-agent-versions/${agentID}`, options);
|
|
152
170
|
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Publish an existing draft version in place.
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* ```ts
|
|
159
|
-
* await client.chatAgent.publish('agent_xxx', {
|
|
160
|
-
* version: 15,
|
|
161
|
-
* });
|
|
162
|
-
* ```
|
|
163
|
-
*/
|
|
164
|
-
publish(agentID: string, body: ChatAgentPublishParams, options?: RequestOptions): APIPromise<void> {
|
|
165
|
-
return this._client.post(path`/publish-agent-version/${agentID}`, {
|
|
166
|
-
body,
|
|
167
|
-
...options,
|
|
168
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
export interface ChatAgentResponse {
|
|
@@ -1401,6 +1401,33 @@ export interface ChatAgentRetrieveParams {
|
|
|
1401
1401
|
version?: number | string;
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
|
+
export interface ChatAgentListParams {
|
|
1405
|
+
/**
|
|
1406
|
+
* If true, only return the latest version of each chat agent.
|
|
1407
|
+
*/
|
|
1408
|
+
is_latest?: boolean;
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* A limit on the number of objects to be returned. Limit can range between 1 and
|
|
1412
|
+
* 1000, and the default is 1000.
|
|
1413
|
+
*/
|
|
1414
|
+
limit?: number;
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* The pagination key to continue fetching the next page of agents. Pagination key
|
|
1418
|
+
* is represented by a agent id, pagination key and version pair is exclusive (not
|
|
1419
|
+
* included in the fetched page). If not set, will start from the beginning.
|
|
1420
|
+
*/
|
|
1421
|
+
pagination_key?: string;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* Specifies the version of the agent associated with the pagination_key. When
|
|
1425
|
+
* paginating, both the pagination_key and its version must be provided to ensure
|
|
1426
|
+
* consistent ordering and to fetch the next page correctly.
|
|
1427
|
+
*/
|
|
1428
|
+
pagination_key_version?: number;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1404
1431
|
export interface ChatAgentUpdateParams {
|
|
1405
1432
|
/**
|
|
1406
1433
|
* Query param: Optional version of the API to use for this request. Default to
|
|
@@ -2002,31 +2029,10 @@ export namespace ChatAgentUpdateParams {
|
|
|
2002
2029
|
}
|
|
2003
2030
|
}
|
|
2004
2031
|
|
|
2005
|
-
export interface
|
|
2006
|
-
|
|
2007
|
-
* If true, only return the latest version of each chat agent.
|
|
2008
|
-
*/
|
|
2009
|
-
is_latest?: boolean;
|
|
2010
|
-
|
|
2011
|
-
/**
|
|
2012
|
-
* A limit on the number of objects to be returned. Limit can range between 1 and
|
|
2013
|
-
* 1000, and the default is 1000.
|
|
2014
|
-
*/
|
|
2015
|
-
limit?: number;
|
|
2016
|
-
|
|
2017
|
-
/**
|
|
2018
|
-
* The pagination key to continue fetching the next page of agents. Pagination key
|
|
2019
|
-
* is represented by a agent id, pagination key and version pair is exclusive (not
|
|
2020
|
-
* included in the fetched page). If not set, will start from the beginning.
|
|
2021
|
-
*/
|
|
2022
|
-
pagination_key?: string;
|
|
2032
|
+
export interface ChatAgentPublishParams {
|
|
2033
|
+
version: number;
|
|
2023
2034
|
|
|
2024
|
-
|
|
2025
|
-
* Specifies the version of the agent associated with the pagination_key. When
|
|
2026
|
-
* paginating, both the pagination_key and its version must be provided to ensure
|
|
2027
|
-
* consistent ordering and to fetch the next page correctly.
|
|
2028
|
-
*/
|
|
2029
|
-
pagination_key_version?: number;
|
|
2035
|
+
version_description?: string;
|
|
2030
2036
|
}
|
|
2031
2037
|
|
|
2032
2038
|
export interface ChatAgentCreateVersionParams {
|
|
@@ -2043,12 +2049,6 @@ export interface ChatAgentDeleteVersionParams {
|
|
|
2043
2049
|
version: number;
|
|
2044
2050
|
}
|
|
2045
2051
|
|
|
2046
|
-
export interface ChatAgentPublishParams {
|
|
2047
|
-
version: number;
|
|
2048
|
-
|
|
2049
|
-
version_description?: string;
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
2052
|
export declare namespace ChatAgent {
|
|
2053
2053
|
export {
|
|
2054
2054
|
type ChatAgentResponse as ChatAgentResponse,
|
|
@@ -2057,10 +2057,10 @@ export declare namespace ChatAgent {
|
|
|
2057
2057
|
type ChatAgentGetVersionsResponse as ChatAgentGetVersionsResponse,
|
|
2058
2058
|
type ChatAgentCreateParams as ChatAgentCreateParams,
|
|
2059
2059
|
type ChatAgentRetrieveParams as ChatAgentRetrieveParams,
|
|
2060
|
-
type ChatAgentUpdateParams as ChatAgentUpdateParams,
|
|
2061
2060
|
type ChatAgentListParams as ChatAgentListParams,
|
|
2061
|
+
type ChatAgentUpdateParams as ChatAgentUpdateParams,
|
|
2062
|
+
type ChatAgentPublishParams as ChatAgentPublishParams,
|
|
2062
2063
|
type ChatAgentCreateVersionParams as ChatAgentCreateVersionParams,
|
|
2063
2064
|
type ChatAgentDeleteVersionParams as ChatAgentDeleteVersionParams,
|
|
2064
|
-
type ChatAgentPublishParams as ChatAgentPublishParams,
|
|
2065
2065
|
};
|
|
2066
2066
|
}
|
package/src/resources/chat.ts
CHANGED
|
@@ -23,74 +23,49 @@ export class Chat extends APIResource {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* ```ts
|
|
30
|
-
* const chatResponse = await client.chat.retrieve(
|
|
31
|
-
* '16b980523634a6dc504898cda492e939',
|
|
32
|
-
* );
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
retrieve(chatID: string, options?: RequestOptions): APIPromise<ChatResponse> {
|
|
36
|
-
return this._client.get(path`/get-chat/${chatID}`, options);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Update metadata and sensitive data storage settings for an existing chat.
|
|
26
|
+
* Start an outbound SMS chat conversation with a phone number using the specified
|
|
27
|
+
* agent. The agent must be configured for chat mode. The initial SMS message will
|
|
28
|
+
* be automatically generated and sent based on the agent's configuration.
|
|
41
29
|
*
|
|
42
30
|
* @example
|
|
43
31
|
* ```ts
|
|
44
|
-
* const chatResponse = await client.chat.
|
|
45
|
-
* '
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* metadata: {
|
|
49
|
-
* customer_id: 'cust_123',
|
|
50
|
-
* notes: 'Follow-up required',
|
|
51
|
-
* },
|
|
52
|
-
* override_dynamic_variables: {
|
|
53
|
-
* additional_discount: '15%',
|
|
54
|
-
* },
|
|
55
|
-
* },
|
|
56
|
-
* );
|
|
32
|
+
* const chatResponse = await client.chat.createSMSChat({
|
|
33
|
+
* from_number: '+12137771234',
|
|
34
|
+
* to_number: '+14155551234',
|
|
35
|
+
* });
|
|
57
36
|
* ```
|
|
58
37
|
*/
|
|
59
|
-
|
|
60
|
-
return this._client.
|
|
38
|
+
createSMSChat(body: ChatCreateSMSChatParams, options?: RequestOptions): APIPromise<ChatResponse> {
|
|
39
|
+
return this._client.post('/create-sms-chat', { body, ...options });
|
|
61
40
|
}
|
|
62
41
|
|
|
63
42
|
/**
|
|
64
|
-
*
|
|
43
|
+
* End an ongoing chat
|
|
65
44
|
*
|
|
66
45
|
* @example
|
|
67
46
|
* ```ts
|
|
68
|
-
*
|
|
47
|
+
* await client.chat.end('16b980523634a6dc504898cda492e939');
|
|
69
48
|
* ```
|
|
70
49
|
*/
|
|
71
|
-
|
|
72
|
-
return this._client.
|
|
73
|
-
body,
|
|
74
|
-
timeout: (this._client as any)._options.timeout ?? 300000,
|
|
50
|
+
end(chatID: string, options?: RequestOptions): APIPromise<void> {
|
|
51
|
+
return this._client.patch(path`/end-chat/${chatID}`, {
|
|
75
52
|
...options,
|
|
53
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
76
54
|
});
|
|
77
55
|
}
|
|
78
56
|
|
|
79
57
|
/**
|
|
80
|
-
*
|
|
58
|
+
* Retrieve details of a specific chat
|
|
81
59
|
*
|
|
82
60
|
* @example
|
|
83
61
|
* ```ts
|
|
84
|
-
* await client.chat.
|
|
62
|
+
* const chatResponse = await client.chat.retrieve(
|
|
85
63
|
* '16b980523634a6dc504898cda492e939',
|
|
86
64
|
* );
|
|
87
65
|
* ```
|
|
88
66
|
*/
|
|
89
|
-
|
|
90
|
-
return this._client.
|
|
91
|
-
...options,
|
|
92
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
93
|
-
});
|
|
67
|
+
retrieve(chatID: string, options?: RequestOptions): APIPromise<ChatResponse> {
|
|
68
|
+
return this._client.get(path`/get-chat/${chatID}`, options);
|
|
94
69
|
}
|
|
95
70
|
|
|
96
71
|
/**
|
|
@@ -116,32 +91,57 @@ export class Chat extends APIResource {
|
|
|
116
91
|
}
|
|
117
92
|
|
|
118
93
|
/**
|
|
119
|
-
*
|
|
120
|
-
* agent. The agent must be configured for chat mode. The initial SMS message will
|
|
121
|
-
* be automatically generated and sent based on the agent's configuration.
|
|
94
|
+
* List chats with unified cursor pagination response.
|
|
122
95
|
*
|
|
123
96
|
* @example
|
|
124
97
|
* ```ts
|
|
125
|
-
* const
|
|
126
|
-
* from_number: '+12137771234',
|
|
127
|
-
* to_number: '+14155551234',
|
|
128
|
-
* });
|
|
98
|
+
* const chats = await client.chat.list();
|
|
129
99
|
* ```
|
|
130
100
|
*/
|
|
131
|
-
|
|
132
|
-
return this._client.post('/
|
|
101
|
+
list(body: ChatListParams | null | undefined = {}, options?: RequestOptions): APIPromise<ChatListResponse> {
|
|
102
|
+
return this._client.post('/v3/list-chats', {
|
|
103
|
+
body,
|
|
104
|
+
timeout: (this._client as any)._options.timeout ?? 300000,
|
|
105
|
+
...options,
|
|
106
|
+
});
|
|
133
107
|
}
|
|
134
108
|
|
|
135
109
|
/**
|
|
136
|
-
*
|
|
110
|
+
* Update metadata and sensitive data storage settings for an existing chat.
|
|
137
111
|
*
|
|
138
112
|
* @example
|
|
139
113
|
* ```ts
|
|
140
|
-
* await client.chat.
|
|
114
|
+
* const chatResponse = await client.chat.update(
|
|
115
|
+
* 'chat_98c1a2157aa0559144d67bb0729',
|
|
116
|
+
* {
|
|
117
|
+
* data_storage_setting: 'everything',
|
|
118
|
+
* metadata: {
|
|
119
|
+
* customer_id: 'cust_123',
|
|
120
|
+
* notes: 'Follow-up required',
|
|
121
|
+
* },
|
|
122
|
+
* override_dynamic_variables: {
|
|
123
|
+
* additional_discount: '15%',
|
|
124
|
+
* },
|
|
125
|
+
* },
|
|
126
|
+
* );
|
|
141
127
|
* ```
|
|
142
128
|
*/
|
|
143
|
-
|
|
144
|
-
return this._client.patch(path`/
|
|
129
|
+
update(chatID: string, body: ChatUpdateParams, options?: RequestOptions): APIPromise<ChatResponse> {
|
|
130
|
+
return this._client.patch(path`/update-chat/${chatID}`, { body, ...options });
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Delete an existing chat
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* await client.chat.delete(
|
|
139
|
+
* '16b980523634a6dc504898cda492e939',
|
|
140
|
+
* );
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
delete(chatID: string, options?: RequestOptions): APIPromise<void> {
|
|
144
|
+
return this._client.delete(path`/delete-chat/${chatID}`, {
|
|
145
145
|
...options,
|
|
146
146
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
147
147
|
});
|
|
@@ -706,34 +706,56 @@ export interface ChatCreateParams {
|
|
|
706
706
|
retell_llm_dynamic_variables?: { [key: string]: string };
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
-
export interface
|
|
709
|
+
export interface ChatCreateSMSChatParams {
|
|
710
710
|
/**
|
|
711
|
-
*
|
|
711
|
+
* The phone number to send SMS from in E.164 format. Must be a number purchased
|
|
712
|
+
* from Retell or imported to Retell with SMS capability.
|
|
712
713
|
*/
|
|
713
|
-
|
|
714
|
+
from_number: string;
|
|
714
715
|
|
|
715
716
|
/**
|
|
716
|
-
*
|
|
717
|
-
* "everything" stores all data, "basic_attributes_only" stores only metadata.
|
|
718
|
-
* Cannot be downgraded from more restrictive to less restrictive settings.
|
|
717
|
+
* The phone number to send SMS to in E.164 format
|
|
719
718
|
*/
|
|
720
|
-
|
|
719
|
+
to_number: string;
|
|
721
720
|
|
|
722
721
|
/**
|
|
723
722
|
* An arbitrary object for storage purpose only. You can put anything here like
|
|
724
723
|
* your internal customer id associated with the chat. Not used for processing. You
|
|
725
|
-
* can later get this field from the chat object.
|
|
724
|
+
* can later get this field from the chat object.
|
|
726
725
|
*/
|
|
727
726
|
metadata?: unknown;
|
|
728
727
|
|
|
729
728
|
/**
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
|
|
733
|
-
|
|
729
|
+
* For this particular chat, override the agent used with this agent id. This does
|
|
730
|
+
* not bind the agent to this number, this is for one time override.
|
|
731
|
+
*/
|
|
732
|
+
override_agent_id?: string;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* For this particular chat, override the agent version used with this version.
|
|
736
|
+
* This does not bind the agent version to this number, this is for one time
|
|
734
737
|
* override.
|
|
735
738
|
*/
|
|
736
|
-
|
|
739
|
+
override_agent_version?: number | string;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Add optional dynamic variables in key value pairs of string that injects into
|
|
743
|
+
* your Response Engine prompt and tool description. Only applicable for Response
|
|
744
|
+
* Engine.
|
|
745
|
+
*/
|
|
746
|
+
retell_llm_dynamic_variables?: { [key: string]: string };
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export interface ChatCreateChatCompletionParams {
|
|
750
|
+
/**
|
|
751
|
+
* Unique id of the chat to create completion.
|
|
752
|
+
*/
|
|
753
|
+
chat_id: string;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* user message to generate agent chat completion.
|
|
757
|
+
*/
|
|
758
|
+
content: string;
|
|
737
759
|
}
|
|
738
760
|
|
|
739
761
|
export interface ChatListParams {
|
|
@@ -1243,56 +1265,34 @@ export namespace ChatListParams {
|
|
|
1243
1265
|
}
|
|
1244
1266
|
}
|
|
1245
1267
|
|
|
1246
|
-
export interface
|
|
1247
|
-
/**
|
|
1248
|
-
* Unique id of the chat to create completion.
|
|
1249
|
-
*/
|
|
1250
|
-
chat_id: string;
|
|
1251
|
-
|
|
1252
|
-
/**
|
|
1253
|
-
* user message to generate agent chat completion.
|
|
1254
|
-
*/
|
|
1255
|
-
content: string;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
export interface ChatCreateSMSChatParams {
|
|
1268
|
+
export interface ChatUpdateParams {
|
|
1259
1269
|
/**
|
|
1260
|
-
*
|
|
1261
|
-
* from Retell or imported to Retell with SMS capability.
|
|
1270
|
+
* Custom attributes for the chat
|
|
1262
1271
|
*/
|
|
1263
|
-
|
|
1272
|
+
custom_attributes?: { [key: string]: string | number | boolean };
|
|
1264
1273
|
|
|
1265
1274
|
/**
|
|
1266
|
-
*
|
|
1275
|
+
* Data storage setting for this chat. Overrides the agent's default setting.
|
|
1276
|
+
* "everything" stores all data, "basic_attributes_only" stores only metadata.
|
|
1277
|
+
* Cannot be downgraded from more restrictive to less restrictive settings.
|
|
1267
1278
|
*/
|
|
1268
|
-
|
|
1279
|
+
data_storage_setting?: 'everything' | 'basic_attributes_only';
|
|
1269
1280
|
|
|
1270
1281
|
/**
|
|
1271
1282
|
* An arbitrary object for storage purpose only. You can put anything here like
|
|
1272
1283
|
* your internal customer id associated with the chat. Not used for processing. You
|
|
1273
|
-
* can later get this field from the chat object.
|
|
1284
|
+
* can later get this field from the chat object. Size limited to 50kB max.
|
|
1274
1285
|
*/
|
|
1275
1286
|
metadata?: unknown;
|
|
1276
1287
|
|
|
1277
1288
|
/**
|
|
1278
|
-
*
|
|
1279
|
-
*
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
/**
|
|
1284
|
-
* For this particular chat, override the agent version used with this version.
|
|
1285
|
-
* This does not bind the agent version to this number, this is for one time
|
|
1289
|
+
* Override dynamic variables represented as key-value pairs of strings. Setting
|
|
1290
|
+
* this will override or add the dynamic variables set in the agent during the
|
|
1291
|
+
* call. Only need to set the delta where you want to override, no need to set the
|
|
1292
|
+
* entire dynamic variables object. Setting this to null will remove any existing
|
|
1286
1293
|
* override.
|
|
1287
1294
|
*/
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
/**
|
|
1291
|
-
* Add optional dynamic variables in key value pairs of string that injects into
|
|
1292
|
-
* your Response Engine prompt and tool description. Only applicable for Response
|
|
1293
|
-
* Engine.
|
|
1294
|
-
*/
|
|
1295
|
-
retell_llm_dynamic_variables?: { [key: string]: string };
|
|
1295
|
+
override_dynamic_variables?: { [key: string]: string } | null;
|
|
1296
1296
|
}
|
|
1297
1297
|
|
|
1298
1298
|
export declare namespace Chat {
|
|
@@ -1301,9 +1301,9 @@ export declare namespace Chat {
|
|
|
1301
1301
|
type ChatListResponse as ChatListResponse,
|
|
1302
1302
|
type ChatCreateChatCompletionResponse as ChatCreateChatCompletionResponse,
|
|
1303
1303
|
type ChatCreateParams as ChatCreateParams,
|
|
1304
|
-
type ChatUpdateParams as ChatUpdateParams,
|
|
1305
|
-
type ChatListParams as ChatListParams,
|
|
1306
|
-
type ChatCreateChatCompletionParams as ChatCreateChatCompletionParams,
|
|
1307
1304
|
type ChatCreateSMSChatParams as ChatCreateSMSChatParams,
|
|
1305
|
+
type ChatCreateChatCompletionParams as ChatCreateChatCompletionParams,
|
|
1306
|
+
type ChatListParams as ChatListParams,
|
|
1307
|
+
type ChatUpdateParams as ChatUpdateParams,
|
|
1308
1308
|
};
|
|
1309
1309
|
}
|
|
@@ -53,6 +53,22 @@ export class ConversationFlowComponent extends APIResource {
|
|
|
53
53
|
return this._client.get(path`/get-conversation-flow-component/${conversationFlowComponentID}`, options);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* List shared conversation flow components with pagination
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const conversationFlowComponents =
|
|
62
|
+
* await client.conversationFlowComponent.list();
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
list(
|
|
66
|
+
query: ConversationFlowComponentListParams | null | undefined = {},
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): APIPromise<ConversationFlowComponentListResponse> {
|
|
69
|
+
return this._client.get('/v2/list-conversation-flow-components', { query, ...options });
|
|
70
|
+
}
|
|
71
|
+
|
|
56
72
|
/**
|
|
57
73
|
* Update an existing shared conversation flow component
|
|
58
74
|
*
|
|
@@ -75,22 +91,6 @@ export class ConversationFlowComponent extends APIResource {
|
|
|
75
91
|
});
|
|
76
92
|
}
|
|
77
93
|
|
|
78
|
-
/**
|
|
79
|
-
* List shared conversation flow components with pagination
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```ts
|
|
83
|
-
* const conversationFlowComponents =
|
|
84
|
-
* await client.conversationFlowComponent.list();
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
list(
|
|
88
|
-
query: ConversationFlowComponentListParams | null | undefined = {},
|
|
89
|
-
options?: RequestOptions,
|
|
90
|
-
): APIPromise<ConversationFlowComponentListResponse> {
|
|
91
|
-
return this._client.get('/v2/list-conversation-flow-components', { query, ...options });
|
|
92
|
-
}
|
|
93
|
-
|
|
94
94
|
/**
|
|
95
95
|
* Delete a shared conversation flow component. When deleting a shared component,
|
|
96
96
|
* creates local copies for all linked conversation flows.
|
|
@@ -16613,6 +16613,23 @@ export namespace ConversationFlowComponentCreateParams {
|
|
|
16613
16613
|
}
|
|
16614
16614
|
}
|
|
16615
16615
|
|
|
16616
|
+
export interface ConversationFlowComponentListParams {
|
|
16617
|
+
/**
|
|
16618
|
+
* Maximum number of items to return.
|
|
16619
|
+
*/
|
|
16620
|
+
limit?: number;
|
|
16621
|
+
|
|
16622
|
+
/**
|
|
16623
|
+
* Pagination key for fetching the next page.
|
|
16624
|
+
*/
|
|
16625
|
+
pagination_key?: string;
|
|
16626
|
+
|
|
16627
|
+
/**
|
|
16628
|
+
* Sort order for results.
|
|
16629
|
+
*/
|
|
16630
|
+
sort_order?: 'ascending' | 'descending';
|
|
16631
|
+
}
|
|
16632
|
+
|
|
16616
16633
|
export interface ConversationFlowComponentUpdateParams {
|
|
16617
16634
|
/**
|
|
16618
16635
|
* Display position for the begin tag in the frontend
|
|
@@ -24850,29 +24867,12 @@ export namespace ConversationFlowComponentUpdateParams {
|
|
|
24850
24867
|
}
|
|
24851
24868
|
}
|
|
24852
24869
|
|
|
24853
|
-
export interface ConversationFlowComponentListParams {
|
|
24854
|
-
/**
|
|
24855
|
-
* Maximum number of items to return.
|
|
24856
|
-
*/
|
|
24857
|
-
limit?: number;
|
|
24858
|
-
|
|
24859
|
-
/**
|
|
24860
|
-
* Pagination key for fetching the next page.
|
|
24861
|
-
*/
|
|
24862
|
-
pagination_key?: string;
|
|
24863
|
-
|
|
24864
|
-
/**
|
|
24865
|
-
* Sort order for results.
|
|
24866
|
-
*/
|
|
24867
|
-
sort_order?: 'ascending' | 'descending';
|
|
24868
|
-
}
|
|
24869
|
-
|
|
24870
24870
|
export declare namespace ConversationFlowComponent {
|
|
24871
24871
|
export {
|
|
24872
24872
|
type ConversationFlowComponentResponse as ConversationFlowComponentResponse,
|
|
24873
24873
|
type ConversationFlowComponentListResponse as ConversationFlowComponentListResponse,
|
|
24874
24874
|
type ConversationFlowComponentCreateParams as ConversationFlowComponentCreateParams,
|
|
24875
|
-
type ConversationFlowComponentUpdateParams as ConversationFlowComponentUpdateParams,
|
|
24876
24875
|
type ConversationFlowComponentListParams as ConversationFlowComponentListParams,
|
|
24876
|
+
type ConversationFlowComponentUpdateParams as ConversationFlowComponentUpdateParams,
|
|
24877
24877
|
};
|
|
24878
24878
|
}
|