@openrouter/sdk 0.0.1-beta.5 → 0.0.1-beta.7
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/jsr.json +1 -1
- package/lib/base64.d.ts +3 -3
- package/lib/base64.js +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/env.d.ts +2 -2
- package/lib/env.js +1 -1
- package/lib/schemas.d.ts +6 -4
- package/lib/schemas.js +1 -1
- package/models/activityitem.d.ts +5 -5
- package/models/activityitem.js +3 -2
- package/models/assistantmessage.d.ts +9 -9
- package/models/assistantmessage.js +1 -1
- package/models/chatcompletionfinishreason.d.ts +5 -5
- package/models/chatcompletionfinishreason.js +3 -3
- package/models/chaterror.d.ts +9 -9
- package/models/chaterror.js +9 -4
- package/models/chatgenerationparams.d.ts +33 -33
- package/models/chatgenerationparams.js +7 -7
- package/models/chatgenerationtokenusage.d.ts +13 -13
- package/models/chatgenerationtokenusage.js +1 -1
- package/models/chatmessagecontentitem.d.ts +5 -5
- package/models/chatmessagecontentitem.js +1 -1
- package/models/chatmessagecontentitemaudio.d.ts +13 -13
- package/models/chatmessagecontentitemaudio.js +5 -4
- package/models/chatmessagecontentitemimage.d.ts +13 -13
- package/models/chatmessagecontentitemimage.js +5 -4
- package/models/chatmessagecontentitemtext.d.ts +5 -5
- package/models/chatmessagecontentitemtext.js +1 -1
- package/models/chatmessagetokenlogprob.d.ts +9 -9
- package/models/chatmessagetokenlogprob.js +1 -1
- package/models/chatmessagetokenlogprobs.d.ts +5 -5
- package/models/chatmessagetokenlogprobs.js +1 -1
- package/models/chatmessagetoolcall.d.ts +9 -9
- package/models/chatmessagetoolcall.js +1 -1
- package/models/chatresponse.d.ts +5 -5
- package/models/chatresponse.js +3 -2
- package/models/chatresponsechoice.d.ts +5 -5
- package/models/chatresponsechoice.js +1 -1
- package/models/chatstreamingchoice.d.ts +5 -5
- package/models/chatstreamingchoice.js +1 -1
- package/models/chatstreamingmessagechunk.d.ts +9 -9
- package/models/chatstreamingmessagechunk.js +2 -2
- package/models/chatstreamingmessagetoolcall.d.ts +9 -9
- package/models/chatstreamingmessagetoolcall.js +1 -1
- package/models/chatstreamingresponsechunk.d.ts +13 -13
- package/models/chatstreamingresponsechunk.js +3 -5
- package/models/chatstreamoptions.d.ts +5 -5
- package/models/chatstreamoptions.js +1 -1
- package/models/completionchoice.d.ts +9 -9
- package/models/completionchoice.js +3 -3
- package/models/completioncreateparams.d.ts +33 -33
- package/models/completioncreateparams.js +10 -9
- package/models/completionlogprobs.d.ts +5 -5
- package/models/completionlogprobs.js +3 -3
- package/models/completionresponse.d.ts +5 -5
- package/models/completionresponse.js +1 -1
- package/models/completionusage.d.ts +5 -5
- package/models/completionusage.js +1 -1
- package/models/createchargerequest.d.ts +5 -5
- package/models/createchargerequest.js +1 -1
- package/models/errorresponse.d.ts +13 -13
- package/models/errorresponse.js +7 -6
- package/models/errors/chaterror.d.ts +5 -5
- package/models/errors/chaterror.js +4 -4
- package/models/errors/errorresponse.d.ts +5 -5
- package/models/errors/errorresponse.js +6 -5
- package/models/errors/listproviders.d.ts +5 -5
- package/models/errors/listproviders.js +4 -4
- package/models/errors/responsevalidationerror.js +1 -1
- package/models/errors/sdkvalidationerror.d.ts +2 -2
- package/models/errors/sdkvalidationerror.js +3 -50
- package/models/filecitationannotation.d.ts +9 -9
- package/models/filecitationannotation.js +2 -2
- package/models/filepathannotation.d.ts +9 -9
- package/models/filepathannotation.js +2 -2
- package/models/imagegenerationstatus.d.ts +5 -5
- package/models/imagegenerationstatus.js +3 -3
- package/models/index.d.ts +7 -0
- package/models/index.js +7 -0
- package/models/jsonschemaconfig.d.ts +5 -5
- package/models/jsonschemaconfig.js +3 -3
- package/models/listendpointsresponse.d.ts +5 -5
- package/models/listendpointsresponse.js +1 -1
- package/models/message.d.ts +13 -13
- package/models/message.js +3 -2
- package/models/modelscountresponse.d.ts +5 -5
- package/models/modelscountresponse.js +1 -1
- package/models/modelslistresponse.d.ts +5 -5
- package/models/modelslistresponse.js +1 -1
- package/models/namedtoolchoice.d.ts +9 -9
- package/models/namedtoolchoice.js +1 -1
- package/models/openresponseseasyinputmessage.d.ts +33 -33
- package/models/openresponseseasyinputmessage.js +6 -9
- package/models/openresponsesformatjsonobject.d.ts +9 -9
- package/models/openresponsesformatjsonobject.js +2 -2
- package/models/openresponsesformatjsonschema.d.ts +9 -9
- package/models/openresponsesformatjsonschema.js +4 -4
- package/models/openresponsesformattext.d.ts +9 -9
- package/models/openresponsesformattext.js +2 -2
- package/models/openresponsesformattextconfig.d.ts +5 -5
- package/models/openresponsesformattextconfig.js +1 -1
- package/models/openresponsesfunctioncalloutput.d.ts +9 -9
- package/models/openresponsesfunctioncalloutput.js +2 -2
- package/models/openresponsesfunctiontoolcall.d.ts +9 -9
- package/models/openresponsesfunctiontoolcall.js +2 -2
- package/models/openresponsesinput.d.ts +5 -5
- package/models/openresponsesinput.js +1 -1
- package/models/openresponsesinputcontent.d.ts +5 -5
- package/models/openresponsesinputcontent.js +1 -1
- package/models/openresponsesinputfile.d.ts +9 -9
- package/models/openresponsesinputfile.js +2 -2
- package/models/openresponsesinputimage.d.ts +13 -13
- package/models/openresponsesinputimage.js +4 -4
- package/models/openresponsesinputitem.d.ts +13 -466
- package/models/openresponsesinputitem.js +19 -467
- package/models/openresponsesinputmessageitem.d.ts +25 -25
- package/models/openresponsesinputmessageitem.js +5 -7
- package/models/openresponsesinputtext.d.ts +9 -9
- package/models/openresponsesinputtext.js +2 -2
- package/models/openresponseslogprobs.d.ts +9 -9
- package/models/openresponseslogprobs.js +1 -1
- package/models/openresponsesnonstreamingresponse.d.ts +29 -29
- package/models/openresponsesnonstreamingresponse.js +17 -17
- package/models/openresponsesoutputtext.d.ts +13 -13
- package/models/openresponsesoutputtext.js +2 -2
- package/models/openresponsesprompt.d.ts +5 -5
- package/models/openresponsesprompt.js +3 -5
- package/models/openresponsesreasoning.d.ts +13 -13
- package/models/openresponsesreasoning.js +4 -4
- package/models/openresponsesreasoningconfig.d.ts +9 -9
- package/models/openresponsesreasoningconfig.js +3 -3
- package/models/openresponsesrefusalcontent.d.ts +9 -9
- package/models/openresponsesrefusalcontent.js +2 -2
- package/models/openresponsesrequest.d.ts +5 -5
- package/models/openresponsesrequest.js +1 -1
- package/models/openresponsesstreamevent.d.ts +233 -233
- package/models/openresponsesstreamevent.js +42 -43
- package/models/openresponsestextconfig.d.ts +9 -9
- package/models/openresponsestextconfig.js +5 -4
- package/models/openresponsestoolchoice.d.ts +25 -25
- package/models/openresponsestoolchoice.js +5 -5
- package/models/openresponsestoolunion.d.ts +13 -13
- package/models/openresponsestoolunion.js +4 -4
- package/models/openresponseswebsearch20250826tool.d.ts +13 -13
- package/models/openresponseswebsearch20250826tool.js +2 -2
- package/models/openresponseswebsearchpreview20250311tool.d.ts +18 -72
- package/models/openresponseswebsearchpreview20250311tool.js +18 -66
- package/models/openresponseswebsearchpreviewtool.d.ts +18 -72
- package/models/openresponseswebsearchpreviewtool.js +18 -67
- package/models/openresponseswebsearchtool.d.ts +13 -13
- package/models/openresponseswebsearchtool.js +2 -2
- package/models/operations/createapialpharesponses.d.ts +9 -9
- package/models/operations/createapialpharesponses.js +2 -3
- package/models/operations/createcoinbasecharge.d.ts +29 -29
- package/models/operations/createcoinbasecharge.js +7 -4
- package/models/operations/createkeys.d.ts +17 -17
- package/models/operations/createkeys.js +3 -3
- package/models/operations/deletekeys.d.ts +9 -9
- package/models/operations/deletekeys.js +1 -1
- package/models/operations/getcredits.d.ts +5 -5
- package/models/operations/getcredits.js +1 -1
- package/models/operations/getcurrentkey.d.ts +13 -13
- package/models/operations/getcurrentkey.js +1 -1
- package/models/operations/getgeneration.d.ts +17 -17
- package/models/operations/getgeneration.js +3 -3
- package/models/operations/getkey.d.ts +13 -13
- package/models/operations/getkey.js +5 -3
- package/models/operations/getmodels.d.ts +9 -9
- package/models/operations/getmodels.js +1 -1
- package/models/operations/getparameters.d.ts +25 -25
- package/models/operations/getparameters.js +5 -5
- package/models/operations/getuseractivity.d.ts +9 -9
- package/models/operations/getuseractivity.js +1 -1
- package/models/operations/list.d.ts +13 -13
- package/models/operations/list.js +7 -4
- package/models/operations/listendpoints.d.ts +9 -9
- package/models/operations/listendpoints.js +1 -1
- package/models/operations/listendpointszdr.d.ts +9 -9
- package/models/operations/listendpointszdr.js +1 -1
- package/models/operations/listmodelscount.d.ts +5 -5
- package/models/operations/listmodelscount.js +1 -1
- package/models/operations/listmodelsuser.d.ts +9 -9
- package/models/operations/listmodelsuser.js +1 -1
- package/models/operations/listproviders.d.ts +13 -13
- package/models/operations/listproviders.js +4 -4
- package/models/operations/sendchatcompletionrequest.d.ts +5 -5
- package/models/operations/sendchatcompletionrequest.js +2 -3
- package/models/operations/updatekeys.d.ts +21 -21
- package/models/operations/updatekeys.js +3 -3
- package/models/outputtextcontent.d.ts +13 -13
- package/models/outputtextcontent.js +2 -2
- package/models/publicendpoint.d.ts +5 -5
- package/models/publicendpoint.js +1 -1
- package/models/reasoningsummarytext.d.ts +9 -9
- package/models/reasoningsummarytext.js +2 -2
- package/models/reasoningsummaryverbosity.d.ts +5 -5
- package/models/reasoningsummaryverbosity.js +3 -3
- package/models/reasoningtextcontent.d.ts +9 -9
- package/models/reasoningtextcontent.js +2 -2
- package/models/refusalcontent.d.ts +9 -9
- package/models/refusalcontent.js +2 -2
- package/models/responseformatjsonschema.d.ts +5 -5
- package/models/responseformatjsonschema.js +1 -1
- package/models/responseformattextgrammar.d.ts +5 -5
- package/models/responseformattextgrammar.js +1 -1
- package/models/responseserrorfield.d.ts +9 -9
- package/models/responseserrorfield.js +3 -3
- package/models/responsesimagegenerationcall.d.ts +58 -0
- package/models/responsesimagegenerationcall.js +55 -0
- package/models/responsesoutputitem.d.ts +13 -466
- package/models/responsesoutputitem.js +19 -465
- package/models/responsesoutputitemfilesearchcall.d.ts +58 -0
- package/models/responsesoutputitemfilesearchcall.js +55 -0
- package/models/responsesoutputitemfunctioncall.d.ts +59 -0
- package/models/responsesoutputitemfunctioncall.js +65 -0
- package/models/responsesoutputitemreasoning.d.ts +61 -0
- package/models/responsesoutputitemreasoning.js +67 -0
- package/models/responsesoutputmessage.d.ts +191 -0
- package/models/responsesoutputmessage.js +189 -0
- package/models/responsessearchcontextsize.d.ts +5 -5
- package/models/responsessearchcontextsize.js +3 -3
- package/models/responsesusage.d.ts +17 -17
- package/models/responsesusage.js +3 -2
- package/models/responseswebsearchcalloutput.d.ts +56 -0
- package/models/responseswebsearchcalloutput.js +53 -0
- package/models/responseswebsearchuserlocation.d.ts +9 -9
- package/models/responseswebsearchuserlocation.js +2 -2
- package/models/security.d.ts +5 -5
- package/models/security.js +3 -2
- package/models/systemmessage.d.ts +9 -9
- package/models/systemmessage.js +3 -2
- package/models/tool.d.ts +9 -9
- package/models/tool.js +6 -6
- package/models/toolcallstatus.d.ts +5 -5
- package/models/toolcallstatus.js +3 -3
- package/models/toolchoicetypes.d.ts +29 -29
- package/models/toolchoicetypes.js +8 -9
- package/models/toolresponsemessage.d.ts +9 -9
- package/models/toolresponsemessage.js +1 -1
- package/models/urlcitationannotation.d.ts +9 -9
- package/models/urlcitationannotation.js +2 -2
- package/models/usermessage.d.ts +9 -9
- package/models/usermessage.js +7 -3
- package/models/websearchpreviewtooluserlocation.d.ts +59 -0
- package/models/websearchpreviewtooluserlocation.js +56 -0
- package/models/websearchstatus.d.ts +5 -5
- package/models/websearchstatus.js +3 -3
- package/package.json +1 -1
- package/types/blobs.d.ts +2 -2
- package/types/blobs.js +2 -2
- package/types/constdatetime.d.ts +2 -2
- package/types/constdatetime.js +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
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 ResponsesOutputItemFunctionCallType: {
|
|
6
|
+
readonly FunctionCall: "function_call";
|
|
7
|
+
};
|
|
8
|
+
export type ResponsesOutputItemFunctionCallType = ClosedEnum<typeof ResponsesOutputItemFunctionCallType>;
|
|
9
|
+
export type ResponsesOutputItemFunctionCall = {
|
|
10
|
+
type: ResponsesOutputItemFunctionCallType;
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
name: string;
|
|
13
|
+
arguments: string;
|
|
14
|
+
callId: string;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const ResponsesOutputItemFunctionCallType$inboundSchema: z.ZodEnum<typeof ResponsesOutputItemFunctionCallType>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ResponsesOutputItemFunctionCallType$outboundSchema: z.ZodEnum<typeof ResponsesOutputItemFunctionCallType>;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
|
+
*/
|
|
24
|
+
export declare namespace ResponsesOutputItemFunctionCallType$ {
|
|
25
|
+
/** @deprecated use `ResponsesOutputItemFunctionCallType$inboundSchema` instead. */
|
|
26
|
+
const inboundSchema: z.ZodEnum<{
|
|
27
|
+
readonly FunctionCall: "function_call";
|
|
28
|
+
}>;
|
|
29
|
+
/** @deprecated use `ResponsesOutputItemFunctionCallType$outboundSchema` instead. */
|
|
30
|
+
const outboundSchema: z.ZodEnum<{
|
|
31
|
+
readonly FunctionCall: "function_call";
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const ResponsesOutputItemFunctionCall$inboundSchema: z.ZodType<ResponsesOutputItemFunctionCall, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ResponsesOutputItemFunctionCall$Outbound = {
|
|
38
|
+
type: string;
|
|
39
|
+
id?: string | undefined;
|
|
40
|
+
name: string;
|
|
41
|
+
arguments: string;
|
|
42
|
+
call_id: string;
|
|
43
|
+
};
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const ResponsesOutputItemFunctionCall$outboundSchema: z.ZodType<ResponsesOutputItemFunctionCall$Outbound, ResponsesOutputItemFunctionCall>;
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export declare namespace ResponsesOutputItemFunctionCall$ {
|
|
51
|
+
/** @deprecated use `ResponsesOutputItemFunctionCall$inboundSchema` instead. */
|
|
52
|
+
const inboundSchema: z.ZodType<ResponsesOutputItemFunctionCall, unknown, z.core.$ZodTypeInternals<ResponsesOutputItemFunctionCall, unknown>>;
|
|
53
|
+
/** @deprecated use `ResponsesOutputItemFunctionCall$outboundSchema` instead. */
|
|
54
|
+
const outboundSchema: z.ZodType<ResponsesOutputItemFunctionCall$Outbound, ResponsesOutputItemFunctionCall, z.core.$ZodTypeInternals<ResponsesOutputItemFunctionCall$Outbound, ResponsesOutputItemFunctionCall>>;
|
|
55
|
+
/** @deprecated use `ResponsesOutputItemFunctionCall$Outbound` instead. */
|
|
56
|
+
type Outbound = ResponsesOutputItemFunctionCall$Outbound;
|
|
57
|
+
}
|
|
58
|
+
export declare function responsesOutputItemFunctionCallToJSON(responsesOutputItemFunctionCall: ResponsesOutputItemFunctionCall): string;
|
|
59
|
+
export declare function responsesOutputItemFunctionCallFromJSON(jsonString: string): SafeParseResult<ResponsesOutputItemFunctionCall, SDKValidationError>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
export const ResponsesOutputItemFunctionCallType = {
|
|
8
|
+
FunctionCall: "function_call",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ResponsesOutputItemFunctionCallType$inboundSchema = z.enum(ResponsesOutputItemFunctionCallType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesOutputItemFunctionCallType$outboundSchema = ResponsesOutputItemFunctionCallType$inboundSchema;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
17
|
+
*/
|
|
18
|
+
export var ResponsesOutputItemFunctionCallType$;
|
|
19
|
+
(function (ResponsesOutputItemFunctionCallType$) {
|
|
20
|
+
/** @deprecated use `ResponsesOutputItemFunctionCallType$inboundSchema` instead. */
|
|
21
|
+
ResponsesOutputItemFunctionCallType$.inboundSchema = ResponsesOutputItemFunctionCallType$inboundSchema;
|
|
22
|
+
/** @deprecated use `ResponsesOutputItemFunctionCallType$outboundSchema` instead. */
|
|
23
|
+
ResponsesOutputItemFunctionCallType$.outboundSchema = ResponsesOutputItemFunctionCallType$outboundSchema;
|
|
24
|
+
})(ResponsesOutputItemFunctionCallType$ || (ResponsesOutputItemFunctionCallType$ = {}));
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ResponsesOutputItemFunctionCall$inboundSchema = z.object({
|
|
27
|
+
type: ResponsesOutputItemFunctionCallType$inboundSchema,
|
|
28
|
+
id: z.string().optional(),
|
|
29
|
+
name: z.string(),
|
|
30
|
+
arguments: z.string(),
|
|
31
|
+
call_id: z.string(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"call_id": "callId",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ResponsesOutputItemFunctionCall$outboundSchema = z.object({
|
|
39
|
+
type: ResponsesOutputItemFunctionCallType$outboundSchema,
|
|
40
|
+
id: z.string().optional(),
|
|
41
|
+
name: z.string(),
|
|
42
|
+
arguments: z.string(),
|
|
43
|
+
callId: z.string(),
|
|
44
|
+
}).transform((v) => {
|
|
45
|
+
return remap$(v, {
|
|
46
|
+
callId: "call_id",
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
+
*/
|
|
53
|
+
export var ResponsesOutputItemFunctionCall$;
|
|
54
|
+
(function (ResponsesOutputItemFunctionCall$) {
|
|
55
|
+
/** @deprecated use `ResponsesOutputItemFunctionCall$inboundSchema` instead. */
|
|
56
|
+
ResponsesOutputItemFunctionCall$.inboundSchema = ResponsesOutputItemFunctionCall$inboundSchema;
|
|
57
|
+
/** @deprecated use `ResponsesOutputItemFunctionCall$outboundSchema` instead. */
|
|
58
|
+
ResponsesOutputItemFunctionCall$.outboundSchema = ResponsesOutputItemFunctionCall$outboundSchema;
|
|
59
|
+
})(ResponsesOutputItemFunctionCall$ || (ResponsesOutputItemFunctionCall$ = {}));
|
|
60
|
+
export function responsesOutputItemFunctionCallToJSON(responsesOutputItemFunctionCall) {
|
|
61
|
+
return JSON.stringify(ResponsesOutputItemFunctionCall$outboundSchema.parse(responsesOutputItemFunctionCall));
|
|
62
|
+
}
|
|
63
|
+
export function responsesOutputItemFunctionCallFromJSON(jsonString) {
|
|
64
|
+
return safeParse(jsonString, (x) => ResponsesOutputItemFunctionCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemFunctionCall' from JSON`);
|
|
65
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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, ReasoningSummaryText$Outbound } from "./reasoningsummarytext.js";
|
|
6
|
+
import { ReasoningTextContent, ReasoningTextContent$Outbound } from "./reasoningtextcontent.js";
|
|
7
|
+
export declare const ResponsesOutputItemReasoningType: {
|
|
8
|
+
readonly Reasoning: "reasoning";
|
|
9
|
+
};
|
|
10
|
+
export type ResponsesOutputItemReasoningType = ClosedEnum<typeof ResponsesOutputItemReasoningType>;
|
|
11
|
+
export type ResponsesOutputItemReasoning = {
|
|
12
|
+
type: ResponsesOutputItemReasoningType;
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
content?: Array<ReasoningTextContent> | undefined;
|
|
15
|
+
summary: Array<ReasoningSummaryText>;
|
|
16
|
+
encryptedContent?: string | null | undefined;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ResponsesOutputItemReasoningType$inboundSchema: z.ZodEnum<typeof ResponsesOutputItemReasoningType>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const ResponsesOutputItemReasoningType$outboundSchema: z.ZodEnum<typeof ResponsesOutputItemReasoningType>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace ResponsesOutputItemReasoningType$ {
|
|
27
|
+
/** @deprecated use `ResponsesOutputItemReasoningType$inboundSchema` instead. */
|
|
28
|
+
const inboundSchema: z.ZodEnum<{
|
|
29
|
+
readonly Reasoning: "reasoning";
|
|
30
|
+
}>;
|
|
31
|
+
/** @deprecated use `ResponsesOutputItemReasoningType$outboundSchema` instead. */
|
|
32
|
+
const outboundSchema: z.ZodEnum<{
|
|
33
|
+
readonly Reasoning: "reasoning";
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const ResponsesOutputItemReasoning$inboundSchema: z.ZodType<ResponsesOutputItemReasoning, unknown>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ResponsesOutputItemReasoning$Outbound = {
|
|
40
|
+
type: string;
|
|
41
|
+
id?: string | undefined;
|
|
42
|
+
content?: Array<ReasoningTextContent$Outbound> | undefined;
|
|
43
|
+
summary: Array<ReasoningSummaryText$Outbound>;
|
|
44
|
+
encrypted_content?: string | null | undefined;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const ResponsesOutputItemReasoning$outboundSchema: z.ZodType<ResponsesOutputItemReasoning$Outbound, ResponsesOutputItemReasoning>;
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export declare namespace ResponsesOutputItemReasoning$ {
|
|
53
|
+
/** @deprecated use `ResponsesOutputItemReasoning$inboundSchema` instead. */
|
|
54
|
+
const inboundSchema: z.ZodType<ResponsesOutputItemReasoning, unknown, z.core.$ZodTypeInternals<ResponsesOutputItemReasoning, unknown>>;
|
|
55
|
+
/** @deprecated use `ResponsesOutputItemReasoning$outboundSchema` instead. */
|
|
56
|
+
const outboundSchema: z.ZodType<ResponsesOutputItemReasoning$Outbound, ResponsesOutputItemReasoning, z.core.$ZodTypeInternals<ResponsesOutputItemReasoning$Outbound, ResponsesOutputItemReasoning>>;
|
|
57
|
+
/** @deprecated use `ResponsesOutputItemReasoning$Outbound` instead. */
|
|
58
|
+
type Outbound = ResponsesOutputItemReasoning$Outbound;
|
|
59
|
+
}
|
|
60
|
+
export declare function responsesOutputItemReasoningToJSON(responsesOutputItemReasoning: ResponsesOutputItemReasoning): string;
|
|
61
|
+
export declare function responsesOutputItemReasoningFromJSON(jsonString: string): SafeParseResult<ResponsesOutputItemReasoning, SDKValidationError>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ReasoningSummaryText$inboundSchema, ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js";
|
|
8
|
+
import { ReasoningTextContent$inboundSchema, ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js";
|
|
9
|
+
export const ResponsesOutputItemReasoningType = {
|
|
10
|
+
Reasoning: "reasoning",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesOutputItemReasoningType$inboundSchema = z.enum(ResponsesOutputItemReasoningType);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const ResponsesOutputItemReasoningType$outboundSchema = ResponsesOutputItemReasoningType$inboundSchema;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
19
|
+
*/
|
|
20
|
+
export var ResponsesOutputItemReasoningType$;
|
|
21
|
+
(function (ResponsesOutputItemReasoningType$) {
|
|
22
|
+
/** @deprecated use `ResponsesOutputItemReasoningType$inboundSchema` instead. */
|
|
23
|
+
ResponsesOutputItemReasoningType$.inboundSchema = ResponsesOutputItemReasoningType$inboundSchema;
|
|
24
|
+
/** @deprecated use `ResponsesOutputItemReasoningType$outboundSchema` instead. */
|
|
25
|
+
ResponsesOutputItemReasoningType$.outboundSchema = ResponsesOutputItemReasoningType$outboundSchema;
|
|
26
|
+
})(ResponsesOutputItemReasoningType$ || (ResponsesOutputItemReasoningType$ = {}));
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ResponsesOutputItemReasoning$inboundSchema = z.object({
|
|
29
|
+
type: ResponsesOutputItemReasoningType$inboundSchema,
|
|
30
|
+
id: z.string().optional(),
|
|
31
|
+
content: z.array(ReasoningTextContent$inboundSchema).optional(),
|
|
32
|
+
summary: z.array(ReasoningSummaryText$inboundSchema),
|
|
33
|
+
encrypted_content: z.nullable(z.string()).optional(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"encrypted_content": "encryptedContent",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const ResponsesOutputItemReasoning$outboundSchema = z.object({
|
|
41
|
+
type: ResponsesOutputItemReasoningType$outboundSchema,
|
|
42
|
+
id: z.string().optional(),
|
|
43
|
+
content: z.array(ReasoningTextContent$outboundSchema).optional(),
|
|
44
|
+
summary: z.array(ReasoningSummaryText$outboundSchema),
|
|
45
|
+
encryptedContent: z.nullable(z.string()).optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
encryptedContent: "encrypted_content",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
+
*/
|
|
55
|
+
export var ResponsesOutputItemReasoning$;
|
|
56
|
+
(function (ResponsesOutputItemReasoning$) {
|
|
57
|
+
/** @deprecated use `ResponsesOutputItemReasoning$inboundSchema` instead. */
|
|
58
|
+
ResponsesOutputItemReasoning$.inboundSchema = ResponsesOutputItemReasoning$inboundSchema;
|
|
59
|
+
/** @deprecated use `ResponsesOutputItemReasoning$outboundSchema` instead. */
|
|
60
|
+
ResponsesOutputItemReasoning$.outboundSchema = ResponsesOutputItemReasoning$outboundSchema;
|
|
61
|
+
})(ResponsesOutputItemReasoning$ || (ResponsesOutputItemReasoning$ = {}));
|
|
62
|
+
export function responsesOutputItemReasoningToJSON(responsesOutputItemReasoning) {
|
|
63
|
+
return JSON.stringify(ResponsesOutputItemReasoning$outboundSchema.parse(responsesOutputItemReasoning));
|
|
64
|
+
}
|
|
65
|
+
export function responsesOutputItemReasoningFromJSON(jsonString) {
|
|
66
|
+
return safeParse(jsonString, (x) => ResponsesOutputItemReasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItemReasoning' from JSON`);
|
|
67
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
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 { OutputTextContent, OutputTextContent$Outbound } from "./outputtextcontent.js";
|
|
6
|
+
import { RefusalContent, RefusalContent$Outbound } from "./refusalcontent.js";
|
|
7
|
+
export declare const ResponsesOutputMessageRole: {
|
|
8
|
+
readonly Assistant: "assistant";
|
|
9
|
+
};
|
|
10
|
+
export type ResponsesOutputMessageRole = ClosedEnum<typeof ResponsesOutputMessageRole>;
|
|
11
|
+
export declare const ResponsesOutputMessageType: {
|
|
12
|
+
readonly Message: "message";
|
|
13
|
+
};
|
|
14
|
+
export type ResponsesOutputMessageType = ClosedEnum<typeof ResponsesOutputMessageType>;
|
|
15
|
+
export declare const StatusInProgress: {
|
|
16
|
+
readonly InProgress: "in_progress";
|
|
17
|
+
};
|
|
18
|
+
export type StatusInProgress = ClosedEnum<typeof StatusInProgress>;
|
|
19
|
+
export declare const StatusIncomplete: {
|
|
20
|
+
readonly Incomplete: "incomplete";
|
|
21
|
+
};
|
|
22
|
+
export type StatusIncomplete = ClosedEnum<typeof StatusIncomplete>;
|
|
23
|
+
export declare const StatusCompleted: {
|
|
24
|
+
readonly Completed: "completed";
|
|
25
|
+
};
|
|
26
|
+
export type StatusCompleted = ClosedEnum<typeof StatusCompleted>;
|
|
27
|
+
export type Status = StatusCompleted | StatusIncomplete | StatusInProgress;
|
|
28
|
+
export type ResponsesOutputMessageContent = OutputTextContent | RefusalContent;
|
|
29
|
+
export type ResponsesOutputMessage = {
|
|
30
|
+
id: string;
|
|
31
|
+
role: ResponsesOutputMessageRole;
|
|
32
|
+
type: ResponsesOutputMessageType;
|
|
33
|
+
status: StatusCompleted | StatusIncomplete | StatusInProgress;
|
|
34
|
+
content: Array<OutputTextContent | RefusalContent>;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const ResponsesOutputMessageRole$inboundSchema: z.ZodEnum<typeof ResponsesOutputMessageRole>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const ResponsesOutputMessageRole$outboundSchema: z.ZodEnum<typeof ResponsesOutputMessageRole>;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export declare namespace ResponsesOutputMessageRole$ {
|
|
45
|
+
/** @deprecated use `ResponsesOutputMessageRole$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodEnum<{
|
|
47
|
+
readonly Assistant: "assistant";
|
|
48
|
+
}>;
|
|
49
|
+
/** @deprecated use `ResponsesOutputMessageRole$outboundSchema` instead. */
|
|
50
|
+
const outboundSchema: z.ZodEnum<{
|
|
51
|
+
readonly Assistant: "assistant";
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const ResponsesOutputMessageType$inboundSchema: z.ZodEnum<typeof ResponsesOutputMessageType>;
|
|
56
|
+
/** @internal */
|
|
57
|
+
export declare const ResponsesOutputMessageType$outboundSchema: z.ZodEnum<typeof ResponsesOutputMessageType>;
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
export declare namespace ResponsesOutputMessageType$ {
|
|
63
|
+
/** @deprecated use `ResponsesOutputMessageType$inboundSchema` instead. */
|
|
64
|
+
const inboundSchema: z.ZodEnum<{
|
|
65
|
+
readonly Message: "message";
|
|
66
|
+
}>;
|
|
67
|
+
/** @deprecated use `ResponsesOutputMessageType$outboundSchema` instead. */
|
|
68
|
+
const outboundSchema: z.ZodEnum<{
|
|
69
|
+
readonly Message: "message";
|
|
70
|
+
}>;
|
|
71
|
+
}
|
|
72
|
+
/** @internal */
|
|
73
|
+
export declare const StatusInProgress$inboundSchema: z.ZodEnum<typeof StatusInProgress>;
|
|
74
|
+
/** @internal */
|
|
75
|
+
export declare const StatusInProgress$outboundSchema: z.ZodEnum<typeof StatusInProgress>;
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export declare namespace StatusInProgress$ {
|
|
81
|
+
/** @deprecated use `StatusInProgress$inboundSchema` instead. */
|
|
82
|
+
const inboundSchema: z.ZodEnum<{
|
|
83
|
+
readonly InProgress: "in_progress";
|
|
84
|
+
}>;
|
|
85
|
+
/** @deprecated use `StatusInProgress$outboundSchema` instead. */
|
|
86
|
+
const outboundSchema: z.ZodEnum<{
|
|
87
|
+
readonly InProgress: "in_progress";
|
|
88
|
+
}>;
|
|
89
|
+
}
|
|
90
|
+
/** @internal */
|
|
91
|
+
export declare const StatusIncomplete$inboundSchema: z.ZodEnum<typeof StatusIncomplete>;
|
|
92
|
+
/** @internal */
|
|
93
|
+
export declare const StatusIncomplete$outboundSchema: z.ZodEnum<typeof StatusIncomplete>;
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
97
|
+
*/
|
|
98
|
+
export declare namespace StatusIncomplete$ {
|
|
99
|
+
/** @deprecated use `StatusIncomplete$inboundSchema` instead. */
|
|
100
|
+
const inboundSchema: z.ZodEnum<{
|
|
101
|
+
readonly Incomplete: "incomplete";
|
|
102
|
+
}>;
|
|
103
|
+
/** @deprecated use `StatusIncomplete$outboundSchema` instead. */
|
|
104
|
+
const outboundSchema: z.ZodEnum<{
|
|
105
|
+
readonly Incomplete: "incomplete";
|
|
106
|
+
}>;
|
|
107
|
+
}
|
|
108
|
+
/** @internal */
|
|
109
|
+
export declare const StatusCompleted$inboundSchema: z.ZodEnum<typeof StatusCompleted>;
|
|
110
|
+
/** @internal */
|
|
111
|
+
export declare const StatusCompleted$outboundSchema: z.ZodEnum<typeof StatusCompleted>;
|
|
112
|
+
/**
|
|
113
|
+
* @internal
|
|
114
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
115
|
+
*/
|
|
116
|
+
export declare namespace StatusCompleted$ {
|
|
117
|
+
/** @deprecated use `StatusCompleted$inboundSchema` instead. */
|
|
118
|
+
const inboundSchema: z.ZodEnum<{
|
|
119
|
+
readonly Completed: "completed";
|
|
120
|
+
}>;
|
|
121
|
+
/** @deprecated use `StatusCompleted$outboundSchema` instead. */
|
|
122
|
+
const outboundSchema: z.ZodEnum<{
|
|
123
|
+
readonly Completed: "completed";
|
|
124
|
+
}>;
|
|
125
|
+
}
|
|
126
|
+
/** @internal */
|
|
127
|
+
export declare const Status$inboundSchema: z.ZodType<Status, unknown>;
|
|
128
|
+
/** @internal */
|
|
129
|
+
export type Status$Outbound = string | string | string;
|
|
130
|
+
/** @internal */
|
|
131
|
+
export declare const Status$outboundSchema: z.ZodType<Status$Outbound, Status>;
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
135
|
+
*/
|
|
136
|
+
export declare namespace Status$ {
|
|
137
|
+
/** @deprecated use `Status$inboundSchema` instead. */
|
|
138
|
+
const inboundSchema: z.ZodType<Status, unknown, z.core.$ZodTypeInternals<Status, unknown>>;
|
|
139
|
+
/** @deprecated use `Status$outboundSchema` instead. */
|
|
140
|
+
const outboundSchema: z.ZodType<string, Status, z.core.$ZodTypeInternals<string, Status>>;
|
|
141
|
+
/** @deprecated use `Status$Outbound` instead. */
|
|
142
|
+
type Outbound = Status$Outbound;
|
|
143
|
+
}
|
|
144
|
+
export declare function statusToJSON(status: Status): string;
|
|
145
|
+
export declare function statusFromJSON(jsonString: string): SafeParseResult<Status, SDKValidationError>;
|
|
146
|
+
/** @internal */
|
|
147
|
+
export declare const ResponsesOutputMessageContent$inboundSchema: z.ZodType<ResponsesOutputMessageContent, unknown>;
|
|
148
|
+
/** @internal */
|
|
149
|
+
export type ResponsesOutputMessageContent$Outbound = OutputTextContent$Outbound | RefusalContent$Outbound;
|
|
150
|
+
/** @internal */
|
|
151
|
+
export declare const ResponsesOutputMessageContent$outboundSchema: z.ZodType<ResponsesOutputMessageContent$Outbound, ResponsesOutputMessageContent>;
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
155
|
+
*/
|
|
156
|
+
export declare namespace ResponsesOutputMessageContent$ {
|
|
157
|
+
/** @deprecated use `ResponsesOutputMessageContent$inboundSchema` instead. */
|
|
158
|
+
const inboundSchema: z.ZodType<ResponsesOutputMessageContent, unknown, z.core.$ZodTypeInternals<ResponsesOutputMessageContent, unknown>>;
|
|
159
|
+
/** @deprecated use `ResponsesOutputMessageContent$outboundSchema` instead. */
|
|
160
|
+
const outboundSchema: z.ZodType<ResponsesOutputMessageContent$Outbound, ResponsesOutputMessageContent, z.core.$ZodTypeInternals<ResponsesOutputMessageContent$Outbound, ResponsesOutputMessageContent>>;
|
|
161
|
+
/** @deprecated use `ResponsesOutputMessageContent$Outbound` instead. */
|
|
162
|
+
type Outbound = ResponsesOutputMessageContent$Outbound;
|
|
163
|
+
}
|
|
164
|
+
export declare function responsesOutputMessageContentToJSON(responsesOutputMessageContent: ResponsesOutputMessageContent): string;
|
|
165
|
+
export declare function responsesOutputMessageContentFromJSON(jsonString: string): SafeParseResult<ResponsesOutputMessageContent, SDKValidationError>;
|
|
166
|
+
/** @internal */
|
|
167
|
+
export declare const ResponsesOutputMessage$inboundSchema: z.ZodType<ResponsesOutputMessage, unknown>;
|
|
168
|
+
/** @internal */
|
|
169
|
+
export type ResponsesOutputMessage$Outbound = {
|
|
170
|
+
id: string;
|
|
171
|
+
role: string;
|
|
172
|
+
type: string;
|
|
173
|
+
status: string | string | string;
|
|
174
|
+
content: Array<OutputTextContent$Outbound | RefusalContent$Outbound>;
|
|
175
|
+
};
|
|
176
|
+
/** @internal */
|
|
177
|
+
export declare const ResponsesOutputMessage$outboundSchema: z.ZodType<ResponsesOutputMessage$Outbound, ResponsesOutputMessage>;
|
|
178
|
+
/**
|
|
179
|
+
* @internal
|
|
180
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
181
|
+
*/
|
|
182
|
+
export declare namespace ResponsesOutputMessage$ {
|
|
183
|
+
/** @deprecated use `ResponsesOutputMessage$inboundSchema` instead. */
|
|
184
|
+
const inboundSchema: z.ZodType<ResponsesOutputMessage, unknown, z.core.$ZodTypeInternals<ResponsesOutputMessage, unknown>>;
|
|
185
|
+
/** @deprecated use `ResponsesOutputMessage$outboundSchema` instead. */
|
|
186
|
+
const outboundSchema: z.ZodType<ResponsesOutputMessage$Outbound, ResponsesOutputMessage, z.core.$ZodTypeInternals<ResponsesOutputMessage$Outbound, ResponsesOutputMessage>>;
|
|
187
|
+
/** @deprecated use `ResponsesOutputMessage$Outbound` instead. */
|
|
188
|
+
type Outbound = ResponsesOutputMessage$Outbound;
|
|
189
|
+
}
|
|
190
|
+
export declare function responsesOutputMessageToJSON(responsesOutputMessage: ResponsesOutputMessage): string;
|
|
191
|
+
export declare function responsesOutputMessageFromJSON(jsonString: string): SafeParseResult<ResponsesOutputMessage, SDKValidationError>;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { OutputTextContent$inboundSchema, OutputTextContent$outboundSchema, } from "./outputtextcontent.js";
|
|
7
|
+
import { RefusalContent$inboundSchema, RefusalContent$outboundSchema, } from "./refusalcontent.js";
|
|
8
|
+
export const ResponsesOutputMessageRole = {
|
|
9
|
+
Assistant: "assistant",
|
|
10
|
+
};
|
|
11
|
+
export const ResponsesOutputMessageType = {
|
|
12
|
+
Message: "message",
|
|
13
|
+
};
|
|
14
|
+
export const StatusInProgress = {
|
|
15
|
+
InProgress: "in_progress",
|
|
16
|
+
};
|
|
17
|
+
export const StatusIncomplete = {
|
|
18
|
+
Incomplete: "incomplete",
|
|
19
|
+
};
|
|
20
|
+
export const StatusCompleted = {
|
|
21
|
+
Completed: "completed",
|
|
22
|
+
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const ResponsesOutputMessageRole$inboundSchema = z.enum(ResponsesOutputMessageRole);
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ResponsesOutputMessageRole$outboundSchema = ResponsesOutputMessageRole$inboundSchema;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
30
|
+
*/
|
|
31
|
+
export var ResponsesOutputMessageRole$;
|
|
32
|
+
(function (ResponsesOutputMessageRole$) {
|
|
33
|
+
/** @deprecated use `ResponsesOutputMessageRole$inboundSchema` instead. */
|
|
34
|
+
ResponsesOutputMessageRole$.inboundSchema = ResponsesOutputMessageRole$inboundSchema;
|
|
35
|
+
/** @deprecated use `ResponsesOutputMessageRole$outboundSchema` instead. */
|
|
36
|
+
ResponsesOutputMessageRole$.outboundSchema = ResponsesOutputMessageRole$outboundSchema;
|
|
37
|
+
})(ResponsesOutputMessageRole$ || (ResponsesOutputMessageRole$ = {}));
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const ResponsesOutputMessageType$inboundSchema = z.enum(ResponsesOutputMessageType);
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ResponsesOutputMessageType$outboundSchema = ResponsesOutputMessageType$inboundSchema;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
45
|
+
*/
|
|
46
|
+
export var ResponsesOutputMessageType$;
|
|
47
|
+
(function (ResponsesOutputMessageType$) {
|
|
48
|
+
/** @deprecated use `ResponsesOutputMessageType$inboundSchema` instead. */
|
|
49
|
+
ResponsesOutputMessageType$.inboundSchema = ResponsesOutputMessageType$inboundSchema;
|
|
50
|
+
/** @deprecated use `ResponsesOutputMessageType$outboundSchema` instead. */
|
|
51
|
+
ResponsesOutputMessageType$.outboundSchema = ResponsesOutputMessageType$outboundSchema;
|
|
52
|
+
})(ResponsesOutputMessageType$ || (ResponsesOutputMessageType$ = {}));
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const StatusInProgress$inboundSchema = z.enum(StatusInProgress);
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const StatusInProgress$outboundSchema = StatusInProgress$inboundSchema;
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
+
*/
|
|
61
|
+
export var StatusInProgress$;
|
|
62
|
+
(function (StatusInProgress$) {
|
|
63
|
+
/** @deprecated use `StatusInProgress$inboundSchema` instead. */
|
|
64
|
+
StatusInProgress$.inboundSchema = StatusInProgress$inboundSchema;
|
|
65
|
+
/** @deprecated use `StatusInProgress$outboundSchema` instead. */
|
|
66
|
+
StatusInProgress$.outboundSchema = StatusInProgress$outboundSchema;
|
|
67
|
+
})(StatusInProgress$ || (StatusInProgress$ = {}));
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const StatusIncomplete$inboundSchema = z.enum(StatusIncomplete);
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const StatusIncomplete$outboundSchema = StatusIncomplete$inboundSchema;
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export var StatusIncomplete$;
|
|
77
|
+
(function (StatusIncomplete$) {
|
|
78
|
+
/** @deprecated use `StatusIncomplete$inboundSchema` instead. */
|
|
79
|
+
StatusIncomplete$.inboundSchema = StatusIncomplete$inboundSchema;
|
|
80
|
+
/** @deprecated use `StatusIncomplete$outboundSchema` instead. */
|
|
81
|
+
StatusIncomplete$.outboundSchema = StatusIncomplete$outboundSchema;
|
|
82
|
+
})(StatusIncomplete$ || (StatusIncomplete$ = {}));
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const StatusCompleted$inboundSchema = z.enum(StatusCompleted);
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const StatusCompleted$outboundSchema = StatusCompleted$inboundSchema;
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
90
|
+
*/
|
|
91
|
+
export var StatusCompleted$;
|
|
92
|
+
(function (StatusCompleted$) {
|
|
93
|
+
/** @deprecated use `StatusCompleted$inboundSchema` instead. */
|
|
94
|
+
StatusCompleted$.inboundSchema = StatusCompleted$inboundSchema;
|
|
95
|
+
/** @deprecated use `StatusCompleted$outboundSchema` instead. */
|
|
96
|
+
StatusCompleted$.outboundSchema = StatusCompleted$outboundSchema;
|
|
97
|
+
})(StatusCompleted$ || (StatusCompleted$ = {}));
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const Status$inboundSchema = z.union([
|
|
100
|
+
StatusCompleted$inboundSchema,
|
|
101
|
+
StatusIncomplete$inboundSchema,
|
|
102
|
+
StatusInProgress$inboundSchema,
|
|
103
|
+
]);
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const Status$outboundSchema = z
|
|
106
|
+
.union([
|
|
107
|
+
StatusCompleted$outboundSchema,
|
|
108
|
+
StatusIncomplete$outboundSchema,
|
|
109
|
+
StatusInProgress$outboundSchema,
|
|
110
|
+
]);
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
114
|
+
*/
|
|
115
|
+
export var Status$;
|
|
116
|
+
(function (Status$) {
|
|
117
|
+
/** @deprecated use `Status$inboundSchema` instead. */
|
|
118
|
+
Status$.inboundSchema = Status$inboundSchema;
|
|
119
|
+
/** @deprecated use `Status$outboundSchema` instead. */
|
|
120
|
+
Status$.outboundSchema = Status$outboundSchema;
|
|
121
|
+
})(Status$ || (Status$ = {}));
|
|
122
|
+
export function statusToJSON(status) {
|
|
123
|
+
return JSON.stringify(Status$outboundSchema.parse(status));
|
|
124
|
+
}
|
|
125
|
+
export function statusFromJSON(jsonString) {
|
|
126
|
+
return safeParse(jsonString, (x) => Status$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Status' from JSON`);
|
|
127
|
+
}
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const ResponsesOutputMessageContent$inboundSchema = z.union([OutputTextContent$inboundSchema, RefusalContent$inboundSchema]);
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const ResponsesOutputMessageContent$outboundSchema = z.union([OutputTextContent$outboundSchema, RefusalContent$outboundSchema]);
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
135
|
+
*/
|
|
136
|
+
export var ResponsesOutputMessageContent$;
|
|
137
|
+
(function (ResponsesOutputMessageContent$) {
|
|
138
|
+
/** @deprecated use `ResponsesOutputMessageContent$inboundSchema` instead. */
|
|
139
|
+
ResponsesOutputMessageContent$.inboundSchema = ResponsesOutputMessageContent$inboundSchema;
|
|
140
|
+
/** @deprecated use `ResponsesOutputMessageContent$outboundSchema` instead. */
|
|
141
|
+
ResponsesOutputMessageContent$.outboundSchema = ResponsesOutputMessageContent$outboundSchema;
|
|
142
|
+
})(ResponsesOutputMessageContent$ || (ResponsesOutputMessageContent$ = {}));
|
|
143
|
+
export function responsesOutputMessageContentToJSON(responsesOutputMessageContent) {
|
|
144
|
+
return JSON.stringify(ResponsesOutputMessageContent$outboundSchema.parse(responsesOutputMessageContent));
|
|
145
|
+
}
|
|
146
|
+
export function responsesOutputMessageContentFromJSON(jsonString) {
|
|
147
|
+
return safeParse(jsonString, (x) => ResponsesOutputMessageContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputMessageContent' from JSON`);
|
|
148
|
+
}
|
|
149
|
+
/** @internal */
|
|
150
|
+
export const ResponsesOutputMessage$inboundSchema = z.object({
|
|
151
|
+
id: z.string(),
|
|
152
|
+
role: ResponsesOutputMessageRole$inboundSchema,
|
|
153
|
+
type: ResponsesOutputMessageType$inboundSchema,
|
|
154
|
+
status: z.union([
|
|
155
|
+
StatusCompleted$inboundSchema,
|
|
156
|
+
StatusIncomplete$inboundSchema,
|
|
157
|
+
StatusInProgress$inboundSchema,
|
|
158
|
+
]),
|
|
159
|
+
content: z.array(z.union([OutputTextContent$inboundSchema, RefusalContent$inboundSchema])),
|
|
160
|
+
});
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const ResponsesOutputMessage$outboundSchema = z.object({
|
|
163
|
+
id: z.string(),
|
|
164
|
+
role: ResponsesOutputMessageRole$outboundSchema,
|
|
165
|
+
type: ResponsesOutputMessageType$outboundSchema,
|
|
166
|
+
status: z.union([
|
|
167
|
+
StatusCompleted$outboundSchema,
|
|
168
|
+
StatusIncomplete$outboundSchema,
|
|
169
|
+
StatusInProgress$outboundSchema,
|
|
170
|
+
]),
|
|
171
|
+
content: z.array(z.union([OutputTextContent$outboundSchema, RefusalContent$outboundSchema])),
|
|
172
|
+
});
|
|
173
|
+
/**
|
|
174
|
+
* @internal
|
|
175
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
176
|
+
*/
|
|
177
|
+
export var ResponsesOutputMessage$;
|
|
178
|
+
(function (ResponsesOutputMessage$) {
|
|
179
|
+
/** @deprecated use `ResponsesOutputMessage$inboundSchema` instead. */
|
|
180
|
+
ResponsesOutputMessage$.inboundSchema = ResponsesOutputMessage$inboundSchema;
|
|
181
|
+
/** @deprecated use `ResponsesOutputMessage$outboundSchema` instead. */
|
|
182
|
+
ResponsesOutputMessage$.outboundSchema = ResponsesOutputMessage$outboundSchema;
|
|
183
|
+
})(ResponsesOutputMessage$ || (ResponsesOutputMessage$ = {}));
|
|
184
|
+
export function responsesOutputMessageToJSON(responsesOutputMessage) {
|
|
185
|
+
return JSON.stringify(ResponsesOutputMessage$outboundSchema.parse(responsesOutputMessage));
|
|
186
|
+
}
|
|
187
|
+
export function responsesOutputMessageFromJSON(jsonString) {
|
|
188
|
+
return safeParse(jsonString, (x) => ResponsesOutputMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputMessage' from JSON`);
|
|
189
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
4
|
* Size of the search context for web search tools
|
|
@@ -13,16 +13,16 @@ export declare const ResponsesSearchContextSize: {
|
|
|
13
13
|
*/
|
|
14
14
|
export type ResponsesSearchContextSize = OpenEnum<typeof ResponsesSearchContextSize>;
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const ResponsesSearchContextSize$inboundSchema: z.ZodType<ResponsesSearchContextSize,
|
|
16
|
+
export declare const ResponsesSearchContextSize$inboundSchema: z.ZodType<ResponsesSearchContextSize, unknown>;
|
|
17
17
|
/** @internal */
|
|
18
|
-
export declare const ResponsesSearchContextSize$outboundSchema: z.ZodType<ResponsesSearchContextSize,
|
|
18
|
+
export declare const ResponsesSearchContextSize$outboundSchema: z.ZodType<ResponsesSearchContextSize, ResponsesSearchContextSize>;
|
|
19
19
|
/**
|
|
20
20
|
* @internal
|
|
21
21
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
22
|
*/
|
|
23
23
|
export declare namespace ResponsesSearchContextSize$ {
|
|
24
24
|
/** @deprecated use `ResponsesSearchContextSize$inboundSchema` instead. */
|
|
25
|
-
const inboundSchema: z.ZodType<ResponsesSearchContextSize, z.
|
|
25
|
+
const inboundSchema: z.ZodType<ResponsesSearchContextSize, unknown, z.core.$ZodTypeInternals<ResponsesSearchContextSize, unknown>>;
|
|
26
26
|
/** @deprecated use `ResponsesSearchContextSize$outboundSchema` instead. */
|
|
27
|
-
const outboundSchema: z.ZodType<ResponsesSearchContextSize, z.
|
|
27
|
+
const outboundSchema: z.ZodType<ResponsesSearchContextSize, ResponsesSearchContextSize, z.core.$ZodTypeInternals<ResponsesSearchContextSize, ResponsesSearchContextSize>>;
|
|
28
28
|
}
|