@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,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 { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
6
6
|
export const ReasoningSummaryVerbosity = {
|
|
7
7
|
Auto: "auto",
|
|
@@ -11,12 +11,12 @@ export const ReasoningSummaryVerbosity = {
|
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const ReasoningSummaryVerbosity$inboundSchema = z
|
|
13
13
|
.union([
|
|
14
|
-
z.
|
|
14
|
+
z.enum(ReasoningSummaryVerbosity),
|
|
15
15
|
z.string().transform(catchUnrecognizedEnum),
|
|
16
16
|
]);
|
|
17
17
|
/** @internal */
|
|
18
18
|
export const ReasoningSummaryVerbosity$outboundSchema = z.union([
|
|
19
|
-
z.
|
|
19
|
+
z.enum(ReasoningSummaryVerbosity),
|
|
20
20
|
z.string().and(z.custom()),
|
|
21
21
|
]);
|
|
22
22
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -11,41 +11,41 @@ export type ReasoningTextContent = {
|
|
|
11
11
|
text: string;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const ReasoningTextContentType$inboundSchema: z.
|
|
14
|
+
export declare const ReasoningTextContentType$inboundSchema: z.ZodEnum<typeof ReasoningTextContentType>;
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const ReasoningTextContentType$outboundSchema: z.
|
|
16
|
+
export declare const ReasoningTextContentType$outboundSchema: z.ZodEnum<typeof ReasoningTextContentType>;
|
|
17
17
|
/**
|
|
18
18
|
* @internal
|
|
19
19
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
20
20
|
*/
|
|
21
21
|
export declare namespace ReasoningTextContentType$ {
|
|
22
22
|
/** @deprecated use `ReasoningTextContentType$inboundSchema` instead. */
|
|
23
|
-
const inboundSchema: z.
|
|
23
|
+
const inboundSchema: z.ZodEnum<{
|
|
24
24
|
readonly ReasoningText: "reasoning_text";
|
|
25
25
|
}>;
|
|
26
26
|
/** @deprecated use `ReasoningTextContentType$outboundSchema` instead. */
|
|
27
|
-
const outboundSchema: z.
|
|
27
|
+
const outboundSchema: z.ZodEnum<{
|
|
28
28
|
readonly ReasoningText: "reasoning_text";
|
|
29
29
|
}>;
|
|
30
30
|
}
|
|
31
31
|
/** @internal */
|
|
32
|
-
export declare const ReasoningTextContent$inboundSchema: z.ZodType<ReasoningTextContent,
|
|
32
|
+
export declare const ReasoningTextContent$inboundSchema: z.ZodType<ReasoningTextContent, unknown>;
|
|
33
33
|
/** @internal */
|
|
34
34
|
export type ReasoningTextContent$Outbound = {
|
|
35
35
|
type: string;
|
|
36
36
|
text: string;
|
|
37
37
|
};
|
|
38
38
|
/** @internal */
|
|
39
|
-
export declare const ReasoningTextContent$outboundSchema: z.ZodType<ReasoningTextContent$Outbound,
|
|
39
|
+
export declare const ReasoningTextContent$outboundSchema: z.ZodType<ReasoningTextContent$Outbound, ReasoningTextContent>;
|
|
40
40
|
/**
|
|
41
41
|
* @internal
|
|
42
42
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
43
|
*/
|
|
44
44
|
export declare namespace ReasoningTextContent$ {
|
|
45
45
|
/** @deprecated use `ReasoningTextContent$inboundSchema` instead. */
|
|
46
|
-
const inboundSchema: z.ZodType<ReasoningTextContent, z.
|
|
46
|
+
const inboundSchema: z.ZodType<ReasoningTextContent, unknown, z.core.$ZodTypeInternals<ReasoningTextContent, unknown>>;
|
|
47
47
|
/** @deprecated use `ReasoningTextContent$outboundSchema` instead. */
|
|
48
|
-
const outboundSchema: z.ZodType<ReasoningTextContent$Outbound, z.
|
|
48
|
+
const outboundSchema: z.ZodType<ReasoningTextContent$Outbound, ReasoningTextContent, z.core.$ZodTypeInternals<ReasoningTextContent$Outbound, ReasoningTextContent>>;
|
|
49
49
|
/** @deprecated use `ReasoningTextContent$Outbound` instead. */
|
|
50
50
|
type Outbound = ReasoningTextContent$Outbound;
|
|
51
51
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
export const ReasoningTextContentType = {
|
|
7
7
|
ReasoningText: "reasoning_text",
|
|
8
8
|
};
|
|
9
9
|
/** @internal */
|
|
10
|
-
export const ReasoningTextContentType$inboundSchema = z.
|
|
10
|
+
export const ReasoningTextContentType$inboundSchema = z.enum(ReasoningTextContentType);
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const ReasoningTextContentType$outboundSchema = ReasoningTextContentType$inboundSchema;
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -11,41 +11,41 @@ export type RefusalContent = {
|
|
|
11
11
|
refusal: string;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const RefusalContentType$inboundSchema: z.
|
|
14
|
+
export declare const RefusalContentType$inboundSchema: z.ZodEnum<typeof RefusalContentType>;
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const RefusalContentType$outboundSchema: z.
|
|
16
|
+
export declare const RefusalContentType$outboundSchema: z.ZodEnum<typeof RefusalContentType>;
|
|
17
17
|
/**
|
|
18
18
|
* @internal
|
|
19
19
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
20
20
|
*/
|
|
21
21
|
export declare namespace RefusalContentType$ {
|
|
22
22
|
/** @deprecated use `RefusalContentType$inboundSchema` instead. */
|
|
23
|
-
const inboundSchema: z.
|
|
23
|
+
const inboundSchema: z.ZodEnum<{
|
|
24
24
|
readonly Refusal: "refusal";
|
|
25
25
|
}>;
|
|
26
26
|
/** @deprecated use `RefusalContentType$outboundSchema` instead. */
|
|
27
|
-
const outboundSchema: z.
|
|
27
|
+
const outboundSchema: z.ZodEnum<{
|
|
28
28
|
readonly Refusal: "refusal";
|
|
29
29
|
}>;
|
|
30
30
|
}
|
|
31
31
|
/** @internal */
|
|
32
|
-
export declare const RefusalContent$inboundSchema: z.ZodType<RefusalContent,
|
|
32
|
+
export declare const RefusalContent$inboundSchema: z.ZodType<RefusalContent, unknown>;
|
|
33
33
|
/** @internal */
|
|
34
34
|
export type RefusalContent$Outbound = {
|
|
35
35
|
type: string;
|
|
36
36
|
refusal: string;
|
|
37
37
|
};
|
|
38
38
|
/** @internal */
|
|
39
|
-
export declare const RefusalContent$outboundSchema: z.ZodType<RefusalContent$Outbound,
|
|
39
|
+
export declare const RefusalContent$outboundSchema: z.ZodType<RefusalContent$Outbound, RefusalContent>;
|
|
40
40
|
/**
|
|
41
41
|
* @internal
|
|
42
42
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
43
|
*/
|
|
44
44
|
export declare namespace RefusalContent$ {
|
|
45
45
|
/** @deprecated use `RefusalContent$inboundSchema` instead. */
|
|
46
|
-
const inboundSchema: z.ZodType<RefusalContent, z.
|
|
46
|
+
const inboundSchema: z.ZodType<RefusalContent, unknown, z.core.$ZodTypeInternals<RefusalContent, unknown>>;
|
|
47
47
|
/** @deprecated use `RefusalContent$outboundSchema` instead. */
|
|
48
|
-
const outboundSchema: z.ZodType<RefusalContent$Outbound, z.
|
|
48
|
+
const outboundSchema: z.ZodType<RefusalContent$Outbound, RefusalContent, z.core.$ZodTypeInternals<RefusalContent$Outbound, RefusalContent>>;
|
|
49
49
|
/** @deprecated use `RefusalContent$Outbound` instead. */
|
|
50
50
|
type Outbound = RefusalContent$Outbound;
|
|
51
51
|
}
|
package/models/refusalcontent.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
|
export const RefusalContentType = {
|
|
7
7
|
Refusal: "refusal",
|
|
8
8
|
};
|
|
9
9
|
/** @internal */
|
|
10
|
-
export const RefusalContentType$inboundSchema = z.
|
|
10
|
+
export const RefusalContentType$inboundSchema = z.enum(RefusalContentType);
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const RefusalContentType$outboundSchema = RefusalContentType$inboundSchema;
|
|
13
13
|
/**
|
|
@@ -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 { JSONSchemaConfig, JSONSchemaConfig$Outbound } from "./jsonschemaconfig.js";
|
|
@@ -7,23 +7,23 @@ export type ResponseFormatJSONSchema = {
|
|
|
7
7
|
jsonSchema: JSONSchemaConfig;
|
|
8
8
|
};
|
|
9
9
|
/** @internal */
|
|
10
|
-
export declare const ResponseFormatJSONSchema$inboundSchema: z.ZodType<ResponseFormatJSONSchema,
|
|
10
|
+
export declare const ResponseFormatJSONSchema$inboundSchema: z.ZodType<ResponseFormatJSONSchema, unknown>;
|
|
11
11
|
/** @internal */
|
|
12
12
|
export type ResponseFormatJSONSchema$Outbound = {
|
|
13
13
|
type: "json_schema";
|
|
14
14
|
json_schema: JSONSchemaConfig$Outbound;
|
|
15
15
|
};
|
|
16
16
|
/** @internal */
|
|
17
|
-
export declare const ResponseFormatJSONSchema$outboundSchema: z.ZodType<ResponseFormatJSONSchema$Outbound,
|
|
17
|
+
export declare const ResponseFormatJSONSchema$outboundSchema: z.ZodType<ResponseFormatJSONSchema$Outbound, ResponseFormatJSONSchema>;
|
|
18
18
|
/**
|
|
19
19
|
* @internal
|
|
20
20
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
21
|
*/
|
|
22
22
|
export declare namespace ResponseFormatJSONSchema$ {
|
|
23
23
|
/** @deprecated use `ResponseFormatJSONSchema$inboundSchema` instead. */
|
|
24
|
-
const inboundSchema: z.ZodType<ResponseFormatJSONSchema, z.
|
|
24
|
+
const inboundSchema: z.ZodType<ResponseFormatJSONSchema, unknown, z.core.$ZodTypeInternals<ResponseFormatJSONSchema, unknown>>;
|
|
25
25
|
/** @deprecated use `ResponseFormatJSONSchema$outboundSchema` instead. */
|
|
26
|
-
const outboundSchema: z.ZodType<ResponseFormatJSONSchema$Outbound, z.
|
|
26
|
+
const outboundSchema: z.ZodType<ResponseFormatJSONSchema$Outbound, ResponseFormatJSONSchema, z.core.$ZodTypeInternals<ResponseFormatJSONSchema$Outbound, ResponseFormatJSONSchema>>;
|
|
27
27
|
/** @deprecated use `ResponseFormatJSONSchema$Outbound` instead. */
|
|
28
28
|
type Outbound = ResponseFormatJSONSchema$Outbound;
|
|
29
29
|
}
|
|
@@ -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 { JSONSchemaConfig$inboundSchema, JSONSchemaConfig$outboundSchema, } from "./jsonschemaconfig.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 ResponseFormatTextGrammar = {
|
|
@@ -6,23 +6,23 @@ export type ResponseFormatTextGrammar = {
|
|
|
6
6
|
grammar: string;
|
|
7
7
|
};
|
|
8
8
|
/** @internal */
|
|
9
|
-
export declare const ResponseFormatTextGrammar$inboundSchema: z.ZodType<ResponseFormatTextGrammar,
|
|
9
|
+
export declare const ResponseFormatTextGrammar$inboundSchema: z.ZodType<ResponseFormatTextGrammar, unknown>;
|
|
10
10
|
/** @internal */
|
|
11
11
|
export type ResponseFormatTextGrammar$Outbound = {
|
|
12
12
|
type: "grammar";
|
|
13
13
|
grammar: string;
|
|
14
14
|
};
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const ResponseFormatTextGrammar$outboundSchema: z.ZodType<ResponseFormatTextGrammar$Outbound,
|
|
16
|
+
export declare const ResponseFormatTextGrammar$outboundSchema: z.ZodType<ResponseFormatTextGrammar$Outbound, ResponseFormatTextGrammar>;
|
|
17
17
|
/**
|
|
18
18
|
* @internal
|
|
19
19
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
20
20
|
*/
|
|
21
21
|
export declare namespace ResponseFormatTextGrammar$ {
|
|
22
22
|
/** @deprecated use `ResponseFormatTextGrammar$inboundSchema` instead. */
|
|
23
|
-
const inboundSchema: z.ZodType<ResponseFormatTextGrammar, z.
|
|
23
|
+
const inboundSchema: z.ZodType<ResponseFormatTextGrammar, unknown, z.core.$ZodTypeInternals<ResponseFormatTextGrammar, unknown>>;
|
|
24
24
|
/** @deprecated use `ResponseFormatTextGrammar$outboundSchema` instead. */
|
|
25
|
-
const outboundSchema: z.ZodType<ResponseFormatTextGrammar$Outbound, z.
|
|
25
|
+
const outboundSchema: z.ZodType<ResponseFormatTextGrammar$Outbound, ResponseFormatTextGrammar, z.core.$ZodTypeInternals<ResponseFormatTextGrammar$Outbound, ResponseFormatTextGrammar>>;
|
|
26
26
|
/** @deprecated use `ResponseFormatTextGrammar$Outbound` instead. */
|
|
27
27
|
type Outbound = ResponseFormatTextGrammar$Outbound;
|
|
28
28
|
}
|
|
@@ -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 ResponseFormatTextGrammar$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";
|
|
@@ -16,37 +16,37 @@ export type ResponsesErrorField = {
|
|
|
16
16
|
message: string;
|
|
17
17
|
};
|
|
18
18
|
/** @internal */
|
|
19
|
-
export declare const ResponsesErrorFieldCode$inboundSchema: z.ZodType<ResponsesErrorFieldCode,
|
|
19
|
+
export declare const ResponsesErrorFieldCode$inboundSchema: z.ZodType<ResponsesErrorFieldCode, unknown>;
|
|
20
20
|
/** @internal */
|
|
21
|
-
export declare const ResponsesErrorFieldCode$outboundSchema: z.ZodType<ResponsesErrorFieldCode,
|
|
21
|
+
export declare const ResponsesErrorFieldCode$outboundSchema: z.ZodType<ResponsesErrorFieldCode, ResponsesErrorFieldCode>;
|
|
22
22
|
/**
|
|
23
23
|
* @internal
|
|
24
24
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
25
|
*/
|
|
26
26
|
export declare namespace ResponsesErrorFieldCode$ {
|
|
27
27
|
/** @deprecated use `ResponsesErrorFieldCode$inboundSchema` instead. */
|
|
28
|
-
const inboundSchema: z.ZodType<ResponsesErrorFieldCode, z.
|
|
28
|
+
const inboundSchema: z.ZodType<ResponsesErrorFieldCode, unknown, z.core.$ZodTypeInternals<ResponsesErrorFieldCode, unknown>>;
|
|
29
29
|
/** @deprecated use `ResponsesErrorFieldCode$outboundSchema` instead. */
|
|
30
|
-
const outboundSchema: z.ZodType<ResponsesErrorFieldCode, z.
|
|
30
|
+
const outboundSchema: z.ZodType<ResponsesErrorFieldCode, ResponsesErrorFieldCode, z.core.$ZodTypeInternals<ResponsesErrorFieldCode, ResponsesErrorFieldCode>>;
|
|
31
31
|
}
|
|
32
32
|
/** @internal */
|
|
33
|
-
export declare const ResponsesErrorField$inboundSchema: z.ZodType<ResponsesErrorField,
|
|
33
|
+
export declare const ResponsesErrorField$inboundSchema: z.ZodType<ResponsesErrorField, unknown>;
|
|
34
34
|
/** @internal */
|
|
35
35
|
export type ResponsesErrorField$Outbound = {
|
|
36
36
|
code: string;
|
|
37
37
|
message: string;
|
|
38
38
|
};
|
|
39
39
|
/** @internal */
|
|
40
|
-
export declare const ResponsesErrorField$outboundSchema: z.ZodType<ResponsesErrorField$Outbound,
|
|
40
|
+
export declare const ResponsesErrorField$outboundSchema: z.ZodType<ResponsesErrorField$Outbound, ResponsesErrorField>;
|
|
41
41
|
/**
|
|
42
42
|
* @internal
|
|
43
43
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
44
|
*/
|
|
45
45
|
export declare namespace ResponsesErrorField$ {
|
|
46
46
|
/** @deprecated use `ResponsesErrorField$inboundSchema` instead. */
|
|
47
|
-
const inboundSchema: z.ZodType<ResponsesErrorField, z.
|
|
47
|
+
const inboundSchema: z.ZodType<ResponsesErrorField, unknown, z.core.$ZodTypeInternals<ResponsesErrorField, unknown>>;
|
|
48
48
|
/** @deprecated use `ResponsesErrorField$outboundSchema` instead. */
|
|
49
|
-
const outboundSchema: z.ZodType<ResponsesErrorField$Outbound, z.
|
|
49
|
+
const outboundSchema: z.ZodType<ResponsesErrorField$Outbound, ResponsesErrorField, z.core.$ZodTypeInternals<ResponsesErrorField$Outbound, ResponsesErrorField>>;
|
|
50
50
|
/** @deprecated use `ResponsesErrorField$Outbound` instead. */
|
|
51
51
|
type Outbound = ResponsesErrorField$Outbound;
|
|
52
52
|
}
|
|
@@ -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
|
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
7
7
|
export const ResponsesErrorFieldCode = {
|
|
@@ -12,12 +12,12 @@ export const ResponsesErrorFieldCode = {
|
|
|
12
12
|
/** @internal */
|
|
13
13
|
export const ResponsesErrorFieldCode$inboundSchema = z
|
|
14
14
|
.union([
|
|
15
|
-
z.
|
|
15
|
+
z.enum(ResponsesErrorFieldCode),
|
|
16
16
|
z.string().transform(catchUnrecognizedEnum),
|
|
17
17
|
]);
|
|
18
18
|
/** @internal */
|
|
19
19
|
export const ResponsesErrorFieldCode$outboundSchema = z.union([
|
|
20
|
-
z.
|
|
20
|
+
z.enum(ResponsesErrorFieldCode),
|
|
21
21
|
z.string().and(z.custom()),
|
|
22
22
|
]);
|
|
23
23
|
/**
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { ImageGenerationStatus } from "./imagegenerationstatus.js";
|
|
6
|
+
export declare const ResponsesImageGenerationCallType: {
|
|
7
|
+
readonly ImageGenerationCall: "image_generation_call";
|
|
8
|
+
};
|
|
9
|
+
export type ResponsesImageGenerationCallType = ClosedEnum<typeof ResponsesImageGenerationCallType>;
|
|
10
|
+
export type ResponsesImageGenerationCall = {
|
|
11
|
+
type: ResponsesImageGenerationCallType;
|
|
12
|
+
id: string;
|
|
13
|
+
result: string | null;
|
|
14
|
+
status: ImageGenerationStatus;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const ResponsesImageGenerationCallType$inboundSchema: z.ZodEnum<typeof ResponsesImageGenerationCallType>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ResponsesImageGenerationCallType$outboundSchema: z.ZodEnum<typeof ResponsesImageGenerationCallType>;
|
|
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 ResponsesImageGenerationCallType$ {
|
|
25
|
+
/** @deprecated use `ResponsesImageGenerationCallType$inboundSchema` instead. */
|
|
26
|
+
const inboundSchema: z.ZodEnum<{
|
|
27
|
+
readonly ImageGenerationCall: "image_generation_call";
|
|
28
|
+
}>;
|
|
29
|
+
/** @deprecated use `ResponsesImageGenerationCallType$outboundSchema` instead. */
|
|
30
|
+
const outboundSchema: z.ZodEnum<{
|
|
31
|
+
readonly ImageGenerationCall: "image_generation_call";
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const ResponsesImageGenerationCall$inboundSchema: z.ZodType<ResponsesImageGenerationCall, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ResponsesImageGenerationCall$Outbound = {
|
|
38
|
+
type: string;
|
|
39
|
+
id: string;
|
|
40
|
+
result: string | null;
|
|
41
|
+
status: string;
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const ResponsesImageGenerationCall$outboundSchema: z.ZodType<ResponsesImageGenerationCall$Outbound, ResponsesImageGenerationCall>;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export declare namespace ResponsesImageGenerationCall$ {
|
|
50
|
+
/** @deprecated use `ResponsesImageGenerationCall$inboundSchema` instead. */
|
|
51
|
+
const inboundSchema: z.ZodType<ResponsesImageGenerationCall, unknown, z.core.$ZodTypeInternals<ResponsesImageGenerationCall, unknown>>;
|
|
52
|
+
/** @deprecated use `ResponsesImageGenerationCall$outboundSchema` instead. */
|
|
53
|
+
const outboundSchema: z.ZodType<ResponsesImageGenerationCall$Outbound, ResponsesImageGenerationCall, z.core.$ZodTypeInternals<ResponsesImageGenerationCall$Outbound, ResponsesImageGenerationCall>>;
|
|
54
|
+
/** @deprecated use `ResponsesImageGenerationCall$Outbound` instead. */
|
|
55
|
+
type Outbound = ResponsesImageGenerationCall$Outbound;
|
|
56
|
+
}
|
|
57
|
+
export declare function responsesImageGenerationCallToJSON(responsesImageGenerationCall: ResponsesImageGenerationCall): string;
|
|
58
|
+
export declare function responsesImageGenerationCallFromJSON(jsonString: string): SafeParseResult<ResponsesImageGenerationCall, SDKValidationError>;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { ImageGenerationStatus$inboundSchema, ImageGenerationStatus$outboundSchema, } from "./imagegenerationstatus.js";
|
|
7
|
+
export const ResponsesImageGenerationCallType = {
|
|
8
|
+
ImageGenerationCall: "image_generation_call",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ResponsesImageGenerationCallType$inboundSchema = z.enum(ResponsesImageGenerationCallType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesImageGenerationCallType$outboundSchema = ResponsesImageGenerationCallType$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 ResponsesImageGenerationCallType$;
|
|
19
|
+
(function (ResponsesImageGenerationCallType$) {
|
|
20
|
+
/** @deprecated use `ResponsesImageGenerationCallType$inboundSchema` instead. */
|
|
21
|
+
ResponsesImageGenerationCallType$.inboundSchema = ResponsesImageGenerationCallType$inboundSchema;
|
|
22
|
+
/** @deprecated use `ResponsesImageGenerationCallType$outboundSchema` instead. */
|
|
23
|
+
ResponsesImageGenerationCallType$.outboundSchema = ResponsesImageGenerationCallType$outboundSchema;
|
|
24
|
+
})(ResponsesImageGenerationCallType$ || (ResponsesImageGenerationCallType$ = {}));
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ResponsesImageGenerationCall$inboundSchema = z.object({
|
|
27
|
+
type: ResponsesImageGenerationCallType$inboundSchema,
|
|
28
|
+
id: z.string(),
|
|
29
|
+
result: z.nullable(z.string()),
|
|
30
|
+
status: ImageGenerationStatus$inboundSchema,
|
|
31
|
+
});
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ResponsesImageGenerationCall$outboundSchema = z.object({
|
|
34
|
+
type: ResponsesImageGenerationCallType$outboundSchema,
|
|
35
|
+
id: z.string(),
|
|
36
|
+
result: z.nullable(z.string()),
|
|
37
|
+
status: ImageGenerationStatus$outboundSchema,
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
42
|
+
*/
|
|
43
|
+
export var ResponsesImageGenerationCall$;
|
|
44
|
+
(function (ResponsesImageGenerationCall$) {
|
|
45
|
+
/** @deprecated use `ResponsesImageGenerationCall$inboundSchema` instead. */
|
|
46
|
+
ResponsesImageGenerationCall$.inboundSchema = ResponsesImageGenerationCall$inboundSchema;
|
|
47
|
+
/** @deprecated use `ResponsesImageGenerationCall$outboundSchema` instead. */
|
|
48
|
+
ResponsesImageGenerationCall$.outboundSchema = ResponsesImageGenerationCall$outboundSchema;
|
|
49
|
+
})(ResponsesImageGenerationCall$ || (ResponsesImageGenerationCall$ = {}));
|
|
50
|
+
export function responsesImageGenerationCallToJSON(responsesImageGenerationCall) {
|
|
51
|
+
return JSON.stringify(ResponsesImageGenerationCall$outboundSchema.parse(responsesImageGenerationCall));
|
|
52
|
+
}
|
|
53
|
+
export function responsesImageGenerationCallFromJSON(jsonString) {
|
|
54
|
+
return safeParse(jsonString, (x) => ResponsesImageGenerationCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesImageGenerationCall' from JSON`);
|
|
55
|
+
}
|