@runwayml/sdk 3.23.0 → 4.0.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 +21 -0
- package/client.d.mts +7 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -4
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/avatar-conversations.d.mts +648 -0
- package/resources/avatar-conversations.d.mts.map +1 -0
- package/resources/avatar-conversations.d.ts +648 -0
- package/resources/avatar-conversations.d.ts.map +1 -0
- package/resources/avatar-conversations.js +41 -0
- package/resources/avatar-conversations.js.map +1 -0
- package/resources/avatar-conversations.mjs +37 -0
- package/resources/avatar-conversations.mjs.map +1 -0
- package/resources/avatars.d.mts +63 -1
- package/resources/avatars.d.mts.map +1 -1
- package/resources/avatars.d.ts +63 -1
- package/resources/avatars.d.ts.map +1 -1
- package/resources/avatars.js +16 -0
- package/resources/avatars.js.map +1 -1
- package/resources/avatars.mjs +16 -0
- package/resources/avatars.mjs.map +1 -1
- package/resources/image-to-video.d.mts +58 -66
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +58 -66
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/image-to-video.js +0 -9
- package/resources/image-to-video.js.map +1 -1
- package/resources/image-to-video.mjs +0 -9
- package/resources/image-to-video.mjs.map +1 -1
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- 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/organization.d.mts +2 -2
- package/resources/organization.d.mts.map +1 -1
- package/resources/organization.d.ts +2 -2
- package/resources/organization.d.ts.map +1 -1
- package/resources/text-to-video.d.mts +75 -3
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +75 -3
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/video-to-video.d.mts +81 -93
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +81 -93
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-to-video.js +1 -1
- package/resources/video-to-video.mjs +1 -1
- package/resources/voices.d.mts +97 -1
- package/resources/voices.d.mts.map +1 -1
- package/resources/voices.d.ts +97 -1
- package/resources/voices.d.ts.map +1 -1
- package/resources/voices.js +6 -0
- package/resources/voices.js.map +1 -1
- package/resources/voices.mjs +6 -0
- package/resources/voices.mjs.map +1 -1
- package/src/client.ts +25 -0
- package/src/resources/avatar-conversations.ts +787 -0
- package/src/resources/avatars.ts +76 -0
- package/src/resources/image-to-video.ts +81 -76
- package/src/resources/index.ts +11 -0
- package/src/resources/organization.ts +5 -1
- package/src/resources/text-to-video.ts +101 -2
- package/src/resources/video-to-video.ts +106 -116
- package/src/resources/voices.ts +128 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -0,0 +1,787 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { buildHeaders } from '../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class AvatarConversations extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Get detailed information about a specific conversation, including the transcript
|
|
13
|
+
* and recording download URL when available. The conversation ID is the same value
|
|
14
|
+
* returned when the realtime session was created.
|
|
15
|
+
*/
|
|
16
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<AvatarConversationRetrieveResponse> {
|
|
17
|
+
return this._client.get(path`/v1/avatar_conversations/${id}`, options);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* List realtime avatar conversations for the authenticated user with cursor-based
|
|
22
|
+
* pagination. Each conversation corresponds to a realtime session, and the
|
|
23
|
+
* conversation ID matches the realtime session ID. Pass `avatar` to restrict
|
|
24
|
+
* results to a single avatar.
|
|
25
|
+
*/
|
|
26
|
+
list(
|
|
27
|
+
query: AvatarConversationListParams,
|
|
28
|
+
options?: RequestOptions,
|
|
29
|
+
): PagePromise<AvatarConversationListResponsesCursorPage, AvatarConversationListResponse> {
|
|
30
|
+
return this._client.getAPIList('/v1/avatar_conversations', CursorPage<AvatarConversationListResponse>, {
|
|
31
|
+
query,
|
|
32
|
+
...options,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Delete a conversation and its associated data.
|
|
38
|
+
*/
|
|
39
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
40
|
+
return this._client.delete(path`/v1/avatar_conversations/${id}`, {
|
|
41
|
+
...options,
|
|
42
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type AvatarConversationListResponsesCursorPage = CursorPage<AvatarConversationListResponse>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* A conversation that is currently active.
|
|
51
|
+
*/
|
|
52
|
+
export type AvatarConversationRetrieveResponse =
|
|
53
|
+
| AvatarConversationRetrieveResponse.InProgress
|
|
54
|
+
| AvatarConversationRetrieveResponse.Ended
|
|
55
|
+
| AvatarConversationRetrieveResponse.Failed;
|
|
56
|
+
|
|
57
|
+
export namespace AvatarConversationRetrieveResponse {
|
|
58
|
+
/**
|
|
59
|
+
* A conversation that is currently active.
|
|
60
|
+
*/
|
|
61
|
+
export interface InProgress {
|
|
62
|
+
/**
|
|
63
|
+
* Unique conversation identifier. This is the same value as the realtime session
|
|
64
|
+
* ID for the call.
|
|
65
|
+
*/
|
|
66
|
+
id: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The avatar used in this conversation.
|
|
70
|
+
*/
|
|
71
|
+
avatar: InProgress.RunwayPreset | InProgress.Custom | null;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* When the conversation was created.
|
|
75
|
+
*/
|
|
76
|
+
createdAt: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Elapsed duration in seconds, or null if not yet started.
|
|
80
|
+
*/
|
|
81
|
+
duration: number | null;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Maximum allowed duration in seconds, or null if not set.
|
|
85
|
+
*/
|
|
86
|
+
maxDuration: number | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Conversation name.
|
|
90
|
+
*/
|
|
91
|
+
name: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* A URL to download the conversation recording, or null if no recording is
|
|
95
|
+
* available. This URL will expire within 24-48 hours, fetch the conversation again
|
|
96
|
+
* to get a fresh download URL.
|
|
97
|
+
*/
|
|
98
|
+
recordingUrl: string | null;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* When the conversation started, or null if not yet started.
|
|
102
|
+
*/
|
|
103
|
+
startedAt: string | null;
|
|
104
|
+
|
|
105
|
+
status: 'in_progress';
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The tools that were configured for this conversation session. Empty if no tools
|
|
109
|
+
* were used.
|
|
110
|
+
*/
|
|
111
|
+
tools: Array<InProgress.Tool>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The conversation transcript.
|
|
115
|
+
*/
|
|
116
|
+
transcript: Array<InProgress.Transcript>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export namespace InProgress {
|
|
120
|
+
/**
|
|
121
|
+
* A preset avatar.
|
|
122
|
+
*/
|
|
123
|
+
export interface RunwayPreset {
|
|
124
|
+
/**
|
|
125
|
+
* The preset avatar ID.
|
|
126
|
+
*/
|
|
127
|
+
presetId: string;
|
|
128
|
+
|
|
129
|
+
type: 'runway-preset';
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A custom avatar created by the user.
|
|
134
|
+
*/
|
|
135
|
+
export interface Custom {
|
|
136
|
+
/**
|
|
137
|
+
* The custom avatar ID, or null if deleted.
|
|
138
|
+
*/
|
|
139
|
+
id: string | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* URL to the avatar image, or null if unavailable.
|
|
143
|
+
*/
|
|
144
|
+
imageUrl: string | null;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The avatar name, or null if unavailable.
|
|
148
|
+
*/
|
|
149
|
+
name: string | null;
|
|
150
|
+
|
|
151
|
+
type: 'custom';
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Summary of a tool configured for the session.
|
|
156
|
+
*/
|
|
157
|
+
export interface Tool {
|
|
158
|
+
/**
|
|
159
|
+
* A description of when and how the tool should be used.
|
|
160
|
+
*/
|
|
161
|
+
description: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The tool name.
|
|
165
|
+
*/
|
|
166
|
+
name: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The tool type.
|
|
170
|
+
*/
|
|
171
|
+
type: 'client_event' | 'backend_rpc';
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* A single entry in the conversation transcript.
|
|
176
|
+
*/
|
|
177
|
+
export interface Transcript {
|
|
178
|
+
/**
|
|
179
|
+
* The spoken text, or null for tool-only turns.
|
|
180
|
+
*/
|
|
181
|
+
content: string | null;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Who produced this transcript entry.
|
|
185
|
+
*/
|
|
186
|
+
role: 'user' | 'assistant';
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* When this entry occurred, or null if unavailable.
|
|
190
|
+
*/
|
|
191
|
+
timestamp: string | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Tool invocations made during this assistant turn. Only present on assistant
|
|
195
|
+
* entries.
|
|
196
|
+
*/
|
|
197
|
+
toolCalls?: Array<Transcript.ToolCall>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Tool results received during this assistant turn. Only present on assistant
|
|
201
|
+
* entries.
|
|
202
|
+
*/
|
|
203
|
+
toolResults?: Array<Transcript.ToolResult>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export namespace Transcript {
|
|
207
|
+
/**
|
|
208
|
+
* A tool invocation by the assistant.
|
|
209
|
+
*/
|
|
210
|
+
export interface ToolCall {
|
|
211
|
+
/**
|
|
212
|
+
* The arguments passed to the tool.
|
|
213
|
+
*/
|
|
214
|
+
arguments: { [key: string]: unknown };
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The name of the tool that was called.
|
|
218
|
+
*/
|
|
219
|
+
name: string;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Optional identifier linking this call to its result.
|
|
223
|
+
*/
|
|
224
|
+
id?: string;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* The result of a tool invocation.
|
|
229
|
+
*/
|
|
230
|
+
export interface ToolResult {
|
|
231
|
+
/**
|
|
232
|
+
* The name of the tool that returned a result.
|
|
233
|
+
*/
|
|
234
|
+
name: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Optional identifier linking this result to its call.
|
|
238
|
+
*/
|
|
239
|
+
id?: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* How long the tool call took in milliseconds.
|
|
243
|
+
*/
|
|
244
|
+
durationMs?: number | null;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Error message if the tool call failed.
|
|
248
|
+
*/
|
|
249
|
+
error?: string | null;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* The tool result (object, string, or null).
|
|
253
|
+
*/
|
|
254
|
+
result?: { [key: string]: unknown } | string | null;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* A conversation that completed successfully.
|
|
261
|
+
*/
|
|
262
|
+
export interface Ended {
|
|
263
|
+
/**
|
|
264
|
+
* Unique conversation identifier. This is the same value as the realtime session
|
|
265
|
+
* ID for the call.
|
|
266
|
+
*/
|
|
267
|
+
id: string;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The avatar used in this conversation.
|
|
271
|
+
*/
|
|
272
|
+
avatar: Ended.RunwayPreset | Ended.Custom | null;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* When the conversation was created.
|
|
276
|
+
*/
|
|
277
|
+
createdAt: string;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Duration of the conversation in seconds.
|
|
281
|
+
*/
|
|
282
|
+
duration: number | null;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* When the conversation ended.
|
|
286
|
+
*/
|
|
287
|
+
endedAt: string | null;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Maximum allowed duration in seconds, or null if not set.
|
|
291
|
+
*/
|
|
292
|
+
maxDuration: number | null;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Conversation name.
|
|
296
|
+
*/
|
|
297
|
+
name: string;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* A URL to download the conversation recording, or null if no recording is
|
|
301
|
+
* available. This URL will expire within 24-48 hours, fetch the conversation again
|
|
302
|
+
* to get a fresh download URL.
|
|
303
|
+
*/
|
|
304
|
+
recordingUrl: string | null;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* When the conversation started.
|
|
308
|
+
*/
|
|
309
|
+
startedAt: string | null;
|
|
310
|
+
|
|
311
|
+
status: 'ended';
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* The tools that were configured for this conversation session. Empty if no tools
|
|
315
|
+
* were used.
|
|
316
|
+
*/
|
|
317
|
+
tools: Array<Ended.Tool>;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* The conversation transcript.
|
|
321
|
+
*/
|
|
322
|
+
transcript: Array<Ended.Transcript>;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export namespace Ended {
|
|
326
|
+
/**
|
|
327
|
+
* A preset avatar.
|
|
328
|
+
*/
|
|
329
|
+
export interface RunwayPreset {
|
|
330
|
+
/**
|
|
331
|
+
* The preset avatar ID.
|
|
332
|
+
*/
|
|
333
|
+
presetId: string;
|
|
334
|
+
|
|
335
|
+
type: 'runway-preset';
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* A custom avatar created by the user.
|
|
340
|
+
*/
|
|
341
|
+
export interface Custom {
|
|
342
|
+
/**
|
|
343
|
+
* The custom avatar ID, or null if deleted.
|
|
344
|
+
*/
|
|
345
|
+
id: string | null;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* URL to the avatar image, or null if unavailable.
|
|
349
|
+
*/
|
|
350
|
+
imageUrl: string | null;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* The avatar name, or null if unavailable.
|
|
354
|
+
*/
|
|
355
|
+
name: string | null;
|
|
356
|
+
|
|
357
|
+
type: 'custom';
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Summary of a tool configured for the session.
|
|
362
|
+
*/
|
|
363
|
+
export interface Tool {
|
|
364
|
+
/**
|
|
365
|
+
* A description of when and how the tool should be used.
|
|
366
|
+
*/
|
|
367
|
+
description: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* The tool name.
|
|
371
|
+
*/
|
|
372
|
+
name: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* The tool type.
|
|
376
|
+
*/
|
|
377
|
+
type: 'client_event' | 'backend_rpc';
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* A single entry in the conversation transcript.
|
|
382
|
+
*/
|
|
383
|
+
export interface Transcript {
|
|
384
|
+
/**
|
|
385
|
+
* The spoken text, or null for tool-only turns.
|
|
386
|
+
*/
|
|
387
|
+
content: string | null;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Who produced this transcript entry.
|
|
391
|
+
*/
|
|
392
|
+
role: 'user' | 'assistant';
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* When this entry occurred, or null if unavailable.
|
|
396
|
+
*/
|
|
397
|
+
timestamp: string | null;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Tool invocations made during this assistant turn. Only present on assistant
|
|
401
|
+
* entries.
|
|
402
|
+
*/
|
|
403
|
+
toolCalls?: Array<Transcript.ToolCall>;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Tool results received during this assistant turn. Only present on assistant
|
|
407
|
+
* entries.
|
|
408
|
+
*/
|
|
409
|
+
toolResults?: Array<Transcript.ToolResult>;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export namespace Transcript {
|
|
413
|
+
/**
|
|
414
|
+
* A tool invocation by the assistant.
|
|
415
|
+
*/
|
|
416
|
+
export interface ToolCall {
|
|
417
|
+
/**
|
|
418
|
+
* The arguments passed to the tool.
|
|
419
|
+
*/
|
|
420
|
+
arguments: { [key: string]: unknown };
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* The name of the tool that was called.
|
|
424
|
+
*/
|
|
425
|
+
name: string;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Optional identifier linking this call to its result.
|
|
429
|
+
*/
|
|
430
|
+
id?: string;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The result of a tool invocation.
|
|
435
|
+
*/
|
|
436
|
+
export interface ToolResult {
|
|
437
|
+
/**
|
|
438
|
+
* The name of the tool that returned a result.
|
|
439
|
+
*/
|
|
440
|
+
name: string;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Optional identifier linking this result to its call.
|
|
444
|
+
*/
|
|
445
|
+
id?: string;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* How long the tool call took in milliseconds.
|
|
449
|
+
*/
|
|
450
|
+
durationMs?: number | null;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Error message if the tool call failed.
|
|
454
|
+
*/
|
|
455
|
+
error?: string | null;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* The tool result (object, string, or null).
|
|
459
|
+
*/
|
|
460
|
+
result?: { [key: string]: unknown } | string | null;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* A conversation that ended due to an error.
|
|
467
|
+
*/
|
|
468
|
+
export interface Failed {
|
|
469
|
+
/**
|
|
470
|
+
* Unique conversation identifier. This is the same value as the realtime session
|
|
471
|
+
* ID for the call.
|
|
472
|
+
*/
|
|
473
|
+
id: string;
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* The avatar used in this conversation.
|
|
477
|
+
*/
|
|
478
|
+
avatar: Failed.RunwayPreset | Failed.Custom | null;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* When the conversation was created.
|
|
482
|
+
*/
|
|
483
|
+
createdAt: string;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Duration in seconds, or null if the conversation failed before starting.
|
|
487
|
+
*/
|
|
488
|
+
duration: number | null;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* When the conversation ended, or null if it failed before starting.
|
|
492
|
+
*/
|
|
493
|
+
endedAt: string | null;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* A human-friendly reason for the failure. We do not recommend returning this to
|
|
497
|
+
* users directly without adding context.
|
|
498
|
+
*/
|
|
499
|
+
failure: string;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* A machine-readable error code for the failure. See
|
|
503
|
+
* https://docs.dev.runwayml.com/errors/task-failures/ for more information.
|
|
504
|
+
*/
|
|
505
|
+
failureCode: string;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Maximum allowed duration in seconds, or null if not set.
|
|
509
|
+
*/
|
|
510
|
+
maxDuration: number | null;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Conversation name.
|
|
514
|
+
*/
|
|
515
|
+
name: string;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* A URL to download the conversation recording, or null if no recording is
|
|
519
|
+
* available. This URL will expire within 24-48 hours, fetch the conversation again
|
|
520
|
+
* to get a fresh download URL.
|
|
521
|
+
*/
|
|
522
|
+
recordingUrl: string | null;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* When the conversation started, or null if it failed before starting.
|
|
526
|
+
*/
|
|
527
|
+
startedAt: string | null;
|
|
528
|
+
|
|
529
|
+
status: 'failed';
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* The tools that were configured for this conversation session. Empty if no tools
|
|
533
|
+
* were used.
|
|
534
|
+
*/
|
|
535
|
+
tools: Array<Failed.Tool>;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* The conversation transcript.
|
|
539
|
+
*/
|
|
540
|
+
transcript: Array<Failed.Transcript>;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export namespace Failed {
|
|
544
|
+
/**
|
|
545
|
+
* A preset avatar.
|
|
546
|
+
*/
|
|
547
|
+
export interface RunwayPreset {
|
|
548
|
+
/**
|
|
549
|
+
* The preset avatar ID.
|
|
550
|
+
*/
|
|
551
|
+
presetId: string;
|
|
552
|
+
|
|
553
|
+
type: 'runway-preset';
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* A custom avatar created by the user.
|
|
558
|
+
*/
|
|
559
|
+
export interface Custom {
|
|
560
|
+
/**
|
|
561
|
+
* The custom avatar ID, or null if deleted.
|
|
562
|
+
*/
|
|
563
|
+
id: string | null;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* URL to the avatar image, or null if unavailable.
|
|
567
|
+
*/
|
|
568
|
+
imageUrl: string | null;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* The avatar name, or null if unavailable.
|
|
572
|
+
*/
|
|
573
|
+
name: string | null;
|
|
574
|
+
|
|
575
|
+
type: 'custom';
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Summary of a tool configured for the session.
|
|
580
|
+
*/
|
|
581
|
+
export interface Tool {
|
|
582
|
+
/**
|
|
583
|
+
* A description of when and how the tool should be used.
|
|
584
|
+
*/
|
|
585
|
+
description: string;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The tool name.
|
|
589
|
+
*/
|
|
590
|
+
name: string;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* The tool type.
|
|
594
|
+
*/
|
|
595
|
+
type: 'client_event' | 'backend_rpc';
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* A single entry in the conversation transcript.
|
|
600
|
+
*/
|
|
601
|
+
export interface Transcript {
|
|
602
|
+
/**
|
|
603
|
+
* The spoken text, or null for tool-only turns.
|
|
604
|
+
*/
|
|
605
|
+
content: string | null;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Who produced this transcript entry.
|
|
609
|
+
*/
|
|
610
|
+
role: 'user' | 'assistant';
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* When this entry occurred, or null if unavailable.
|
|
614
|
+
*/
|
|
615
|
+
timestamp: string | null;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Tool invocations made during this assistant turn. Only present on assistant
|
|
619
|
+
* entries.
|
|
620
|
+
*/
|
|
621
|
+
toolCalls?: Array<Transcript.ToolCall>;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Tool results received during this assistant turn. Only present on assistant
|
|
625
|
+
* entries.
|
|
626
|
+
*/
|
|
627
|
+
toolResults?: Array<Transcript.ToolResult>;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
export namespace Transcript {
|
|
631
|
+
/**
|
|
632
|
+
* A tool invocation by the assistant.
|
|
633
|
+
*/
|
|
634
|
+
export interface ToolCall {
|
|
635
|
+
/**
|
|
636
|
+
* The arguments passed to the tool.
|
|
637
|
+
*/
|
|
638
|
+
arguments: { [key: string]: unknown };
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* The name of the tool that was called.
|
|
642
|
+
*/
|
|
643
|
+
name: string;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Optional identifier linking this call to its result.
|
|
647
|
+
*/
|
|
648
|
+
id?: string;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* The result of a tool invocation.
|
|
653
|
+
*/
|
|
654
|
+
export interface ToolResult {
|
|
655
|
+
/**
|
|
656
|
+
* The name of the tool that returned a result.
|
|
657
|
+
*/
|
|
658
|
+
name: string;
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Optional identifier linking this result to its call.
|
|
662
|
+
*/
|
|
663
|
+
id?: string;
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* How long the tool call took in milliseconds.
|
|
667
|
+
*/
|
|
668
|
+
durationMs?: number | null;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Error message if the tool call failed.
|
|
672
|
+
*/
|
|
673
|
+
error?: string | null;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* The tool result (object, string, or null).
|
|
677
|
+
*/
|
|
678
|
+
result?: { [key: string]: unknown } | string | null;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Summary of a conversation for list responses.
|
|
686
|
+
*/
|
|
687
|
+
export interface AvatarConversationListResponse {
|
|
688
|
+
/**
|
|
689
|
+
* Unique conversation identifier. This is the same value as the realtime session
|
|
690
|
+
* ID for the call.
|
|
691
|
+
*/
|
|
692
|
+
id: string;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* The avatar used in this conversation.
|
|
696
|
+
*/
|
|
697
|
+
avatar: AvatarConversationListResponse.RunwayPreset | AvatarConversationListResponse.Custom | null;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* When the conversation was created.
|
|
701
|
+
*/
|
|
702
|
+
createdAt: string;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Duration of the conversation in seconds, or null if not started.
|
|
706
|
+
*/
|
|
707
|
+
duration: number | null;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Whether tools were configured for this conversation session.
|
|
711
|
+
*/
|
|
712
|
+
hasTools: boolean;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Conversation name (auto-generated or user-provided).
|
|
716
|
+
*/
|
|
717
|
+
name: string;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* The status of the conversation. `in_progress` means the session is active,
|
|
721
|
+
* `ended` means it completed successfully, `failed` means it ended due to an
|
|
722
|
+
* error.
|
|
723
|
+
*/
|
|
724
|
+
status: 'in_progress' | 'ended' | 'failed';
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export namespace AvatarConversationListResponse {
|
|
728
|
+
/**
|
|
729
|
+
* A preset avatar.
|
|
730
|
+
*/
|
|
731
|
+
export interface RunwayPreset {
|
|
732
|
+
/**
|
|
733
|
+
* The preset avatar's display name (e.g. "Mina").
|
|
734
|
+
*/
|
|
735
|
+
name: string;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* The preset avatar ID.
|
|
739
|
+
*/
|
|
740
|
+
presetId: string;
|
|
741
|
+
|
|
742
|
+
type: 'runway-preset';
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* A custom avatar created by the user.
|
|
747
|
+
*/
|
|
748
|
+
export interface Custom {
|
|
749
|
+
/**
|
|
750
|
+
* The custom avatar ID, or null if deleted.
|
|
751
|
+
*/
|
|
752
|
+
id: string | null;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* The avatar's configured name, or null if unavailable.
|
|
756
|
+
*/
|
|
757
|
+
name: string | null;
|
|
758
|
+
|
|
759
|
+
type: 'custom';
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export interface AvatarConversationListParams extends CursorPageParams {
|
|
764
|
+
/**
|
|
765
|
+
* Filter to conversations that used the given custom avatar.
|
|
766
|
+
*/
|
|
767
|
+
avatar?: string;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Filter conversations created before this timestamp (exclusive).
|
|
771
|
+
*/
|
|
772
|
+
endDate?: string;
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Filter conversations created on or after this timestamp (inclusive).
|
|
776
|
+
*/
|
|
777
|
+
startDate?: string;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export declare namespace AvatarConversations {
|
|
781
|
+
export {
|
|
782
|
+
type AvatarConversationRetrieveResponse as AvatarConversationRetrieveResponse,
|
|
783
|
+
type AvatarConversationListResponse as AvatarConversationListResponse,
|
|
784
|
+
type AvatarConversationListResponsesCursorPage as AvatarConversationListResponsesCursorPage,
|
|
785
|
+
type AvatarConversationListParams as AvatarConversationListParams,
|
|
786
|
+
};
|
|
787
|
+
}
|