@openrouter/sdk 1.4.9 → 1.4.10

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.
Files changed (66) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/alignment.d.ts +17 -0
  4. package/esm/models/alignment.js +15 -0
  5. package/esm/models/alignmentallowedcallrecord.d.ts +19 -0
  6. package/esm/models/alignmentallowedcallrecord.js +17 -0
  7. package/esm/models/alignmentblockedcallrecord.d.ts +19 -0
  8. package/esm/models/alignmentblockedcallrecord.js +17 -0
  9. package/esm/models/alignmentcallrecord.d.ts +12 -0
  10. package/esm/models/alignmentcallrecord.js +19 -0
  11. package/esm/models/alignmentchataudio.d.ts +20 -0
  12. package/esm/models/alignmentchataudio.js +15 -0
  13. package/esm/models/alignmentchatimage.d.ts +24 -0
  14. package/esm/models/alignmentchatimage.js +32 -0
  15. package/esm/models/alignmentchatrejected.d.ts +31 -0
  16. package/esm/models/alignmentchatrejected.js +32 -0
  17. package/esm/models/alignmentchattoolcall.d.ts +26 -0
  18. package/esm/models/alignmentchattoolcall.js +29 -0
  19. package/esm/models/alignmentplugin.d.ts +54 -0
  20. package/esm/models/alignmentplugin.js +33 -0
  21. package/esm/models/alignmentrejected.d.ts +10 -0
  22. package/esm/models/alignmentrejected.js +17 -0
  23. package/esm/models/alignmentresponsesrejected.d.ts +18 -0
  24. package/esm/models/alignmentresponsesrejected.js +31 -0
  25. package/esm/models/alignmentrulerecord.d.ts +17 -0
  26. package/esm/models/alignmentrulerecord.js +15 -0
  27. package/esm/models/alignmentunavailablecallrecord.d.ts +25 -0
  28. package/esm/models/alignmentunavailablecallrecord.js +25 -0
  29. package/esm/models/batchobject.d.ts +5 -0
  30. package/esm/models/batchobject.js +2 -0
  31. package/esm/models/chatrequest.d.ts +5 -4
  32. package/esm/models/chatrequest.js +3 -0
  33. package/esm/models/index.d.ts +22 -1
  34. package/esm/models/index.js +22 -1
  35. package/esm/models/messagesrequest.d.ts +5 -4
  36. package/esm/models/messagesrequest.js +3 -0
  37. package/esm/models/{responseserrorfield.d.ts → openresponseserrorfield.d.ts} +10 -5
  38. package/esm/models/{responseserrorfield.js → openresponseserrorfield.js} +7 -5
  39. package/esm/models/openresponseserrormetadata.d.ts +31 -0
  40. package/esm/models/openresponseserrormetadata.js +25 -0
  41. package/esm/models/openresponsesresult.d.ts +8 -3
  42. package/esm/models/openresponsesresult.js +4 -2
  43. package/esm/models/outputitemapplypatchcall.d.ts +31 -0
  44. package/esm/models/outputitemapplypatchcall.js +49 -0
  45. package/esm/models/outputitemcodeinterpretercall.d.ts +37 -0
  46. package/esm/models/outputitemcodeinterpretercall.js +51 -0
  47. package/esm/models/outputitemcustomtoolcall.d.ts +32 -0
  48. package/esm/models/outputitemcustomtoolcall.js +34 -0
  49. package/esm/models/outputitemfilesearchcall.d.ts +14 -0
  50. package/esm/models/outputitemfilesearchcall.js +18 -0
  51. package/esm/models/outputitemfunctioncall.d.ts +46 -0
  52. package/esm/models/outputitemfunctioncall.js +54 -0
  53. package/esm/models/outputitemimagegenerationcall.d.ts +1 -8
  54. package/esm/models/outputitemimagegenerationcall.js +1 -6
  55. package/esm/models/outputitemreasoning.d.ts +40 -0
  56. package/esm/models/outputitemreasoning.js +54 -0
  57. package/esm/models/outputitemwebsearchcall.d.ts +47 -0
  58. package/esm/models/outputitemwebsearchcall.js +60 -0
  59. package/esm/models/outputmessage.d.ts +1 -7
  60. package/esm/models/outputmessage.js +1 -6
  61. package/esm/models/outputwebsearchcallitem.d.ts +25 -25
  62. package/esm/models/outputwebsearchcallitem.js +31 -32
  63. package/esm/models/responsesrequest.d.ts +5 -4
  64. package/esm/models/responsesrequest.js +3 -0
  65. package/jsr.json +1 -1
  66. package/package.json +7 -7
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: accdd67e3d17
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
8
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
9
+ import * as openEnums from "../types/enums.js";
10
+ import { CodeInterpreterFileOutput$inboundSchema, } from "./codeinterpreterfileoutput.js";
11
+ import { CodeInterpreterImageOutput$inboundSchema, } from "./codeinterpreterimageoutput.js";
12
+ import { CodeInterpreterLogsOutput$inboundSchema, } from "./codeinterpreterlogsoutput.js";
13
+ export const OutputItemCodeInterpreterCallStatus = {
14
+ InProgress: "in_progress",
15
+ Completed: "completed",
16
+ Incomplete: "incomplete",
17
+ Interpreting: "interpreting",
18
+ Failed: "failed",
19
+ };
20
+ /** @internal */
21
+ export const OutputItemCodeInterpreterCallOutput$inboundSchema = discriminatedUnion("type", {
22
+ file: CodeInterpreterFileOutput$inboundSchema,
23
+ image: CodeInterpreterImageOutput$inboundSchema,
24
+ logs: CodeInterpreterLogsOutput$inboundSchema,
25
+ });
26
+ export function outputItemCodeInterpreterCallOutputFromJSON(jsonString) {
27
+ return safeParse(jsonString, (x) => OutputItemCodeInterpreterCallOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemCodeInterpreterCallOutput' from JSON`);
28
+ }
29
+ /** @internal */
30
+ export const OutputItemCodeInterpreterCallStatus$inboundSchema = openEnums.inboundSchema(OutputItemCodeInterpreterCallStatus);
31
+ /** @internal */
32
+ export const OutputItemCodeInterpreterCall$inboundSchema = collectExtraKeys$(z.object({
33
+ code: z.nullable(z.string()).optional(),
34
+ container_id: z.string().optional(),
35
+ id: z.string(),
36
+ outputs: z.nullable(z.array(discriminatedUnion("type", {
37
+ file: CodeInterpreterFileOutput$inboundSchema,
38
+ image: CodeInterpreterImageOutput$inboundSchema,
39
+ logs: CodeInterpreterLogsOutput$inboundSchema,
40
+ }))).optional(),
41
+ status: OutputItemCodeInterpreterCallStatus$inboundSchema,
42
+ type: z.literal("code_interpreter_call"),
43
+ }).catchall(z.any()), "additionalProperties", true).transform((v) => {
44
+ return remap$(v, {
45
+ "container_id": "containerId",
46
+ });
47
+ });
48
+ export function outputItemCodeInterpreterCallFromJSON(jsonString) {
49
+ return safeParse(jsonString, (x) => OutputItemCodeInterpreterCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemCodeInterpreterCall' from JSON`);
50
+ }
51
+ //# sourceMappingURL=outputitemcodeinterpretercall.js.map
@@ -0,0 +1,32 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const OutputItemCustomToolCallStatus: {
6
+ readonly InProgress: "in_progress";
7
+ readonly Completed: "completed";
8
+ readonly Incomplete: "incomplete";
9
+ };
10
+ export type OutputItemCustomToolCallStatus = OpenEnum<typeof OutputItemCustomToolCallStatus>;
11
+ export type OutputItemCustomToolCall = {
12
+ /**
13
+ * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.
14
+ */
15
+ async?: boolean | undefined;
16
+ callId: string;
17
+ id?: string | undefined;
18
+ input: string;
19
+ name: string;
20
+ /**
21
+ * Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
22
+ */
23
+ namespace?: string | undefined;
24
+ status?: OutputItemCustomToolCallStatus | undefined;
25
+ type: "custom_tool_call";
26
+ };
27
+ /** @internal */
28
+ export declare const OutputItemCustomToolCallStatus$inboundSchema: z.ZodType<OutputItemCustomToolCallStatus, unknown>;
29
+ /** @internal */
30
+ export declare const OutputItemCustomToolCall$inboundSchema: z.ZodType<OutputItemCustomToolCall, unknown>;
31
+ export declare function outputItemCustomToolCallFromJSON(jsonString: string): SafeParseResult<OutputItemCustomToolCall, SDKValidationError>;
32
+ //# sourceMappingURL=outputitemcustomtoolcall.d.ts.map
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 753e2c0bcba2
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import * as openEnums from "../types/enums.js";
9
+ export const OutputItemCustomToolCallStatus = {
10
+ InProgress: "in_progress",
11
+ Completed: "completed",
12
+ Incomplete: "incomplete",
13
+ };
14
+ /** @internal */
15
+ export const OutputItemCustomToolCallStatus$inboundSchema = openEnums.inboundSchema(OutputItemCustomToolCallStatus);
16
+ /** @internal */
17
+ export const OutputItemCustomToolCall$inboundSchema = z.object({
18
+ async: z.boolean().optional(),
19
+ call_id: z.string(),
20
+ id: z.string().optional(),
21
+ input: z.string(),
22
+ name: z.string(),
23
+ namespace: z.string().optional(),
24
+ status: OutputItemCustomToolCallStatus$inboundSchema.optional(),
25
+ type: z.literal("custom_tool_call"),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "call_id": "callId",
29
+ });
30
+ });
31
+ export function outputItemCustomToolCallFromJSON(jsonString) {
32
+ return safeParse(jsonString, (x) => OutputItemCustomToolCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemCustomToolCall' from JSON`);
33
+ }
34
+ //# sourceMappingURL=outputitemcustomtoolcall.js.map
@@ -0,0 +1,14 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { WebSearchStatus } from "./websearchstatus.js";
5
+ export type OutputItemFileSearchCall = {
6
+ id: string;
7
+ queries: Array<string>;
8
+ status: WebSearchStatus;
9
+ type: "file_search_call";
10
+ };
11
+ /** @internal */
12
+ export declare const OutputItemFileSearchCall$inboundSchema: z.ZodType<OutputItemFileSearchCall, unknown>;
13
+ export declare function outputItemFileSearchCallFromJSON(jsonString: string): SafeParseResult<OutputItemFileSearchCall, SDKValidationError>;
14
+ //# sourceMappingURL=outputitemfilesearchcall.d.ts.map
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: e56ad67855a5
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { WebSearchStatus$inboundSchema, } from "./websearchstatus.js";
8
+ /** @internal */
9
+ export const OutputItemFileSearchCall$inboundSchema = z.object({
10
+ id: z.string(),
11
+ queries: z.array(z.string()),
12
+ status: WebSearchStatus$inboundSchema,
13
+ type: z.literal("file_search_call"),
14
+ });
15
+ export function outputItemFileSearchCallFromJSON(jsonString) {
16
+ return safeParse(jsonString, (x) => OutputItemFileSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemFileSearchCall' from JSON`);
17
+ }
18
+ //# sourceMappingURL=outputitemfilesearchcall.js.map
@@ -0,0 +1,46 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const OutputItemFunctionCallStatusInProgress: {
6
+ readonly InProgress: "in_progress";
7
+ };
8
+ export type OutputItemFunctionCallStatusInProgress = ClosedEnum<typeof OutputItemFunctionCallStatusInProgress>;
9
+ export declare const OutputItemFunctionCallStatusIncomplete: {
10
+ readonly Incomplete: "incomplete";
11
+ };
12
+ export type OutputItemFunctionCallStatusIncomplete = ClosedEnum<typeof OutputItemFunctionCallStatusIncomplete>;
13
+ export declare const OutputItemFunctionCallStatusCompleted: {
14
+ readonly Completed: "completed";
15
+ };
16
+ export type OutputItemFunctionCallStatusCompleted = ClosedEnum<typeof OutputItemFunctionCallStatusCompleted>;
17
+ export type OutputItemFunctionCallStatusUnion = OutputItemFunctionCallStatusCompleted | OutputItemFunctionCallStatusIncomplete | OutputItemFunctionCallStatusInProgress;
18
+ export type OutputItemFunctionCall = {
19
+ arguments: string;
20
+ /**
21
+ * True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.
22
+ */
23
+ async?: boolean | undefined;
24
+ callId: string;
25
+ id?: string | undefined;
26
+ name: string;
27
+ /**
28
+ * Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
29
+ */
30
+ namespace?: string | undefined;
31
+ status?: OutputItemFunctionCallStatusCompleted | OutputItemFunctionCallStatusIncomplete | OutputItemFunctionCallStatusInProgress | undefined;
32
+ type: "function_call";
33
+ };
34
+ /** @internal */
35
+ export declare const OutputItemFunctionCallStatusInProgress$inboundSchema: z.ZodEnum<typeof OutputItemFunctionCallStatusInProgress>;
36
+ /** @internal */
37
+ export declare const OutputItemFunctionCallStatusIncomplete$inboundSchema: z.ZodEnum<typeof OutputItemFunctionCallStatusIncomplete>;
38
+ /** @internal */
39
+ export declare const OutputItemFunctionCallStatusCompleted$inboundSchema: z.ZodEnum<typeof OutputItemFunctionCallStatusCompleted>;
40
+ /** @internal */
41
+ export declare const OutputItemFunctionCallStatusUnion$inboundSchema: z.ZodType<OutputItemFunctionCallStatusUnion, unknown>;
42
+ export declare function outputItemFunctionCallStatusUnionFromJSON(jsonString: string): SafeParseResult<OutputItemFunctionCallStatusUnion, SDKValidationError>;
43
+ /** @internal */
44
+ export declare const OutputItemFunctionCall$inboundSchema: z.ZodType<OutputItemFunctionCall, unknown>;
45
+ export declare function outputItemFunctionCallFromJSON(jsonString: string): SafeParseResult<OutputItemFunctionCall, SDKValidationError>;
46
+ //# sourceMappingURL=outputitemfunctioncall.d.ts.map
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 43cb10359f32
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ export const OutputItemFunctionCallStatusInProgress = {
9
+ InProgress: "in_progress",
10
+ };
11
+ export const OutputItemFunctionCallStatusIncomplete = {
12
+ Incomplete: "incomplete",
13
+ };
14
+ export const OutputItemFunctionCallStatusCompleted = {
15
+ Completed: "completed",
16
+ };
17
+ /** @internal */
18
+ export const OutputItemFunctionCallStatusInProgress$inboundSchema = z.enum(OutputItemFunctionCallStatusInProgress);
19
+ /** @internal */
20
+ export const OutputItemFunctionCallStatusIncomplete$inboundSchema = z.enum(OutputItemFunctionCallStatusIncomplete);
21
+ /** @internal */
22
+ export const OutputItemFunctionCallStatusCompleted$inboundSchema = z.enum(OutputItemFunctionCallStatusCompleted);
23
+ /** @internal */
24
+ export const OutputItemFunctionCallStatusUnion$inboundSchema = z.union([
25
+ OutputItemFunctionCallStatusCompleted$inboundSchema,
26
+ OutputItemFunctionCallStatusIncomplete$inboundSchema,
27
+ OutputItemFunctionCallStatusInProgress$inboundSchema,
28
+ ]);
29
+ export function outputItemFunctionCallStatusUnionFromJSON(jsonString) {
30
+ return safeParse(jsonString, (x) => OutputItemFunctionCallStatusUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemFunctionCallStatusUnion' from JSON`);
31
+ }
32
+ /** @internal */
33
+ export const OutputItemFunctionCall$inboundSchema = z.object({
34
+ arguments: z.string(),
35
+ async: z.boolean().optional(),
36
+ call_id: z.string(),
37
+ id: z.string().optional(),
38
+ name: z.string(),
39
+ namespace: z.string().optional(),
40
+ status: z.union([
41
+ OutputItemFunctionCallStatusCompleted$inboundSchema,
42
+ OutputItemFunctionCallStatusIncomplete$inboundSchema,
43
+ OutputItemFunctionCallStatusInProgress$inboundSchema,
44
+ ]).optional(),
45
+ type: z.literal("function_call"),
46
+ }).transform((v) => {
47
+ return remap$(v, {
48
+ "call_id": "callId",
49
+ });
50
+ });
51
+ export function outputItemFunctionCallFromJSON(jsonString) {
52
+ return safeParse(jsonString, (x) => OutputItemFunctionCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemFunctionCall' from JSON`);
53
+ }
54
+ //# sourceMappingURL=outputitemfunctioncall.js.map
@@ -1,21 +1,14 @@
1
1
  import * as z from "zod/v4";
2
- import { ClosedEnum } from "../types/enums.js";
3
2
  import { Result as SafeParseResult } from "../types/fp.js";
4
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
4
  import { ImageGenerationStatus } from "./imagegenerationstatus.js";
6
- export declare const OutputItemImageGenerationCallType: {
7
- readonly ImageGenerationCall: "image_generation_call";
8
- };
9
- export type OutputItemImageGenerationCallType = ClosedEnum<typeof OutputItemImageGenerationCallType>;
10
5
  export type OutputItemImageGenerationCall = {
11
6
  id: string;
12
7
  result: string | null;
13
8
  status: ImageGenerationStatus;
14
- type: OutputItemImageGenerationCallType;
9
+ type: "image_generation_call";
15
10
  };
16
11
  /** @internal */
17
- export declare const OutputItemImageGenerationCallType$inboundSchema: z.ZodEnum<typeof OutputItemImageGenerationCallType>;
18
- /** @internal */
19
12
  export declare const OutputItemImageGenerationCall$inboundSchema: z.ZodType<OutputItemImageGenerationCall, unknown>;
20
13
  export declare function outputItemImageGenerationCallFromJSON(jsonString: string): SafeParseResult<OutputItemImageGenerationCall, SDKValidationError>;
21
14
  //# sourceMappingURL=outputitemimagegenerationcall.d.ts.map
@@ -5,17 +5,12 @@
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { ImageGenerationStatus$inboundSchema, } from "./imagegenerationstatus.js";
8
- export const OutputItemImageGenerationCallType = {
9
- ImageGenerationCall: "image_generation_call",
10
- };
11
- /** @internal */
12
- export const OutputItemImageGenerationCallType$inboundSchema = z.enum(OutputItemImageGenerationCallType);
13
8
  /** @internal */
14
9
  export const OutputItemImageGenerationCall$inboundSchema = z.object({
15
10
  id: z.string(),
16
11
  result: z.nullable(z.string()).default(null),
17
12
  status: ImageGenerationStatus$inboundSchema,
18
- type: OutputItemImageGenerationCallType$inboundSchema,
13
+ type: z.literal("image_generation_call"),
19
14
  });
20
15
  export function outputItemImageGenerationCallFromJSON(jsonString) {
21
16
  return safeParse(jsonString, (x) => OutputItemImageGenerationCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemImageGenerationCall' from JSON`);
@@ -0,0 +1,40 @@
1
+ import * as z from "zod/v4";
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 { ReasoningSummaryText } from "./reasoningsummarytext.js";
6
+ import { ReasoningTextContent } from "./reasoningtextcontent.js";
7
+ export declare const OutputItemReasoningStatusInProgress: {
8
+ readonly InProgress: "in_progress";
9
+ };
10
+ export type OutputItemReasoningStatusInProgress = ClosedEnum<typeof OutputItemReasoningStatusInProgress>;
11
+ export declare const OutputItemReasoningStatusIncomplete: {
12
+ readonly Incomplete: "incomplete";
13
+ };
14
+ export type OutputItemReasoningStatusIncomplete = ClosedEnum<typeof OutputItemReasoningStatusIncomplete>;
15
+ export declare const OutputItemReasoningStatusCompleted: {
16
+ readonly Completed: "completed";
17
+ };
18
+ export type OutputItemReasoningStatusCompleted = ClosedEnum<typeof OutputItemReasoningStatusCompleted>;
19
+ export type OutputItemReasoningStatusUnion = OutputItemReasoningStatusCompleted | OutputItemReasoningStatusIncomplete | OutputItemReasoningStatusInProgress;
20
+ export type OutputItemReasoning = {
21
+ content?: Array<ReasoningTextContent> | undefined;
22
+ encryptedContent?: string | null | undefined;
23
+ id: string;
24
+ status?: OutputItemReasoningStatusCompleted | OutputItemReasoningStatusIncomplete | OutputItemReasoningStatusInProgress | undefined;
25
+ summary: Array<ReasoningSummaryText>;
26
+ type: "reasoning";
27
+ };
28
+ /** @internal */
29
+ export declare const OutputItemReasoningStatusInProgress$inboundSchema: z.ZodEnum<typeof OutputItemReasoningStatusInProgress>;
30
+ /** @internal */
31
+ export declare const OutputItemReasoningStatusIncomplete$inboundSchema: z.ZodEnum<typeof OutputItemReasoningStatusIncomplete>;
32
+ /** @internal */
33
+ export declare const OutputItemReasoningStatusCompleted$inboundSchema: z.ZodEnum<typeof OutputItemReasoningStatusCompleted>;
34
+ /** @internal */
35
+ export declare const OutputItemReasoningStatusUnion$inboundSchema: z.ZodType<OutputItemReasoningStatusUnion, unknown>;
36
+ export declare function outputItemReasoningStatusUnionFromJSON(jsonString: string): SafeParseResult<OutputItemReasoningStatusUnion, SDKValidationError>;
37
+ /** @internal */
38
+ export declare const OutputItemReasoning$inboundSchema: z.ZodType<OutputItemReasoning, unknown>;
39
+ export declare function outputItemReasoningFromJSON(jsonString: string): SafeParseResult<OutputItemReasoning, SDKValidationError>;
40
+ //# sourceMappingURL=outputitemreasoning.d.ts.map
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: a1c7dca97393
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { ReasoningSummaryText$inboundSchema, } from "./reasoningsummarytext.js";
9
+ import { ReasoningTextContent$inboundSchema, } from "./reasoningtextcontent.js";
10
+ export const OutputItemReasoningStatusInProgress = {
11
+ InProgress: "in_progress",
12
+ };
13
+ export const OutputItemReasoningStatusIncomplete = {
14
+ Incomplete: "incomplete",
15
+ };
16
+ export const OutputItemReasoningStatusCompleted = {
17
+ Completed: "completed",
18
+ };
19
+ /** @internal */
20
+ export const OutputItemReasoningStatusInProgress$inboundSchema = z.enum(OutputItemReasoningStatusInProgress);
21
+ /** @internal */
22
+ export const OutputItemReasoningStatusIncomplete$inboundSchema = z.enum(OutputItemReasoningStatusIncomplete);
23
+ /** @internal */
24
+ export const OutputItemReasoningStatusCompleted$inboundSchema = z.enum(OutputItemReasoningStatusCompleted);
25
+ /** @internal */
26
+ export const OutputItemReasoningStatusUnion$inboundSchema = z.union([
27
+ OutputItemReasoningStatusCompleted$inboundSchema,
28
+ OutputItemReasoningStatusIncomplete$inboundSchema,
29
+ OutputItemReasoningStatusInProgress$inboundSchema,
30
+ ]);
31
+ export function outputItemReasoningStatusUnionFromJSON(jsonString) {
32
+ return safeParse(jsonString, (x) => OutputItemReasoningStatusUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemReasoningStatusUnion' from JSON`);
33
+ }
34
+ /** @internal */
35
+ export const OutputItemReasoning$inboundSchema = z.object({
36
+ content: z.array(ReasoningTextContent$inboundSchema).optional(),
37
+ encrypted_content: z.nullable(z.string()).optional(),
38
+ id: z.string(),
39
+ status: z.union([
40
+ OutputItemReasoningStatusCompleted$inboundSchema,
41
+ OutputItemReasoningStatusIncomplete$inboundSchema,
42
+ OutputItemReasoningStatusInProgress$inboundSchema,
43
+ ]).optional(),
44
+ summary: z.array(ReasoningSummaryText$inboundSchema),
45
+ type: z.literal("reasoning"),
46
+ }).transform((v) => {
47
+ return remap$(v, {
48
+ "encrypted_content": "encryptedContent",
49
+ });
50
+ });
51
+ export function outputItemReasoningFromJSON(jsonString) {
52
+ return safeParse(jsonString, (x) => OutputItemReasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemReasoning' from JSON`);
53
+ }
54
+ //# sourceMappingURL=outputitemreasoning.js.map
@@ -0,0 +1,47 @@
1
+ import * as z from "zod/v4";
2
+ import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { WebSearchSource } from "./websearchsource.js";
6
+ import { WebSearchStatus } from "./websearchstatus.js";
7
+ export type OutputItemWebSearchCallActionFindInPage = {
8
+ pattern: string;
9
+ type: "find_in_page";
10
+ url: string;
11
+ };
12
+ export type OutputItemWebSearchCallActionOpenPage = {
13
+ type: "open_page";
14
+ url?: string | null | undefined;
15
+ };
16
+ export type OutputItemWebSearchCallActionSearch = {
17
+ queries?: Array<string> | undefined;
18
+ query: string;
19
+ sources?: Array<WebSearchSource> | undefined;
20
+ type: "search";
21
+ };
22
+ export type OutputItemWebSearchCallActionUnion = OutputItemWebSearchCallActionSearch | OutputItemWebSearchCallActionOpenPage | OutputItemWebSearchCallActionFindInPage | discriminatedUnionTypes.Unknown<"type">;
23
+ export type OutputItemWebSearchCall = {
24
+ action?: OutputItemWebSearchCallActionSearch | OutputItemWebSearchCallActionOpenPage | OutputItemWebSearchCallActionFindInPage | discriminatedUnionTypes.Unknown<"type"> | undefined;
25
+ id: string;
26
+ status: WebSearchStatus;
27
+ type: "web_search_call";
28
+ additionalProperties?: {
29
+ [k: string]: any;
30
+ } | undefined;
31
+ };
32
+ /** @internal */
33
+ export declare const OutputItemWebSearchCallActionFindInPage$inboundSchema: z.ZodType<OutputItemWebSearchCallActionFindInPage, unknown>;
34
+ export declare function outputItemWebSearchCallActionFindInPageFromJSON(jsonString: string): SafeParseResult<OutputItemWebSearchCallActionFindInPage, SDKValidationError>;
35
+ /** @internal */
36
+ export declare const OutputItemWebSearchCallActionOpenPage$inboundSchema: z.ZodType<OutputItemWebSearchCallActionOpenPage, unknown>;
37
+ export declare function outputItemWebSearchCallActionOpenPageFromJSON(jsonString: string): SafeParseResult<OutputItemWebSearchCallActionOpenPage, SDKValidationError>;
38
+ /** @internal */
39
+ export declare const OutputItemWebSearchCallActionSearch$inboundSchema: z.ZodType<OutputItemWebSearchCallActionSearch, unknown>;
40
+ export declare function outputItemWebSearchCallActionSearchFromJSON(jsonString: string): SafeParseResult<OutputItemWebSearchCallActionSearch, SDKValidationError>;
41
+ /** @internal */
42
+ export declare const OutputItemWebSearchCallActionUnion$inboundSchema: z.ZodType<OutputItemWebSearchCallActionUnion, unknown>;
43
+ export declare function outputItemWebSearchCallActionUnionFromJSON(jsonString: string): SafeParseResult<OutputItemWebSearchCallActionUnion, SDKValidationError>;
44
+ /** @internal */
45
+ export declare const OutputItemWebSearchCall$inboundSchema: z.ZodType<OutputItemWebSearchCall, unknown>;
46
+ export declare function outputItemWebSearchCallFromJSON(jsonString: string): SafeParseResult<OutputItemWebSearchCall, SDKValidationError>;
47
+ //# sourceMappingURL=outputitemwebsearchcall.d.ts.map
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 759b367102df
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
7
+ import { discriminatedUnion } from "../types/discriminatedUnion.js";
8
+ import { WebSearchSource$inboundSchema, } from "./websearchsource.js";
9
+ import { WebSearchStatus$inboundSchema, } from "./websearchstatus.js";
10
+ /** @internal */
11
+ export const OutputItemWebSearchCallActionFindInPage$inboundSchema = z.object({
12
+ pattern: z.string(),
13
+ type: z.literal("find_in_page"),
14
+ url: z.string(),
15
+ });
16
+ export function outputItemWebSearchCallActionFindInPageFromJSON(jsonString) {
17
+ return safeParse(jsonString, (x) => OutputItemWebSearchCallActionFindInPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionFindInPage' from JSON`);
18
+ }
19
+ /** @internal */
20
+ export const OutputItemWebSearchCallActionOpenPage$inboundSchema = z.object({
21
+ type: z.literal("open_page"),
22
+ url: z.nullable(z.string()).optional(),
23
+ });
24
+ export function outputItemWebSearchCallActionOpenPageFromJSON(jsonString) {
25
+ return safeParse(jsonString, (x) => OutputItemWebSearchCallActionOpenPage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionOpenPage' from JSON`);
26
+ }
27
+ /** @internal */
28
+ export const OutputItemWebSearchCallActionSearch$inboundSchema = z.object({
29
+ queries: z.array(z.string()).optional(),
30
+ query: z.string(),
31
+ sources: z.array(WebSearchSource$inboundSchema).optional(),
32
+ type: z.literal("search"),
33
+ });
34
+ export function outputItemWebSearchCallActionSearchFromJSON(jsonString) {
35
+ return safeParse(jsonString, (x) => OutputItemWebSearchCallActionSearch$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionSearch' from JSON`);
36
+ }
37
+ /** @internal */
38
+ export const OutputItemWebSearchCallActionUnion$inboundSchema = discriminatedUnion("type", {
39
+ search: z.lazy(() => OutputItemWebSearchCallActionSearch$inboundSchema),
40
+ open_page: z.lazy(() => OutputItemWebSearchCallActionOpenPage$inboundSchema),
41
+ find_in_page: z.lazy(() => OutputItemWebSearchCallActionFindInPage$inboundSchema),
42
+ });
43
+ export function outputItemWebSearchCallActionUnionFromJSON(jsonString) {
44
+ return safeParse(jsonString, (x) => OutputItemWebSearchCallActionUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCallActionUnion' from JSON`);
45
+ }
46
+ /** @internal */
47
+ export const OutputItemWebSearchCall$inboundSchema = collectExtraKeys$(z.object({
48
+ action: discriminatedUnion("type", {
49
+ search: z.lazy(() => OutputItemWebSearchCallActionSearch$inboundSchema),
50
+ open_page: z.lazy(() => OutputItemWebSearchCallActionOpenPage$inboundSchema),
51
+ find_in_page: z.lazy(() => OutputItemWebSearchCallActionFindInPage$inboundSchema),
52
+ }).optional(),
53
+ id: z.string(),
54
+ status: WebSearchStatus$inboundSchema,
55
+ type: z.literal("web_search_call"),
56
+ }).catchall(z.any()), "additionalProperties", true);
57
+ export function outputItemWebSearchCallFromJSON(jsonString) {
58
+ return safeParse(jsonString, (x) => OutputItemWebSearchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemWebSearchCall' from JSON`);
59
+ }
60
+ //# sourceMappingURL=outputitemwebsearchcall.js.map
@@ -35,10 +35,6 @@ export declare const OutputMessageStatusCompleted: {
35
35
  };
36
36
  export type OutputMessageStatusCompleted = ClosedEnum<typeof OutputMessageStatusCompleted>;
37
37
  export type OutputMessageStatusUnion = OutputMessageStatusCompleted | OutputMessageStatusIncomplete | OutputMessageStatusInProgress;
38
- export declare const OutputMessageType: {
39
- readonly Message: "message";
40
- };
41
- export type OutputMessageType = ClosedEnum<typeof OutputMessageType>;
42
38
  export type OutputMessage = {
43
39
  content: Array<ResponseOutputText | OpenAIResponsesRefusalContent | discriminatedUnionTypes.Unknown<"type">>;
44
40
  id: string;
@@ -48,7 +44,7 @@ export type OutputMessage = {
48
44
  phase?: OutputMessagePhaseCommentary | OutputMessagePhaseFinalAnswer | null | undefined;
49
45
  role: OutputMessageRole;
50
46
  status?: OutputMessageStatusCompleted | OutputMessageStatusIncomplete | OutputMessageStatusInProgress | undefined;
51
- type: OutputMessageType;
47
+ type: "message";
52
48
  };
53
49
  /** @internal */
54
50
  export declare const OutputMessageContent$inboundSchema: z.ZodType<OutputMessageContent, unknown>;
@@ -72,8 +68,6 @@ export declare const OutputMessageStatusCompleted$inboundSchema: z.ZodEnum<typeo
72
68
  export declare const OutputMessageStatusUnion$inboundSchema: z.ZodType<OutputMessageStatusUnion, unknown>;
73
69
  export declare function outputMessageStatusUnionFromJSON(jsonString: string): SafeParseResult<OutputMessageStatusUnion, SDKValidationError>;
74
70
  /** @internal */
75
- export declare const OutputMessageType$inboundSchema: z.ZodEnum<typeof OutputMessageType>;
76
- /** @internal */
77
71
  export declare const OutputMessage$inboundSchema: z.ZodType<OutputMessage, unknown>;
78
72
  export declare function outputMessageFromJSON(jsonString: string): SafeParseResult<OutputMessage, SDKValidationError>;
79
73
  //# sourceMappingURL=outputmessage.d.ts.map
@@ -25,9 +25,6 @@ export const OutputMessageStatusIncomplete = {
25
25
  export const OutputMessageStatusCompleted = {
26
26
  Completed: "completed",
27
27
  };
28
- export const OutputMessageType = {
29
- Message: "message",
30
- };
31
28
  /** @internal */
32
29
  export const OutputMessageContent$inboundSchema = discriminatedUnion("type", {
33
30
  output_text: ResponseOutputText$inboundSchema,
@@ -66,8 +63,6 @@ export function outputMessageStatusUnionFromJSON(jsonString) {
66
63
  return safeParse(jsonString, (x) => OutputMessageStatusUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMessageStatusUnion' from JSON`);
67
64
  }
68
65
  /** @internal */
69
- export const OutputMessageType$inboundSchema = z.enum(OutputMessageType);
70
- /** @internal */
71
66
  export const OutputMessage$inboundSchema = z
72
67
  .object({
73
68
  content: z.array(discriminatedUnion("type", {
@@ -85,7 +80,7 @@ export const OutputMessage$inboundSchema = z
85
80
  OutputMessageStatusIncomplete$inboundSchema,
86
81
  OutputMessageStatusInProgress$inboundSchema,
87
82
  ]).optional(),
88
- type: OutputMessageType$inboundSchema,
83
+ type: z.literal("message"),
89
84
  });
90
85
  export function outputMessageFromJSON(jsonString) {
91
86
  return safeParse(jsonString, (x) => OutputMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMessage' from JSON`);