@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,493 +2,45 @@
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
6
  import { OpenResponsesEasyInputMessage$inboundSchema, OpenResponsesEasyInputMessage$outboundSchema, } from "./openresponseseasyinputmessage.js";
9
7
  import { OpenResponsesFunctionCallOutput$inboundSchema, OpenResponsesFunctionCallOutput$outboundSchema, } from "./openresponsesfunctioncalloutput.js";
10
8
  import { OpenResponsesFunctionToolCall$inboundSchema, OpenResponsesFunctionToolCall$outboundSchema, } from "./openresponsesfunctiontoolcall.js";
11
9
  import { OpenResponsesInputMessageItem$inboundSchema, OpenResponsesInputMessageItem$outboundSchema, } from "./openresponsesinputmessageitem.js";
12
10
  import { OpenResponsesReasoning$inboundSchema, OpenResponsesReasoning$outboundSchema, } from "./openresponsesreasoning.js";
13
- import { OutputTextContent$inboundSchema, OutputTextContent$outboundSchema, } from "./outputtextcontent.js";
14
- import { ReasoningSummaryText$inboundSchema, ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js";
15
- import { ReasoningTextContent$inboundSchema, ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js";
16
- import { RefusalContent$inboundSchema, RefusalContent$outboundSchema, } from "./refusalcontent.js";
17
- import { WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js";
18
- export const OpenResponsesInputItemTypeImageGenerationCall = {
19
- ImageGenerationCall: "image_generation_call",
20
- };
21
- export const OpenResponsesInputItemTypeFileSearchCall = {
22
- FileSearchCall: "file_search_call",
23
- };
24
- export const OpenResponsesInputItemTypeWebSearchCall = {
25
- WebSearchCall: "web_search_call",
26
- };
27
- export const OpenResponsesInputItemTypeFunctionCall = {
28
- FunctionCall: "function_call",
29
- };
30
- export const OpenResponsesInputItemTypeReasoning = {
31
- Reasoning: "reasoning",
32
- };
33
- export const OpenResponsesInputItemRole = {
34
- Assistant: "assistant",
35
- };
36
- export const OpenResponsesInputItemTypeMessage = {
37
- Message: "message",
38
- };
39
- export const OpenResponsesInputItemStatusInProgress = {
40
- InProgress: "in_progress",
41
- };
42
- export const OpenResponsesInputItemStatusIncomplete = {
43
- Incomplete: "incomplete",
44
- };
45
- export const OpenResponsesInputItemStatusCompleted = {
46
- Completed: "completed",
47
- };
48
- /** @internal */
49
- export const OpenResponsesInputItemTypeImageGenerationCall$inboundSchema = z
50
- .nativeEnum(OpenResponsesInputItemTypeImageGenerationCall);
51
- /** @internal */
52
- export const OpenResponsesInputItemTypeImageGenerationCall$outboundSchema = OpenResponsesInputItemTypeImageGenerationCall$inboundSchema;
53
- /**
54
- * @internal
55
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
- */
57
- export var OpenResponsesInputItemTypeImageGenerationCall$;
58
- (function (OpenResponsesInputItemTypeImageGenerationCall$) {
59
- /** @deprecated use `OpenResponsesInputItemTypeImageGenerationCall$inboundSchema` instead. */
60
- OpenResponsesInputItemTypeImageGenerationCall$.inboundSchema = OpenResponsesInputItemTypeImageGenerationCall$inboundSchema;
61
- /** @deprecated use `OpenResponsesInputItemTypeImageGenerationCall$outboundSchema` instead. */
62
- OpenResponsesInputItemTypeImageGenerationCall$.outboundSchema = OpenResponsesInputItemTypeImageGenerationCall$outboundSchema;
63
- })(OpenResponsesInputItemTypeImageGenerationCall$ || (OpenResponsesInputItemTypeImageGenerationCall$ = {}));
64
- /** @internal */
65
- export const OpenResponsesInputItemImageGenerationCall$inboundSchema = z.object({
66
- type: OpenResponsesInputItemTypeImageGenerationCall$inboundSchema,
67
- id: z.string(),
68
- result: z.nullable(z.string()),
69
- status: ImageGenerationStatus$inboundSchema,
70
- });
71
- /** @internal */
72
- export const OpenResponsesInputItemImageGenerationCall$outboundSchema = z.object({
73
- type: OpenResponsesInputItemTypeImageGenerationCall$outboundSchema,
74
- id: z.string(),
75
- result: z.nullable(z.string()),
76
- status: ImageGenerationStatus$outboundSchema,
77
- });
78
- /**
79
- * @internal
80
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
- */
82
- export var OpenResponsesInputItemImageGenerationCall$;
83
- (function (OpenResponsesInputItemImageGenerationCall$) {
84
- /** @deprecated use `OpenResponsesInputItemImageGenerationCall$inboundSchema` instead. */
85
- OpenResponsesInputItemImageGenerationCall$.inboundSchema = OpenResponsesInputItemImageGenerationCall$inboundSchema;
86
- /** @deprecated use `OpenResponsesInputItemImageGenerationCall$outboundSchema` instead. */
87
- OpenResponsesInputItemImageGenerationCall$.outboundSchema = OpenResponsesInputItemImageGenerationCall$outboundSchema;
88
- })(OpenResponsesInputItemImageGenerationCall$ || (OpenResponsesInputItemImageGenerationCall$ = {}));
89
- export function openResponsesInputItemImageGenerationCallToJSON(openResponsesInputItemImageGenerationCall) {
90
- return JSON.stringify(OpenResponsesInputItemImageGenerationCall$outboundSchema.parse(openResponsesInputItemImageGenerationCall));
91
- }
92
- export function openResponsesInputItemImageGenerationCallFromJSON(jsonString) {
93
- return safeParse(jsonString, (x) => OpenResponsesInputItemImageGenerationCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemImageGenerationCall' from JSON`);
94
- }
95
- /** @internal */
96
- export const OpenResponsesInputItemTypeFileSearchCall$inboundSchema = z
97
- .nativeEnum(OpenResponsesInputItemTypeFileSearchCall);
98
- /** @internal */
99
- export const OpenResponsesInputItemTypeFileSearchCall$outboundSchema = OpenResponsesInputItemTypeFileSearchCall$inboundSchema;
100
- /**
101
- * @internal
102
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
103
- */
104
- export var OpenResponsesInputItemTypeFileSearchCall$;
105
- (function (OpenResponsesInputItemTypeFileSearchCall$) {
106
- /** @deprecated use `OpenResponsesInputItemTypeFileSearchCall$inboundSchema` instead. */
107
- OpenResponsesInputItemTypeFileSearchCall$.inboundSchema = OpenResponsesInputItemTypeFileSearchCall$inboundSchema;
108
- /** @deprecated use `OpenResponsesInputItemTypeFileSearchCall$outboundSchema` instead. */
109
- OpenResponsesInputItemTypeFileSearchCall$.outboundSchema = OpenResponsesInputItemTypeFileSearchCall$outboundSchema;
110
- })(OpenResponsesInputItemTypeFileSearchCall$ || (OpenResponsesInputItemTypeFileSearchCall$ = {}));
111
- /** @internal */
112
- export const OpenResponsesInputItemFileSearchCall$inboundSchema = z.object({
113
- type: OpenResponsesInputItemTypeFileSearchCall$inboundSchema,
114
- id: z.string(),
115
- queries: z.array(z.string()),
116
- status: WebSearchStatus$inboundSchema,
117
- });
118
- /** @internal */
119
- export const OpenResponsesInputItemFileSearchCall$outboundSchema = z.object({
120
- type: OpenResponsesInputItemTypeFileSearchCall$outboundSchema,
121
- id: z.string(),
122
- queries: z.array(z.string()),
123
- status: WebSearchStatus$outboundSchema,
124
- });
125
- /**
126
- * @internal
127
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
128
- */
129
- export var OpenResponsesInputItemFileSearchCall$;
130
- (function (OpenResponsesInputItemFileSearchCall$) {
131
- /** @deprecated use `OpenResponsesInputItemFileSearchCall$inboundSchema` instead. */
132
- OpenResponsesInputItemFileSearchCall$.inboundSchema = OpenResponsesInputItemFileSearchCall$inboundSchema;
133
- /** @deprecated use `OpenResponsesInputItemFileSearchCall$outboundSchema` instead. */
134
- OpenResponsesInputItemFileSearchCall$.outboundSchema = OpenResponsesInputItemFileSearchCall$outboundSchema;
135
- })(OpenResponsesInputItemFileSearchCall$ || (OpenResponsesInputItemFileSearchCall$ = {}));
136
- export function openResponsesInputItemFileSearchCallToJSON(openResponsesInputItemFileSearchCall) {
137
- return JSON.stringify(OpenResponsesInputItemFileSearchCall$outboundSchema.parse(openResponsesInputItemFileSearchCall));
138
- }
139
- export function openResponsesInputItemFileSearchCallFromJSON(jsonString) {
140
- return safeParse(jsonString, (x) => OpenResponsesInputItemFileSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemFileSearchCall' from JSON`);
141
- }
142
- /** @internal */
143
- export const OpenResponsesInputItemTypeWebSearchCall$inboundSchema = z
144
- .nativeEnum(OpenResponsesInputItemTypeWebSearchCall);
145
- /** @internal */
146
- export const OpenResponsesInputItemTypeWebSearchCall$outboundSchema = OpenResponsesInputItemTypeWebSearchCall$inboundSchema;
147
- /**
148
- * @internal
149
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
150
- */
151
- export var OpenResponsesInputItemTypeWebSearchCall$;
152
- (function (OpenResponsesInputItemTypeWebSearchCall$) {
153
- /** @deprecated use `OpenResponsesInputItemTypeWebSearchCall$inboundSchema` instead. */
154
- OpenResponsesInputItemTypeWebSearchCall$.inboundSchema = OpenResponsesInputItemTypeWebSearchCall$inboundSchema;
155
- /** @deprecated use `OpenResponsesInputItemTypeWebSearchCall$outboundSchema` instead. */
156
- OpenResponsesInputItemTypeWebSearchCall$.outboundSchema = OpenResponsesInputItemTypeWebSearchCall$outboundSchema;
157
- })(OpenResponsesInputItemTypeWebSearchCall$ || (OpenResponsesInputItemTypeWebSearchCall$ = {}));
158
- /** @internal */
159
- export const OpenResponsesInputItemWebSearchCall$inboundSchema = z.object({
160
- type: OpenResponsesInputItemTypeWebSearchCall$inboundSchema,
161
- id: z.string(),
162
- status: WebSearchStatus$inboundSchema,
163
- });
164
- /** @internal */
165
- export const OpenResponsesInputItemWebSearchCall$outboundSchema = z.object({
166
- type: OpenResponsesInputItemTypeWebSearchCall$outboundSchema,
167
- id: z.string(),
168
- status: WebSearchStatus$outboundSchema,
169
- });
170
- /**
171
- * @internal
172
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
173
- */
174
- export var OpenResponsesInputItemWebSearchCall$;
175
- (function (OpenResponsesInputItemWebSearchCall$) {
176
- /** @deprecated use `OpenResponsesInputItemWebSearchCall$inboundSchema` instead. */
177
- OpenResponsesInputItemWebSearchCall$.inboundSchema = OpenResponsesInputItemWebSearchCall$inboundSchema;
178
- /** @deprecated use `OpenResponsesInputItemWebSearchCall$outboundSchema` instead. */
179
- OpenResponsesInputItemWebSearchCall$.outboundSchema = OpenResponsesInputItemWebSearchCall$outboundSchema;
180
- })(OpenResponsesInputItemWebSearchCall$ || (OpenResponsesInputItemWebSearchCall$ = {}));
181
- export function openResponsesInputItemWebSearchCallToJSON(openResponsesInputItemWebSearchCall) {
182
- return JSON.stringify(OpenResponsesInputItemWebSearchCall$outboundSchema.parse(openResponsesInputItemWebSearchCall));
183
- }
184
- export function openResponsesInputItemWebSearchCallFromJSON(jsonString) {
185
- return safeParse(jsonString, (x) => OpenResponsesInputItemWebSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemWebSearchCall' from JSON`);
186
- }
187
- /** @internal */
188
- export const OpenResponsesInputItemTypeFunctionCall$inboundSchema = z.nativeEnum(OpenResponsesInputItemTypeFunctionCall);
189
- /** @internal */
190
- export const OpenResponsesInputItemTypeFunctionCall$outboundSchema = OpenResponsesInputItemTypeFunctionCall$inboundSchema;
191
- /**
192
- * @internal
193
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
194
- */
195
- export var OpenResponsesInputItemTypeFunctionCall$;
196
- (function (OpenResponsesInputItemTypeFunctionCall$) {
197
- /** @deprecated use `OpenResponsesInputItemTypeFunctionCall$inboundSchema` instead. */
198
- OpenResponsesInputItemTypeFunctionCall$.inboundSchema = OpenResponsesInputItemTypeFunctionCall$inboundSchema;
199
- /** @deprecated use `OpenResponsesInputItemTypeFunctionCall$outboundSchema` instead. */
200
- OpenResponsesInputItemTypeFunctionCall$.outboundSchema = OpenResponsesInputItemTypeFunctionCall$outboundSchema;
201
- })(OpenResponsesInputItemTypeFunctionCall$ || (OpenResponsesInputItemTypeFunctionCall$ = {}));
202
- /** @internal */
203
- export const OpenResponsesInputItemFunctionCall$inboundSchema = z.object({
204
- type: OpenResponsesInputItemTypeFunctionCall$inboundSchema,
205
- id: z.string().optional(),
206
- name: z.string(),
207
- arguments: z.string(),
208
- call_id: z.string(),
209
- }).transform((v) => {
210
- return remap$(v, {
211
- "call_id": "callId",
212
- });
213
- });
214
- /** @internal */
215
- export const OpenResponsesInputItemFunctionCall$outboundSchema = z.object({
216
- type: OpenResponsesInputItemTypeFunctionCall$outboundSchema,
217
- id: z.string().optional(),
218
- name: z.string(),
219
- arguments: z.string(),
220
- callId: z.string(),
221
- }).transform((v) => {
222
- return remap$(v, {
223
- callId: "call_id",
224
- });
225
- });
226
- /**
227
- * @internal
228
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
229
- */
230
- export var OpenResponsesInputItemFunctionCall$;
231
- (function (OpenResponsesInputItemFunctionCall$) {
232
- /** @deprecated use `OpenResponsesInputItemFunctionCall$inboundSchema` instead. */
233
- OpenResponsesInputItemFunctionCall$.inboundSchema = OpenResponsesInputItemFunctionCall$inboundSchema;
234
- /** @deprecated use `OpenResponsesInputItemFunctionCall$outboundSchema` instead. */
235
- OpenResponsesInputItemFunctionCall$.outboundSchema = OpenResponsesInputItemFunctionCall$outboundSchema;
236
- })(OpenResponsesInputItemFunctionCall$ || (OpenResponsesInputItemFunctionCall$ = {}));
237
- export function openResponsesInputItemFunctionCallToJSON(openResponsesInputItemFunctionCall) {
238
- return JSON.stringify(OpenResponsesInputItemFunctionCall$outboundSchema.parse(openResponsesInputItemFunctionCall));
239
- }
240
- export function openResponsesInputItemFunctionCallFromJSON(jsonString) {
241
- return safeParse(jsonString, (x) => OpenResponsesInputItemFunctionCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemFunctionCall' from JSON`);
242
- }
243
- /** @internal */
244
- export const OpenResponsesInputItemTypeReasoning$inboundSchema = z.nativeEnum(OpenResponsesInputItemTypeReasoning);
245
- /** @internal */
246
- export const OpenResponsesInputItemTypeReasoning$outboundSchema = OpenResponsesInputItemTypeReasoning$inboundSchema;
247
- /**
248
- * @internal
249
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
250
- */
251
- export var OpenResponsesInputItemTypeReasoning$;
252
- (function (OpenResponsesInputItemTypeReasoning$) {
253
- /** @deprecated use `OpenResponsesInputItemTypeReasoning$inboundSchema` instead. */
254
- OpenResponsesInputItemTypeReasoning$.inboundSchema = OpenResponsesInputItemTypeReasoning$inboundSchema;
255
- /** @deprecated use `OpenResponsesInputItemTypeReasoning$outboundSchema` instead. */
256
- OpenResponsesInputItemTypeReasoning$.outboundSchema = OpenResponsesInputItemTypeReasoning$outboundSchema;
257
- })(OpenResponsesInputItemTypeReasoning$ || (OpenResponsesInputItemTypeReasoning$ = {}));
258
- /** @internal */
259
- export const OpenResponsesInputItemReasoning$inboundSchema = z.object({
260
- type: OpenResponsesInputItemTypeReasoning$inboundSchema,
261
- id: z.string().optional(),
262
- content: z.array(ReasoningTextContent$inboundSchema).optional(),
263
- summary: z.array(ReasoningSummaryText$inboundSchema),
264
- encrypted_content: z.nullable(z.string()).optional(),
265
- }).transform((v) => {
266
- return remap$(v, {
267
- "encrypted_content": "encryptedContent",
268
- });
269
- });
270
- /** @internal */
271
- export const OpenResponsesInputItemReasoning$outboundSchema = z.object({
272
- type: OpenResponsesInputItemTypeReasoning$outboundSchema,
273
- id: z.string().optional(),
274
- content: z.array(ReasoningTextContent$outboundSchema).optional(),
275
- summary: z.array(ReasoningSummaryText$outboundSchema),
276
- encryptedContent: z.nullable(z.string()).optional(),
277
- }).transform((v) => {
278
- return remap$(v, {
279
- encryptedContent: "encrypted_content",
280
- });
281
- });
282
- /**
283
- * @internal
284
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
285
- */
286
- export var OpenResponsesInputItemReasoning$;
287
- (function (OpenResponsesInputItemReasoning$) {
288
- /** @deprecated use `OpenResponsesInputItemReasoning$inboundSchema` instead. */
289
- OpenResponsesInputItemReasoning$.inboundSchema = OpenResponsesInputItemReasoning$inboundSchema;
290
- /** @deprecated use `OpenResponsesInputItemReasoning$outboundSchema` instead. */
291
- OpenResponsesInputItemReasoning$.outboundSchema = OpenResponsesInputItemReasoning$outboundSchema;
292
- })(OpenResponsesInputItemReasoning$ || (OpenResponsesInputItemReasoning$ = {}));
293
- export function openResponsesInputItemReasoningToJSON(openResponsesInputItemReasoning) {
294
- return JSON.stringify(OpenResponsesInputItemReasoning$outboundSchema.parse(openResponsesInputItemReasoning));
295
- }
296
- export function openResponsesInputItemReasoningFromJSON(jsonString) {
297
- return safeParse(jsonString, (x) => OpenResponsesInputItemReasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemReasoning' from JSON`);
298
- }
299
- /** @internal */
300
- export const OpenResponsesInputItemRole$inboundSchema = z.nativeEnum(OpenResponsesInputItemRole);
301
- /** @internal */
302
- export const OpenResponsesInputItemRole$outboundSchema = OpenResponsesInputItemRole$inboundSchema;
303
- /**
304
- * @internal
305
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
306
- */
307
- export var OpenResponsesInputItemRole$;
308
- (function (OpenResponsesInputItemRole$) {
309
- /** @deprecated use `OpenResponsesInputItemRole$inboundSchema` instead. */
310
- OpenResponsesInputItemRole$.inboundSchema = OpenResponsesInputItemRole$inboundSchema;
311
- /** @deprecated use `OpenResponsesInputItemRole$outboundSchema` instead. */
312
- OpenResponsesInputItemRole$.outboundSchema = OpenResponsesInputItemRole$outboundSchema;
313
- })(OpenResponsesInputItemRole$ || (OpenResponsesInputItemRole$ = {}));
314
- /** @internal */
315
- export const OpenResponsesInputItemTypeMessage$inboundSchema = z.nativeEnum(OpenResponsesInputItemTypeMessage);
316
- /** @internal */
317
- export const OpenResponsesInputItemTypeMessage$outboundSchema = OpenResponsesInputItemTypeMessage$inboundSchema;
318
- /**
319
- * @internal
320
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
321
- */
322
- export var OpenResponsesInputItemTypeMessage$;
323
- (function (OpenResponsesInputItemTypeMessage$) {
324
- /** @deprecated use `OpenResponsesInputItemTypeMessage$inboundSchema` instead. */
325
- OpenResponsesInputItemTypeMessage$.inboundSchema = OpenResponsesInputItemTypeMessage$inboundSchema;
326
- /** @deprecated use `OpenResponsesInputItemTypeMessage$outboundSchema` instead. */
327
- OpenResponsesInputItemTypeMessage$.outboundSchema = OpenResponsesInputItemTypeMessage$outboundSchema;
328
- })(OpenResponsesInputItemTypeMessage$ || (OpenResponsesInputItemTypeMessage$ = {}));
329
- /** @internal */
330
- export const OpenResponsesInputItemStatusInProgress$inboundSchema = z.nativeEnum(OpenResponsesInputItemStatusInProgress);
331
- /** @internal */
332
- export const OpenResponsesInputItemStatusInProgress$outboundSchema = OpenResponsesInputItemStatusInProgress$inboundSchema;
333
- /**
334
- * @internal
335
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
336
- */
337
- export var OpenResponsesInputItemStatusInProgress$;
338
- (function (OpenResponsesInputItemStatusInProgress$) {
339
- /** @deprecated use `OpenResponsesInputItemStatusInProgress$inboundSchema` instead. */
340
- OpenResponsesInputItemStatusInProgress$.inboundSchema = OpenResponsesInputItemStatusInProgress$inboundSchema;
341
- /** @deprecated use `OpenResponsesInputItemStatusInProgress$outboundSchema` instead. */
342
- OpenResponsesInputItemStatusInProgress$.outboundSchema = OpenResponsesInputItemStatusInProgress$outboundSchema;
343
- })(OpenResponsesInputItemStatusInProgress$ || (OpenResponsesInputItemStatusInProgress$ = {}));
344
- /** @internal */
345
- export const OpenResponsesInputItemStatusIncomplete$inboundSchema = z.nativeEnum(OpenResponsesInputItemStatusIncomplete);
346
- /** @internal */
347
- export const OpenResponsesInputItemStatusIncomplete$outboundSchema = OpenResponsesInputItemStatusIncomplete$inboundSchema;
348
- /**
349
- * @internal
350
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
351
- */
352
- export var OpenResponsesInputItemStatusIncomplete$;
353
- (function (OpenResponsesInputItemStatusIncomplete$) {
354
- /** @deprecated use `OpenResponsesInputItemStatusIncomplete$inboundSchema` instead. */
355
- OpenResponsesInputItemStatusIncomplete$.inboundSchema = OpenResponsesInputItemStatusIncomplete$inboundSchema;
356
- /** @deprecated use `OpenResponsesInputItemStatusIncomplete$outboundSchema` instead. */
357
- OpenResponsesInputItemStatusIncomplete$.outboundSchema = OpenResponsesInputItemStatusIncomplete$outboundSchema;
358
- })(OpenResponsesInputItemStatusIncomplete$ || (OpenResponsesInputItemStatusIncomplete$ = {}));
359
- /** @internal */
360
- export const OpenResponsesInputItemStatusCompleted$inboundSchema = z.nativeEnum(OpenResponsesInputItemStatusCompleted);
361
- /** @internal */
362
- export const OpenResponsesInputItemStatusCompleted$outboundSchema = OpenResponsesInputItemStatusCompleted$inboundSchema;
363
- /**
364
- * @internal
365
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
366
- */
367
- export var OpenResponsesInputItemStatusCompleted$;
368
- (function (OpenResponsesInputItemStatusCompleted$) {
369
- /** @deprecated use `OpenResponsesInputItemStatusCompleted$inboundSchema` instead. */
370
- OpenResponsesInputItemStatusCompleted$.inboundSchema = OpenResponsesInputItemStatusCompleted$inboundSchema;
371
- /** @deprecated use `OpenResponsesInputItemStatusCompleted$outboundSchema` instead. */
372
- OpenResponsesInputItemStatusCompleted$.outboundSchema = OpenResponsesInputItemStatusCompleted$outboundSchema;
373
- })(OpenResponsesInputItemStatusCompleted$ || (OpenResponsesInputItemStatusCompleted$ = {}));
374
- /** @internal */
375
- export const OpenResponsesInputItemStatusUnion$inboundSchema = z.union([
376
- OpenResponsesInputItemStatusCompleted$inboundSchema,
377
- OpenResponsesInputItemStatusIncomplete$inboundSchema,
378
- OpenResponsesInputItemStatusInProgress$inboundSchema,
379
- ]);
380
- /** @internal */
381
- export const OpenResponsesInputItemStatusUnion$outboundSchema = z.union([
382
- OpenResponsesInputItemStatusCompleted$outboundSchema,
383
- OpenResponsesInputItemStatusIncomplete$outboundSchema,
384
- OpenResponsesInputItemStatusInProgress$outboundSchema,
385
- ]);
386
- /**
387
- * @internal
388
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
389
- */
390
- export var OpenResponsesInputItemStatusUnion$;
391
- (function (OpenResponsesInputItemStatusUnion$) {
392
- /** @deprecated use `OpenResponsesInputItemStatusUnion$inboundSchema` instead. */
393
- OpenResponsesInputItemStatusUnion$.inboundSchema = OpenResponsesInputItemStatusUnion$inboundSchema;
394
- /** @deprecated use `OpenResponsesInputItemStatusUnion$outboundSchema` instead. */
395
- OpenResponsesInputItemStatusUnion$.outboundSchema = OpenResponsesInputItemStatusUnion$outboundSchema;
396
- })(OpenResponsesInputItemStatusUnion$ || (OpenResponsesInputItemStatusUnion$ = {}));
397
- export function openResponsesInputItemStatusUnionToJSON(openResponsesInputItemStatusUnion) {
398
- return JSON.stringify(OpenResponsesInputItemStatusUnion$outboundSchema.parse(openResponsesInputItemStatusUnion));
399
- }
400
- export function openResponsesInputItemStatusUnionFromJSON(jsonString) {
401
- return safeParse(jsonString, (x) => OpenResponsesInputItemStatusUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemStatusUnion' from JSON`);
402
- }
403
- /** @internal */
404
- export const OpenResponsesInputItemContent$inboundSchema = z.union([OutputTextContent$inboundSchema, RefusalContent$inboundSchema]);
405
- /** @internal */
406
- export const OpenResponsesInputItemContent$outboundSchema = z.union([OutputTextContent$outboundSchema, RefusalContent$outboundSchema]);
407
- /**
408
- * @internal
409
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
410
- */
411
- export var OpenResponsesInputItemContent$;
412
- (function (OpenResponsesInputItemContent$) {
413
- /** @deprecated use `OpenResponsesInputItemContent$inboundSchema` instead. */
414
- OpenResponsesInputItemContent$.inboundSchema = OpenResponsesInputItemContent$inboundSchema;
415
- /** @deprecated use `OpenResponsesInputItemContent$outboundSchema` instead. */
416
- OpenResponsesInputItemContent$.outboundSchema = OpenResponsesInputItemContent$outboundSchema;
417
- })(OpenResponsesInputItemContent$ || (OpenResponsesInputItemContent$ = {}));
418
- export function openResponsesInputItemContentToJSON(openResponsesInputItemContent) {
419
- return JSON.stringify(OpenResponsesInputItemContent$outboundSchema.parse(openResponsesInputItemContent));
420
- }
421
- export function openResponsesInputItemContentFromJSON(jsonString) {
422
- return safeParse(jsonString, (x) => OpenResponsesInputItemContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemContent' from JSON`);
423
- }
424
- /** @internal */
425
- export const OpenResponsesInputItemMessage$inboundSchema = z.object({
426
- id: z.string(),
427
- role: OpenResponsesInputItemRole$inboundSchema,
428
- type: OpenResponsesInputItemTypeMessage$inboundSchema,
429
- status: z.union([
430
- OpenResponsesInputItemStatusCompleted$inboundSchema,
431
- OpenResponsesInputItemStatusIncomplete$inboundSchema,
432
- OpenResponsesInputItemStatusInProgress$inboundSchema,
433
- ]),
434
- content: z.array(z.union([OutputTextContent$inboundSchema, RefusalContent$inboundSchema])),
435
- });
436
- /** @internal */
437
- export const OpenResponsesInputItemMessage$outboundSchema = z.object({
438
- id: z.string(),
439
- role: OpenResponsesInputItemRole$outboundSchema,
440
- type: OpenResponsesInputItemTypeMessage$outboundSchema,
441
- status: z.union([
442
- OpenResponsesInputItemStatusCompleted$outboundSchema,
443
- OpenResponsesInputItemStatusIncomplete$outboundSchema,
444
- OpenResponsesInputItemStatusInProgress$outboundSchema,
445
- ]),
446
- content: z.array(z.union([OutputTextContent$outboundSchema, RefusalContent$outboundSchema])),
447
- });
448
- /**
449
- * @internal
450
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
451
- */
452
- export var OpenResponsesInputItemMessage$;
453
- (function (OpenResponsesInputItemMessage$) {
454
- /** @deprecated use `OpenResponsesInputItemMessage$inboundSchema` instead. */
455
- OpenResponsesInputItemMessage$.inboundSchema = OpenResponsesInputItemMessage$inboundSchema;
456
- /** @deprecated use `OpenResponsesInputItemMessage$outboundSchema` instead. */
457
- OpenResponsesInputItemMessage$.outboundSchema = OpenResponsesInputItemMessage$outboundSchema;
458
- })(OpenResponsesInputItemMessage$ || (OpenResponsesInputItemMessage$ = {}));
459
- export function openResponsesInputItemMessageToJSON(openResponsesInputItemMessage) {
460
- return JSON.stringify(OpenResponsesInputItemMessage$outboundSchema.parse(openResponsesInputItemMessage));
461
- }
462
- export function openResponsesInputItemMessageFromJSON(jsonString) {
463
- return safeParse(jsonString, (x) => OpenResponsesInputItemMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesInputItemMessage' from JSON`);
464
- }
11
+ import { ResponsesImageGenerationCall$inboundSchema, ResponsesImageGenerationCall$outboundSchema, } from "./responsesimagegenerationcall.js";
12
+ import { ResponsesOutputItemFileSearchCall$inboundSchema, ResponsesOutputItemFileSearchCall$outboundSchema, } from "./responsesoutputitemfilesearchcall.js";
13
+ import { ResponsesOutputItemFunctionCall$inboundSchema, ResponsesOutputItemFunctionCall$outboundSchema, } from "./responsesoutputitemfunctioncall.js";
14
+ import { ResponsesOutputItemReasoning$inboundSchema, ResponsesOutputItemReasoning$outboundSchema, } from "./responsesoutputitemreasoning.js";
15
+ import { ResponsesOutputMessage$inboundSchema, ResponsesOutputMessage$outboundSchema, } from "./responsesoutputmessage.js";
16
+ import { ResponsesWebSearchCallOutput$inboundSchema, ResponsesWebSearchCallOutput$outboundSchema, } from "./responseswebsearchcalloutput.js";
465
17
  /** @internal */
466
18
  export const OpenResponsesInputItem$inboundSchema = z.union([
467
19
  OpenResponsesFunctionToolCall$inboundSchema,
468
- z.lazy(() => OpenResponsesInputItemMessage$inboundSchema),
20
+ ResponsesOutputMessage$inboundSchema,
469
21
  OpenResponsesFunctionCallOutput$inboundSchema,
470
- z.lazy(() => OpenResponsesInputItemFunctionCall$inboundSchema),
471
- z.lazy(() => OpenResponsesInputItemFileSearchCall$inboundSchema),
472
- z.lazy(() => OpenResponsesInputItemImageGenerationCall$inboundSchema),
22
+ ResponsesOutputItemFunctionCall$inboundSchema,
23
+ ResponsesOutputItemFileSearchCall$inboundSchema,
24
+ ResponsesImageGenerationCall$inboundSchema,
473
25
  OpenResponsesReasoning$inboundSchema,
474
26
  OpenResponsesInputMessageItem$inboundSchema,
475
- z.lazy(() => OpenResponsesInputItemWebSearchCall$inboundSchema),
27
+ ResponsesWebSearchCallOutput$inboundSchema,
476
28
  OpenResponsesEasyInputMessage$inboundSchema,
477
- z.lazy(() => OpenResponsesInputItemReasoning$inboundSchema),
29
+ ResponsesOutputItemReasoning$inboundSchema,
478
30
  ]);
479
31
  /** @internal */
480
32
  export const OpenResponsesInputItem$outboundSchema = z.union([
481
33
  OpenResponsesFunctionToolCall$outboundSchema,
482
- z.lazy(() => OpenResponsesInputItemMessage$outboundSchema),
34
+ ResponsesOutputMessage$outboundSchema,
483
35
  OpenResponsesFunctionCallOutput$outboundSchema,
484
- z.lazy(() => OpenResponsesInputItemFunctionCall$outboundSchema),
485
- z.lazy(() => OpenResponsesInputItemFileSearchCall$outboundSchema),
486
- z.lazy(() => OpenResponsesInputItemImageGenerationCall$outboundSchema),
36
+ ResponsesOutputItemFunctionCall$outboundSchema,
37
+ ResponsesOutputItemFileSearchCall$outboundSchema,
38
+ ResponsesImageGenerationCall$outboundSchema,
487
39
  OpenResponsesReasoning$outboundSchema,
488
40
  OpenResponsesInputMessageItem$outboundSchema,
489
- z.lazy(() => OpenResponsesInputItemWebSearchCall$outboundSchema),
41
+ ResponsesWebSearchCallOutput$outboundSchema,
490
42
  OpenResponsesEasyInputMessage$outboundSchema,
491
- z.lazy(() => OpenResponsesInputItemReasoning$outboundSchema),
43
+ ResponsesOutputItemReasoning$outboundSchema,
492
44
  ]);
493
45
  /**
494
46
  * @internal
@@ -3,101 +3,47 @@ import { ClosedEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
5
  import { ResponsesSearchContextSize } from "./responsessearchcontextsize.js";
6
- export declare const OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311: {
6
+ import { WebSearchPreviewToolUserLocation, WebSearchPreviewToolUserLocation$Outbound } from "./websearchpreviewtooluserlocation.js";
7
+ export declare const OpenResponsesWebSearchPreview20250311ToolType: {
7
8
  readonly WebSearchPreview20250311: "web_search_preview_2025_03_11";
8
9
  };
9
- export type OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311 = ClosedEnum<typeof OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311>;
10
- export declare const OpenResponsesWebSearchPreview20250311ToolTypeApproximate: {
11
- readonly Approximate: "approximate";
12
- };
13
- export type OpenResponsesWebSearchPreview20250311ToolTypeApproximate = ClosedEnum<typeof OpenResponsesWebSearchPreview20250311ToolTypeApproximate>;
14
- export type OpenResponsesWebSearchPreview20250311ToolUserLocation = {
15
- type: OpenResponsesWebSearchPreview20250311ToolTypeApproximate;
16
- city?: string | null | undefined;
17
- country?: string | null | undefined;
18
- region?: string | null | undefined;
19
- timezone?: string | null | undefined;
20
- };
10
+ export type OpenResponsesWebSearchPreview20250311ToolType = ClosedEnum<typeof OpenResponsesWebSearchPreview20250311ToolType>;
21
11
  /**
22
12
  * Web search preview tool configuration (2025-03-11 version)
23
13
  */
24
14
  export type OpenResponsesWebSearchPreview20250311Tool = {
25
- type: OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311;
15
+ type: OpenResponsesWebSearchPreview20250311ToolType;
26
16
  /**
27
17
  * Size of the search context for web search tools
28
18
  */
29
19
  searchContextSize?: ResponsesSearchContextSize | undefined;
30
- userLocation?: OpenResponsesWebSearchPreview20250311ToolUserLocation | null | undefined;
20
+ userLocation?: WebSearchPreviewToolUserLocation | null | undefined;
31
21
  };
32
22
  /** @internal */
33
- export declare const OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311$inboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311>;
23
+ export declare const OpenResponsesWebSearchPreview20250311ToolType$inboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreview20250311ToolType>;
34
24
  /** @internal */
35
- export declare const OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311$outboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311>;
25
+ export declare const OpenResponsesWebSearchPreview20250311ToolType$outboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreview20250311ToolType>;
36
26
  /**
37
27
  * @internal
38
28
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
39
29
  */
40
- export declare namespace OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311$ {
41
- /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311$inboundSchema` instead. */
30
+ export declare namespace OpenResponsesWebSearchPreview20250311ToolType$ {
31
+ /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolType$inboundSchema` instead. */
42
32
  const inboundSchema: z.ZodNativeEnum<{
43
33
  readonly WebSearchPreview20250311: "web_search_preview_2025_03_11";
44
34
  }>;
45
- /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolTypeWebSearchPreview20250311$outboundSchema` instead. */
35
+ /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolType$outboundSchema` instead. */
46
36
  const outboundSchema: z.ZodNativeEnum<{
47
37
  readonly WebSearchPreview20250311: "web_search_preview_2025_03_11";
48
38
  }>;
49
39
  }
50
40
  /** @internal */
51
- export declare const OpenResponsesWebSearchPreview20250311ToolTypeApproximate$inboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreview20250311ToolTypeApproximate>;
52
- /** @internal */
53
- export declare const OpenResponsesWebSearchPreview20250311ToolTypeApproximate$outboundSchema: z.ZodNativeEnum<typeof OpenResponsesWebSearchPreview20250311ToolTypeApproximate>;
54
- /**
55
- * @internal
56
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
57
- */
58
- export declare namespace OpenResponsesWebSearchPreview20250311ToolTypeApproximate$ {
59
- /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolTypeApproximate$inboundSchema` instead. */
60
- const inboundSchema: z.ZodNativeEnum<{
61
- readonly Approximate: "approximate";
62
- }>;
63
- /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolTypeApproximate$outboundSchema` instead. */
64
- const outboundSchema: z.ZodNativeEnum<{
65
- readonly Approximate: "approximate";
66
- }>;
67
- }
68
- /** @internal */
69
- export declare const OpenResponsesWebSearchPreview20250311ToolUserLocation$inboundSchema: z.ZodType<OpenResponsesWebSearchPreview20250311ToolUserLocation, z.ZodTypeDef, unknown>;
70
- /** @internal */
71
- export type OpenResponsesWebSearchPreview20250311ToolUserLocation$Outbound = {
72
- type: string;
73
- city?: string | null | undefined;
74
- country?: string | null | undefined;
75
- region?: string | null | undefined;
76
- timezone?: string | null | undefined;
77
- };
78
- /** @internal */
79
- export declare const OpenResponsesWebSearchPreview20250311ToolUserLocation$outboundSchema: z.ZodType<OpenResponsesWebSearchPreview20250311ToolUserLocation$Outbound, z.ZodTypeDef, OpenResponsesWebSearchPreview20250311ToolUserLocation>;
80
- /**
81
- * @internal
82
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
- */
84
- export declare namespace OpenResponsesWebSearchPreview20250311ToolUserLocation$ {
85
- /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolUserLocation$inboundSchema` instead. */
86
- const inboundSchema: z.ZodType<OpenResponsesWebSearchPreview20250311ToolUserLocation, z.ZodTypeDef, unknown>;
87
- /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolUserLocation$outboundSchema` instead. */
88
- const outboundSchema: z.ZodType<OpenResponsesWebSearchPreview20250311ToolUserLocation$Outbound, z.ZodTypeDef, OpenResponsesWebSearchPreview20250311ToolUserLocation>;
89
- /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolUserLocation$Outbound` instead. */
90
- type Outbound = OpenResponsesWebSearchPreview20250311ToolUserLocation$Outbound;
91
- }
92
- export declare function openResponsesWebSearchPreview20250311ToolUserLocationToJSON(openResponsesWebSearchPreview20250311ToolUserLocation: OpenResponsesWebSearchPreview20250311ToolUserLocation): string;
93
- export declare function openResponsesWebSearchPreview20250311ToolUserLocationFromJSON(jsonString: string): SafeParseResult<OpenResponsesWebSearchPreview20250311ToolUserLocation, SDKValidationError>;
94
- /** @internal */
95
41
  export declare const OpenResponsesWebSearchPreview20250311Tool$inboundSchema: z.ZodType<OpenResponsesWebSearchPreview20250311Tool, z.ZodTypeDef, unknown>;
96
42
  /** @internal */
97
43
  export type OpenResponsesWebSearchPreview20250311Tool$Outbound = {
98
44
  type: string;
99
45
  search_context_size?: string | undefined;
100
- user_location?: OpenResponsesWebSearchPreview20250311ToolUserLocation$Outbound | null | undefined;
46
+ user_location?: WebSearchPreviewToolUserLocation$Outbound | null | undefined;
101
47
  };
102
48
  /** @internal */
103
49
  export declare const OpenResponsesWebSearchPreview20250311Tool$outboundSchema: z.ZodType<OpenResponsesWebSearchPreview20250311Tool$Outbound, z.ZodTypeDef, OpenResponsesWebSearchPreview20250311Tool>;