@openrouter/sdk 0.0.1-beta.5 → 0.0.1-beta.6

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.
@@ -2,476 +2,30 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
  import * as z from "zod/v3";
5
- import { remap as remap$ } from "../lib/primitives.js";
6
5
  import { safeParse } from "../lib/schemas.js";
7
- import { ImageGenerationStatus$inboundSchema, ImageGenerationStatus$outboundSchema, } from "./imagegenerationstatus.js";
8
- import { OutputTextContent$inboundSchema, OutputTextContent$outboundSchema, } from "./outputtextcontent.js";
9
- import { ReasoningSummaryText$inboundSchema, ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js";
10
- import { ReasoningTextContent$inboundSchema, ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js";
11
- import { RefusalContent$inboundSchema, RefusalContent$outboundSchema, } from "./refusalcontent.js";
12
- import { WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js";
13
- export const ResponsesOutputItemTypeImageGenerationCall = {
14
- ImageGenerationCall: "image_generation_call",
15
- };
16
- export const ResponsesOutputItemTypeFileSearchCall = {
17
- FileSearchCall: "file_search_call",
18
- };
19
- export const ResponsesOutputItemTypeWebSearchCall = {
20
- WebSearchCall: "web_search_call",
21
- };
22
- export const ResponsesOutputItemTypeFunctionCall = {
23
- FunctionCall: "function_call",
24
- };
25
- export const ResponsesOutputItemTypeReasoning = {
26
- Reasoning: "reasoning",
27
- };
28
- export const ResponsesOutputItemRole = {
29
- Assistant: "assistant",
30
- };
31
- export const ResponsesOutputItemTypeMessage = {
32
- Message: "message",
33
- };
34
- export const ResponsesOutputItemStatusInProgress = {
35
- InProgress: "in_progress",
36
- };
37
- export const ResponsesOutputItemStatusIncomplete = {
38
- Incomplete: "incomplete",
39
- };
40
- export const ResponsesOutputItemStatusCompleted = {
41
- Completed: "completed",
42
- };
43
- /** @internal */
44
- export const ResponsesOutputItemTypeImageGenerationCall$inboundSchema = z
45
- .nativeEnum(ResponsesOutputItemTypeImageGenerationCall);
46
- /** @internal */
47
- export const ResponsesOutputItemTypeImageGenerationCall$outboundSchema = ResponsesOutputItemTypeImageGenerationCall$inboundSchema;
48
- /**
49
- * @internal
50
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
51
- */
52
- export var ResponsesOutputItemTypeImageGenerationCall$;
53
- (function (ResponsesOutputItemTypeImageGenerationCall$) {
54
- /** @deprecated use `ResponsesOutputItemTypeImageGenerationCall$inboundSchema` instead. */
55
- ResponsesOutputItemTypeImageGenerationCall$.inboundSchema = ResponsesOutputItemTypeImageGenerationCall$inboundSchema;
56
- /** @deprecated use `ResponsesOutputItemTypeImageGenerationCall$outboundSchema` instead. */
57
- ResponsesOutputItemTypeImageGenerationCall$.outboundSchema = ResponsesOutputItemTypeImageGenerationCall$outboundSchema;
58
- })(ResponsesOutputItemTypeImageGenerationCall$ || (ResponsesOutputItemTypeImageGenerationCall$ = {}));
59
- /** @internal */
60
- export const ResponsesOutputItemImageGenerationCall$inboundSchema = z.object({
61
- type: ResponsesOutputItemTypeImageGenerationCall$inboundSchema,
62
- id: z.string(),
63
- result: z.nullable(z.string()),
64
- status: ImageGenerationStatus$inboundSchema,
65
- });
66
- /** @internal */
67
- export const ResponsesOutputItemImageGenerationCall$outboundSchema = z.object({
68
- type: ResponsesOutputItemTypeImageGenerationCall$outboundSchema,
69
- id: z.string(),
70
- result: z.nullable(z.string()),
71
- status: ImageGenerationStatus$outboundSchema,
72
- });
73
- /**
74
- * @internal
75
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
- */
77
- export var ResponsesOutputItemImageGenerationCall$;
78
- (function (ResponsesOutputItemImageGenerationCall$) {
79
- /** @deprecated use `ResponsesOutputItemImageGenerationCall$inboundSchema` instead. */
80
- ResponsesOutputItemImageGenerationCall$.inboundSchema = ResponsesOutputItemImageGenerationCall$inboundSchema;
81
- /** @deprecated use `ResponsesOutputItemImageGenerationCall$outboundSchema` instead. */
82
- ResponsesOutputItemImageGenerationCall$.outboundSchema = ResponsesOutputItemImageGenerationCall$outboundSchema;
83
- })(ResponsesOutputItemImageGenerationCall$ || (ResponsesOutputItemImageGenerationCall$ = {}));
84
- export function responsesOutputItemImageGenerationCallToJSON(responsesOutputItemImageGenerationCall) {
85
- return JSON.stringify(ResponsesOutputItemImageGenerationCall$outboundSchema.parse(responsesOutputItemImageGenerationCall));
86
- }
87
- export function responsesOutputItemImageGenerationCallFromJSON(jsonString) {
88
- return safeParse(jsonString, (x) => ResponsesOutputItemImageGenerationCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemImageGenerationCall' from JSON`);
89
- }
90
- /** @internal */
91
- export const ResponsesOutputItemTypeFileSearchCall$inboundSchema = z.nativeEnum(ResponsesOutputItemTypeFileSearchCall);
92
- /** @internal */
93
- export const ResponsesOutputItemTypeFileSearchCall$outboundSchema = ResponsesOutputItemTypeFileSearchCall$inboundSchema;
94
- /**
95
- * @internal
96
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
97
- */
98
- export var ResponsesOutputItemTypeFileSearchCall$;
99
- (function (ResponsesOutputItemTypeFileSearchCall$) {
100
- /** @deprecated use `ResponsesOutputItemTypeFileSearchCall$inboundSchema` instead. */
101
- ResponsesOutputItemTypeFileSearchCall$.inboundSchema = ResponsesOutputItemTypeFileSearchCall$inboundSchema;
102
- /** @deprecated use `ResponsesOutputItemTypeFileSearchCall$outboundSchema` instead. */
103
- ResponsesOutputItemTypeFileSearchCall$.outboundSchema = ResponsesOutputItemTypeFileSearchCall$outboundSchema;
104
- })(ResponsesOutputItemTypeFileSearchCall$ || (ResponsesOutputItemTypeFileSearchCall$ = {}));
105
- /** @internal */
106
- export const ResponsesOutputItemFileSearchCall$inboundSchema = z.object({
107
- type: ResponsesOutputItemTypeFileSearchCall$inboundSchema,
108
- id: z.string(),
109
- queries: z.array(z.string()),
110
- status: WebSearchStatus$inboundSchema,
111
- });
112
- /** @internal */
113
- export const ResponsesOutputItemFileSearchCall$outboundSchema = z.object({
114
- type: ResponsesOutputItemTypeFileSearchCall$outboundSchema,
115
- id: z.string(),
116
- queries: z.array(z.string()),
117
- status: WebSearchStatus$outboundSchema,
118
- });
119
- /**
120
- * @internal
121
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
122
- */
123
- export var ResponsesOutputItemFileSearchCall$;
124
- (function (ResponsesOutputItemFileSearchCall$) {
125
- /** @deprecated use `ResponsesOutputItemFileSearchCall$inboundSchema` instead. */
126
- ResponsesOutputItemFileSearchCall$.inboundSchema = ResponsesOutputItemFileSearchCall$inboundSchema;
127
- /** @deprecated use `ResponsesOutputItemFileSearchCall$outboundSchema` instead. */
128
- ResponsesOutputItemFileSearchCall$.outboundSchema = ResponsesOutputItemFileSearchCall$outboundSchema;
129
- })(ResponsesOutputItemFileSearchCall$ || (ResponsesOutputItemFileSearchCall$ = {}));
130
- export function responsesOutputItemFileSearchCallToJSON(responsesOutputItemFileSearchCall) {
131
- return JSON.stringify(ResponsesOutputItemFileSearchCall$outboundSchema.parse(responsesOutputItemFileSearchCall));
132
- }
133
- export function responsesOutputItemFileSearchCallFromJSON(jsonString) {
134
- return safeParse(jsonString, (x) => ResponsesOutputItemFileSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemFileSearchCall' from JSON`);
135
- }
136
- /** @internal */
137
- export const ResponsesOutputItemTypeWebSearchCall$inboundSchema = z.nativeEnum(ResponsesOutputItemTypeWebSearchCall);
138
- /** @internal */
139
- export const ResponsesOutputItemTypeWebSearchCall$outboundSchema = ResponsesOutputItemTypeWebSearchCall$inboundSchema;
140
- /**
141
- * @internal
142
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
143
- */
144
- export var ResponsesOutputItemTypeWebSearchCall$;
145
- (function (ResponsesOutputItemTypeWebSearchCall$) {
146
- /** @deprecated use `ResponsesOutputItemTypeWebSearchCall$inboundSchema` instead. */
147
- ResponsesOutputItemTypeWebSearchCall$.inboundSchema = ResponsesOutputItemTypeWebSearchCall$inboundSchema;
148
- /** @deprecated use `ResponsesOutputItemTypeWebSearchCall$outboundSchema` instead. */
149
- ResponsesOutputItemTypeWebSearchCall$.outboundSchema = ResponsesOutputItemTypeWebSearchCall$outboundSchema;
150
- })(ResponsesOutputItemTypeWebSearchCall$ || (ResponsesOutputItemTypeWebSearchCall$ = {}));
151
- /** @internal */
152
- export const ResponsesOutputItemWebSearchCall$inboundSchema = z.object({
153
- type: ResponsesOutputItemTypeWebSearchCall$inboundSchema,
154
- id: z.string(),
155
- status: WebSearchStatus$inboundSchema,
156
- });
157
- /** @internal */
158
- export const ResponsesOutputItemWebSearchCall$outboundSchema = z.object({
159
- type: ResponsesOutputItemTypeWebSearchCall$outboundSchema,
160
- id: z.string(),
161
- status: WebSearchStatus$outboundSchema,
162
- });
163
- /**
164
- * @internal
165
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
166
- */
167
- export var ResponsesOutputItemWebSearchCall$;
168
- (function (ResponsesOutputItemWebSearchCall$) {
169
- /** @deprecated use `ResponsesOutputItemWebSearchCall$inboundSchema` instead. */
170
- ResponsesOutputItemWebSearchCall$.inboundSchema = ResponsesOutputItemWebSearchCall$inboundSchema;
171
- /** @deprecated use `ResponsesOutputItemWebSearchCall$outboundSchema` instead. */
172
- ResponsesOutputItemWebSearchCall$.outboundSchema = ResponsesOutputItemWebSearchCall$outboundSchema;
173
- })(ResponsesOutputItemWebSearchCall$ || (ResponsesOutputItemWebSearchCall$ = {}));
174
- export function responsesOutputItemWebSearchCallToJSON(responsesOutputItemWebSearchCall) {
175
- return JSON.stringify(ResponsesOutputItemWebSearchCall$outboundSchema.parse(responsesOutputItemWebSearchCall));
176
- }
177
- export function responsesOutputItemWebSearchCallFromJSON(jsonString) {
178
- return safeParse(jsonString, (x) => ResponsesOutputItemWebSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemWebSearchCall' from JSON`);
179
- }
180
- /** @internal */
181
- export const ResponsesOutputItemTypeFunctionCall$inboundSchema = z.nativeEnum(ResponsesOutputItemTypeFunctionCall);
182
- /** @internal */
183
- export const ResponsesOutputItemTypeFunctionCall$outboundSchema = ResponsesOutputItemTypeFunctionCall$inboundSchema;
184
- /**
185
- * @internal
186
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
187
- */
188
- export var ResponsesOutputItemTypeFunctionCall$;
189
- (function (ResponsesOutputItemTypeFunctionCall$) {
190
- /** @deprecated use `ResponsesOutputItemTypeFunctionCall$inboundSchema` instead. */
191
- ResponsesOutputItemTypeFunctionCall$.inboundSchema = ResponsesOutputItemTypeFunctionCall$inboundSchema;
192
- /** @deprecated use `ResponsesOutputItemTypeFunctionCall$outboundSchema` instead. */
193
- ResponsesOutputItemTypeFunctionCall$.outboundSchema = ResponsesOutputItemTypeFunctionCall$outboundSchema;
194
- })(ResponsesOutputItemTypeFunctionCall$ || (ResponsesOutputItemTypeFunctionCall$ = {}));
195
- /** @internal */
196
- export const ResponsesOutputItemFunctionCall$inboundSchema = z.object({
197
- type: ResponsesOutputItemTypeFunctionCall$inboundSchema,
198
- id: z.string().optional(),
199
- name: z.string(),
200
- arguments: z.string(),
201
- call_id: z.string(),
202
- }).transform((v) => {
203
- return remap$(v, {
204
- "call_id": "callId",
205
- });
206
- });
207
- /** @internal */
208
- export const ResponsesOutputItemFunctionCall$outboundSchema = z.object({
209
- type: ResponsesOutputItemTypeFunctionCall$outboundSchema,
210
- id: z.string().optional(),
211
- name: z.string(),
212
- arguments: z.string(),
213
- callId: z.string(),
214
- }).transform((v) => {
215
- return remap$(v, {
216
- callId: "call_id",
217
- });
218
- });
219
- /**
220
- * @internal
221
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
222
- */
223
- export var ResponsesOutputItemFunctionCall$;
224
- (function (ResponsesOutputItemFunctionCall$) {
225
- /** @deprecated use `ResponsesOutputItemFunctionCall$inboundSchema` instead. */
226
- ResponsesOutputItemFunctionCall$.inboundSchema = ResponsesOutputItemFunctionCall$inboundSchema;
227
- /** @deprecated use `ResponsesOutputItemFunctionCall$outboundSchema` instead. */
228
- ResponsesOutputItemFunctionCall$.outboundSchema = ResponsesOutputItemFunctionCall$outboundSchema;
229
- })(ResponsesOutputItemFunctionCall$ || (ResponsesOutputItemFunctionCall$ = {}));
230
- export function responsesOutputItemFunctionCallToJSON(responsesOutputItemFunctionCall) {
231
- return JSON.stringify(ResponsesOutputItemFunctionCall$outboundSchema.parse(responsesOutputItemFunctionCall));
232
- }
233
- export function responsesOutputItemFunctionCallFromJSON(jsonString) {
234
- return safeParse(jsonString, (x) => ResponsesOutputItemFunctionCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemFunctionCall' from JSON`);
235
- }
236
- /** @internal */
237
- export const ResponsesOutputItemTypeReasoning$inboundSchema = z.nativeEnum(ResponsesOutputItemTypeReasoning);
238
- /** @internal */
239
- export const ResponsesOutputItemTypeReasoning$outboundSchema = ResponsesOutputItemTypeReasoning$inboundSchema;
240
- /**
241
- * @internal
242
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
243
- */
244
- export var ResponsesOutputItemTypeReasoning$;
245
- (function (ResponsesOutputItemTypeReasoning$) {
246
- /** @deprecated use `ResponsesOutputItemTypeReasoning$inboundSchema` instead. */
247
- ResponsesOutputItemTypeReasoning$.inboundSchema = ResponsesOutputItemTypeReasoning$inboundSchema;
248
- /** @deprecated use `ResponsesOutputItemTypeReasoning$outboundSchema` instead. */
249
- ResponsesOutputItemTypeReasoning$.outboundSchema = ResponsesOutputItemTypeReasoning$outboundSchema;
250
- })(ResponsesOutputItemTypeReasoning$ || (ResponsesOutputItemTypeReasoning$ = {}));
251
- /** @internal */
252
- export const ResponsesOutputItemReasoning$inboundSchema = z.object({
253
- type: ResponsesOutputItemTypeReasoning$inboundSchema,
254
- id: z.string().optional(),
255
- content: z.array(ReasoningTextContent$inboundSchema).optional(),
256
- summary: z.array(ReasoningSummaryText$inboundSchema),
257
- encrypted_content: z.nullable(z.string()).optional(),
258
- }).transform((v) => {
259
- return remap$(v, {
260
- "encrypted_content": "encryptedContent",
261
- });
262
- });
263
- /** @internal */
264
- export const ResponsesOutputItemReasoning$outboundSchema = z.object({
265
- type: ResponsesOutputItemTypeReasoning$outboundSchema,
266
- id: z.string().optional(),
267
- content: z.array(ReasoningTextContent$outboundSchema).optional(),
268
- summary: z.array(ReasoningSummaryText$outboundSchema),
269
- encryptedContent: z.nullable(z.string()).optional(),
270
- }).transform((v) => {
271
- return remap$(v, {
272
- encryptedContent: "encrypted_content",
273
- });
274
- });
275
- /**
276
- * @internal
277
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
278
- */
279
- export var ResponsesOutputItemReasoning$;
280
- (function (ResponsesOutputItemReasoning$) {
281
- /** @deprecated use `ResponsesOutputItemReasoning$inboundSchema` instead. */
282
- ResponsesOutputItemReasoning$.inboundSchema = ResponsesOutputItemReasoning$inboundSchema;
283
- /** @deprecated use `ResponsesOutputItemReasoning$outboundSchema` instead. */
284
- ResponsesOutputItemReasoning$.outboundSchema = ResponsesOutputItemReasoning$outboundSchema;
285
- })(ResponsesOutputItemReasoning$ || (ResponsesOutputItemReasoning$ = {}));
286
- export function responsesOutputItemReasoningToJSON(responsesOutputItemReasoning) {
287
- return JSON.stringify(ResponsesOutputItemReasoning$outboundSchema.parse(responsesOutputItemReasoning));
288
- }
289
- export function responsesOutputItemReasoningFromJSON(jsonString) {
290
- return safeParse(jsonString, (x) => ResponsesOutputItemReasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemReasoning' from JSON`);
291
- }
292
- /** @internal */
293
- export const ResponsesOutputItemRole$inboundSchema = z.nativeEnum(ResponsesOutputItemRole);
294
- /** @internal */
295
- export const ResponsesOutputItemRole$outboundSchema = ResponsesOutputItemRole$inboundSchema;
296
- /**
297
- * @internal
298
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
299
- */
300
- export var ResponsesOutputItemRole$;
301
- (function (ResponsesOutputItemRole$) {
302
- /** @deprecated use `ResponsesOutputItemRole$inboundSchema` instead. */
303
- ResponsesOutputItemRole$.inboundSchema = ResponsesOutputItemRole$inboundSchema;
304
- /** @deprecated use `ResponsesOutputItemRole$outboundSchema` instead. */
305
- ResponsesOutputItemRole$.outboundSchema = ResponsesOutputItemRole$outboundSchema;
306
- })(ResponsesOutputItemRole$ || (ResponsesOutputItemRole$ = {}));
307
- /** @internal */
308
- export const ResponsesOutputItemTypeMessage$inboundSchema = z.nativeEnum(ResponsesOutputItemTypeMessage);
309
- /** @internal */
310
- export const ResponsesOutputItemTypeMessage$outboundSchema = ResponsesOutputItemTypeMessage$inboundSchema;
311
- /**
312
- * @internal
313
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
314
- */
315
- export var ResponsesOutputItemTypeMessage$;
316
- (function (ResponsesOutputItemTypeMessage$) {
317
- /** @deprecated use `ResponsesOutputItemTypeMessage$inboundSchema` instead. */
318
- ResponsesOutputItemTypeMessage$.inboundSchema = ResponsesOutputItemTypeMessage$inboundSchema;
319
- /** @deprecated use `ResponsesOutputItemTypeMessage$outboundSchema` instead. */
320
- ResponsesOutputItemTypeMessage$.outboundSchema = ResponsesOutputItemTypeMessage$outboundSchema;
321
- })(ResponsesOutputItemTypeMessage$ || (ResponsesOutputItemTypeMessage$ = {}));
322
- /** @internal */
323
- export const ResponsesOutputItemStatusInProgress$inboundSchema = z.nativeEnum(ResponsesOutputItemStatusInProgress);
324
- /** @internal */
325
- export const ResponsesOutputItemStatusInProgress$outboundSchema = ResponsesOutputItemStatusInProgress$inboundSchema;
326
- /**
327
- * @internal
328
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
329
- */
330
- export var ResponsesOutputItemStatusInProgress$;
331
- (function (ResponsesOutputItemStatusInProgress$) {
332
- /** @deprecated use `ResponsesOutputItemStatusInProgress$inboundSchema` instead. */
333
- ResponsesOutputItemStatusInProgress$.inboundSchema = ResponsesOutputItemStatusInProgress$inboundSchema;
334
- /** @deprecated use `ResponsesOutputItemStatusInProgress$outboundSchema` instead. */
335
- ResponsesOutputItemStatusInProgress$.outboundSchema = ResponsesOutputItemStatusInProgress$outboundSchema;
336
- })(ResponsesOutputItemStatusInProgress$ || (ResponsesOutputItemStatusInProgress$ = {}));
337
- /** @internal */
338
- export const ResponsesOutputItemStatusIncomplete$inboundSchema = z.nativeEnum(ResponsesOutputItemStatusIncomplete);
339
- /** @internal */
340
- export const ResponsesOutputItemStatusIncomplete$outboundSchema = ResponsesOutputItemStatusIncomplete$inboundSchema;
341
- /**
342
- * @internal
343
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
344
- */
345
- export var ResponsesOutputItemStatusIncomplete$;
346
- (function (ResponsesOutputItemStatusIncomplete$) {
347
- /** @deprecated use `ResponsesOutputItemStatusIncomplete$inboundSchema` instead. */
348
- ResponsesOutputItemStatusIncomplete$.inboundSchema = ResponsesOutputItemStatusIncomplete$inboundSchema;
349
- /** @deprecated use `ResponsesOutputItemStatusIncomplete$outboundSchema` instead. */
350
- ResponsesOutputItemStatusIncomplete$.outboundSchema = ResponsesOutputItemStatusIncomplete$outboundSchema;
351
- })(ResponsesOutputItemStatusIncomplete$ || (ResponsesOutputItemStatusIncomplete$ = {}));
352
- /** @internal */
353
- export const ResponsesOutputItemStatusCompleted$inboundSchema = z.nativeEnum(ResponsesOutputItemStatusCompleted);
354
- /** @internal */
355
- export const ResponsesOutputItemStatusCompleted$outboundSchema = ResponsesOutputItemStatusCompleted$inboundSchema;
356
- /**
357
- * @internal
358
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
359
- */
360
- export var ResponsesOutputItemStatusCompleted$;
361
- (function (ResponsesOutputItemStatusCompleted$) {
362
- /** @deprecated use `ResponsesOutputItemStatusCompleted$inboundSchema` instead. */
363
- ResponsesOutputItemStatusCompleted$.inboundSchema = ResponsesOutputItemStatusCompleted$inboundSchema;
364
- /** @deprecated use `ResponsesOutputItemStatusCompleted$outboundSchema` instead. */
365
- ResponsesOutputItemStatusCompleted$.outboundSchema = ResponsesOutputItemStatusCompleted$outboundSchema;
366
- })(ResponsesOutputItemStatusCompleted$ || (ResponsesOutputItemStatusCompleted$ = {}));
367
- /** @internal */
368
- export const ResponsesOutputItemStatusUnion$inboundSchema = z.union([
369
- ResponsesOutputItemStatusCompleted$inboundSchema,
370
- ResponsesOutputItemStatusIncomplete$inboundSchema,
371
- ResponsesOutputItemStatusInProgress$inboundSchema,
372
- ]);
373
- /** @internal */
374
- export const ResponsesOutputItemStatusUnion$outboundSchema = z.union([
375
- ResponsesOutputItemStatusCompleted$outboundSchema,
376
- ResponsesOutputItemStatusIncomplete$outboundSchema,
377
- ResponsesOutputItemStatusInProgress$outboundSchema,
378
- ]);
379
- /**
380
- * @internal
381
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
382
- */
383
- export var ResponsesOutputItemStatusUnion$;
384
- (function (ResponsesOutputItemStatusUnion$) {
385
- /** @deprecated use `ResponsesOutputItemStatusUnion$inboundSchema` instead. */
386
- ResponsesOutputItemStatusUnion$.inboundSchema = ResponsesOutputItemStatusUnion$inboundSchema;
387
- /** @deprecated use `ResponsesOutputItemStatusUnion$outboundSchema` instead. */
388
- ResponsesOutputItemStatusUnion$.outboundSchema = ResponsesOutputItemStatusUnion$outboundSchema;
389
- })(ResponsesOutputItemStatusUnion$ || (ResponsesOutputItemStatusUnion$ = {}));
390
- export function responsesOutputItemStatusUnionToJSON(responsesOutputItemStatusUnion) {
391
- return JSON.stringify(ResponsesOutputItemStatusUnion$outboundSchema.parse(responsesOutputItemStatusUnion));
392
- }
393
- export function responsesOutputItemStatusUnionFromJSON(jsonString) {
394
- return safeParse(jsonString, (x) => ResponsesOutputItemStatusUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemStatusUnion' from JSON`);
395
- }
396
- /** @internal */
397
- export const ResponsesOutputItemContent$inboundSchema = z.union([OutputTextContent$inboundSchema, RefusalContent$inboundSchema]);
398
- /** @internal */
399
- export const ResponsesOutputItemContent$outboundSchema = z.union([OutputTextContent$outboundSchema, RefusalContent$outboundSchema]);
400
- /**
401
- * @internal
402
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
403
- */
404
- export var ResponsesOutputItemContent$;
405
- (function (ResponsesOutputItemContent$) {
406
- /** @deprecated use `ResponsesOutputItemContent$inboundSchema` instead. */
407
- ResponsesOutputItemContent$.inboundSchema = ResponsesOutputItemContent$inboundSchema;
408
- /** @deprecated use `ResponsesOutputItemContent$outboundSchema` instead. */
409
- ResponsesOutputItemContent$.outboundSchema = ResponsesOutputItemContent$outboundSchema;
410
- })(ResponsesOutputItemContent$ || (ResponsesOutputItemContent$ = {}));
411
- export function responsesOutputItemContentToJSON(responsesOutputItemContent) {
412
- return JSON.stringify(ResponsesOutputItemContent$outboundSchema.parse(responsesOutputItemContent));
413
- }
414
- export function responsesOutputItemContentFromJSON(jsonString) {
415
- return safeParse(jsonString, (x) => ResponsesOutputItemContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemContent' from JSON`);
416
- }
417
- /** @internal */
418
- export const ResponsesOutputItemMessage$inboundSchema = z.object({
419
- id: z.string(),
420
- role: ResponsesOutputItemRole$inboundSchema,
421
- type: ResponsesOutputItemTypeMessage$inboundSchema,
422
- status: z.union([
423
- ResponsesOutputItemStatusCompleted$inboundSchema,
424
- ResponsesOutputItemStatusIncomplete$inboundSchema,
425
- ResponsesOutputItemStatusInProgress$inboundSchema,
426
- ]),
427
- content: z.array(z.union([OutputTextContent$inboundSchema, RefusalContent$inboundSchema])),
428
- });
429
- /** @internal */
430
- export const ResponsesOutputItemMessage$outboundSchema = z.object({
431
- id: z.string(),
432
- role: ResponsesOutputItemRole$outboundSchema,
433
- type: ResponsesOutputItemTypeMessage$outboundSchema,
434
- status: z.union([
435
- ResponsesOutputItemStatusCompleted$outboundSchema,
436
- ResponsesOutputItemStatusIncomplete$outboundSchema,
437
- ResponsesOutputItemStatusInProgress$outboundSchema,
438
- ]),
439
- content: z.array(z.union([OutputTextContent$outboundSchema, RefusalContent$outboundSchema])),
440
- });
441
- /**
442
- * @internal
443
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
444
- */
445
- export var ResponsesOutputItemMessage$;
446
- (function (ResponsesOutputItemMessage$) {
447
- /** @deprecated use `ResponsesOutputItemMessage$inboundSchema` instead. */
448
- ResponsesOutputItemMessage$.inboundSchema = ResponsesOutputItemMessage$inboundSchema;
449
- /** @deprecated use `ResponsesOutputItemMessage$outboundSchema` instead. */
450
- ResponsesOutputItemMessage$.outboundSchema = ResponsesOutputItemMessage$outboundSchema;
451
- })(ResponsesOutputItemMessage$ || (ResponsesOutputItemMessage$ = {}));
452
- export function responsesOutputItemMessageToJSON(responsesOutputItemMessage) {
453
- return JSON.stringify(ResponsesOutputItemMessage$outboundSchema.parse(responsesOutputItemMessage));
454
- }
455
- export function responsesOutputItemMessageFromJSON(jsonString) {
456
- return safeParse(jsonString, (x) => ResponsesOutputItemMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemMessage' from JSON`);
457
- }
6
+ import { ResponsesImageGenerationCall$inboundSchema, ResponsesImageGenerationCall$outboundSchema, } from "./responsesimagegenerationcall.js";
7
+ import { ResponsesOutputItemFileSearchCall$inboundSchema, ResponsesOutputItemFileSearchCall$outboundSchema, } from "./responsesoutputitemfilesearchcall.js";
8
+ import { ResponsesOutputItemFunctionCall$inboundSchema, ResponsesOutputItemFunctionCall$outboundSchema, } from "./responsesoutputitemfunctioncall.js";
9
+ import { ResponsesOutputItemReasoning$inboundSchema, ResponsesOutputItemReasoning$outboundSchema, } from "./responsesoutputitemreasoning.js";
10
+ import { ResponsesOutputMessage$inboundSchema, ResponsesOutputMessage$outboundSchema, } from "./responsesoutputmessage.js";
11
+ import { ResponsesWebSearchCallOutput$inboundSchema, ResponsesWebSearchCallOutput$outboundSchema, } from "./responseswebsearchcalloutput.js";
458
12
  /** @internal */
459
13
  export const ResponsesOutputItem$inboundSchema = z.union([
460
- z.lazy(() => ResponsesOutputItemMessage$inboundSchema),
461
- z.lazy(() => ResponsesOutputItemFunctionCall$inboundSchema),
462
- z.lazy(() => ResponsesOutputItemFileSearchCall$inboundSchema),
463
- z.lazy(() => ResponsesOutputItemImageGenerationCall$inboundSchema),
464
- z.lazy(() => ResponsesOutputItemWebSearchCall$inboundSchema),
465
- z.lazy(() => ResponsesOutputItemReasoning$inboundSchema),
14
+ ResponsesOutputMessage$inboundSchema,
15
+ ResponsesOutputItemFunctionCall$inboundSchema,
16
+ ResponsesOutputItemFileSearchCall$inboundSchema,
17
+ ResponsesImageGenerationCall$inboundSchema,
18
+ ResponsesWebSearchCallOutput$inboundSchema,
19
+ ResponsesOutputItemReasoning$inboundSchema,
466
20
  ]);
467
21
  /** @internal */
468
22
  export const ResponsesOutputItem$outboundSchema = z.union([
469
- z.lazy(() => ResponsesOutputItemMessage$outboundSchema),
470
- z.lazy(() => ResponsesOutputItemFunctionCall$outboundSchema),
471
- z.lazy(() => ResponsesOutputItemFileSearchCall$outboundSchema),
472
- z.lazy(() => ResponsesOutputItemImageGenerationCall$outboundSchema),
473
- z.lazy(() => ResponsesOutputItemWebSearchCall$outboundSchema),
474
- z.lazy(() => ResponsesOutputItemReasoning$outboundSchema),
23
+ ResponsesOutputMessage$outboundSchema,
24
+ ResponsesOutputItemFunctionCall$outboundSchema,
25
+ ResponsesOutputItemFileSearchCall$outboundSchema,
26
+ ResponsesImageGenerationCall$outboundSchema,
27
+ ResponsesWebSearchCallOutput$outboundSchema,
28
+ ResponsesOutputItemReasoning$outboundSchema,
475
29
  ]);
476
30
  /**
477
31
  * @internal
@@ -0,0 +1,58 @@
1
+ import * as z from "zod/v3";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { WebSearchStatus } from "./websearchstatus.js";
6
+ export declare const ResponsesOutputItemFileSearchCallType: {
7
+ readonly FileSearchCall: "file_search_call";
8
+ };
9
+ export type ResponsesOutputItemFileSearchCallType = ClosedEnum<typeof ResponsesOutputItemFileSearchCallType>;
10
+ export type ResponsesOutputItemFileSearchCall = {
11
+ type: ResponsesOutputItemFileSearchCallType;
12
+ id: string;
13
+ queries: Array<string>;
14
+ status: WebSearchStatus;
15
+ };
16
+ /** @internal */
17
+ export declare const ResponsesOutputItemFileSearchCallType$inboundSchema: z.ZodNativeEnum<typeof ResponsesOutputItemFileSearchCallType>;
18
+ /** @internal */
19
+ export declare const ResponsesOutputItemFileSearchCallType$outboundSchema: z.ZodNativeEnum<typeof ResponsesOutputItemFileSearchCallType>;
20
+ /**
21
+ * @internal
22
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
23
+ */
24
+ export declare namespace ResponsesOutputItemFileSearchCallType$ {
25
+ /** @deprecated use `ResponsesOutputItemFileSearchCallType$inboundSchema` instead. */
26
+ const inboundSchema: z.ZodNativeEnum<{
27
+ readonly FileSearchCall: "file_search_call";
28
+ }>;
29
+ /** @deprecated use `ResponsesOutputItemFileSearchCallType$outboundSchema` instead. */
30
+ const outboundSchema: z.ZodNativeEnum<{
31
+ readonly FileSearchCall: "file_search_call";
32
+ }>;
33
+ }
34
+ /** @internal */
35
+ export declare const ResponsesOutputItemFileSearchCall$inboundSchema: z.ZodType<ResponsesOutputItemFileSearchCall, z.ZodTypeDef, unknown>;
36
+ /** @internal */
37
+ export type ResponsesOutputItemFileSearchCall$Outbound = {
38
+ type: string;
39
+ id: string;
40
+ queries: Array<string>;
41
+ status: string;
42
+ };
43
+ /** @internal */
44
+ export declare const ResponsesOutputItemFileSearchCall$outboundSchema: z.ZodType<ResponsesOutputItemFileSearchCall$Outbound, z.ZodTypeDef, ResponsesOutputItemFileSearchCall>;
45
+ /**
46
+ * @internal
47
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
+ */
49
+ export declare namespace ResponsesOutputItemFileSearchCall$ {
50
+ /** @deprecated use `ResponsesOutputItemFileSearchCall$inboundSchema` instead. */
51
+ const inboundSchema: z.ZodType<ResponsesOutputItemFileSearchCall, z.ZodTypeDef, unknown>;
52
+ /** @deprecated use `ResponsesOutputItemFileSearchCall$outboundSchema` instead. */
53
+ const outboundSchema: z.ZodType<ResponsesOutputItemFileSearchCall$Outbound, z.ZodTypeDef, ResponsesOutputItemFileSearchCall>;
54
+ /** @deprecated use `ResponsesOutputItemFileSearchCall$Outbound` instead. */
55
+ type Outbound = ResponsesOutputItemFileSearchCall$Outbound;
56
+ }
57
+ export declare function responsesOutputItemFileSearchCallToJSON(responsesOutputItemFileSearchCall: ResponsesOutputItemFileSearchCall): string;
58
+ export declare function responsesOutputItemFileSearchCallFromJSON(jsonString: string): SafeParseResult<ResponsesOutputItemFileSearchCall, SDKValidationError>;
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ import { WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js";
7
+ export const ResponsesOutputItemFileSearchCallType = {
8
+ FileSearchCall: "file_search_call",
9
+ };
10
+ /** @internal */
11
+ export const ResponsesOutputItemFileSearchCallType$inboundSchema = z.nativeEnum(ResponsesOutputItemFileSearchCallType);
12
+ /** @internal */
13
+ export const ResponsesOutputItemFileSearchCallType$outboundSchema = ResponsesOutputItemFileSearchCallType$inboundSchema;
14
+ /**
15
+ * @internal
16
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
17
+ */
18
+ export var ResponsesOutputItemFileSearchCallType$;
19
+ (function (ResponsesOutputItemFileSearchCallType$) {
20
+ /** @deprecated use `ResponsesOutputItemFileSearchCallType$inboundSchema` instead. */
21
+ ResponsesOutputItemFileSearchCallType$.inboundSchema = ResponsesOutputItemFileSearchCallType$inboundSchema;
22
+ /** @deprecated use `ResponsesOutputItemFileSearchCallType$outboundSchema` instead. */
23
+ ResponsesOutputItemFileSearchCallType$.outboundSchema = ResponsesOutputItemFileSearchCallType$outboundSchema;
24
+ })(ResponsesOutputItemFileSearchCallType$ || (ResponsesOutputItemFileSearchCallType$ = {}));
25
+ /** @internal */
26
+ export const ResponsesOutputItemFileSearchCall$inboundSchema = z.object({
27
+ type: ResponsesOutputItemFileSearchCallType$inboundSchema,
28
+ id: z.string(),
29
+ queries: z.array(z.string()),
30
+ status: WebSearchStatus$inboundSchema,
31
+ });
32
+ /** @internal */
33
+ export const ResponsesOutputItemFileSearchCall$outboundSchema = z.object({
34
+ type: ResponsesOutputItemFileSearchCallType$outboundSchema,
35
+ id: z.string(),
36
+ queries: z.array(z.string()),
37
+ status: WebSearchStatus$outboundSchema,
38
+ });
39
+ /**
40
+ * @internal
41
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
42
+ */
43
+ export var ResponsesOutputItemFileSearchCall$;
44
+ (function (ResponsesOutputItemFileSearchCall$) {
45
+ /** @deprecated use `ResponsesOutputItemFileSearchCall$inboundSchema` instead. */
46
+ ResponsesOutputItemFileSearchCall$.inboundSchema = ResponsesOutputItemFileSearchCall$inboundSchema;
47
+ /** @deprecated use `ResponsesOutputItemFileSearchCall$outboundSchema` instead. */
48
+ ResponsesOutputItemFileSearchCall$.outboundSchema = ResponsesOutputItemFileSearchCall$outboundSchema;
49
+ })(ResponsesOutputItemFileSearchCall$ || (ResponsesOutputItemFileSearchCall$ = {}));
50
+ export function responsesOutputItemFileSearchCallToJSON(responsesOutputItemFileSearchCall) {
51
+ return JSON.stringify(ResponsesOutputItemFileSearchCall$outboundSchema.parse(responsesOutputItemFileSearchCall));
52
+ }
53
+ export function responsesOutputItemFileSearchCallFromJSON(jsonString) {
54
+ return safeParse(jsonString, (x) => ResponsesOutputItemFileSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemFileSearchCall' from JSON`);
55
+ }