@openrouter/sdk 1.4.9 → 1.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/funcs/endUsersCreate.d.ts +19 -0
- package/esm/funcs/endUsersCreate.js +100 -0
- package/esm/funcs/endUsersDelete.d.ts +18 -0
- package/esm/funcs/endUsersDelete.js +103 -0
- package/esm/funcs/endUsersGet.d.ts +19 -0
- package/esm/funcs/endUsersGet.js +103 -0
- package/esm/funcs/endUsersList.d.ts +21 -0
- package/esm/funcs/endUsersList.js +135 -0
- package/esm/funcs/endUsersUpdate.d.ts +19 -0
- package/esm/funcs/endUsersUpdate.js +106 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/alignment.d.ts +17 -0
- package/esm/models/alignment.js +15 -0
- package/esm/models/alignmentallowedcallrecord.d.ts +19 -0
- package/esm/models/alignmentallowedcallrecord.js +17 -0
- package/esm/models/alignmentblockedcallrecord.d.ts +19 -0
- package/esm/models/alignmentblockedcallrecord.js +17 -0
- package/esm/models/alignmentcallrecord.d.ts +12 -0
- package/esm/models/alignmentcallrecord.js +19 -0
- package/esm/models/alignmentchataudio.d.ts +20 -0
- package/esm/models/alignmentchataudio.js +15 -0
- package/esm/models/alignmentchatimage.d.ts +24 -0
- package/esm/models/alignmentchatimage.js +32 -0
- package/esm/models/alignmentchatrejected.d.ts +31 -0
- package/esm/models/alignmentchatrejected.js +32 -0
- package/esm/models/alignmentchattoolcall.d.ts +26 -0
- package/esm/models/alignmentchattoolcall.js +29 -0
- package/esm/models/alignmentplugin.d.ts +54 -0
- package/esm/models/alignmentplugin.js +33 -0
- package/esm/models/alignmentrejected.d.ts +10 -0
- package/esm/models/alignmentrejected.js +17 -0
- package/esm/models/alignmentresponsesrejected.d.ts +18 -0
- package/esm/models/alignmentresponsesrejected.js +31 -0
- package/esm/models/alignmentrulerecord.d.ts +17 -0
- package/esm/models/alignmentrulerecord.js +15 -0
- package/esm/models/alignmentunavailablecallrecord.d.ts +25 -0
- package/esm/models/alignmentunavailablecallrecord.js +25 -0
- package/esm/models/batchobject.d.ts +5 -0
- package/esm/models/batchobject.js +2 -0
- package/esm/models/chatrequest.d.ts +5 -4
- package/esm/models/chatrequest.js +3 -0
- package/esm/models/createenduserrequest.d.ts +15 -0
- package/esm/models/createenduserrequest.js +13 -0
- package/esm/models/enduser.d.ts +25 -0
- package/esm/models/enduser.js +24 -0
- package/esm/models/enduserresponse.d.ts +11 -0
- package/esm/models/enduserresponse.js +15 -0
- package/esm/models/index.d.ts +27 -1
- package/esm/models/index.js +27 -1
- package/esm/models/listendusersresponse.d.ts +15 -0
- package/esm/models/listendusersresponse.js +21 -0
- package/esm/models/messagesrequest.d.ts +5 -4
- package/esm/models/messagesrequest.js +3 -0
- package/esm/models/{responseserrorfield.d.ts → openresponseserrorfield.d.ts} +10 -5
- package/esm/models/{responseserrorfield.js → openresponseserrorfield.js} +7 -5
- package/esm/models/openresponseserrormetadata.d.ts +31 -0
- package/esm/models/openresponseserrormetadata.js +25 -0
- package/esm/models/openresponsesresult.d.ts +8 -3
- package/esm/models/openresponsesresult.js +4 -2
- package/esm/models/operations/createenduser.d.ts +56 -0
- package/esm/models/operations/createenduser.js +23 -0
- package/esm/models/operations/deleteenduser.d.ts +58 -0
- package/esm/models/operations/deleteenduser.js +21 -0
- package/esm/models/operations/getenduser.d.ts +58 -0
- package/esm/models/operations/getenduser.js +21 -0
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.js +5 -0
- package/esm/models/operations/listendusers.d.ts +82 -0
- package/esm/models/operations/listendusers.js +38 -0
- package/esm/models/operations/updateenduser.d.ts +61 -0
- package/esm/models/operations/updateenduser.js +24 -0
- package/esm/models/outputitemapplypatchcall.d.ts +31 -0
- package/esm/models/outputitemapplypatchcall.js +49 -0
- package/esm/models/outputitemcodeinterpretercall.d.ts +37 -0
- package/esm/models/outputitemcodeinterpretercall.js +51 -0
- package/esm/models/outputitemcustomtoolcall.d.ts +32 -0
- package/esm/models/outputitemcustomtoolcall.js +34 -0
- package/esm/models/outputitemfilesearchcall.d.ts +14 -0
- package/esm/models/outputitemfilesearchcall.js +18 -0
- package/esm/models/outputitemfunctioncall.d.ts +46 -0
- package/esm/models/outputitemfunctioncall.js +54 -0
- package/esm/models/outputitemimagegenerationcall.d.ts +1 -8
- package/esm/models/outputitemimagegenerationcall.js +1 -6
- package/esm/models/outputitemreasoning.d.ts +40 -0
- package/esm/models/outputitemreasoning.js +54 -0
- package/esm/models/outputitemwebsearchcall.d.ts +47 -0
- package/esm/models/outputitemwebsearchcall.js +60 -0
- package/esm/models/outputmessage.d.ts +1 -7
- package/esm/models/outputmessage.js +1 -6
- package/esm/models/outputwebsearchcallitem.d.ts +25 -25
- package/esm/models/outputwebsearchcallitem.js +31 -32
- package/esm/models/responsesrequest.d.ts +5 -4
- package/esm/models/responsesrequest.js +3 -0
- package/esm/models/updateenduserrequest.d.ts +15 -0
- package/esm/models/updateenduserrequest.js +18 -0
- package/esm/sdk/endusers.d.ts +44 -0
- package/esm/sdk/endusers.js +60 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
export type UpdateEndUserGlobals = {
|
|
4
|
+
/**
|
|
5
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is used to track API usage per application.
|
|
9
|
+
*/
|
|
10
|
+
httpReferer?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*/
|
|
16
|
+
appTitle?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
*/
|
|
22
|
+
appCategories?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type UpdateEndUserRequest = {
|
|
25
|
+
/**
|
|
26
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is used to track API usage per application.
|
|
30
|
+
*/
|
|
31
|
+
httpReferer?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*/
|
|
37
|
+
appTitle?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
*/
|
|
43
|
+
appCategories?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
46
|
+
*/
|
|
47
|
+
user: string;
|
|
48
|
+
updateEndUserRequest: models.UpdateEndUserRequest;
|
|
49
|
+
};
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type UpdateEndUserRequest$Outbound = {
|
|
52
|
+
"HTTP-Referer"?: string | undefined;
|
|
53
|
+
appTitle?: string | undefined;
|
|
54
|
+
appCategories?: string | undefined;
|
|
55
|
+
user: string;
|
|
56
|
+
UpdateEndUserRequest: models.UpdateEndUserRequest$Outbound;
|
|
57
|
+
};
|
|
58
|
+
/** @internal */
|
|
59
|
+
export declare const UpdateEndUserRequest$outboundSchema: z.ZodType<UpdateEndUserRequest$Outbound, UpdateEndUserRequest>;
|
|
60
|
+
export declare function updateEndUserRequestToJSON(updateEndUserRequest: UpdateEndUserRequest): string;
|
|
61
|
+
//# sourceMappingURL=updateenduser.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 15ed3e7fa116
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { UpdateEndUserRequest$outboundSchema as models_UpdateEndUserRequest$outboundSchema } from "../updateenduserrequest.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const UpdateEndUserRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
user: z.string(),
|
|
14
|
+
updateEndUserRequest: models_UpdateEndUserRequest$outboundSchema,
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
httpReferer: "HTTP-Referer",
|
|
18
|
+
updateEndUserRequest: "UpdateEndUserRequest",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function updateEndUserRequestToJSON(updateEndUserRequest) {
|
|
22
|
+
return JSON.stringify(UpdateEndUserRequest$outboundSchema.parse(updateEndUserRequest));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=updateenduser.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
+
import { OpenEnum } from "../types/enums.js";
|
|
4
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
|
+
import { ApplyPatchCreateFileOperation } from "./applypatchcreatefileoperation.js";
|
|
6
|
+
import { ApplyPatchDeleteFileOperation } from "./applypatchdeletefileoperation.js";
|
|
7
|
+
import { ApplyPatchUpdateFileOperation } from "./applypatchupdatefileoperation.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
export type Operation = ApplyPatchCreateFileOperation | ApplyPatchDeleteFileOperation | ApplyPatchUpdateFileOperation | discriminatedUnionTypes.Unknown<"type">;
|
|
10
|
+
export declare const OutputItemApplyPatchCallStatus: {
|
|
11
|
+
readonly InProgress: "in_progress";
|
|
12
|
+
readonly Completed: "completed";
|
|
13
|
+
};
|
|
14
|
+
export type OutputItemApplyPatchCallStatus = OpenEnum<typeof OutputItemApplyPatchCallStatus>;
|
|
15
|
+
export type OutputItemApplyPatchCall = {
|
|
16
|
+
callId: string;
|
|
17
|
+
createdBy?: string | undefined;
|
|
18
|
+
id: string;
|
|
19
|
+
operation: ApplyPatchCreateFileOperation | ApplyPatchDeleteFileOperation | ApplyPatchUpdateFileOperation | discriminatedUnionTypes.Unknown<"type">;
|
|
20
|
+
status: OutputItemApplyPatchCallStatus;
|
|
21
|
+
type: "apply_patch_call";
|
|
22
|
+
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const Operation$inboundSchema: z.ZodType<Operation, unknown>;
|
|
25
|
+
export declare function operationFromJSON(jsonString: string): SafeParseResult<Operation, SDKValidationError>;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const OutputItemApplyPatchCallStatus$inboundSchema: z.ZodType<OutputItemApplyPatchCallStatus, unknown>;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const OutputItemApplyPatchCall$inboundSchema: z.ZodType<OutputItemApplyPatchCall, unknown>;
|
|
30
|
+
export declare function outputItemApplyPatchCallFromJSON(jsonString: string): SafeParseResult<OutputItemApplyPatchCall, SDKValidationError>;
|
|
31
|
+
//# sourceMappingURL=outputitemapplypatchcall.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e89e86568a78
|
|
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 { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
|
+
import * as openEnums from "../types/enums.js";
|
|
10
|
+
import { ApplyPatchCreateFileOperation$inboundSchema, } from "./applypatchcreatefileoperation.js";
|
|
11
|
+
import { ApplyPatchDeleteFileOperation$inboundSchema, } from "./applypatchdeletefileoperation.js";
|
|
12
|
+
import { ApplyPatchUpdateFileOperation$inboundSchema, } from "./applypatchupdatefileoperation.js";
|
|
13
|
+
export const OutputItemApplyPatchCallStatus = {
|
|
14
|
+
InProgress: "in_progress",
|
|
15
|
+
Completed: "completed",
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const Operation$inboundSchema = discriminatedUnion("type", {
|
|
19
|
+
create_file: ApplyPatchCreateFileOperation$inboundSchema,
|
|
20
|
+
delete_file: ApplyPatchDeleteFileOperation$inboundSchema,
|
|
21
|
+
update_file: ApplyPatchUpdateFileOperation$inboundSchema,
|
|
22
|
+
});
|
|
23
|
+
export function operationFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => Operation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Operation' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const OutputItemApplyPatchCallStatus$inboundSchema = openEnums.inboundSchema(OutputItemApplyPatchCallStatus);
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const OutputItemApplyPatchCall$inboundSchema = z.object({
|
|
30
|
+
call_id: z.string(),
|
|
31
|
+
created_by: z.string().optional(),
|
|
32
|
+
id: z.string(),
|
|
33
|
+
operation: discriminatedUnion("type", {
|
|
34
|
+
create_file: ApplyPatchCreateFileOperation$inboundSchema,
|
|
35
|
+
delete_file: ApplyPatchDeleteFileOperation$inboundSchema,
|
|
36
|
+
update_file: ApplyPatchUpdateFileOperation$inboundSchema,
|
|
37
|
+
}),
|
|
38
|
+
status: OutputItemApplyPatchCallStatus$inboundSchema,
|
|
39
|
+
type: z.literal("apply_patch_call"),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"call_id": "callId",
|
|
43
|
+
"created_by": "createdBy",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
export function outputItemApplyPatchCallFromJSON(jsonString) {
|
|
47
|
+
return safeParse(jsonString, (x) => OutputItemApplyPatchCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemApplyPatchCall' from JSON`);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=outputitemapplypatchcall.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
+
import { OpenEnum } from "../types/enums.js";
|
|
4
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
|
+
import { CodeInterpreterFileOutput } from "./codeinterpreterfileoutput.js";
|
|
6
|
+
import { CodeInterpreterImageOutput } from "./codeinterpreterimageoutput.js";
|
|
7
|
+
import { CodeInterpreterLogsOutput } from "./codeinterpreterlogsoutput.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
export type OutputItemCodeInterpreterCallOutput = CodeInterpreterFileOutput | CodeInterpreterImageOutput | CodeInterpreterLogsOutput | discriminatedUnionTypes.Unknown<"type">;
|
|
10
|
+
export declare const OutputItemCodeInterpreterCallStatus: {
|
|
11
|
+
readonly InProgress: "in_progress";
|
|
12
|
+
readonly Completed: "completed";
|
|
13
|
+
readonly Incomplete: "incomplete";
|
|
14
|
+
readonly Interpreting: "interpreting";
|
|
15
|
+
readonly Failed: "failed";
|
|
16
|
+
};
|
|
17
|
+
export type OutputItemCodeInterpreterCallStatus = OpenEnum<typeof OutputItemCodeInterpreterCallStatus>;
|
|
18
|
+
export type OutputItemCodeInterpreterCall = {
|
|
19
|
+
code?: string | null | undefined;
|
|
20
|
+
containerId?: string | undefined;
|
|
21
|
+
id: string;
|
|
22
|
+
outputs?: Array<CodeInterpreterFileOutput | CodeInterpreterImageOutput | CodeInterpreterLogsOutput | discriminatedUnionTypes.Unknown<"type">> | null | undefined;
|
|
23
|
+
status: OutputItemCodeInterpreterCallStatus;
|
|
24
|
+
type: "code_interpreter_call";
|
|
25
|
+
additionalProperties?: {
|
|
26
|
+
[k: string]: any;
|
|
27
|
+
} | undefined;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const OutputItemCodeInterpreterCallOutput$inboundSchema: z.ZodType<OutputItemCodeInterpreterCallOutput, unknown>;
|
|
31
|
+
export declare function outputItemCodeInterpreterCallOutputFromJSON(jsonString: string): SafeParseResult<OutputItemCodeInterpreterCallOutput, SDKValidationError>;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const OutputItemCodeInterpreterCallStatus$inboundSchema: z.ZodType<OutputItemCodeInterpreterCallStatus, unknown>;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const OutputItemCodeInterpreterCall$inboundSchema: z.ZodType<OutputItemCodeInterpreterCall, unknown>;
|
|
36
|
+
export declare function outputItemCodeInterpreterCallFromJSON(jsonString: string): SafeParseResult<OutputItemCodeInterpreterCall, SDKValidationError>;
|
|
37
|
+
//# sourceMappingURL=outputitemcodeinterpretercall.d.ts.map
|
|
@@ -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:
|
|
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:
|
|
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
|