retell-sdk 4.30.0 → 4.31.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.31.0 (2025-05-22)
4
+
5
+ Full Changelog: [v4.30.0...v4.31.0](https://github.com/RetellAI/retell-typescript-sdk/compare/v4.30.0...v4.31.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([434bf73](https://github.com/RetellAI/retell-typescript-sdk/commit/434bf73b9f2e3da8fcf2913f0d1cb7c5846da418))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **docs:** grammar improvements ([907a718](https://github.com/RetellAI/retell-typescript-sdk/commit/907a7182ca7ea5b6c6da906836d0ecfc2c13949b))
15
+
3
16
  ## 4.30.0 (2025-05-15)
4
17
 
5
18
  Full Changelog: [v4.29.0...v4.30.0](https://github.com/RetellAI/retell-typescript-sdk/compare/v4.29.0...v4.30.0)
package/index.d.mts CHANGED
@@ -6,6 +6,7 @@ import * as API from "./resources/index.js";
6
6
  import { Agent as AgentAPIAgent, AgentCreateParams, AgentGetVersionsResponse, AgentListResponse, AgentResponse, AgentRetrieveParams, AgentUpdateParams } from "./resources/agent.js";
7
7
  import { BatchCall, BatchCallCreateBatchCallParams, BatchCallResponse } from "./resources/batch-call.js";
8
8
  import { Call, CallCreatePhoneCallParams, CallCreateWebCallParams, CallListParams, CallListResponse, CallRegisterPhoneCallParams, CallResponse, CallUpdateParams, PhoneCallResponse, WebCallResponse } from "./resources/call.js";
9
+ import { Chat, ChatCreateChatCompletionParams, ChatCreateChatCompletionResponse, ChatCreateParams, ChatListResponse, ChatResponse } from "./resources/chat.js";
9
10
  import { Concurrency, ConcurrencyRetrieveResponse } from "./resources/concurrency.js";
10
11
  import { KnowledgeBase, KnowledgeBaseAddSourcesParams, KnowledgeBaseCreateParams, KnowledgeBaseListResponse, KnowledgeBaseResponse } from "./resources/knowledge-base.js";
11
12
  import { Llm, LlmCreateParams, LlmListResponse, LlmResponse, LlmRetrieveParams, LlmUpdateParams } from "./resources/llm.js";
@@ -83,6 +84,7 @@ export declare class Retell extends Core.APIClient {
83
84
  */
84
85
  constructor({ baseURL, apiKey, ...opts }: ClientOptions);
85
86
  call: API.Call;
87
+ chat: API.Chat;
86
88
  phoneNumber: API.PhoneNumber;
87
89
  agent: API.Agent;
88
90
  llm: API.Llm;
@@ -116,6 +118,7 @@ export declare class Retell extends Core.APIClient {
116
118
  export declare namespace Retell {
117
119
  export type RequestOptions = Core.RequestOptions;
118
120
  export { Call as Call, type CallResponse as CallResponse, type PhoneCallResponse as PhoneCallResponse, type WebCallResponse as WebCallResponse, type CallListResponse as CallListResponse, type CallUpdateParams as CallUpdateParams, type CallListParams as CallListParams, type CallCreatePhoneCallParams as CallCreatePhoneCallParams, type CallCreateWebCallParams as CallCreateWebCallParams, type CallRegisterPhoneCallParams as CallRegisterPhoneCallParams, };
121
+ export { Chat as Chat, type ChatResponse as ChatResponse, type ChatListResponse as ChatListResponse, type ChatCreateChatCompletionResponse as ChatCreateChatCompletionResponse, type ChatCreateParams as ChatCreateParams, type ChatCreateChatCompletionParams as ChatCreateChatCompletionParams, };
119
122
  export { PhoneNumber as PhoneNumber, type PhoneNumberResponse as PhoneNumberResponse, type PhoneNumberListResponse as PhoneNumberListResponse, type PhoneNumberCreateParams as PhoneNumberCreateParams, type PhoneNumberUpdateParams as PhoneNumberUpdateParams, type PhoneNumberImportParams as PhoneNumberImportParams, };
120
123
  export { AgentAPIAgent as Agent, type AgentResponse as AgentResponse, type AgentListResponse as AgentListResponse, type AgentGetVersionsResponse as AgentGetVersionsResponse, type AgentCreateParams as AgentCreateParams, type AgentRetrieveParams as AgentRetrieveParams, type AgentUpdateParams as AgentUpdateParams, };
121
124
  export { Llm as Llm, type LlmResponse as LlmResponse, type LlmListResponse as LlmListResponse, type LlmCreateParams as LlmCreateParams, type LlmRetrieveParams as LlmRetrieveParams, type LlmUpdateParams as LlmUpdateParams, };
package/index.d.ts CHANGED
@@ -6,6 +6,7 @@ import * as API from "./resources/index.js";
6
6
  import { Agent as AgentAPIAgent, AgentCreateParams, AgentGetVersionsResponse, AgentListResponse, AgentResponse, AgentRetrieveParams, AgentUpdateParams } from "./resources/agent.js";
7
7
  import { BatchCall, BatchCallCreateBatchCallParams, BatchCallResponse } from "./resources/batch-call.js";
8
8
  import { Call, CallCreatePhoneCallParams, CallCreateWebCallParams, CallListParams, CallListResponse, CallRegisterPhoneCallParams, CallResponse, CallUpdateParams, PhoneCallResponse, WebCallResponse } from "./resources/call.js";
9
+ import { Chat, ChatCreateChatCompletionParams, ChatCreateChatCompletionResponse, ChatCreateParams, ChatListResponse, ChatResponse } from "./resources/chat.js";
9
10
  import { Concurrency, ConcurrencyRetrieveResponse } from "./resources/concurrency.js";
10
11
  import { KnowledgeBase, KnowledgeBaseAddSourcesParams, KnowledgeBaseCreateParams, KnowledgeBaseListResponse, KnowledgeBaseResponse } from "./resources/knowledge-base.js";
11
12
  import { Llm, LlmCreateParams, LlmListResponse, LlmResponse, LlmRetrieveParams, LlmUpdateParams } from "./resources/llm.js";
@@ -83,6 +84,7 @@ export declare class Retell extends Core.APIClient {
83
84
  */
84
85
  constructor({ baseURL, apiKey, ...opts }: ClientOptions);
85
86
  call: API.Call;
87
+ chat: API.Chat;
86
88
  phoneNumber: API.PhoneNumber;
87
89
  agent: API.Agent;
88
90
  llm: API.Llm;
@@ -116,6 +118,7 @@ export declare class Retell extends Core.APIClient {
116
118
  export declare namespace Retell {
117
119
  export type RequestOptions = Core.RequestOptions;
118
120
  export { Call as Call, type CallResponse as CallResponse, type PhoneCallResponse as PhoneCallResponse, type WebCallResponse as WebCallResponse, type CallListResponse as CallListResponse, type CallUpdateParams as CallUpdateParams, type CallListParams as CallListParams, type CallCreatePhoneCallParams as CallCreatePhoneCallParams, type CallCreateWebCallParams as CallCreateWebCallParams, type CallRegisterPhoneCallParams as CallRegisterPhoneCallParams, };
121
+ export { Chat as Chat, type ChatResponse as ChatResponse, type ChatListResponse as ChatListResponse, type ChatCreateChatCompletionResponse as ChatCreateChatCompletionResponse, type ChatCreateParams as ChatCreateParams, type ChatCreateChatCompletionParams as ChatCreateChatCompletionParams, };
119
122
  export { PhoneNumber as PhoneNumber, type PhoneNumberResponse as PhoneNumberResponse, type PhoneNumberListResponse as PhoneNumberListResponse, type PhoneNumberCreateParams as PhoneNumberCreateParams, type PhoneNumberUpdateParams as PhoneNumberUpdateParams, type PhoneNumberImportParams as PhoneNumberImportParams, };
120
123
  export { AgentAPIAgent as Agent, type AgentResponse as AgentResponse, type AgentListResponse as AgentListResponse, type AgentGetVersionsResponse as AgentGetVersionsResponse, type AgentCreateParams as AgentCreateParams, type AgentRetrieveParams as AgentRetrieveParams, type AgentUpdateParams as AgentUpdateParams, };
121
124
  export { Llm as Llm, type LlmResponse as LlmResponse, type LlmListResponse as LlmListResponse, type LlmCreateParams as LlmCreateParams, type LlmRetrieveParams as LlmRetrieveParams, type LlmUpdateParams as LlmUpdateParams, };
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,KAAK,IAAI,aAAa,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACtG,OAAO,EACL,IAAI,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aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,eAAe,MAAM,CAAC"}
package/index.js CHANGED
@@ -33,6 +33,7 @@ const API = __importStar(require("./resources/index.js"));
33
33
  const agent_1 = require("./resources/agent.js");
34
34
  const batch_call_1 = require("./resources/batch-call.js");
35
35
  const call_1 = require("./resources/call.js");
36
+ const chat_1 = require("./resources/chat.js");
36
37
  const concurrency_1 = require("./resources/concurrency.js");
37
38
  const knowledge_base_1 = require("./resources/knowledge-base.js");
38
39
  const llm_1 = require("./resources/llm.js");
@@ -72,6 +73,7 @@ class Retell extends Core.APIClient {
72
73
  fetch: options.fetch,
73
74
  });
74
75
  this.call = new API.Call(this);
76
+ this.chat = new API.Chat(this);
75
77
  this.phoneNumber = new API.PhoneNumber(this);
76
78
  this.agent = new API.Agent(this);
77
79
  this.llm = new API.Llm(this);
@@ -117,6 +119,7 @@ Retell.fileFromPath = Uploads.fileFromPath;
117
119
  Retell.verify = Webhooks.verify;
118
120
  Retell.sign = Webhooks.sign;
119
121
  Retell.Call = call_1.Call;
122
+ Retell.Chat = chat_1.Chat;
120
123
  Retell.PhoneNumber = phone_number_1.PhoneNumber;
121
124
  Retell.Agent = agent_1.Agent;
122
125
  Retell.Llm = llm_1.Llm;
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,gDAA+B;AAC/B,mDAAkC;AAClC,sDAAqC;AACrC,0DAAyC;AACzC,gDAQ2B;AAC3B,0DAAsG;AACtG,8CAW0B;AAC1B,4DAAmF;AACnF,kEAMoC;AACpC,4CAOyB;AACzB,8DAOkC;AAClC,gDAA4E;AAC5E,sEAAwD;AA8DxD;;GAEG;AACH,MAAa,MAAO,SAAQ,IAAI,CAAC,SA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I,GAAG,WAAI,CAAC;AACnB,MAAM,CAAC,WAAW,GAAG,0BAAW,CAAC;AACjC,MAAM,CAAC,KAAK,GAAG,aAAa,CAAC;AAC7B,MAAM,CAAC,GAAG,GAAG,SAAG,CAAC;AACjB,MAAM,CAAC,aAAa,GAAG,8BAAa,CAAC;AACrC,MAAM,CAAC,KAAK,GAAG,aAAK,CAAC;AACrB,MAAM,CAAC,WAAW,GAAG,yBAAW,CAAC;AACjC,MAAM,CAAC,SAAS,GAAG,sBAAS,CAAC;AAyE7B,wCAAiD;AAAxC,iGAAA,MAAM,OAAA;AAAE,uGAAA,YAAY,OAAA;AAC7B,oCAciB;AAbf,oGAAA,WAAW,OAAA;AACX,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA;AAG1B,kBAAe,MAAM,CAAC"}
package/index.mjs CHANGED
@@ -7,6 +7,7 @@ import * as API from "./resources/index.mjs";
7
7
  import { Agent as AgentAPIAgent, } from "./resources/agent.mjs";
8
8
  import { BatchCall } from "./resources/batch-call.mjs";
9
9
  import { Call, } from "./resources/call.mjs";
10
+ import { Chat, } from "./resources/chat.mjs";
10
11
  import { Concurrency } from "./resources/concurrency.mjs";
11
12
  import { KnowledgeBase, } from "./resources/knowledge-base.mjs";
12
13
  import { Llm, } from "./resources/llm.mjs";
@@ -46,6 +47,7 @@ export class Retell extends Core.APIClient {
46
47
  fetch: options.fetch,
47
48
  });
48
49
  this.call = new API.Call(this);
50
+ this.chat = new API.Chat(this);
49
51
  this.phoneNumber = new API.PhoneNumber(this);
50
52
  this.agent = new API.Agent(this);
51
53
  this.llm = new API.Llm(this);
@@ -90,6 +92,7 @@ Retell.fileFromPath = Uploads.fileFromPath;
90
92
  Retell.verify = Webhooks.verify;
91
93
  Retell.sign = Webhooks.sign;
92
94
  Retell.Call = Call;
95
+ Retell.Chat = Chat;
93
96
  Retell.PhoneNumber = PhoneNumber;
94
97
  Retell.Agent = AgentAPIAgent;
95
98
  Retell.Llm = Llm;
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EACL,KAAK,IAAI,aAAa,GAOvB;OACM,EAAE,SAAS,EAAqD;OAChE,EACL,IAAI,GAUL;OACM,EAAE,WAAW,EAA+B;OAC5C,EACL,aAAa,GAKd;OACM,EACL,GAAG,GAMJ;OACM,EACL,WAAW,GAMZ;OACM,EAAE,KAAK,EAAoC;OAC3C,KAAK,QAAQ,MAAM,6BAA6B;AA8DvD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,IAAI,CAAC,SAAS;IAKxC;;;;;;;;;;;OAWG;IACH,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAiB;QACvF,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,MAAM,CAAC,WAAW,CAC1B,6JAA6J,CAC9J,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,GAAG,IAAI;YACP,OAAO,EAAE,OAAO,IAAI,0BAA0B;SAC/C,CAAC;QAEF,KAAK,CAAC;YACJ,OAAO,EAAE,OAAO,CAAC,OAAQ;YACzB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,cAAc;YAChD,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5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4
  "description": "The official TypeScript library for the Retell API",
5
5
  "author": "Retell <support@retellai.com>",
6
6
  "types": "./index.d.ts",
@@ -0,0 +1,447 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Chat extends APIResource {
4
+ /**
5
+ * Create a chat session
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const chatResponse = await client.chat.create({
10
+ * agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
11
+ * });
12
+ * ```
13
+ */
14
+ create(body: ChatCreateParams, options?: Core.RequestOptions): Core.APIPromise<ChatResponse>;
15
+ /**
16
+ * Retrieve details of a specific chat
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const chatResponse = await client.chat.retrieve(
21
+ * '16b980523634a6dc504898cda492e939',
22
+ * );
23
+ * ```
24
+ */
25
+ retrieve(chatId: string, options?: Core.RequestOptions): Core.APIPromise<ChatResponse>;
26
+ /**
27
+ * List all chats
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const chatResponses = await client.chat.list();
32
+ * ```
33
+ */
34
+ list(options?: Core.RequestOptions): Core.APIPromise<ChatListResponse>;
35
+ /**
36
+ * Create a chat completion message
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const response = await client.chat.createChatCompletion({
41
+ * chat_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
42
+ * content: 'hi how are you doing?',
43
+ * });
44
+ * ```
45
+ */
46
+ createChatCompletion(body: ChatCreateChatCompletionParams, options?: Core.RequestOptions): Core.APIPromise<ChatCreateChatCompletionResponse>;
47
+ /**
48
+ * End an ongoing chat
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * await client.chat.end('16b980523634a6dc504898cda492e939');
53
+ * ```
54
+ */
55
+ end(chatId: string, options?: Core.RequestOptions): Core.APIPromise<void>;
56
+ }
57
+ export interface ChatResponse {
58
+ /**
59
+ * Corresponding chat agent id of this chat.
60
+ */
61
+ agent_id: string;
62
+ /**
63
+ * Unique id of the chat.
64
+ */
65
+ chat_id: string;
66
+ /**
67
+ * Status of chat.
68
+ *
69
+ * - `ongoing`: Chat session is ongoing, chat agent can receive new message and
70
+ * generate response.
71
+ *
72
+ * - `ended`: Chat session has ended can not generate new response.
73
+ *
74
+ * - `error`: Chat encountered error.
75
+ */
76
+ chat_status: 'ongoing' | 'ended' | 'error';
77
+ /**
78
+ * Post chat analysis that includes information such as sentiment, status, summary,
79
+ * and custom defined data to extract. Available after chat ends. Subscribe to
80
+ * `chat_analyzed` webhook event type to receive it once ready.
81
+ */
82
+ chat_analysis?: ChatResponse.ChatAnalysis;
83
+ chat_cost?: ChatResponse.ChatCost;
84
+ /**
85
+ * End timestamp (milliseconds since epoch) of the chat. Available after chat ends.
86
+ */
87
+ end_timestamp?: number;
88
+ /**
89
+ * Transcript of the chat weaved with tool call invocation and results.
90
+ */
91
+ message_with_tool_calls?: Array<ChatResponse.Message | ChatResponse.ToolCallInvocationMessage | ChatResponse.ToolCallResultMessage | ChatResponse.NodeTransitionMessage | ChatResponse.StateTransitionMessage>;
92
+ /**
93
+ * An arbitrary object for storage purpose only. You can put anything here like
94
+ * your internal customer id associated with the chat. Not used for processing. You
95
+ * can later get this field from the chat object.
96
+ */
97
+ metadata?: unknown;
98
+ /**
99
+ * Add optional dynamic variables in key value pairs of string that injects into
100
+ * your Response Engine prompt and tool description. Only applicable for Response
101
+ * Engine.
102
+ */
103
+ retell_llm_dynamic_variables?: Record<string, unknown>;
104
+ /**
105
+ * Begin timestamp (milliseconds since epoch) of the chat. Available after chat
106
+ * starts.
107
+ */
108
+ start_timestamp?: number;
109
+ /**
110
+ * Transcription of the chat.
111
+ */
112
+ transcript?: string;
113
+ }
114
+ export declare namespace ChatResponse {
115
+ /**
116
+ * Post chat analysis that includes information such as sentiment, status, summary,
117
+ * and custom defined data to extract. Available after chat ends. Subscribe to
118
+ * `chat_analyzed` webhook event type to receive it once ready.
119
+ */
120
+ interface ChatAnalysis {
121
+ /**
122
+ * Whether the agent seems to have a successful chat with the user, where the agent
123
+ * finishes the task, and the call was complete without being cutoff.
124
+ */
125
+ chat_successful?: boolean;
126
+ /**
127
+ * A high level summary of the chat.
128
+ */
129
+ chat_summary?: string;
130
+ /**
131
+ * Custom analysis data that was extracted based on the schema defined in chat
132
+ * agent post chat analysis data. Can be empty if nothing is specified.
133
+ */
134
+ custom_analysis_data?: unknown;
135
+ /**
136
+ * Sentiment of the user in the chat.
137
+ */
138
+ user_sentiment?: 'Negative' | 'Positive' | 'Neutral' | 'Unknown';
139
+ }
140
+ interface ChatCost {
141
+ /**
142
+ * Combined cost of all individual costs in cents
143
+ */
144
+ combined_cost?: number;
145
+ /**
146
+ * List of products with their unit prices and costs in cents
147
+ */
148
+ product_costs?: Array<ChatCost.ProductCost>;
149
+ }
150
+ namespace ChatCost {
151
+ interface ProductCost {
152
+ /**
153
+ * Cost for the product in cents for the duration of the call.
154
+ */
155
+ cost: number;
156
+ /**
157
+ * Product name that has a cost associated with it.
158
+ */
159
+ product: string;
160
+ /**
161
+ * Unit price of the product in cents per second.
162
+ */
163
+ unitPrice: number;
164
+ }
165
+ }
166
+ interface Message {
167
+ /**
168
+ * Content of the message
169
+ */
170
+ content: string;
171
+ /**
172
+ * Create timestamp of the message
173
+ */
174
+ created_timestamp: number;
175
+ /**
176
+ * Unique id ot the message
177
+ */
178
+ message_id: string;
179
+ /**
180
+ * Documents whether this message is sent by agent or user.
181
+ */
182
+ role: 'agent' | 'user';
183
+ }
184
+ interface ToolCallInvocationMessage {
185
+ /**
186
+ * Arguments for this tool call, it's a stringified JSON object.
187
+ */
188
+ arguments: string;
189
+ /**
190
+ * Unique id ot the message
191
+ */
192
+ message_id: string;
193
+ /**
194
+ * Name of the function in this tool call.
195
+ */
196
+ name: string;
197
+ /**
198
+ * This is a tool call invocation.
199
+ */
200
+ role: 'tool_call_invocation';
201
+ /**
202
+ * Tool call id, globally unique.
203
+ */
204
+ tool_call_id: string;
205
+ /**
206
+ * Create timestamp of the message
207
+ */
208
+ created_timestamp?: number;
209
+ }
210
+ interface ToolCallResultMessage {
211
+ /**
212
+ * Result of the tool call, can be a string, a stringified json, etc.
213
+ */
214
+ content: string;
215
+ /**
216
+ * Create timestamp of the message
217
+ */
218
+ created_timestamp: number;
219
+ /**
220
+ * Unique id ot the message
221
+ */
222
+ message_id: string;
223
+ /**
224
+ * This is result of a tool call.
225
+ */
226
+ role: 'tool_call_result';
227
+ /**
228
+ * Tool call id, globally unique.
229
+ */
230
+ tool_call_id: string;
231
+ }
232
+ interface NodeTransitionMessage {
233
+ /**
234
+ * Create timestamp of the message
235
+ */
236
+ created_timestamp: number;
237
+ /**
238
+ * Unique id ot the message
239
+ */
240
+ message_id: string;
241
+ /**
242
+ * This is node transition.
243
+ */
244
+ role: 'node_transition';
245
+ /**
246
+ * Former node id
247
+ */
248
+ former_node_id?: string;
249
+ /**
250
+ * Former node name
251
+ */
252
+ former_node_name?: string;
253
+ /**
254
+ * New node id
255
+ */
256
+ new_node_id?: string;
257
+ /**
258
+ * New node name
259
+ */
260
+ new_node_name?: string;
261
+ }
262
+ interface StateTransitionMessage {
263
+ /**
264
+ * Create timestamp of the message
265
+ */
266
+ created_timestamp: number;
267
+ /**
268
+ * Unique id ot the message
269
+ */
270
+ message_id: string;
271
+ /**
272
+ * This is state transition for .
273
+ */
274
+ role: 'state_transition';
275
+ /**
276
+ * Former state name
277
+ */
278
+ former_state_name?: string;
279
+ /**
280
+ * New state name
281
+ */
282
+ new_state_name?: string;
283
+ }
284
+ }
285
+ export type ChatListResponse = Array<ChatResponse>;
286
+ export interface ChatCreateChatCompletionResponse {
287
+ /**
288
+ * Transcript of the chat completion weaved with tool call invocation and results.
289
+ */
290
+ messages: Array<ChatCreateChatCompletionResponse.Message | ChatCreateChatCompletionResponse.ToolCallInvocationMessage | ChatCreateChatCompletionResponse.ToolCallResultMessage | ChatCreateChatCompletionResponse.NodeTransitionMessage | ChatCreateChatCompletionResponse.StateTransitionMessage>;
291
+ }
292
+ export declare namespace ChatCreateChatCompletionResponse {
293
+ interface Message {
294
+ /**
295
+ * Content of the message
296
+ */
297
+ content: string;
298
+ /**
299
+ * Create timestamp of the message
300
+ */
301
+ created_timestamp: number;
302
+ /**
303
+ * Unique id ot the message
304
+ */
305
+ message_id: string;
306
+ /**
307
+ * Documents whether this message is sent by agent or user.
308
+ */
309
+ role: 'agent' | 'user';
310
+ }
311
+ interface ToolCallInvocationMessage {
312
+ /**
313
+ * Arguments for this tool call, it's a stringified JSON object.
314
+ */
315
+ arguments: string;
316
+ /**
317
+ * Unique id ot the message
318
+ */
319
+ message_id: string;
320
+ /**
321
+ * Name of the function in this tool call.
322
+ */
323
+ name: string;
324
+ /**
325
+ * This is a tool call invocation.
326
+ */
327
+ role: 'tool_call_invocation';
328
+ /**
329
+ * Tool call id, globally unique.
330
+ */
331
+ tool_call_id: string;
332
+ /**
333
+ * Create timestamp of the message
334
+ */
335
+ created_timestamp?: number;
336
+ }
337
+ interface ToolCallResultMessage {
338
+ /**
339
+ * Result of the tool call, can be a string, a stringified json, etc.
340
+ */
341
+ content: string;
342
+ /**
343
+ * Create timestamp of the message
344
+ */
345
+ created_timestamp: number;
346
+ /**
347
+ * Unique id ot the message
348
+ */
349
+ message_id: string;
350
+ /**
351
+ * This is result of a tool call.
352
+ */
353
+ role: 'tool_call_result';
354
+ /**
355
+ * Tool call id, globally unique.
356
+ */
357
+ tool_call_id: string;
358
+ }
359
+ interface NodeTransitionMessage {
360
+ /**
361
+ * Create timestamp of the message
362
+ */
363
+ created_timestamp: number;
364
+ /**
365
+ * Unique id ot the message
366
+ */
367
+ message_id: string;
368
+ /**
369
+ * This is node transition.
370
+ */
371
+ role: 'node_transition';
372
+ /**
373
+ * Former node id
374
+ */
375
+ former_node_id?: string;
376
+ /**
377
+ * Former node name
378
+ */
379
+ former_node_name?: string;
380
+ /**
381
+ * New node id
382
+ */
383
+ new_node_id?: string;
384
+ /**
385
+ * New node name
386
+ */
387
+ new_node_name?: string;
388
+ }
389
+ interface StateTransitionMessage {
390
+ /**
391
+ * Create timestamp of the message
392
+ */
393
+ created_timestamp: number;
394
+ /**
395
+ * Unique id ot the message
396
+ */
397
+ message_id: string;
398
+ /**
399
+ * This is state transition for .
400
+ */
401
+ role: 'state_transition';
402
+ /**
403
+ * Former state name
404
+ */
405
+ former_state_name?: string;
406
+ /**
407
+ * New state name
408
+ */
409
+ new_state_name?: string;
410
+ }
411
+ }
412
+ export interface ChatCreateParams {
413
+ /**
414
+ * The chat agent to use for the call.
415
+ */
416
+ agent_id: string;
417
+ /**
418
+ * The version of the chat agent to use for the call.
419
+ */
420
+ agent_version?: number;
421
+ /**
422
+ * An arbitrary object for storage purpose only. You can put anything here like
423
+ * your internal customer id associated with the chat. Not used for processing. You
424
+ * can later get this field from the chat object.
425
+ */
426
+ metadata?: unknown;
427
+ /**
428
+ * Add optional dynamic variables in key value pairs of string that injects into
429
+ * your Response Engine prompt and tool description. Only applicable for Response
430
+ * Engine.
431
+ */
432
+ retell_llm_dynamic_variables?: Record<string, unknown>;
433
+ }
434
+ export interface ChatCreateChatCompletionParams {
435
+ /**
436
+ * Unique id of the chat to create completion.
437
+ */
438
+ chat_id: string;
439
+ /**
440
+ * user message to generate agent chat completion.
441
+ */
442
+ content: string;
443
+ }
444
+ export declare namespace Chat {
445
+ export { type ChatResponse as ChatResponse, type ChatListResponse as ChatListResponse, type ChatCreateChatCompletionResponse as ChatCreateChatCompletionResponse, type ChatCreateParams as ChatCreateParams, type ChatCreateChatCompletionParams as ChatCreateChatCompletionParams, };
446
+ }
447
+ //# sourceMappingURL=chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../src/resources/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAA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