retell-sdk 5.49.1 → 5.49.2

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +9 -9
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -9
  5. package/client.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/agent.d.mts +69 -69
  8. package/resources/agent.d.mts.map +1 -1
  9. package/resources/agent.d.ts +69 -69
  10. package/resources/agent.d.ts.map +1 -1
  11. package/resources/agent.js +30 -30
  12. package/resources/agent.js.map +1 -1
  13. package/resources/agent.mjs +30 -30
  14. package/resources/agent.mjs.map +1 -1
  15. package/resources/call.d.mts +1350 -1350
  16. package/resources/call.d.mts.map +1 -1
  17. package/resources/call.d.ts +1350 -1350
  18. package/resources/call.d.ts.map +1 -1
  19. package/resources/call.js +60 -60
  20. package/resources/call.js.map +1 -1
  21. package/resources/call.mjs +60 -60
  22. package/resources/call.mjs.map +1 -1
  23. package/resources/chat-agent.d.mts +70 -70
  24. package/resources/chat-agent.d.mts.map +1 -1
  25. package/resources/chat-agent.d.ts +70 -70
  26. package/resources/chat-agent.d.ts.map +1 -1
  27. package/resources/chat-agent.js +31 -31
  28. package/resources/chat-agent.js.map +1 -1
  29. package/resources/chat-agent.mjs +31 -31
  30. package/resources/chat-agent.mjs.map +1 -1
  31. package/resources/chat.d.mts +97 -97
  32. package/resources/chat.d.mts.map +1 -1
  33. package/resources/chat.d.ts +97 -97
  34. package/resources/chat.d.ts.map +1 -1
  35. package/resources/chat.js +55 -55
  36. package/resources/chat.js.map +1 -1
  37. package/resources/chat.mjs +55 -55
  38. package/resources/chat.mjs.map +1 -1
  39. package/resources/conversation-flow-component.d.mts +25 -25
  40. package/resources/conversation-flow-component.d.mts.map +1 -1
  41. package/resources/conversation-flow-component.d.ts +25 -25
  42. package/resources/conversation-flow-component.d.ts.map +1 -1
  43. package/resources/conversation-flow-component.js +12 -12
  44. package/resources/conversation-flow-component.js.map +1 -1
  45. package/resources/conversation-flow-component.mjs +12 -12
  46. package/resources/conversation-flow-component.mjs.map +1 -1
  47. package/resources/conversation-flow.d.mts +25 -25
  48. package/resources/conversation-flow.d.mts.map +1 -1
  49. package/resources/conversation-flow.d.ts +25 -25
  50. package/resources/conversation-flow.d.ts.map +1 -1
  51. package/resources/conversation-flow.js +12 -12
  52. package/resources/conversation-flow.js.map +1 -1
  53. package/resources/conversation-flow.mjs +12 -12
  54. package/resources/conversation-flow.mjs.map +1 -1
  55. package/resources/index.d.mts +9 -9
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +9 -9
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/llm.d.mts +24 -24
  60. package/resources/llm.d.mts.map +1 -1
  61. package/resources/llm.d.ts +24 -24
  62. package/resources/llm.d.ts.map +1 -1
  63. package/resources/llm.js +11 -11
  64. package/resources/llm.js.map +1 -1
  65. package/resources/llm.mjs +11 -11
  66. package/resources/llm.mjs.map +1 -1
  67. package/resources/phone-number.d.mts +130 -130
  68. package/resources/phone-number.d.mts.map +1 -1
  69. package/resources/phone-number.d.ts +130 -130
  70. package/resources/phone-number.d.ts.map +1 -1
  71. package/resources/phone-number.js +27 -27
  72. package/resources/phone-number.js.map +1 -1
  73. package/resources/phone-number.mjs +27 -27
  74. package/resources/phone-number.mjs.map +1 -1
  75. package/resources/tests.d.mts +95 -95
  76. package/resources/tests.d.mts.map +1 -1
  77. package/resources/tests.d.ts +95 -95
  78. package/resources/tests.d.ts.map +1 -1
  79. package/resources/tests.js +27 -27
  80. package/resources/tests.js.map +1 -1
  81. package/resources/tests.mjs +27 -27
  82. package/resources/tests.mjs.map +1 -1
  83. package/resources/voice.d.mts +8 -8
  84. package/resources/voice.d.mts.map +1 -1
  85. package/resources/voice.d.ts +8 -8
  86. package/resources/voice.d.ts.map +1 -1
  87. package/resources/voice.js +12 -12
  88. package/resources/voice.js.map +1 -1
  89. package/resources/voice.mjs +12 -12
  90. package/resources/voice.mjs.map +1 -1
  91. package/src/client.ts +18 -18
  92. package/src/resources/agent.ts +90 -90
  93. package/src/resources/call.ts +1821 -1821
  94. package/src/resources/chat-agent.ts +95 -95
  95. package/src/resources/chat.ts +112 -112
  96. package/src/resources/conversation-flow-component.ts +34 -34
  97. package/src/resources/conversation-flow.ts +34 -34
  98. package/src/resources/index.ts +18 -18
  99. package/src/resources/llm.ts +30 -30
  100. package/src/resources/phone-number.ts +152 -152
  101. package/src/resources/tests.ts +136 -136
  102. package/src/resources/voice.ts +12 -12
  103. package/src/version.ts +1 -1
  104. package/version.d.mts +1 -1
  105. package/version.d.ts +1 -1
  106. package/version.js +1 -1
  107. package/version.mjs +1 -1
@@ -43,6 +43,25 @@ export class ChatAgent extends APIResource {
43
43
  return this._client.get(path`/get-chat-agent/${agentID}`, { query, ...options });
44
44
  }
45
45
 
46
+ /**
47
+ * Update an existing chat agent
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const chatAgentResponse = await client.chatAgent.update(
52
+ * '16b980523634a6dc504898cda492e939',
53
+ * );
54
+ * ```
55
+ */
56
+ update(
57
+ agentID: string,
58
+ params: ChatAgentUpdateParams,
59
+ options?: RequestOptions,
60
+ ): APIPromise<ChatAgentResponse> {
61
+ const { version, ...body } = params;
62
+ return this._client.patch(path`/update-chat-agent/${agentID}`, { query: { version }, body, ...options });
63
+ }
64
+
46
65
  /**
47
66
  * List unique agents with pagination.
48
67
  *
@@ -71,25 +90,6 @@ export class ChatAgent extends APIResource {
71
90
  });
72
91
  }
73
92
 
74
- /**
75
- * Update an existing chat agent
76
- *
77
- * @example
78
- * ```ts
79
- * const chatAgentResponse = await client.chatAgent.update(
80
- * '16b980523634a6dc504898cda492e939',
81
- * );
82
- * ```
83
- */
84
- update(
85
- agentID: string,
86
- params: ChatAgentUpdateParams,
87
- options?: RequestOptions,
88
- ): APIPromise<ChatAgentResponse> {
89
- const { version, ...body } = params;
90
- return this._client.patch(path`/update-chat-agent/${agentID}`, { query: { version }, body, ...options });
91
- }
92
-
93
93
  /**
94
94
  * Delete an existing chat agent
95
95
  *
@@ -107,24 +107,6 @@ export class ChatAgent extends APIResource {
107
107
  });
108
108
  }
109
109
 
110
- /**
111
- * Publish an existing draft version in place.
112
- *
113
- * @example
114
- * ```ts
115
- * await client.chatAgent.publish('agent_xxx', {
116
- * version: 15,
117
- * });
118
- * ```
119
- */
120
- publish(agentID: string, body: ChatAgentPublishParams, options?: RequestOptions): APIPromise<void> {
121
- return this._client.post(path`/publish-agent-version/${agentID}`, {
122
- body,
123
- ...options,
124
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
125
- });
126
- }
127
-
128
110
  /**
129
111
  * Create a new draft agent version from a base version.
130
112
  *
@@ -181,6 +163,24 @@ export class ChatAgent extends APIResource {
181
163
  getVersions(agentID: string, options?: RequestOptions): APIPromise<ChatAgentGetVersionsResponse> {
182
164
  return this._client.get(path`/get-chat-agent-versions/${agentID}`, options);
183
165
  }
166
+
167
+ /**
168
+ * Publish an existing draft version in place.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * await client.chatAgent.publish('agent_xxx', {
173
+ * version: 15,
174
+ * });
175
+ * ```
176
+ */
177
+ publish(agentID: string, body: ChatAgentPublishParams, options?: RequestOptions): APIPromise<void> {
178
+ return this._client.post(path`/publish-agent-version/${agentID}`, {
179
+ body,
180
+ ...options,
181
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
182
+ });
183
+ }
184
184
  }
185
185
 
186
186
  export interface ChatAgentResponse {
@@ -1441,57 +1441,6 @@ export interface ChatAgentRetrieveParams {
1441
1441
  version?: string | number;
1442
1442
  }
1443
1443
 
1444
- export interface ChatAgentListParams {
1445
- /**
1446
- * Query param: Maximum number of items to return.
1447
- */
1448
- limit?: number;
1449
-
1450
- /**
1451
- * Query param: Pagination key for fetching the next page.
1452
- */
1453
- pagination_key?: string;
1454
-
1455
- /**
1456
- * Query param: Sort order for results.
1457
- */
1458
- sort_order?: 'ascending' | 'descending';
1459
-
1460
- /**
1461
- * Body param: Filters for listing agents. All provided filters are connected with
1462
- * AND.
1463
- */
1464
- filter_criteria?: ChatAgentListParams.FilterCriteria;
1465
- }
1466
-
1467
- export namespace ChatAgentListParams {
1468
- /**
1469
- * Filters for listing agents. All provided filters are connected with AND.
1470
- */
1471
- export interface FilterCriteria {
1472
- channel?: FilterCriteria.Channel;
1473
-
1474
- /**
1475
- * Case-insensitive substring search over agent name, plus substring search over
1476
- * agent id.
1477
- */
1478
- query?: string;
1479
- }
1480
-
1481
- export namespace FilterCriteria {
1482
- export interface Channel {
1483
- /**
1484
- * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
1485
- */
1486
- op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
1487
-
1488
- type: 'string';
1489
-
1490
- value: 'voice' | 'chat';
1491
- }
1492
- }
1493
- }
1494
-
1495
1444
  export interface ChatAgentUpdateParams {
1496
1445
  /**
1497
1446
  * Query param: Optional version of the API to use for this request. Default to
@@ -2083,15 +2032,55 @@ export namespace ChatAgentUpdateParams {
2083
2032
  }
2084
2033
  }
2085
2034
 
2086
- export interface ChatAgentPublishParams {
2087
- version: number;
2035
+ export interface ChatAgentListParams {
2036
+ /**
2037
+ * Query param: Maximum number of items to return.
2038
+ */
2039
+ limit?: number;
2088
2040
 
2089
- version_description?: string;
2041
+ /**
2042
+ * Query param: Pagination key for fetching the next page.
2043
+ */
2044
+ pagination_key?: string;
2090
2045
 
2091
2046
  /**
2092
- * Optional title of the agent version. Used for your own reference.
2047
+ * Query param: Sort order for results.
2093
2048
  */
2094
- version_title?: string;
2049
+ sort_order?: 'ascending' | 'descending';
2050
+
2051
+ /**
2052
+ * Body param: Filters for listing agents. All provided filters are connected with
2053
+ * AND.
2054
+ */
2055
+ filter_criteria?: ChatAgentListParams.FilterCriteria;
2056
+ }
2057
+
2058
+ export namespace ChatAgentListParams {
2059
+ /**
2060
+ * Filters for listing agents. All provided filters are connected with AND.
2061
+ */
2062
+ export interface FilterCriteria {
2063
+ channel?: FilterCriteria.Channel;
2064
+
2065
+ /**
2066
+ * Case-insensitive substring search over agent name, plus substring search over
2067
+ * agent id.
2068
+ */
2069
+ query?: string;
2070
+ }
2071
+
2072
+ export namespace FilterCriteria {
2073
+ export interface Channel {
2074
+ /**
2075
+ * eq: equal, ne: not equal, sw: starts with, ew: ends with, co: contains
2076
+ */
2077
+ op: 'eq' | 'ne' | 'sw' | 'ew' | 'co';
2078
+
2079
+ type: 'string';
2080
+
2081
+ value: 'voice' | 'chat';
2082
+ }
2083
+ }
2095
2084
  }
2096
2085
 
2097
2086
  export interface ChatAgentCreateVersionParams {
@@ -2108,6 +2097,17 @@ export interface ChatAgentDeleteVersionParams {
2108
2097
  version: number;
2109
2098
  }
2110
2099
 
2100
+ export interface ChatAgentPublishParams {
2101
+ version: number;
2102
+
2103
+ version_description?: string;
2104
+
2105
+ /**
2106
+ * Optional title of the agent version. Used for your own reference.
2107
+ */
2108
+ version_title?: string;
2109
+ }
2110
+
2111
2111
  export declare namespace ChatAgent {
2112
2112
  export {
2113
2113
  type ChatAgentResponse as ChatAgentResponse,
@@ -2116,10 +2116,10 @@ export declare namespace ChatAgent {
2116
2116
  type ChatAgentGetVersionsResponse as ChatAgentGetVersionsResponse,
2117
2117
  type ChatAgentCreateParams as ChatAgentCreateParams,
2118
2118
  type ChatAgentRetrieveParams as ChatAgentRetrieveParams,
2119
- type ChatAgentListParams as ChatAgentListParams,
2120
2119
  type ChatAgentUpdateParams as ChatAgentUpdateParams,
2121
- type ChatAgentPublishParams as ChatAgentPublishParams,
2120
+ type ChatAgentListParams as ChatAgentListParams,
2122
2121
  type ChatAgentCreateVersionParams as ChatAgentCreateVersionParams,
2123
2122
  type ChatAgentDeleteVersionParams as ChatAgentDeleteVersionParams,
2123
+ type ChatAgentPublishParams as ChatAgentPublishParams,
2124
2124
  };
2125
2125
  }
@@ -23,49 +23,74 @@ export class Chat extends APIResource {
23
23
  }
24
24
 
25
25
  /**
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.
26
+ * Retrieve details of a specific chat
29
27
  *
30
28
  * @example
31
29
  * ```ts
32
- * const chatResponse = await client.chat.createSMSChat({
33
- * from_number: '+12137771234',
34
- * to_number: '+14155551234',
35
- * });
30
+ * const chatResponse = await client.chat.retrieve(
31
+ * '16b980523634a6dc504898cda492e939',
32
+ * );
36
33
  * ```
37
34
  */
38
- createSMSChat(body: ChatCreateSMSChatParams, options?: RequestOptions): APIPromise<ChatResponse> {
39
- return this._client.post('/create-sms-chat', { body, ...options });
35
+ retrieve(chatID: string, options?: RequestOptions): APIPromise<ChatResponse> {
36
+ return this._client.get(path`/get-chat/${chatID}`, options);
40
37
  }
41
38
 
42
39
  /**
43
- * End an ongoing chat
40
+ * Update metadata and sensitive data storage settings for an existing chat.
44
41
  *
45
42
  * @example
46
43
  * ```ts
47
- * await client.chat.end('16b980523634a6dc504898cda492e939');
44
+ * const chatResponse = await client.chat.update(
45
+ * 'chat_98c1a2157aa0559144d67bb0729',
46
+ * {
47
+ * data_storage_setting: 'everything',
48
+ * metadata: {
49
+ * customer_id: 'cust_123',
50
+ * notes: 'Follow-up required',
51
+ * },
52
+ * override_dynamic_variables: {
53
+ * additional_discount: '15%',
54
+ * },
55
+ * },
56
+ * );
48
57
  * ```
49
58
  */
50
- end(chatID: string, options?: RequestOptions): APIPromise<void> {
51
- return this._client.patch(path`/end-chat/${chatID}`, {
59
+ update(chatID: string, body: ChatUpdateParams, options?: RequestOptions): APIPromise<ChatResponse> {
60
+ return this._client.patch(path`/update-chat/${chatID}`, { body, ...options });
61
+ }
62
+
63
+ /**
64
+ * List chats with unified cursor pagination response.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const chats = await client.chat.list();
69
+ * ```
70
+ */
71
+ list(body: ChatListParams | null | undefined = {}, options?: RequestOptions): APIPromise<ChatListResponse> {
72
+ return this._client.post('/v3/list-chats', {
73
+ body,
74
+ timeout: (this._client as any)._options.timeout ?? 300000,
52
75
  ...options,
53
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
54
76
  });
55
77
  }
56
78
 
57
79
  /**
58
- * Retrieve details of a specific chat
80
+ * Delete an existing chat
59
81
  *
60
82
  * @example
61
83
  * ```ts
62
- * const chatResponse = await client.chat.retrieve(
84
+ * await client.chat.delete(
63
85
  * '16b980523634a6dc504898cda492e939',
64
86
  * );
65
87
  * ```
66
88
  */
67
- retrieve(chatID: string, options?: RequestOptions): APIPromise<ChatResponse> {
68
- return this._client.get(path`/get-chat/${chatID}`, options);
89
+ delete(chatID: string, options?: RequestOptions): APIPromise<void> {
90
+ return this._client.delete(path`/delete-chat/${chatID}`, {
91
+ ...options,
92
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
93
+ });
69
94
  }
70
95
 
71
96
  /**
@@ -91,57 +116,32 @@ export class Chat extends APIResource {
91
116
  }
92
117
 
93
118
  /**
94
- * List chats with unified cursor pagination response.
95
- *
96
- * @example
97
- * ```ts
98
- * const chats = await client.chat.list();
99
- * ```
100
- */
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
- });
107
- }
108
-
109
- /**
110
- * Update metadata and sensitive data storage settings for an existing chat.
119
+ * Start an outbound SMS chat conversation with a phone number using the specified
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.
111
122
  *
112
123
  * @example
113
124
  * ```ts
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
- * );
125
+ * const chatResponse = await client.chat.createSMSChat({
126
+ * from_number: '+12137771234',
127
+ * to_number: '+14155551234',
128
+ * });
127
129
  * ```
128
130
  */
129
- update(chatID: string, body: ChatUpdateParams, options?: RequestOptions): APIPromise<ChatResponse> {
130
- return this._client.patch(path`/update-chat/${chatID}`, { body, ...options });
131
+ createSMSChat(body: ChatCreateSMSChatParams, options?: RequestOptions): APIPromise<ChatResponse> {
132
+ return this._client.post('/create-sms-chat', { body, ...options });
131
133
  }
132
134
 
133
135
  /**
134
- * Delete an existing chat
136
+ * End an ongoing chat
135
137
  *
136
138
  * @example
137
139
  * ```ts
138
- * await client.chat.delete(
139
- * '16b980523634a6dc504898cda492e939',
140
- * );
140
+ * await client.chat.end('16b980523634a6dc504898cda492e939');
141
141
  * ```
142
142
  */
143
- delete(chatID: string, options?: RequestOptions): APIPromise<void> {
144
- return this._client.delete(path`/delete-chat/${chatID}`, {
143
+ end(chatID: string, options?: RequestOptions): APIPromise<void> {
144
+ return this._client.patch(path`/end-chat/${chatID}`, {
145
145
  ...options,
146
146
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
147
147
  });
@@ -844,56 +844,39 @@ export interface ChatCreateParams {
844
844
  retell_llm_dynamic_variables?: { [key: string]: string };
845
845
  }
846
846
 
847
- export interface ChatCreateSMSChatParams {
847
+ export interface ChatUpdateParams {
848
848
  /**
849
- * The phone number to send SMS from in E.164 format. Must be a number purchased
850
- * from Retell or imported to Retell with SMS capability.
849
+ * Custom attributes for the chat, as key-value pairs. Each attribute must first be
850
+ * defined for your organization in the Retell dashboard (Chat History → Actions →
851
+ * Custom attributes) before it can be set here. The object key must match the id
852
+ * of an existing organization-level custom attribute; keys that do not match a
853
+ * defined attribute are ignored and will not be saved. Values must be a string,
854
+ * number, or boolean.
851
855
  */
852
- from_number: string;
856
+ custom_attributes?: { [key: string]: string | number | boolean };
853
857
 
854
858
  /**
855
- * The phone number to send SMS to in E.164 format
859
+ * Data storage setting for this chat. Overrides the agent's default setting.
860
+ * "everything" stores all data, "basic_attributes_only" stores only metadata.
861
+ * Cannot be downgraded from more restrictive to less restrictive settings.
856
862
  */
857
- to_number: string;
863
+ data_storage_setting?: 'everything' | 'basic_attributes_only';
858
864
 
859
865
  /**
860
866
  * An arbitrary object for storage purpose only. You can put anything here like
861
867
  * your internal customer id associated with the chat. Not used for processing. You
862
- * can later get this field from the chat object.
868
+ * can later get this field from the chat object. Size limited to 50kB max.
863
869
  */
864
870
  metadata?: unknown;
865
871
 
866
872
  /**
867
- * For this particular chat, override the agent used with this agent id. This does
868
- * not bind the agent to this number, this is for one time override.
869
- */
870
- override_agent_id?: string;
871
-
872
- /**
873
- * For this particular chat, override the agent version used with this version.
874
- * This does not bind the agent version to this number, this is for one time
873
+ * Override dynamic variables represented as key-value pairs of strings. Setting
874
+ * this will override or add the dynamic variables set in the agent during the
875
+ * call. Only need to set the delta where you want to override, no need to set the
876
+ * entire dynamic variables object. Setting this to null will remove any existing
875
877
  * override.
876
878
  */
877
- override_agent_version?: string | number;
878
-
879
- /**
880
- * Add optional dynamic variables in key value pairs of string that injects into
881
- * your Response Engine prompt and tool description. Only applicable for Response
882
- * Engine.
883
- */
884
- retell_llm_dynamic_variables?: { [key: string]: string };
885
- }
886
-
887
- export interface ChatCreateChatCompletionParams {
888
- /**
889
- * Unique id of the chat to create completion.
890
- */
891
- chat_id: string;
892
-
893
- /**
894
- * user message to generate agent chat completion.
895
- */
896
- content: string;
879
+ override_dynamic_variables?: { [key: string]: string } | null;
897
880
  }
898
881
 
899
882
  export interface ChatListParams {
@@ -1423,39 +1406,56 @@ export namespace ChatListParams {
1423
1406
  }
1424
1407
  }
1425
1408
 
1426
- export interface ChatUpdateParams {
1409
+ export interface ChatCreateChatCompletionParams {
1427
1410
  /**
1428
- * Custom attributes for the chat, as key-value pairs. Each attribute must first be
1429
- * defined for your organization in the Retell dashboard (Chat History → Actions →
1430
- * Custom attributes) before it can be set here. The object key must match the id
1431
- * of an existing organization-level custom attribute; keys that do not match a
1432
- * defined attribute are ignored and will not be saved. Values must be a string,
1433
- * number, or boolean.
1411
+ * Unique id of the chat to create completion.
1434
1412
  */
1435
- custom_attributes?: { [key: string]: string | number | boolean };
1413
+ chat_id: string;
1436
1414
 
1437
1415
  /**
1438
- * Data storage setting for this chat. Overrides the agent's default setting.
1439
- * "everything" stores all data, "basic_attributes_only" stores only metadata.
1440
- * Cannot be downgraded from more restrictive to less restrictive settings.
1416
+ * user message to generate agent chat completion.
1441
1417
  */
1442
- data_storage_setting?: 'everything' | 'basic_attributes_only';
1418
+ content: string;
1419
+ }
1420
+
1421
+ export interface ChatCreateSMSChatParams {
1422
+ /**
1423
+ * The phone number to send SMS from in E.164 format. Must be a number purchased
1424
+ * from Retell or imported to Retell with SMS capability.
1425
+ */
1426
+ from_number: string;
1427
+
1428
+ /**
1429
+ * The phone number to send SMS to in E.164 format
1430
+ */
1431
+ to_number: string;
1443
1432
 
1444
1433
  /**
1445
1434
  * An arbitrary object for storage purpose only. You can put anything here like
1446
1435
  * your internal customer id associated with the chat. Not used for processing. You
1447
- * can later get this field from the chat object. Size limited to 50kB max.
1436
+ * can later get this field from the chat object.
1448
1437
  */
1449
1438
  metadata?: unknown;
1450
1439
 
1451
1440
  /**
1452
- * Override dynamic variables represented as key-value pairs of strings. Setting
1453
- * this will override or add the dynamic variables set in the agent during the
1454
- * call. Only need to set the delta where you want to override, no need to set the
1455
- * entire dynamic variables object. Setting this to null will remove any existing
1441
+ * For this particular chat, override the agent used with this agent id. This does
1442
+ * not bind the agent to this number, this is for one time override.
1443
+ */
1444
+ override_agent_id?: string;
1445
+
1446
+ /**
1447
+ * For this particular chat, override the agent version used with this version.
1448
+ * This does not bind the agent version to this number, this is for one time
1456
1449
  * override.
1457
1450
  */
1458
- override_dynamic_variables?: { [key: string]: string } | null;
1451
+ override_agent_version?: string | number;
1452
+
1453
+ /**
1454
+ * Add optional dynamic variables in key value pairs of string that injects into
1455
+ * your Response Engine prompt and tool description. Only applicable for Response
1456
+ * Engine.
1457
+ */
1458
+ retell_llm_dynamic_variables?: { [key: string]: string };
1459
1459
  }
1460
1460
 
1461
1461
  export declare namespace Chat {
@@ -1464,9 +1464,9 @@ export declare namespace Chat {
1464
1464
  type ChatListResponse as ChatListResponse,
1465
1465
  type ChatCreateChatCompletionResponse as ChatCreateChatCompletionResponse,
1466
1466
  type ChatCreateParams as ChatCreateParams,
1467
- type ChatCreateSMSChatParams as ChatCreateSMSChatParams,
1468
- type ChatCreateChatCompletionParams as ChatCreateChatCompletionParams,
1469
- type ChatListParams as ChatListParams,
1470
1467
  type ChatUpdateParams as ChatUpdateParams,
1468
+ type ChatListParams as ChatListParams,
1469
+ type ChatCreateChatCompletionParams as ChatCreateChatCompletionParams,
1470
+ type ChatCreateSMSChatParams as ChatCreateSMSChatParams,
1471
1471
  };
1472
1472
  }
@@ -53,22 +53,6 @@ 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
-
72
56
  /**
73
57
  * Update an existing shared conversation flow component
74
58
  *
@@ -91,6 +75,22 @@ export class ConversationFlowComponent extends APIResource {
91
75
  });
92
76
  }
93
77
 
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.
@@ -17297,23 +17297,6 @@ export namespace ConversationFlowComponentCreateParams {
17297
17297
  }
17298
17298
  }
17299
17299
 
17300
- export interface ConversationFlowComponentListParams {
17301
- /**
17302
- * Maximum number of items to return.
17303
- */
17304
- limit?: number;
17305
-
17306
- /**
17307
- * Pagination key for fetching the next page.
17308
- */
17309
- pagination_key?: string;
17310
-
17311
- /**
17312
- * Sort order for results.
17313
- */
17314
- sort_order?: 'ascending' | 'descending';
17315
- }
17316
-
17317
17300
  export interface ConversationFlowComponentUpdateParams {
17318
17301
  /**
17319
17302
  * Display position for the begin tag in the frontend
@@ -25893,12 +25876,29 @@ export namespace ConversationFlowComponentUpdateParams {
25893
25876
  }
25894
25877
  }
25895
25878
 
25879
+ export interface ConversationFlowComponentListParams {
25880
+ /**
25881
+ * Maximum number of items to return.
25882
+ */
25883
+ limit?: number;
25884
+
25885
+ /**
25886
+ * Pagination key for fetching the next page.
25887
+ */
25888
+ pagination_key?: string;
25889
+
25890
+ /**
25891
+ * Sort order for results.
25892
+ */
25893
+ sort_order?: 'ascending' | 'descending';
25894
+ }
25895
+
25896
25896
  export declare namespace ConversationFlowComponent {
25897
25897
  export {
25898
25898
  type ConversationFlowComponentResponse as ConversationFlowComponentResponse,
25899
25899
  type ConversationFlowComponentListResponse as ConversationFlowComponentListResponse,
25900
25900
  type ConversationFlowComponentCreateParams as ConversationFlowComponentCreateParams,
25901
- type ConversationFlowComponentListParams as ConversationFlowComponentListParams,
25902
25901
  type ConversationFlowComponentUpdateParams as ConversationFlowComponentUpdateParams,
25902
+ type ConversationFlowComponentListParams as ConversationFlowComponentListParams,
25903
25903
  };
25904
25904
  }