@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./responseformatjsonschema.js";
|
|
@@ -45,155 +45,155 @@ export type CompletionCreateParams = {
|
|
|
45
45
|
responseFormat?: ResponseFormatJSONSchema | ResponseFormatTextGrammar | CompletionCreateParamsResponseFormatText | CompletionCreateParamsResponseFormatJSONObject | CompletionCreateParamsResponseFormatPython | null | undefined;
|
|
46
46
|
};
|
|
47
47
|
/** @internal */
|
|
48
|
-
export declare const Prompt$inboundSchema: z.ZodType<Prompt,
|
|
48
|
+
export declare const Prompt$inboundSchema: z.ZodType<Prompt, unknown>;
|
|
49
49
|
/** @internal */
|
|
50
50
|
export type Prompt$Outbound = string | Array<string> | Array<number> | Array<Array<number>>;
|
|
51
51
|
/** @internal */
|
|
52
|
-
export declare const Prompt$outboundSchema: z.ZodType<Prompt$Outbound,
|
|
52
|
+
export declare const Prompt$outboundSchema: z.ZodType<Prompt$Outbound, Prompt>;
|
|
53
53
|
/**
|
|
54
54
|
* @internal
|
|
55
55
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
56
|
*/
|
|
57
57
|
export declare namespace Prompt$ {
|
|
58
58
|
/** @deprecated use `Prompt$inboundSchema` instead. */
|
|
59
|
-
const inboundSchema: z.ZodType<Prompt, z.
|
|
59
|
+
const inboundSchema: z.ZodType<Prompt, unknown, z.core.$ZodTypeInternals<Prompt, unknown>>;
|
|
60
60
|
/** @deprecated use `Prompt$outboundSchema` instead. */
|
|
61
|
-
const outboundSchema: z.ZodType<Prompt$Outbound, z.
|
|
61
|
+
const outboundSchema: z.ZodType<Prompt$Outbound, Prompt, z.core.$ZodTypeInternals<Prompt$Outbound, Prompt>>;
|
|
62
62
|
/** @deprecated use `Prompt$Outbound` instead. */
|
|
63
63
|
type Outbound = Prompt$Outbound;
|
|
64
64
|
}
|
|
65
65
|
export declare function promptToJSON(prompt: Prompt): string;
|
|
66
66
|
export declare function promptFromJSON(jsonString: string): SafeParseResult<Prompt, SDKValidationError>;
|
|
67
67
|
/** @internal */
|
|
68
|
-
export declare const CompletionCreateParamsStop$inboundSchema: z.ZodType<CompletionCreateParamsStop,
|
|
68
|
+
export declare const CompletionCreateParamsStop$inboundSchema: z.ZodType<CompletionCreateParamsStop, unknown>;
|
|
69
69
|
/** @internal */
|
|
70
70
|
export type CompletionCreateParamsStop$Outbound = string | Array<string>;
|
|
71
71
|
/** @internal */
|
|
72
|
-
export declare const CompletionCreateParamsStop$outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound,
|
|
72
|
+
export declare const CompletionCreateParamsStop$outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound, CompletionCreateParamsStop>;
|
|
73
73
|
/**
|
|
74
74
|
* @internal
|
|
75
75
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
76
|
*/
|
|
77
77
|
export declare namespace CompletionCreateParamsStop$ {
|
|
78
78
|
/** @deprecated use `CompletionCreateParamsStop$inboundSchema` instead. */
|
|
79
|
-
const inboundSchema: z.ZodType<CompletionCreateParamsStop, z.
|
|
79
|
+
const inboundSchema: z.ZodType<CompletionCreateParamsStop, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsStop, unknown>>;
|
|
80
80
|
/** @deprecated use `CompletionCreateParamsStop$outboundSchema` instead. */
|
|
81
|
-
const outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound, z.
|
|
81
|
+
const outboundSchema: z.ZodType<CompletionCreateParamsStop$Outbound, CompletionCreateParamsStop, z.core.$ZodTypeInternals<CompletionCreateParamsStop$Outbound, CompletionCreateParamsStop>>;
|
|
82
82
|
/** @deprecated use `CompletionCreateParamsStop$Outbound` instead. */
|
|
83
83
|
type Outbound = CompletionCreateParamsStop$Outbound;
|
|
84
84
|
}
|
|
85
85
|
export declare function completionCreateParamsStopToJSON(completionCreateParamsStop: CompletionCreateParamsStop): string;
|
|
86
86
|
export declare function completionCreateParamsStopFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsStop, SDKValidationError>;
|
|
87
87
|
/** @internal */
|
|
88
|
-
export declare const StreamOptions$inboundSchema: z.ZodType<StreamOptions,
|
|
88
|
+
export declare const StreamOptions$inboundSchema: z.ZodType<StreamOptions, unknown>;
|
|
89
89
|
/** @internal */
|
|
90
90
|
export type StreamOptions$Outbound = {
|
|
91
91
|
include_usage?: boolean | null | undefined;
|
|
92
92
|
};
|
|
93
93
|
/** @internal */
|
|
94
|
-
export declare const StreamOptions$outboundSchema: z.ZodType<StreamOptions$Outbound,
|
|
94
|
+
export declare const StreamOptions$outboundSchema: z.ZodType<StreamOptions$Outbound, StreamOptions>;
|
|
95
95
|
/**
|
|
96
96
|
* @internal
|
|
97
97
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
98
|
*/
|
|
99
99
|
export declare namespace StreamOptions$ {
|
|
100
100
|
/** @deprecated use `StreamOptions$inboundSchema` instead. */
|
|
101
|
-
const inboundSchema: z.ZodType<StreamOptions, z.
|
|
101
|
+
const inboundSchema: z.ZodType<StreamOptions, unknown, z.core.$ZodTypeInternals<StreamOptions, unknown>>;
|
|
102
102
|
/** @deprecated use `StreamOptions$outboundSchema` instead. */
|
|
103
|
-
const outboundSchema: z.ZodType<StreamOptions$Outbound, z.
|
|
103
|
+
const outboundSchema: z.ZodType<StreamOptions$Outbound, StreamOptions, z.core.$ZodTypeInternals<StreamOptions$Outbound, StreamOptions>>;
|
|
104
104
|
/** @deprecated use `StreamOptions$Outbound` instead. */
|
|
105
105
|
type Outbound = StreamOptions$Outbound;
|
|
106
106
|
}
|
|
107
107
|
export declare function streamOptionsToJSON(streamOptions: StreamOptions): string;
|
|
108
108
|
export declare function streamOptionsFromJSON(jsonString: string): SafeParseResult<StreamOptions, SDKValidationError>;
|
|
109
109
|
/** @internal */
|
|
110
|
-
export declare const CompletionCreateParamsResponseFormatPython$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython,
|
|
110
|
+
export declare const CompletionCreateParamsResponseFormatPython$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython, unknown>;
|
|
111
111
|
/** @internal */
|
|
112
112
|
export type CompletionCreateParamsResponseFormatPython$Outbound = {
|
|
113
113
|
type: "python";
|
|
114
114
|
};
|
|
115
115
|
/** @internal */
|
|
116
|
-
export declare const CompletionCreateParamsResponseFormatPython$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound,
|
|
116
|
+
export declare const CompletionCreateParamsResponseFormatPython$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound, CompletionCreateParamsResponseFormatPython>;
|
|
117
117
|
/**
|
|
118
118
|
* @internal
|
|
119
119
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
120
120
|
*/
|
|
121
121
|
export declare namespace CompletionCreateParamsResponseFormatPython$ {
|
|
122
122
|
/** @deprecated use `CompletionCreateParamsResponseFormatPython$inboundSchema` instead. */
|
|
123
|
-
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython, z.
|
|
123
|
+
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatPython, unknown>>;
|
|
124
124
|
/** @deprecated use `CompletionCreateParamsResponseFormatPython$outboundSchema` instead. */
|
|
125
|
-
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound, z.
|
|
125
|
+
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatPython$Outbound, CompletionCreateParamsResponseFormatPython, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatPython$Outbound, CompletionCreateParamsResponseFormatPython>>;
|
|
126
126
|
/** @deprecated use `CompletionCreateParamsResponseFormatPython$Outbound` instead. */
|
|
127
127
|
type Outbound = CompletionCreateParamsResponseFormatPython$Outbound;
|
|
128
128
|
}
|
|
129
129
|
export declare function completionCreateParamsResponseFormatPythonToJSON(completionCreateParamsResponseFormatPython: CompletionCreateParamsResponseFormatPython): string;
|
|
130
130
|
export declare function completionCreateParamsResponseFormatPythonFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatPython, SDKValidationError>;
|
|
131
131
|
/** @internal */
|
|
132
|
-
export declare const CompletionCreateParamsResponseFormatJSONObject$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject,
|
|
132
|
+
export declare const CompletionCreateParamsResponseFormatJSONObject$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject, unknown>;
|
|
133
133
|
/** @internal */
|
|
134
134
|
export type CompletionCreateParamsResponseFormatJSONObject$Outbound = {
|
|
135
135
|
type: "json_object";
|
|
136
136
|
};
|
|
137
137
|
/** @internal */
|
|
138
|
-
export declare const CompletionCreateParamsResponseFormatJSONObject$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound,
|
|
138
|
+
export declare const CompletionCreateParamsResponseFormatJSONObject$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound, CompletionCreateParamsResponseFormatJSONObject>;
|
|
139
139
|
/**
|
|
140
140
|
* @internal
|
|
141
141
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
142
142
|
*/
|
|
143
143
|
export declare namespace CompletionCreateParamsResponseFormatJSONObject$ {
|
|
144
144
|
/** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$inboundSchema` instead. */
|
|
145
|
-
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject, z.
|
|
145
|
+
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatJSONObject, unknown>>;
|
|
146
146
|
/** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$outboundSchema` instead. */
|
|
147
|
-
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound, z.
|
|
147
|
+
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatJSONObject$Outbound, CompletionCreateParamsResponseFormatJSONObject, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatJSONObject$Outbound, CompletionCreateParamsResponseFormatJSONObject>>;
|
|
148
148
|
/** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$Outbound` instead. */
|
|
149
149
|
type Outbound = CompletionCreateParamsResponseFormatJSONObject$Outbound;
|
|
150
150
|
}
|
|
151
151
|
export declare function completionCreateParamsResponseFormatJSONObjectToJSON(completionCreateParamsResponseFormatJSONObject: CompletionCreateParamsResponseFormatJSONObject): string;
|
|
152
152
|
export declare function completionCreateParamsResponseFormatJSONObjectFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatJSONObject, SDKValidationError>;
|
|
153
153
|
/** @internal */
|
|
154
|
-
export declare const CompletionCreateParamsResponseFormatText$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText,
|
|
154
|
+
export declare const CompletionCreateParamsResponseFormatText$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText, unknown>;
|
|
155
155
|
/** @internal */
|
|
156
156
|
export type CompletionCreateParamsResponseFormatText$Outbound = {
|
|
157
157
|
type: "text";
|
|
158
158
|
};
|
|
159
159
|
/** @internal */
|
|
160
|
-
export declare const CompletionCreateParamsResponseFormatText$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound,
|
|
160
|
+
export declare const CompletionCreateParamsResponseFormatText$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound, CompletionCreateParamsResponseFormatText>;
|
|
161
161
|
/**
|
|
162
162
|
* @internal
|
|
163
163
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
164
164
|
*/
|
|
165
165
|
export declare namespace CompletionCreateParamsResponseFormatText$ {
|
|
166
166
|
/** @deprecated use `CompletionCreateParamsResponseFormatText$inboundSchema` instead. */
|
|
167
|
-
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText, z.
|
|
167
|
+
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatText, unknown>>;
|
|
168
168
|
/** @deprecated use `CompletionCreateParamsResponseFormatText$outboundSchema` instead. */
|
|
169
|
-
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound, z.
|
|
169
|
+
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatText$Outbound, CompletionCreateParamsResponseFormatText, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatText$Outbound, CompletionCreateParamsResponseFormatText>>;
|
|
170
170
|
/** @deprecated use `CompletionCreateParamsResponseFormatText$Outbound` instead. */
|
|
171
171
|
type Outbound = CompletionCreateParamsResponseFormatText$Outbound;
|
|
172
172
|
}
|
|
173
173
|
export declare function completionCreateParamsResponseFormatTextToJSON(completionCreateParamsResponseFormatText: CompletionCreateParamsResponseFormatText): string;
|
|
174
174
|
export declare function completionCreateParamsResponseFormatTextFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatText, SDKValidationError>;
|
|
175
175
|
/** @internal */
|
|
176
|
-
export declare const CompletionCreateParamsResponseFormatUnion$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion,
|
|
176
|
+
export declare const CompletionCreateParamsResponseFormatUnion$inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion, unknown>;
|
|
177
177
|
/** @internal */
|
|
178
178
|
export type CompletionCreateParamsResponseFormatUnion$Outbound = ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatText$Outbound | CompletionCreateParamsResponseFormatJSONObject$Outbound | CompletionCreateParamsResponseFormatPython$Outbound;
|
|
179
179
|
/** @internal */
|
|
180
|
-
export declare const CompletionCreateParamsResponseFormatUnion$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound,
|
|
180
|
+
export declare const CompletionCreateParamsResponseFormatUnion$outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound, CompletionCreateParamsResponseFormatUnion>;
|
|
181
181
|
/**
|
|
182
182
|
* @internal
|
|
183
183
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
184
184
|
*/
|
|
185
185
|
export declare namespace CompletionCreateParamsResponseFormatUnion$ {
|
|
186
186
|
/** @deprecated use `CompletionCreateParamsResponseFormatUnion$inboundSchema` instead. */
|
|
187
|
-
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion, z.
|
|
187
|
+
const inboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion, unknown, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatUnion, unknown>>;
|
|
188
188
|
/** @deprecated use `CompletionCreateParamsResponseFormatUnion$outboundSchema` instead. */
|
|
189
|
-
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound, z.
|
|
189
|
+
const outboundSchema: z.ZodType<CompletionCreateParamsResponseFormatUnion$Outbound, CompletionCreateParamsResponseFormatUnion, z.core.$ZodTypeInternals<CompletionCreateParamsResponseFormatUnion$Outbound, CompletionCreateParamsResponseFormatUnion>>;
|
|
190
190
|
/** @deprecated use `CompletionCreateParamsResponseFormatUnion$Outbound` instead. */
|
|
191
191
|
type Outbound = CompletionCreateParamsResponseFormatUnion$Outbound;
|
|
192
192
|
}
|
|
193
193
|
export declare function completionCreateParamsResponseFormatUnionToJSON(completionCreateParamsResponseFormatUnion: CompletionCreateParamsResponseFormatUnion): string;
|
|
194
194
|
export declare function completionCreateParamsResponseFormatUnionFromJSON(jsonString: string): SafeParseResult<CompletionCreateParamsResponseFormatUnion, SDKValidationError>;
|
|
195
195
|
/** @internal */
|
|
196
|
-
export declare const CompletionCreateParams$inboundSchema: z.ZodType<CompletionCreateParams,
|
|
196
|
+
export declare const CompletionCreateParams$inboundSchema: z.ZodType<CompletionCreateParams, unknown>;
|
|
197
197
|
/** @internal */
|
|
198
198
|
export type CompletionCreateParams$Outbound = {
|
|
199
199
|
model: string;
|
|
@@ -222,16 +222,16 @@ export type CompletionCreateParams$Outbound = {
|
|
|
222
222
|
response_format?: ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | CompletionCreateParamsResponseFormatText$Outbound | CompletionCreateParamsResponseFormatJSONObject$Outbound | CompletionCreateParamsResponseFormatPython$Outbound | null | undefined;
|
|
223
223
|
};
|
|
224
224
|
/** @internal */
|
|
225
|
-
export declare const CompletionCreateParams$outboundSchema: z.ZodType<CompletionCreateParams$Outbound,
|
|
225
|
+
export declare const CompletionCreateParams$outboundSchema: z.ZodType<CompletionCreateParams$Outbound, CompletionCreateParams>;
|
|
226
226
|
/**
|
|
227
227
|
* @internal
|
|
228
228
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
229
229
|
*/
|
|
230
230
|
export declare namespace CompletionCreateParams$ {
|
|
231
231
|
/** @deprecated use `CompletionCreateParams$inboundSchema` instead. */
|
|
232
|
-
const inboundSchema: z.ZodType<CompletionCreateParams, z.
|
|
232
|
+
const inboundSchema: z.ZodType<CompletionCreateParams, unknown, z.core.$ZodTypeInternals<CompletionCreateParams, unknown>>;
|
|
233
233
|
/** @deprecated use `CompletionCreateParams$outboundSchema` instead. */
|
|
234
|
-
const outboundSchema: z.ZodType<CompletionCreateParams$Outbound, z.
|
|
234
|
+
const outboundSchema: z.ZodType<CompletionCreateParams$Outbound, CompletionCreateParams, z.core.$ZodTypeInternals<CompletionCreateParams$Outbound, CompletionCreateParams>>;
|
|
235
235
|
/** @deprecated use `CompletionCreateParams$Outbound` instead. */
|
|
236
236
|
type Outbound = CompletionCreateParams$Outbound;
|
|
237
237
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { ResponseFormatJSONSchema$inboundSchema, ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonschema.js";
|
|
8
8
|
import { ResponseFormatTextGrammar$inboundSchema, ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js";
|
|
9
9
|
/** @internal */
|
|
10
|
-
export const Prompt$inboundSchema = z
|
|
11
|
-
.union([
|
|
10
|
+
export const Prompt$inboundSchema = z.union([
|
|
12
11
|
z.string(),
|
|
13
12
|
z.array(z.string()),
|
|
14
13
|
z.array(z.number()),
|
|
15
14
|
z.array(z.array(z.number())),
|
|
16
15
|
]);
|
|
17
16
|
/** @internal */
|
|
18
|
-
export const Prompt$outboundSchema = z
|
|
17
|
+
export const Prompt$outboundSchema = z
|
|
18
|
+
.union([
|
|
19
19
|
z.string(),
|
|
20
20
|
z.array(z.string()),
|
|
21
21
|
z.array(z.number()),
|
|
@@ -60,7 +60,8 @@ export function completionCreateParamsStopFromJSON(jsonString) {
|
|
|
60
60
|
return safeParse(jsonString, (x) => CompletionCreateParamsStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParamsStop' from JSON`);
|
|
61
61
|
}
|
|
62
62
|
/** @internal */
|
|
63
|
-
export const StreamOptions$inboundSchema = z
|
|
63
|
+
export const StreamOptions$inboundSchema = z
|
|
64
|
+
.object({
|
|
64
65
|
include_usage: z.nullable(z.boolean()).optional(),
|
|
65
66
|
}).transform((v) => {
|
|
66
67
|
return remap$(v, {
|
|
@@ -212,7 +213,7 @@ export const CompletionCreateParams$inboundSchema = z.object({
|
|
|
212
213
|
best_of: z.nullable(z.number().int()).optional(),
|
|
213
214
|
echo: z.nullable(z.boolean()).optional(),
|
|
214
215
|
frequency_penalty: z.nullable(z.number()).optional(),
|
|
215
|
-
logit_bias: z.nullable(z.record(z.number())).optional(),
|
|
216
|
+
logit_bias: z.nullable(z.record(z.string(), z.number())).optional(),
|
|
216
217
|
logprobs: z.nullable(z.number().int()).optional(),
|
|
217
218
|
max_tokens: z.nullable(z.number().int()).optional(),
|
|
218
219
|
n: z.nullable(z.number().int()).optional(),
|
|
@@ -226,7 +227,7 @@ export const CompletionCreateParams$inboundSchema = z.object({
|
|
|
226
227
|
temperature: z.nullable(z.number()).optional(),
|
|
227
228
|
top_p: z.nullable(z.number()).optional(),
|
|
228
229
|
user: z.string().optional(),
|
|
229
|
-
metadata: z.nullable(z.record(z.string())).optional(),
|
|
230
|
+
metadata: z.nullable(z.record(z.string(), z.string())).optional(),
|
|
230
231
|
response_format: z.nullable(z.union([
|
|
231
232
|
ResponseFormatJSONSchema$inboundSchema,
|
|
232
233
|
ResponseFormatTextGrammar$inboundSchema,
|
|
@@ -258,7 +259,7 @@ export const CompletionCreateParams$outboundSchema = z.object({
|
|
|
258
259
|
bestOf: z.nullable(z.number().int()).optional(),
|
|
259
260
|
echo: z.nullable(z.boolean()).optional(),
|
|
260
261
|
frequencyPenalty: z.nullable(z.number()).optional(),
|
|
261
|
-
logitBias: z.nullable(z.record(z.number())).optional(),
|
|
262
|
+
logitBias: z.nullable(z.record(z.string(), z.number())).optional(),
|
|
262
263
|
logprobs: z.nullable(z.number().int()).optional(),
|
|
263
264
|
maxTokens: z.nullable(z.number().int()).optional(),
|
|
264
265
|
n: z.nullable(z.number().int()).optional(),
|
|
@@ -272,7 +273,7 @@ export const CompletionCreateParams$outboundSchema = z.object({
|
|
|
272
273
|
temperature: z.nullable(z.number()).optional(),
|
|
273
274
|
topP: z.nullable(z.number()).optional(),
|
|
274
275
|
user: z.string().optional(),
|
|
275
|
-
metadata: z.nullable(z.record(z.string())).optional(),
|
|
276
|
+
metadata: z.nullable(z.record(z.string(), z.string())).optional(),
|
|
276
277
|
responseFormat: z.nullable(z.union([
|
|
277
278
|
ResponseFormatJSONSchema$outboundSchema,
|
|
278
279
|
ResponseFormatTextGrammar$outboundSchema,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type CompletionLogprobs = {
|
|
@@ -10,7 +10,7 @@ export type CompletionLogprobs = {
|
|
|
10
10
|
textOffset: Array<number>;
|
|
11
11
|
};
|
|
12
12
|
/** @internal */
|
|
13
|
-
export declare const CompletionLogprobs$inboundSchema: z.ZodType<CompletionLogprobs,
|
|
13
|
+
export declare const CompletionLogprobs$inboundSchema: z.ZodType<CompletionLogprobs, unknown>;
|
|
14
14
|
/** @internal */
|
|
15
15
|
export type CompletionLogprobs$Outbound = {
|
|
16
16
|
tokens: Array<string>;
|
|
@@ -21,16 +21,16 @@ export type CompletionLogprobs$Outbound = {
|
|
|
21
21
|
text_offset: Array<number>;
|
|
22
22
|
};
|
|
23
23
|
/** @internal */
|
|
24
|
-
export declare const CompletionLogprobs$outboundSchema: z.ZodType<CompletionLogprobs$Outbound,
|
|
24
|
+
export declare const CompletionLogprobs$outboundSchema: z.ZodType<CompletionLogprobs$Outbound, CompletionLogprobs>;
|
|
25
25
|
/**
|
|
26
26
|
* @internal
|
|
27
27
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
28
28
|
*/
|
|
29
29
|
export declare namespace CompletionLogprobs$ {
|
|
30
30
|
/** @deprecated use `CompletionLogprobs$inboundSchema` instead. */
|
|
31
|
-
const inboundSchema: z.ZodType<CompletionLogprobs, z.
|
|
31
|
+
const inboundSchema: z.ZodType<CompletionLogprobs, unknown, z.core.$ZodTypeInternals<CompletionLogprobs, unknown>>;
|
|
32
32
|
/** @deprecated use `CompletionLogprobs$outboundSchema` instead. */
|
|
33
|
-
const outboundSchema: z.ZodType<CompletionLogprobs$Outbound, z.
|
|
33
|
+
const outboundSchema: z.ZodType<CompletionLogprobs$Outbound, CompletionLogprobs, z.core.$ZodTypeInternals<CompletionLogprobs$Outbound, CompletionLogprobs>>;
|
|
34
34
|
/** @deprecated use `CompletionLogprobs$Outbound` instead. */
|
|
35
35
|
type Outbound = CompletionLogprobs$Outbound;
|
|
36
36
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const CompletionLogprobs$inboundSchema = z.object({
|
|
9
9
|
tokens: z.array(z.string()),
|
|
10
10
|
token_logprobs: z.array(z.number()),
|
|
11
|
-
top_logprobs: z.nullable(z.array(z.record(z.number()))),
|
|
11
|
+
top_logprobs: z.nullable(z.array(z.record(z.string(), z.number()))),
|
|
12
12
|
text_offset: z.array(z.number()),
|
|
13
13
|
}).transform((v) => {
|
|
14
14
|
return remap$(v, {
|
|
@@ -21,7 +21,7 @@ export const CompletionLogprobs$inboundSchema = z.object({
|
|
|
21
21
|
export const CompletionLogprobs$outboundSchema = z.object({
|
|
22
22
|
tokens: z.array(z.string()),
|
|
23
23
|
tokenLogprobs: z.array(z.number()),
|
|
24
|
-
topLogprobs: z.nullable(z.array(z.record(z.number()))),
|
|
24
|
+
topLogprobs: z.nullable(z.array(z.record(z.string(), z.number()))),
|
|
25
25
|
textOffset: z.array(z.number()),
|
|
26
26
|
}).transform((v) => {
|
|
27
27
|
return remap$(v, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { CompletionChoice, CompletionChoice$Outbound } from "./completionchoice.js";
|
|
4
4
|
import { CompletionUsage, CompletionUsage$Outbound } from "./completionusage.js";
|
|
@@ -13,7 +13,7 @@ export type CompletionResponse = {
|
|
|
13
13
|
usage?: CompletionUsage | undefined;
|
|
14
14
|
};
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const CompletionResponse$inboundSchema: z.ZodType<CompletionResponse,
|
|
16
|
+
export declare const CompletionResponse$inboundSchema: z.ZodType<CompletionResponse, unknown>;
|
|
17
17
|
/** @internal */
|
|
18
18
|
export type CompletionResponse$Outbound = {
|
|
19
19
|
id: string;
|
|
@@ -25,16 +25,16 @@ export type CompletionResponse$Outbound = {
|
|
|
25
25
|
usage?: CompletionUsage$Outbound | undefined;
|
|
26
26
|
};
|
|
27
27
|
/** @internal */
|
|
28
|
-
export declare const CompletionResponse$outboundSchema: z.ZodType<CompletionResponse$Outbound,
|
|
28
|
+
export declare const CompletionResponse$outboundSchema: z.ZodType<CompletionResponse$Outbound, CompletionResponse>;
|
|
29
29
|
/**
|
|
30
30
|
* @internal
|
|
31
31
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
32
|
*/
|
|
33
33
|
export declare namespace CompletionResponse$ {
|
|
34
34
|
/** @deprecated use `CompletionResponse$inboundSchema` instead. */
|
|
35
|
-
const inboundSchema: z.ZodType<CompletionResponse, z.
|
|
35
|
+
const inboundSchema: z.ZodType<CompletionResponse, unknown, z.core.$ZodTypeInternals<CompletionResponse, unknown>>;
|
|
36
36
|
/** @deprecated use `CompletionResponse$outboundSchema` instead. */
|
|
37
|
-
const outboundSchema: z.ZodType<CompletionResponse$Outbound, z.
|
|
37
|
+
const outboundSchema: z.ZodType<CompletionResponse$Outbound, CompletionResponse, z.core.$ZodTypeInternals<CompletionResponse$Outbound, CompletionResponse>>;
|
|
38
38
|
/** @deprecated use `CompletionResponse$Outbound` instead. */
|
|
39
39
|
type Outbound = CompletionResponse$Outbound;
|
|
40
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { CompletionChoice$inboundSchema, CompletionChoice$outboundSchema, } from "./completionchoice.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type CompletionUsage = {
|
|
@@ -7,7 +7,7 @@ export type CompletionUsage = {
|
|
|
7
7
|
totalTokens: number;
|
|
8
8
|
};
|
|
9
9
|
/** @internal */
|
|
10
|
-
export declare const CompletionUsage$inboundSchema: z.ZodType<CompletionUsage,
|
|
10
|
+
export declare const CompletionUsage$inboundSchema: z.ZodType<CompletionUsage, unknown>;
|
|
11
11
|
/** @internal */
|
|
12
12
|
export type CompletionUsage$Outbound = {
|
|
13
13
|
prompt_tokens: number;
|
|
@@ -15,16 +15,16 @@ export type CompletionUsage$Outbound = {
|
|
|
15
15
|
total_tokens: number;
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
|
-
export declare const CompletionUsage$outboundSchema: z.ZodType<CompletionUsage$Outbound,
|
|
18
|
+
export declare const CompletionUsage$outboundSchema: z.ZodType<CompletionUsage$Outbound, CompletionUsage>;
|
|
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 CompletionUsage$ {
|
|
24
24
|
/** @deprecated use `CompletionUsage$inboundSchema` instead. */
|
|
25
|
-
const inboundSchema: z.ZodType<CompletionUsage, z.
|
|
25
|
+
const inboundSchema: z.ZodType<CompletionUsage, unknown, z.core.$ZodTypeInternals<CompletionUsage, unknown>>;
|
|
26
26
|
/** @deprecated use `CompletionUsage$outboundSchema` instead. */
|
|
27
|
-
const outboundSchema: z.ZodType<CompletionUsage$Outbound, z.
|
|
27
|
+
const outboundSchema: z.ZodType<CompletionUsage$Outbound, CompletionUsage, z.core.$ZodTypeInternals<CompletionUsage$Outbound, CompletionUsage>>;
|
|
28
28
|
/** @deprecated use `CompletionUsage$Outbound` instead. */
|
|
29
29
|
type Outbound = CompletionUsage$Outbound;
|
|
30
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
/**
|
|
@@ -6,20 +6,20 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export type CreateChargeRequest = {};
|
|
8
8
|
/** @internal */
|
|
9
|
-
export declare const CreateChargeRequest$inboundSchema: z.ZodType<CreateChargeRequest,
|
|
9
|
+
export declare const CreateChargeRequest$inboundSchema: z.ZodType<CreateChargeRequest, unknown>;
|
|
10
10
|
/** @internal */
|
|
11
11
|
export type CreateChargeRequest$Outbound = {};
|
|
12
12
|
/** @internal */
|
|
13
|
-
export declare const CreateChargeRequest$outboundSchema: z.ZodType<CreateChargeRequest$Outbound,
|
|
13
|
+
export declare const CreateChargeRequest$outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest>;
|
|
14
14
|
/**
|
|
15
15
|
* @internal
|
|
16
16
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
17
17
|
*/
|
|
18
18
|
export declare namespace CreateChargeRequest$ {
|
|
19
19
|
/** @deprecated use `CreateChargeRequest$inboundSchema` instead. */
|
|
20
|
-
const inboundSchema: z.ZodType<CreateChargeRequest, z.
|
|
20
|
+
const inboundSchema: z.ZodType<CreateChargeRequest, unknown, z.core.$ZodTypeInternals<CreateChargeRequest, unknown>>;
|
|
21
21
|
/** @deprecated use `CreateChargeRequest$outboundSchema` instead. */
|
|
22
|
-
const outboundSchema: z.ZodType<CreateChargeRequest$Outbound, z.
|
|
22
|
+
const outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest, z.core.$ZodTypeInternals<CreateChargeRequest$Outbound, CreateChargeRequest>>;
|
|
23
23
|
/** @deprecated use `CreateChargeRequest$Outbound` instead. */
|
|
24
24
|
type Outbound = CreateChargeRequest$Outbound;
|
|
25
25
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export const CreateChargeRequest$inboundSchema = z.object({});
|
|
@@ -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
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -90,21 +90,21 @@ export type ErrorResponse = {
|
|
|
90
90
|
userId?: string | null | undefined;
|
|
91
91
|
};
|
|
92
92
|
/** @internal */
|
|
93
|
-
export declare const ErrorResponseCode$inboundSchema: z.ZodType<ErrorResponseCode,
|
|
93
|
+
export declare const ErrorResponseCode$inboundSchema: z.ZodType<ErrorResponseCode, unknown>;
|
|
94
94
|
/** @internal */
|
|
95
|
-
export declare const ErrorResponseCode$outboundSchema: z.ZodType<ErrorResponseCode,
|
|
95
|
+
export declare const ErrorResponseCode$outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode>;
|
|
96
96
|
/**
|
|
97
97
|
* @internal
|
|
98
98
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
99
99
|
*/
|
|
100
100
|
export declare namespace ErrorResponseCode$ {
|
|
101
101
|
/** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
|
|
102
|
-
const inboundSchema: z.ZodType<ErrorResponseCode, z.
|
|
102
|
+
const inboundSchema: z.ZodType<ErrorResponseCode, unknown, z.core.$ZodTypeInternals<ErrorResponseCode, unknown>>;
|
|
103
103
|
/** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
|
|
104
|
-
const outboundSchema: z.ZodType<ErrorResponseCode, z.
|
|
104
|
+
const outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode, z.core.$ZodTypeInternals<ErrorResponseCode, ErrorResponseCode>>;
|
|
105
105
|
}
|
|
106
106
|
/** @internal */
|
|
107
|
-
export declare const ErrorResponseError$inboundSchema: z.ZodType<ErrorResponseError,
|
|
107
|
+
export declare const ErrorResponseError$inboundSchema: z.ZodType<ErrorResponseError, unknown>;
|
|
108
108
|
/** @internal */
|
|
109
109
|
export type ErrorResponseError$Outbound = {
|
|
110
110
|
code: number;
|
|
@@ -114,39 +114,39 @@ export type ErrorResponseError$Outbound = {
|
|
|
114
114
|
} | null | undefined;
|
|
115
115
|
};
|
|
116
116
|
/** @internal */
|
|
117
|
-
export declare const ErrorResponseError$outboundSchema: z.ZodType<ErrorResponseError$Outbound,
|
|
117
|
+
export declare const ErrorResponseError$outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError>;
|
|
118
118
|
/**
|
|
119
119
|
* @internal
|
|
120
120
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
121
121
|
*/
|
|
122
122
|
export declare namespace ErrorResponseError$ {
|
|
123
123
|
/** @deprecated use `ErrorResponseError$inboundSchema` instead. */
|
|
124
|
-
const inboundSchema: z.ZodType<ErrorResponseError, z.
|
|
124
|
+
const inboundSchema: z.ZodType<ErrorResponseError, unknown, z.core.$ZodTypeInternals<ErrorResponseError, unknown>>;
|
|
125
125
|
/** @deprecated use `ErrorResponseError$outboundSchema` instead. */
|
|
126
|
-
const outboundSchema: z.ZodType<ErrorResponseError$Outbound, z.
|
|
126
|
+
const outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError, z.core.$ZodTypeInternals<ErrorResponseError$Outbound, ErrorResponseError>>;
|
|
127
127
|
/** @deprecated use `ErrorResponseError$Outbound` instead. */
|
|
128
128
|
type Outbound = ErrorResponseError$Outbound;
|
|
129
129
|
}
|
|
130
130
|
export declare function errorResponseErrorToJSON(errorResponseError: ErrorResponseError): string;
|
|
131
131
|
export declare function errorResponseErrorFromJSON(jsonString: string): SafeParseResult<ErrorResponseError, SDKValidationError>;
|
|
132
132
|
/** @internal */
|
|
133
|
-
export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse,
|
|
133
|
+
export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
|
|
134
134
|
/** @internal */
|
|
135
135
|
export type ErrorResponse$Outbound = {
|
|
136
136
|
error: ErrorResponseError$Outbound;
|
|
137
137
|
user_id?: string | null | undefined;
|
|
138
138
|
};
|
|
139
139
|
/** @internal */
|
|
140
|
-
export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound,
|
|
140
|
+
export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
|
|
141
141
|
/**
|
|
142
142
|
* @internal
|
|
143
143
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
144
144
|
*/
|
|
145
145
|
export declare namespace ErrorResponse$ {
|
|
146
146
|
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
147
|
-
const inboundSchema: z.ZodType<ErrorResponse, z.
|
|
147
|
+
const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
|
|
148
148
|
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
149
|
-
const outboundSchema: z.ZodType<ErrorResponse$Outbound, z.
|
|
149
|
+
const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
|
|
150
150
|
/** @deprecated use `ErrorResponse$Outbound` instead. */
|
|
151
151
|
type Outbound = ErrorResponse$Outbound;
|
|
152
152
|
}
|
package/models/errorresponse.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
@@ -80,12 +80,12 @@ export const ErrorResponseCode = {
|
|
|
80
80
|
/** @internal */
|
|
81
81
|
export const ErrorResponseCode$inboundSchema = z
|
|
82
82
|
.union([
|
|
83
|
-
z.
|
|
83
|
+
z.enum(ErrorResponseCode),
|
|
84
84
|
z.number().transform(catchUnrecognizedEnum),
|
|
85
85
|
]);
|
|
86
86
|
/** @internal */
|
|
87
87
|
export const ErrorResponseCode$outboundSchema = z.union([
|
|
88
|
-
z.
|
|
88
|
+
z.enum(ErrorResponseCode),
|
|
89
89
|
z.number().and(z.custom()),
|
|
90
90
|
]);
|
|
91
91
|
/**
|
|
@@ -103,13 +103,13 @@ export var ErrorResponseCode$;
|
|
|
103
103
|
export const ErrorResponseError$inboundSchema = z.object({
|
|
104
104
|
code: ErrorResponseCode$inboundSchema,
|
|
105
105
|
message: z.string(),
|
|
106
|
-
metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
|
|
106
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
107
107
|
});
|
|
108
108
|
/** @internal */
|
|
109
109
|
export const ErrorResponseError$outboundSchema = z.object({
|
|
110
110
|
code: ErrorResponseCode$outboundSchema,
|
|
111
111
|
message: z.string(),
|
|
112
|
-
metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
|
|
112
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
113
113
|
});
|
|
114
114
|
/**
|
|
115
115
|
* @internal
|
|
@@ -129,7 +129,8 @@ export function errorResponseErrorFromJSON(jsonString) {
|
|
|
129
129
|
return safeParse(jsonString, (x) => ErrorResponseError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponseError' from JSON`);
|
|
130
130
|
}
|
|
131
131
|
/** @internal */
|
|
132
|
-
export const ErrorResponse$inboundSchema = z
|
|
132
|
+
export const ErrorResponse$inboundSchema = z
|
|
133
|
+
.object({
|
|
133
134
|
error: z.lazy(() => ErrorResponseError$inboundSchema),
|
|
134
135
|
user_id: z.nullable(z.string()).optional(),
|
|
135
136
|
}).transform((v) => {
|