@aviaryhq/cloudglue-js 0.5.9 → 0.6.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.
@@ -0,0 +1,727 @@
1
+ import { type ZodiosOptions } from '@zodios/core';
2
+ import { z } from 'zod';
3
+ type CreateResponseRequest = {
4
+ model: 'nimbus-001';
5
+ input: string | Array<ResponseInputMessage>;
6
+ instructions?: (string | null) | undefined;
7
+ temperature?: number | undefined;
8
+ knowledge_base: ResponseKnowledgeBase;
9
+ include?: Array<'cloudglue_citations.media_descriptions'> | undefined;
10
+ background?: boolean | undefined;
11
+ };
12
+ type ResponseOutputMessage = Partial<{
13
+ type: 'message';
14
+ role: 'assistant';
15
+ content: Array<ResponseOutputContent>;
16
+ }>;
17
+ type ResponseOutputContent = Partial<{
18
+ type: 'output_text';
19
+ text: string;
20
+ annotations: Array<ResponseAnnotation>;
21
+ }>;
22
+ type ResponseAnnotation = Partial<{
23
+ type: 'cloudglue_citation';
24
+ collection_id: string;
25
+ file_id: string;
26
+ segment_id: string;
27
+ start_time: number;
28
+ end_time: number;
29
+ context: string;
30
+ relevant_sources: Array<string>;
31
+ visual_scene_description: Array<string>;
32
+ scene_text: Array<string>;
33
+ speech: Array<string>;
34
+ audio_description: Array<string>;
35
+ }>;
36
+ type ResponseUsage = Partial<{
37
+ input_tokens: number;
38
+ output_tokens: number;
39
+ total_tokens: number;
40
+ }>;
41
+ type ResponseError = Partial<{
42
+ message: string;
43
+ type: string;
44
+ code: string;
45
+ }>;
46
+ type ResponseInputMessage = {
47
+ type: 'message';
48
+ role: 'developer' | 'user' | 'assistant';
49
+ content: Array<ResponseInputContent>;
50
+ };
51
+ type ResponseInputContent = {
52
+ type: 'input_text';
53
+ text: string;
54
+ };
55
+ type ResponseKnowledgeBase = {
56
+ collections: Array<string>;
57
+ filter?: Partial<{
58
+ file_ids: Array<string>;
59
+ }> | undefined;
60
+ };
61
+ type ResponseListItem = Partial<{
62
+ id: string;
63
+ object: 'response';
64
+ status: 'in_progress' | 'completed' | 'failed' | 'cancelled';
65
+ created_at: number;
66
+ model: string;
67
+ instructions: string | null;
68
+ usage: ResponseUsage;
69
+ }>;
70
+ declare const ResponseInputContent: z.ZodType<ResponseInputContent>;
71
+ declare const ResponseInputMessage: z.ZodType<ResponseInputMessage>;
72
+ declare const ResponseKnowledgeBase: z.ZodType<ResponseKnowledgeBase>;
73
+ declare const CreateResponseRequest: z.ZodType<CreateResponseRequest>;
74
+ declare const ResponseAnnotation: z.ZodType<ResponseAnnotation>;
75
+ declare const ResponseOutputContent: z.ZodType<ResponseOutputContent>;
76
+ declare const ResponseOutputMessage: z.ZodType<ResponseOutputMessage>;
77
+ declare const ResponseUsage: z.ZodType<ResponseUsage>;
78
+ declare const ResponseError: z.ZodType<ResponseError>;
79
+ declare const ResponseListItem: z.ZodType<ResponseListItem>;
80
+ export declare const schemas: {
81
+ ResponseInputContent: z.ZodType<ResponseInputContent, z.ZodTypeDef, ResponseInputContent>;
82
+ ResponseInputMessage: z.ZodType<ResponseInputMessage, z.ZodTypeDef, ResponseInputMessage>;
83
+ ResponseKnowledgeBase: z.ZodType<ResponseKnowledgeBase, z.ZodTypeDef, ResponseKnowledgeBase>;
84
+ CreateResponseRequest: z.ZodType<CreateResponseRequest, z.ZodTypeDef, CreateResponseRequest>;
85
+ ResponseAnnotation: z.ZodType<Partial<{
86
+ type: "cloudglue_citation";
87
+ collection_id: string;
88
+ file_id: string;
89
+ segment_id: string;
90
+ start_time: number;
91
+ end_time: number;
92
+ context: string;
93
+ relevant_sources: Array<string>;
94
+ visual_scene_description: Array<string>;
95
+ scene_text: Array<string>;
96
+ speech: Array<string>;
97
+ audio_description: Array<string>;
98
+ }>, z.ZodTypeDef, Partial<{
99
+ type: "cloudglue_citation";
100
+ collection_id: string;
101
+ file_id: string;
102
+ segment_id: string;
103
+ start_time: number;
104
+ end_time: number;
105
+ context: string;
106
+ relevant_sources: Array<string>;
107
+ visual_scene_description: Array<string>;
108
+ scene_text: Array<string>;
109
+ speech: Array<string>;
110
+ audio_description: Array<string>;
111
+ }>>;
112
+ ResponseOutputContent: z.ZodType<Partial<{
113
+ type: "output_text";
114
+ text: string;
115
+ annotations: Array<ResponseAnnotation>;
116
+ }>, z.ZodTypeDef, Partial<{
117
+ type: "output_text";
118
+ text: string;
119
+ annotations: Array<ResponseAnnotation>;
120
+ }>>;
121
+ ResponseOutputMessage: z.ZodType<Partial<{
122
+ type: "message";
123
+ role: "assistant";
124
+ content: Array<ResponseOutputContent>;
125
+ }>, z.ZodTypeDef, Partial<{
126
+ type: "message";
127
+ role: "assistant";
128
+ content: Array<ResponseOutputContent>;
129
+ }>>;
130
+ ResponseUsage: z.ZodType<Partial<{
131
+ input_tokens: number;
132
+ output_tokens: number;
133
+ total_tokens: number;
134
+ }>, z.ZodTypeDef, Partial<{
135
+ input_tokens: number;
136
+ output_tokens: number;
137
+ total_tokens: number;
138
+ }>>;
139
+ ResponseError: z.ZodType<Partial<{
140
+ message: string;
141
+ type: string;
142
+ code: string;
143
+ }>, z.ZodTypeDef, Partial<{
144
+ message: string;
145
+ type: string;
146
+ code: string;
147
+ }>>;
148
+ Response: z.ZodType<Partial<{
149
+ id: string;
150
+ object: "response";
151
+ status: "in_progress" | "completed" | "failed" | "cancelled";
152
+ created_at: number;
153
+ model: string;
154
+ instructions: string | null;
155
+ output: Array<ResponseOutputMessage> | null;
156
+ usage: ResponseUsage;
157
+ error: ResponseError | null;
158
+ }>, z.ZodTypeDef, Partial<{
159
+ id: string;
160
+ object: "response";
161
+ status: "in_progress" | "completed" | "failed" | "cancelled";
162
+ created_at: number;
163
+ model: string;
164
+ instructions: string | null;
165
+ output: Array<ResponseOutputMessage> | null;
166
+ usage: ResponseUsage;
167
+ error: ResponseError | null;
168
+ }>>;
169
+ ResponseListItem: z.ZodType<Partial<{
170
+ id: string;
171
+ object: "response";
172
+ status: "in_progress" | "completed" | "failed" | "cancelled";
173
+ created_at: number;
174
+ model: string;
175
+ instructions: string | null;
176
+ usage: ResponseUsage;
177
+ }>, z.ZodTypeDef, Partial<{
178
+ id: string;
179
+ object: "response";
180
+ status: "in_progress" | "completed" | "failed" | "cancelled";
181
+ created_at: number;
182
+ model: string;
183
+ instructions: string | null;
184
+ usage: ResponseUsage;
185
+ }>>;
186
+ ResponseList: z.ZodType<Partial<{
187
+ object: "list";
188
+ data: Array<ResponseListItem>;
189
+ total: number;
190
+ limit: number;
191
+ offset: number;
192
+ }>, z.ZodTypeDef, Partial<{
193
+ object: "list";
194
+ data: Array<ResponseListItem>;
195
+ total: number;
196
+ limit: number;
197
+ offset: number;
198
+ }>>;
199
+ DeleteResponseResult: z.ZodObject<{
200
+ id: z.ZodOptional<z.ZodString>;
201
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
202
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
203
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
204
+ id: z.ZodOptional<z.ZodString>;
205
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
206
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
207
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
208
+ id: z.ZodOptional<z.ZodString>;
209
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
210
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
211
+ }, z.ZodTypeAny, "passthrough">>;
212
+ };
213
+ export declare const ResponseApi: import("@zodios/core").ZodiosInstance<[{
214
+ method: "post";
215
+ path: "/responses";
216
+ alias: "createResponse";
217
+ description: "Create a new response using the Response API. This endpoint provides an OpenAI Responses-compatible interface for chat completions with video collections.\n\nThe response can be processed synchronously (default) or asynchronously using the &#x60;background&#x60; parameter.";
218
+ requestFormat: "json";
219
+ parameters: [{
220
+ name: "body";
221
+ description: string;
222
+ type: "Body";
223
+ schema: z.ZodType<CreateResponseRequest, z.ZodTypeDef, CreateResponseRequest>;
224
+ }];
225
+ response: z.ZodType<Partial<{
226
+ id: string;
227
+ object: "response";
228
+ status: "in_progress" | "completed" | "failed" | "cancelled";
229
+ created_at: number;
230
+ model: string;
231
+ instructions: string | null;
232
+ output: Array<ResponseOutputMessage> | null;
233
+ usage: ResponseUsage;
234
+ error: ResponseError | null;
235
+ }>, z.ZodTypeDef, Partial<{
236
+ id: string;
237
+ object: "response";
238
+ status: "in_progress" | "completed" | "failed" | "cancelled";
239
+ created_at: number;
240
+ model: string;
241
+ instructions: string | null;
242
+ output: Array<ResponseOutputMessage> | null;
243
+ usage: ResponseUsage;
244
+ error: ResponseError | null;
245
+ }>>;
246
+ errors: [{
247
+ status: 400;
248
+ description: string;
249
+ schema: z.ZodObject<{
250
+ error: z.ZodString;
251
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
252
+ error: z.ZodString;
253
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
254
+ error: z.ZodString;
255
+ }, z.ZodTypeAny, "passthrough">>;
256
+ }, {
257
+ status: 404;
258
+ description: string;
259
+ schema: z.ZodObject<{
260
+ error: z.ZodString;
261
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
262
+ error: z.ZodString;
263
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
264
+ error: z.ZodString;
265
+ }, z.ZodTypeAny, "passthrough">>;
266
+ }, {
267
+ status: 500;
268
+ description: string;
269
+ schema: z.ZodObject<{
270
+ error: z.ZodString;
271
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
272
+ error: z.ZodString;
273
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
274
+ error: z.ZodString;
275
+ }, z.ZodTypeAny, "passthrough">>;
276
+ }];
277
+ }, {
278
+ method: "get";
279
+ path: "/responses";
280
+ alias: "listResponses";
281
+ description: "List all responses with pagination and filtering options.";
282
+ requestFormat: "json";
283
+ parameters: [{
284
+ name: "limit";
285
+ type: "Query";
286
+ schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
287
+ }, {
288
+ name: "offset";
289
+ type: "Query";
290
+ schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
291
+ }, {
292
+ name: "status";
293
+ type: "Query";
294
+ schema: z.ZodOptional<z.ZodEnum<["in_progress", "completed", "failed", "cancelled"]>>;
295
+ }, {
296
+ name: "created_before";
297
+ type: "Query";
298
+ schema: z.ZodOptional<z.ZodString>;
299
+ }, {
300
+ name: "created_after";
301
+ type: "Query";
302
+ schema: z.ZodOptional<z.ZodString>;
303
+ }];
304
+ response: z.ZodType<Partial<{
305
+ object: "list";
306
+ data: Array<ResponseListItem>;
307
+ total: number;
308
+ limit: number;
309
+ offset: number;
310
+ }>, z.ZodTypeDef, Partial<{
311
+ object: "list";
312
+ data: Array<ResponseListItem>;
313
+ total: number;
314
+ limit: number;
315
+ offset: number;
316
+ }>>;
317
+ errors: [{
318
+ status: 500;
319
+ description: string;
320
+ schema: z.ZodObject<{
321
+ error: z.ZodString;
322
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
323
+ error: z.ZodString;
324
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
325
+ error: z.ZodString;
326
+ }, z.ZodTypeAny, "passthrough">>;
327
+ }];
328
+ }, {
329
+ method: "get";
330
+ path: "/responses/:id";
331
+ alias: "getResponse";
332
+ description: "Retrieve a specific response by its ID.";
333
+ requestFormat: "json";
334
+ parameters: [{
335
+ name: "id";
336
+ type: "Path";
337
+ schema: z.ZodString;
338
+ }];
339
+ response: z.ZodType<Partial<{
340
+ id: string;
341
+ object: "response";
342
+ status: "in_progress" | "completed" | "failed" | "cancelled";
343
+ created_at: number;
344
+ model: string;
345
+ instructions: string | null;
346
+ output: Array<ResponseOutputMessage> | null;
347
+ usage: ResponseUsage;
348
+ error: ResponseError | null;
349
+ }>, z.ZodTypeDef, Partial<{
350
+ id: string;
351
+ object: "response";
352
+ status: "in_progress" | "completed" | "failed" | "cancelled";
353
+ created_at: number;
354
+ model: string;
355
+ instructions: string | null;
356
+ output: Array<ResponseOutputMessage> | null;
357
+ usage: ResponseUsage;
358
+ error: ResponseError | null;
359
+ }>>;
360
+ errors: [{
361
+ status: 404;
362
+ description: string;
363
+ schema: z.ZodObject<{
364
+ error: z.ZodString;
365
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
366
+ error: z.ZodString;
367
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
368
+ error: z.ZodString;
369
+ }, z.ZodTypeAny, "passthrough">>;
370
+ }, {
371
+ status: 500;
372
+ description: string;
373
+ schema: z.ZodObject<{
374
+ error: z.ZodString;
375
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
376
+ error: z.ZodString;
377
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
378
+ error: z.ZodString;
379
+ }, z.ZodTypeAny, "passthrough">>;
380
+ }];
381
+ }, {
382
+ method: "delete";
383
+ path: "/responses/:id";
384
+ alias: "deleteResponse";
385
+ description: "Delete a response by ID. This operation is idempotent - deleting a non-existent response returns success.";
386
+ requestFormat: "json";
387
+ parameters: [{
388
+ name: "id";
389
+ type: "Path";
390
+ schema: z.ZodString;
391
+ }];
392
+ response: z.ZodObject<{
393
+ id: z.ZodOptional<z.ZodString>;
394
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
395
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
396
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
397
+ id: z.ZodOptional<z.ZodString>;
398
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
399
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
400
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
401
+ id: z.ZodOptional<z.ZodString>;
402
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
403
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
404
+ }, z.ZodTypeAny, "passthrough">>;
405
+ errors: [{
406
+ status: 500;
407
+ description: string;
408
+ schema: z.ZodObject<{
409
+ error: z.ZodString;
410
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
411
+ error: z.ZodString;
412
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
413
+ error: z.ZodString;
414
+ }, z.ZodTypeAny, "passthrough">>;
415
+ }];
416
+ }, {
417
+ method: "post";
418
+ path: "/responses/:id/cancel";
419
+ alias: "cancelResponse";
420
+ description: "Cancel a background response that is in progress. If the response is already completed, failed, or cancelled, this returns the response as-is.";
421
+ requestFormat: "json";
422
+ parameters: [{
423
+ name: "id";
424
+ type: "Path";
425
+ schema: z.ZodString;
426
+ }];
427
+ response: z.ZodType<Partial<{
428
+ id: string;
429
+ object: "response";
430
+ status: "in_progress" | "completed" | "failed" | "cancelled";
431
+ created_at: number;
432
+ model: string;
433
+ instructions: string | null;
434
+ output: Array<ResponseOutputMessage> | null;
435
+ usage: ResponseUsage;
436
+ error: ResponseError | null;
437
+ }>, z.ZodTypeDef, Partial<{
438
+ id: string;
439
+ object: "response";
440
+ status: "in_progress" | "completed" | "failed" | "cancelled";
441
+ created_at: number;
442
+ model: string;
443
+ instructions: string | null;
444
+ output: Array<ResponseOutputMessage> | null;
445
+ usage: ResponseUsage;
446
+ error: ResponseError | null;
447
+ }>>;
448
+ errors: [{
449
+ status: 404;
450
+ description: string;
451
+ schema: z.ZodObject<{
452
+ error: z.ZodString;
453
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
454
+ error: z.ZodString;
455
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
456
+ error: z.ZodString;
457
+ }, z.ZodTypeAny, "passthrough">>;
458
+ }, {
459
+ status: 500;
460
+ description: string;
461
+ schema: z.ZodObject<{
462
+ error: z.ZodString;
463
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
464
+ error: z.ZodString;
465
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
466
+ error: z.ZodString;
467
+ }, z.ZodTypeAny, "passthrough">>;
468
+ }];
469
+ }]>;
470
+ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
471
+ method: "post";
472
+ path: "/responses";
473
+ alias: "createResponse";
474
+ description: "Create a new response using the Response API. This endpoint provides an OpenAI Responses-compatible interface for chat completions with video collections.\n\nThe response can be processed synchronously (default) or asynchronously using the &#x60;background&#x60; parameter.";
475
+ requestFormat: "json";
476
+ parameters: [{
477
+ name: "body";
478
+ description: string;
479
+ type: "Body";
480
+ schema: z.ZodType<CreateResponseRequest, z.ZodTypeDef, CreateResponseRequest>;
481
+ }];
482
+ response: z.ZodType<Partial<{
483
+ id: string;
484
+ object: "response";
485
+ status: "in_progress" | "completed" | "failed" | "cancelled";
486
+ created_at: number;
487
+ model: string;
488
+ instructions: string | null;
489
+ output: Array<ResponseOutputMessage> | null;
490
+ usage: ResponseUsage;
491
+ error: ResponseError | null;
492
+ }>, z.ZodTypeDef, Partial<{
493
+ id: string;
494
+ object: "response";
495
+ status: "in_progress" | "completed" | "failed" | "cancelled";
496
+ created_at: number;
497
+ model: string;
498
+ instructions: string | null;
499
+ output: Array<ResponseOutputMessage> | null;
500
+ usage: ResponseUsage;
501
+ error: ResponseError | null;
502
+ }>>;
503
+ errors: [{
504
+ status: 400;
505
+ description: string;
506
+ schema: z.ZodObject<{
507
+ error: z.ZodString;
508
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
509
+ error: z.ZodString;
510
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
511
+ error: z.ZodString;
512
+ }, z.ZodTypeAny, "passthrough">>;
513
+ }, {
514
+ status: 404;
515
+ description: string;
516
+ schema: z.ZodObject<{
517
+ error: z.ZodString;
518
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
519
+ error: z.ZodString;
520
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
521
+ error: z.ZodString;
522
+ }, z.ZodTypeAny, "passthrough">>;
523
+ }, {
524
+ status: 500;
525
+ description: string;
526
+ schema: z.ZodObject<{
527
+ error: z.ZodString;
528
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
529
+ error: z.ZodString;
530
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
531
+ error: z.ZodString;
532
+ }, z.ZodTypeAny, "passthrough">>;
533
+ }];
534
+ }, {
535
+ method: "get";
536
+ path: "/responses";
537
+ alias: "listResponses";
538
+ description: "List all responses with pagination and filtering options.";
539
+ requestFormat: "json";
540
+ parameters: [{
541
+ name: "limit";
542
+ type: "Query";
543
+ schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
544
+ }, {
545
+ name: "offset";
546
+ type: "Query";
547
+ schema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
548
+ }, {
549
+ name: "status";
550
+ type: "Query";
551
+ schema: z.ZodOptional<z.ZodEnum<["in_progress", "completed", "failed", "cancelled"]>>;
552
+ }, {
553
+ name: "created_before";
554
+ type: "Query";
555
+ schema: z.ZodOptional<z.ZodString>;
556
+ }, {
557
+ name: "created_after";
558
+ type: "Query";
559
+ schema: z.ZodOptional<z.ZodString>;
560
+ }];
561
+ response: z.ZodType<Partial<{
562
+ object: "list";
563
+ data: Array<ResponseListItem>;
564
+ total: number;
565
+ limit: number;
566
+ offset: number;
567
+ }>, z.ZodTypeDef, Partial<{
568
+ object: "list";
569
+ data: Array<ResponseListItem>;
570
+ total: number;
571
+ limit: number;
572
+ offset: number;
573
+ }>>;
574
+ errors: [{
575
+ status: 500;
576
+ description: string;
577
+ schema: z.ZodObject<{
578
+ error: z.ZodString;
579
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
580
+ error: z.ZodString;
581
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
582
+ error: z.ZodString;
583
+ }, z.ZodTypeAny, "passthrough">>;
584
+ }];
585
+ }, {
586
+ method: "get";
587
+ path: "/responses/:id";
588
+ alias: "getResponse";
589
+ description: "Retrieve a specific response by its ID.";
590
+ requestFormat: "json";
591
+ parameters: [{
592
+ name: "id";
593
+ type: "Path";
594
+ schema: z.ZodString;
595
+ }];
596
+ response: z.ZodType<Partial<{
597
+ id: string;
598
+ object: "response";
599
+ status: "in_progress" | "completed" | "failed" | "cancelled";
600
+ created_at: number;
601
+ model: string;
602
+ instructions: string | null;
603
+ output: Array<ResponseOutputMessage> | null;
604
+ usage: ResponseUsage;
605
+ error: ResponseError | null;
606
+ }>, z.ZodTypeDef, Partial<{
607
+ id: string;
608
+ object: "response";
609
+ status: "in_progress" | "completed" | "failed" | "cancelled";
610
+ created_at: number;
611
+ model: string;
612
+ instructions: string | null;
613
+ output: Array<ResponseOutputMessage> | null;
614
+ usage: ResponseUsage;
615
+ error: ResponseError | null;
616
+ }>>;
617
+ errors: [{
618
+ status: 404;
619
+ description: string;
620
+ schema: z.ZodObject<{
621
+ error: z.ZodString;
622
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
623
+ error: z.ZodString;
624
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
625
+ error: z.ZodString;
626
+ }, z.ZodTypeAny, "passthrough">>;
627
+ }, {
628
+ status: 500;
629
+ description: string;
630
+ schema: z.ZodObject<{
631
+ error: z.ZodString;
632
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
633
+ error: z.ZodString;
634
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
635
+ error: z.ZodString;
636
+ }, z.ZodTypeAny, "passthrough">>;
637
+ }];
638
+ }, {
639
+ method: "delete";
640
+ path: "/responses/:id";
641
+ alias: "deleteResponse";
642
+ description: "Delete a response by ID. This operation is idempotent - deleting a non-existent response returns success.";
643
+ requestFormat: "json";
644
+ parameters: [{
645
+ name: "id";
646
+ type: "Path";
647
+ schema: z.ZodString;
648
+ }];
649
+ response: z.ZodObject<{
650
+ id: z.ZodOptional<z.ZodString>;
651
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
652
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
653
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
654
+ id: z.ZodOptional<z.ZodString>;
655
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
656
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
657
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
658
+ id: z.ZodOptional<z.ZodString>;
659
+ object: z.ZodOptional<z.ZodLiteral<"response">>;
660
+ deleted: z.ZodOptional<z.ZodLiteral<true>>;
661
+ }, z.ZodTypeAny, "passthrough">>;
662
+ errors: [{
663
+ status: 500;
664
+ description: string;
665
+ schema: z.ZodObject<{
666
+ error: z.ZodString;
667
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
668
+ error: z.ZodString;
669
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
670
+ error: z.ZodString;
671
+ }, z.ZodTypeAny, "passthrough">>;
672
+ }];
673
+ }, {
674
+ method: "post";
675
+ path: "/responses/:id/cancel";
676
+ alias: "cancelResponse";
677
+ description: "Cancel a background response that is in progress. If the response is already completed, failed, or cancelled, this returns the response as-is.";
678
+ requestFormat: "json";
679
+ parameters: [{
680
+ name: "id";
681
+ type: "Path";
682
+ schema: z.ZodString;
683
+ }];
684
+ response: z.ZodType<Partial<{
685
+ id: string;
686
+ object: "response";
687
+ status: "in_progress" | "completed" | "failed" | "cancelled";
688
+ created_at: number;
689
+ model: string;
690
+ instructions: string | null;
691
+ output: Array<ResponseOutputMessage> | null;
692
+ usage: ResponseUsage;
693
+ error: ResponseError | null;
694
+ }>, z.ZodTypeDef, Partial<{
695
+ id: string;
696
+ object: "response";
697
+ status: "in_progress" | "completed" | "failed" | "cancelled";
698
+ created_at: number;
699
+ model: string;
700
+ instructions: string | null;
701
+ output: Array<ResponseOutputMessage> | null;
702
+ usage: ResponseUsage;
703
+ error: ResponseError | null;
704
+ }>>;
705
+ errors: [{
706
+ status: 404;
707
+ description: string;
708
+ schema: z.ZodObject<{
709
+ error: z.ZodString;
710
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
711
+ error: z.ZodString;
712
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
713
+ error: z.ZodString;
714
+ }, z.ZodTypeAny, "passthrough">>;
715
+ }, {
716
+ status: 500;
717
+ description: string;
718
+ schema: z.ZodObject<{
719
+ error: z.ZodString;
720
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
721
+ error: z.ZodString;
722
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
723
+ error: z.ZodString;
724
+ }, z.ZodTypeAny, "passthrough">>;
725
+ }];
726
+ }]>;
727
+ export {};