@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
|
/**
|
|
7
7
|
* Size of the search context for web search tools
|
|
@@ -14,12 +14,12 @@ export const ResponsesSearchContextSize = {
|
|
|
14
14
|
/** @internal */
|
|
15
15
|
export const ResponsesSearchContextSize$inboundSchema = z
|
|
16
16
|
.union([
|
|
17
|
-
z.
|
|
17
|
+
z.enum(ResponsesSearchContextSize),
|
|
18
18
|
z.string().transform(catchUnrecognizedEnum),
|
|
19
19
|
]);
|
|
20
20
|
/** @internal */
|
|
21
21
|
export const ResponsesSearchContextSize$outboundSchema = z.union([
|
|
22
|
-
z.
|
|
22
|
+
z.enum(ResponsesSearchContextSize),
|
|
23
23
|
z.string().and(z.custom()),
|
|
24
24
|
]);
|
|
25
25
|
/**
|
|
@@ -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 InputTokensDetails = {
|
|
@@ -32,51 +32,51 @@ export type ResponsesUsage = {
|
|
|
32
32
|
costDetails?: CostDetails | undefined;
|
|
33
33
|
};
|
|
34
34
|
/** @internal */
|
|
35
|
-
export declare const InputTokensDetails$inboundSchema: z.ZodType<InputTokensDetails,
|
|
35
|
+
export declare const InputTokensDetails$inboundSchema: z.ZodType<InputTokensDetails, unknown>;
|
|
36
36
|
/** @internal */
|
|
37
37
|
export type InputTokensDetails$Outbound = {
|
|
38
38
|
cached_tokens: number;
|
|
39
39
|
};
|
|
40
40
|
/** @internal */
|
|
41
|
-
export declare const InputTokensDetails$outboundSchema: z.ZodType<InputTokensDetails$Outbound,
|
|
41
|
+
export declare const InputTokensDetails$outboundSchema: z.ZodType<InputTokensDetails$Outbound, InputTokensDetails>;
|
|
42
42
|
/**
|
|
43
43
|
* @internal
|
|
44
44
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
45
45
|
*/
|
|
46
46
|
export declare namespace InputTokensDetails$ {
|
|
47
47
|
/** @deprecated use `InputTokensDetails$inboundSchema` instead. */
|
|
48
|
-
const inboundSchema: z.ZodType<InputTokensDetails, z.
|
|
48
|
+
const inboundSchema: z.ZodType<InputTokensDetails, unknown, z.core.$ZodTypeInternals<InputTokensDetails, unknown>>;
|
|
49
49
|
/** @deprecated use `InputTokensDetails$outboundSchema` instead. */
|
|
50
|
-
const outboundSchema: z.ZodType<InputTokensDetails$Outbound, z.
|
|
50
|
+
const outboundSchema: z.ZodType<InputTokensDetails$Outbound, InputTokensDetails, z.core.$ZodTypeInternals<InputTokensDetails$Outbound, InputTokensDetails>>;
|
|
51
51
|
/** @deprecated use `InputTokensDetails$Outbound` instead. */
|
|
52
52
|
type Outbound = InputTokensDetails$Outbound;
|
|
53
53
|
}
|
|
54
54
|
export declare function inputTokensDetailsToJSON(inputTokensDetails: InputTokensDetails): string;
|
|
55
55
|
export declare function inputTokensDetailsFromJSON(jsonString: string): SafeParseResult<InputTokensDetails, SDKValidationError>;
|
|
56
56
|
/** @internal */
|
|
57
|
-
export declare const OutputTokensDetails$inboundSchema: z.ZodType<OutputTokensDetails,
|
|
57
|
+
export declare const OutputTokensDetails$inboundSchema: z.ZodType<OutputTokensDetails, unknown>;
|
|
58
58
|
/** @internal */
|
|
59
59
|
export type OutputTokensDetails$Outbound = {
|
|
60
60
|
reasoning_tokens: number;
|
|
61
61
|
};
|
|
62
62
|
/** @internal */
|
|
63
|
-
export declare const OutputTokensDetails$outboundSchema: z.ZodType<OutputTokensDetails$Outbound,
|
|
63
|
+
export declare const OutputTokensDetails$outboundSchema: z.ZodType<OutputTokensDetails$Outbound, OutputTokensDetails>;
|
|
64
64
|
/**
|
|
65
65
|
* @internal
|
|
66
66
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
67
|
*/
|
|
68
68
|
export declare namespace OutputTokensDetails$ {
|
|
69
69
|
/** @deprecated use `OutputTokensDetails$inboundSchema` instead. */
|
|
70
|
-
const inboundSchema: z.ZodType<OutputTokensDetails, z.
|
|
70
|
+
const inboundSchema: z.ZodType<OutputTokensDetails, unknown, z.core.$ZodTypeInternals<OutputTokensDetails, unknown>>;
|
|
71
71
|
/** @deprecated use `OutputTokensDetails$outboundSchema` instead. */
|
|
72
|
-
const outboundSchema: z.ZodType<OutputTokensDetails$Outbound, z.
|
|
72
|
+
const outboundSchema: z.ZodType<OutputTokensDetails$Outbound, OutputTokensDetails, z.core.$ZodTypeInternals<OutputTokensDetails$Outbound, OutputTokensDetails>>;
|
|
73
73
|
/** @deprecated use `OutputTokensDetails$Outbound` instead. */
|
|
74
74
|
type Outbound = OutputTokensDetails$Outbound;
|
|
75
75
|
}
|
|
76
76
|
export declare function outputTokensDetailsToJSON(outputTokensDetails: OutputTokensDetails): string;
|
|
77
77
|
export declare function outputTokensDetailsFromJSON(jsonString: string): SafeParseResult<OutputTokensDetails, SDKValidationError>;
|
|
78
78
|
/** @internal */
|
|
79
|
-
export declare const CostDetails$inboundSchema: z.ZodType<CostDetails,
|
|
79
|
+
export declare const CostDetails$inboundSchema: z.ZodType<CostDetails, unknown>;
|
|
80
80
|
/** @internal */
|
|
81
81
|
export type CostDetails$Outbound = {
|
|
82
82
|
upstream_inference_cost?: number | null | undefined;
|
|
@@ -84,23 +84,23 @@ export type CostDetails$Outbound = {
|
|
|
84
84
|
upstream_inference_output_cost: number;
|
|
85
85
|
};
|
|
86
86
|
/** @internal */
|
|
87
|
-
export declare const CostDetails$outboundSchema: z.ZodType<CostDetails$Outbound,
|
|
87
|
+
export declare const CostDetails$outboundSchema: z.ZodType<CostDetails$Outbound, CostDetails>;
|
|
88
88
|
/**
|
|
89
89
|
* @internal
|
|
90
90
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
91
91
|
*/
|
|
92
92
|
export declare namespace CostDetails$ {
|
|
93
93
|
/** @deprecated use `CostDetails$inboundSchema` instead. */
|
|
94
|
-
const inboundSchema: z.ZodType<CostDetails, z.
|
|
94
|
+
const inboundSchema: z.ZodType<CostDetails, unknown, z.core.$ZodTypeInternals<CostDetails, unknown>>;
|
|
95
95
|
/** @deprecated use `CostDetails$outboundSchema` instead. */
|
|
96
|
-
const outboundSchema: z.ZodType<CostDetails$Outbound, z.
|
|
96
|
+
const outboundSchema: z.ZodType<CostDetails$Outbound, CostDetails, z.core.$ZodTypeInternals<CostDetails$Outbound, CostDetails>>;
|
|
97
97
|
/** @deprecated use `CostDetails$Outbound` instead. */
|
|
98
98
|
type Outbound = CostDetails$Outbound;
|
|
99
99
|
}
|
|
100
100
|
export declare function costDetailsToJSON(costDetails: CostDetails): string;
|
|
101
101
|
export declare function costDetailsFromJSON(jsonString: string): SafeParseResult<CostDetails, SDKValidationError>;
|
|
102
102
|
/** @internal */
|
|
103
|
-
export declare const ResponsesUsage$inboundSchema: z.ZodType<ResponsesUsage,
|
|
103
|
+
export declare const ResponsesUsage$inboundSchema: z.ZodType<ResponsesUsage, unknown>;
|
|
104
104
|
/** @internal */
|
|
105
105
|
export type ResponsesUsage$Outbound = {
|
|
106
106
|
input_tokens: number;
|
|
@@ -113,16 +113,16 @@ export type ResponsesUsage$Outbound = {
|
|
|
113
113
|
cost_details?: CostDetails$Outbound | undefined;
|
|
114
114
|
};
|
|
115
115
|
/** @internal */
|
|
116
|
-
export declare const ResponsesUsage$outboundSchema: z.ZodType<ResponsesUsage$Outbound,
|
|
116
|
+
export declare const ResponsesUsage$outboundSchema: z.ZodType<ResponsesUsage$Outbound, ResponsesUsage>;
|
|
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 ResponsesUsage$ {
|
|
122
122
|
/** @deprecated use `ResponsesUsage$inboundSchema` instead. */
|
|
123
|
-
const inboundSchema: z.ZodType<ResponsesUsage, z.
|
|
123
|
+
const inboundSchema: z.ZodType<ResponsesUsage, unknown, z.core.$ZodTypeInternals<ResponsesUsage, unknown>>;
|
|
124
124
|
/** @deprecated use `ResponsesUsage$outboundSchema` instead. */
|
|
125
|
-
const outboundSchema: z.ZodType<ResponsesUsage$Outbound, z.
|
|
125
|
+
const outboundSchema: z.ZodType<ResponsesUsage$Outbound, ResponsesUsage, z.core.$ZodTypeInternals<ResponsesUsage$Outbound, ResponsesUsage>>;
|
|
126
126
|
/** @deprecated use `ResponsesUsage$Outbound` instead. */
|
|
127
127
|
type Outbound = ResponsesUsage$Outbound;
|
|
128
128
|
}
|
package/models/responsesusage.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
|
/** @internal */
|
|
@@ -71,7 +71,8 @@ export function outputTokensDetailsFromJSON(jsonString) {
|
|
|
71
71
|
return safeParse(jsonString, (x) => OutputTokensDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputTokensDetails' from JSON`);
|
|
72
72
|
}
|
|
73
73
|
/** @internal */
|
|
74
|
-
export const CostDetails$inboundSchema = z
|
|
74
|
+
export const CostDetails$inboundSchema = z
|
|
75
|
+
.object({
|
|
75
76
|
upstream_inference_cost: z.nullable(z.number()).optional(),
|
|
76
77
|
upstream_inference_input_cost: z.number(),
|
|
77
78
|
upstream_inference_output_cost: z.number(),
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { WebSearchStatus } from "./websearchstatus.js";
|
|
6
|
+
export declare const ResponsesWebSearchCallOutputType: {
|
|
7
|
+
readonly WebSearchCall: "web_search_call";
|
|
8
|
+
};
|
|
9
|
+
export type ResponsesWebSearchCallOutputType = ClosedEnum<typeof ResponsesWebSearchCallOutputType>;
|
|
10
|
+
export type ResponsesWebSearchCallOutput = {
|
|
11
|
+
type: ResponsesWebSearchCallOutputType;
|
|
12
|
+
id: string;
|
|
13
|
+
status: WebSearchStatus;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ResponsesWebSearchCallOutputType$inboundSchema: z.ZodEnum<typeof ResponsesWebSearchCallOutputType>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const ResponsesWebSearchCallOutputType$outboundSchema: z.ZodEnum<typeof ResponsesWebSearchCallOutputType>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace ResponsesWebSearchCallOutputType$ {
|
|
24
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$inboundSchema` instead. */
|
|
25
|
+
const inboundSchema: z.ZodEnum<{
|
|
26
|
+
readonly WebSearchCall: "web_search_call";
|
|
27
|
+
}>;
|
|
28
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$outboundSchema` instead. */
|
|
29
|
+
const outboundSchema: z.ZodEnum<{
|
|
30
|
+
readonly WebSearchCall: "web_search_call";
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const ResponsesWebSearchCallOutput$inboundSchema: z.ZodType<ResponsesWebSearchCallOutput, unknown>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type ResponsesWebSearchCallOutput$Outbound = {
|
|
37
|
+
type: string;
|
|
38
|
+
id: string;
|
|
39
|
+
status: string;
|
|
40
|
+
};
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const ResponsesWebSearchCallOutput$outboundSchema: z.ZodType<ResponsesWebSearchCallOutput$Outbound, ResponsesWebSearchCallOutput>;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export declare namespace ResponsesWebSearchCallOutput$ {
|
|
48
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$inboundSchema` instead. */
|
|
49
|
+
const inboundSchema: z.ZodType<ResponsesWebSearchCallOutput, unknown, z.core.$ZodTypeInternals<ResponsesWebSearchCallOutput, unknown>>;
|
|
50
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$outboundSchema` instead. */
|
|
51
|
+
const outboundSchema: z.ZodType<ResponsesWebSearchCallOutput$Outbound, ResponsesWebSearchCallOutput, z.core.$ZodTypeInternals<ResponsesWebSearchCallOutput$Outbound, ResponsesWebSearchCallOutput>>;
|
|
52
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$Outbound` instead. */
|
|
53
|
+
type Outbound = ResponsesWebSearchCallOutput$Outbound;
|
|
54
|
+
}
|
|
55
|
+
export declare function responsesWebSearchCallOutputToJSON(responsesWebSearchCallOutput: ResponsesWebSearchCallOutput): string;
|
|
56
|
+
export declare function responsesWebSearchCallOutputFromJSON(jsonString: string): SafeParseResult<ResponsesWebSearchCallOutput, SDKValidationError>;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { WebSearchStatus$inboundSchema, WebSearchStatus$outboundSchema, } from "./websearchstatus.js";
|
|
7
|
+
export const ResponsesWebSearchCallOutputType = {
|
|
8
|
+
WebSearchCall: "web_search_call",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ResponsesWebSearchCallOutputType$inboundSchema = z.enum(ResponsesWebSearchCallOutputType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesWebSearchCallOutputType$outboundSchema = ResponsesWebSearchCallOutputType$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 ResponsesWebSearchCallOutputType$;
|
|
19
|
+
(function (ResponsesWebSearchCallOutputType$) {
|
|
20
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$inboundSchema` instead. */
|
|
21
|
+
ResponsesWebSearchCallOutputType$.inboundSchema = ResponsesWebSearchCallOutputType$inboundSchema;
|
|
22
|
+
/** @deprecated use `ResponsesWebSearchCallOutputType$outboundSchema` instead. */
|
|
23
|
+
ResponsesWebSearchCallOutputType$.outboundSchema = ResponsesWebSearchCallOutputType$outboundSchema;
|
|
24
|
+
})(ResponsesWebSearchCallOutputType$ || (ResponsesWebSearchCallOutputType$ = {}));
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ResponsesWebSearchCallOutput$inboundSchema = z.object({
|
|
27
|
+
type: ResponsesWebSearchCallOutputType$inboundSchema,
|
|
28
|
+
id: z.string(),
|
|
29
|
+
status: WebSearchStatus$inboundSchema,
|
|
30
|
+
});
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ResponsesWebSearchCallOutput$outboundSchema = z.object({
|
|
33
|
+
type: ResponsesWebSearchCallOutputType$outboundSchema,
|
|
34
|
+
id: z.string(),
|
|
35
|
+
status: WebSearchStatus$outboundSchema,
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export var ResponsesWebSearchCallOutput$;
|
|
42
|
+
(function (ResponsesWebSearchCallOutput$) {
|
|
43
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$inboundSchema` instead. */
|
|
44
|
+
ResponsesWebSearchCallOutput$.inboundSchema = ResponsesWebSearchCallOutput$inboundSchema;
|
|
45
|
+
/** @deprecated use `ResponsesWebSearchCallOutput$outboundSchema` instead. */
|
|
46
|
+
ResponsesWebSearchCallOutput$.outboundSchema = ResponsesWebSearchCallOutput$outboundSchema;
|
|
47
|
+
})(ResponsesWebSearchCallOutput$ || (ResponsesWebSearchCallOutput$ = {}));
|
|
48
|
+
export function responsesWebSearchCallOutputToJSON(responsesWebSearchCallOutput) {
|
|
49
|
+
return JSON.stringify(ResponsesWebSearchCallOutput$outboundSchema.parse(responsesWebSearchCallOutput));
|
|
50
|
+
}
|
|
51
|
+
export function responsesWebSearchCallOutputFromJSON(jsonString) {
|
|
52
|
+
return safeParse(jsonString, (x) => ResponsesWebSearchCallOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesWebSearchCallOutput' from JSON`);
|
|
53
|
+
}
|
|
@@ -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";
|
|
@@ -17,25 +17,25 @@ export type ResponsesWebSearchUserLocation = {
|
|
|
17
17
|
timezone?: string | null | undefined;
|
|
18
18
|
};
|
|
19
19
|
/** @internal */
|
|
20
|
-
export declare const ResponsesWebSearchUserLocationType$inboundSchema: z.
|
|
20
|
+
export declare const ResponsesWebSearchUserLocationType$inboundSchema: z.ZodEnum<typeof ResponsesWebSearchUserLocationType>;
|
|
21
21
|
/** @internal */
|
|
22
|
-
export declare const ResponsesWebSearchUserLocationType$outboundSchema: z.
|
|
22
|
+
export declare const ResponsesWebSearchUserLocationType$outboundSchema: z.ZodEnum<typeof ResponsesWebSearchUserLocationType>;
|
|
23
23
|
/**
|
|
24
24
|
* @internal
|
|
25
25
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
26
26
|
*/
|
|
27
27
|
export declare namespace ResponsesWebSearchUserLocationType$ {
|
|
28
28
|
/** @deprecated use `ResponsesWebSearchUserLocationType$inboundSchema` instead. */
|
|
29
|
-
const inboundSchema: z.
|
|
29
|
+
const inboundSchema: z.ZodEnum<{
|
|
30
30
|
readonly Approximate: "approximate";
|
|
31
31
|
}>;
|
|
32
32
|
/** @deprecated use `ResponsesWebSearchUserLocationType$outboundSchema` instead. */
|
|
33
|
-
const outboundSchema: z.
|
|
33
|
+
const outboundSchema: z.ZodEnum<{
|
|
34
34
|
readonly Approximate: "approximate";
|
|
35
35
|
}>;
|
|
36
36
|
}
|
|
37
37
|
/** @internal */
|
|
38
|
-
export declare const ResponsesWebSearchUserLocation$inboundSchema: z.ZodType<ResponsesWebSearchUserLocation,
|
|
38
|
+
export declare const ResponsesWebSearchUserLocation$inboundSchema: z.ZodType<ResponsesWebSearchUserLocation, unknown>;
|
|
39
39
|
/** @internal */
|
|
40
40
|
export type ResponsesWebSearchUserLocation$Outbound = {
|
|
41
41
|
type?: string | undefined;
|
|
@@ -45,16 +45,16 @@ export type ResponsesWebSearchUserLocation$Outbound = {
|
|
|
45
45
|
timezone?: string | null | undefined;
|
|
46
46
|
};
|
|
47
47
|
/** @internal */
|
|
48
|
-
export declare const ResponsesWebSearchUserLocation$outboundSchema: z.ZodType<ResponsesWebSearchUserLocation$Outbound,
|
|
48
|
+
export declare const ResponsesWebSearchUserLocation$outboundSchema: z.ZodType<ResponsesWebSearchUserLocation$Outbound, ResponsesWebSearchUserLocation>;
|
|
49
49
|
/**
|
|
50
50
|
* @internal
|
|
51
51
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
52
|
*/
|
|
53
53
|
export declare namespace ResponsesWebSearchUserLocation$ {
|
|
54
54
|
/** @deprecated use `ResponsesWebSearchUserLocation$inboundSchema` instead. */
|
|
55
|
-
const inboundSchema: z.ZodType<ResponsesWebSearchUserLocation, z.
|
|
55
|
+
const inboundSchema: z.ZodType<ResponsesWebSearchUserLocation, unknown, z.core.$ZodTypeInternals<ResponsesWebSearchUserLocation, unknown>>;
|
|
56
56
|
/** @deprecated use `ResponsesWebSearchUserLocation$outboundSchema` instead. */
|
|
57
|
-
const outboundSchema: z.ZodType<ResponsesWebSearchUserLocation$Outbound, z.
|
|
57
|
+
const outboundSchema: z.ZodType<ResponsesWebSearchUserLocation$Outbound, ResponsesWebSearchUserLocation, z.core.$ZodTypeInternals<ResponsesWebSearchUserLocation$Outbound, ResponsesWebSearchUserLocation>>;
|
|
58
58
|
/** @deprecated use `ResponsesWebSearchUserLocation$Outbound` instead. */
|
|
59
59
|
type Outbound = ResponsesWebSearchUserLocation$Outbound;
|
|
60
60
|
}
|
|
@@ -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 ResponsesWebSearchUserLocationType = {
|
|
7
7
|
Approximate: "approximate",
|
|
8
8
|
};
|
|
9
9
|
/** @internal */
|
|
10
|
-
export const ResponsesWebSearchUserLocationType$inboundSchema = z.
|
|
10
|
+
export const ResponsesWebSearchUserLocationType$inboundSchema = z.enum(ResponsesWebSearchUserLocationType);
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const ResponsesWebSearchUserLocationType$outboundSchema = ResponsesWebSearchUserLocationType$inboundSchema;
|
|
13
13
|
/**
|
package/models/security.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
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 Security = {
|
|
5
5
|
apiKey?: string | undefined;
|
|
6
6
|
};
|
|
7
7
|
/** @internal */
|
|
8
|
-
export declare const Security$inboundSchema: z.ZodType<Security,
|
|
8
|
+
export declare const Security$inboundSchema: z.ZodType<Security, unknown>;
|
|
9
9
|
/** @internal */
|
|
10
10
|
export type Security$Outbound = {
|
|
11
11
|
apiKey?: string | undefined;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const Security$outboundSchema: z.ZodType<Security$Outbound,
|
|
14
|
+
export declare const Security$outboundSchema: z.ZodType<Security$Outbound, Security>;
|
|
15
15
|
/**
|
|
16
16
|
* @internal
|
|
17
17
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
18
|
*/
|
|
19
19
|
export declare namespace Security$ {
|
|
20
20
|
/** @deprecated use `Security$inboundSchema` instead. */
|
|
21
|
-
const inboundSchema: z.ZodType<Security, z.
|
|
21
|
+
const inboundSchema: z.ZodType<Security, unknown, z.core.$ZodTypeInternals<Security, unknown>>;
|
|
22
22
|
/** @deprecated use `Security$outboundSchema` instead. */
|
|
23
|
-
const outboundSchema: z.ZodType<Security$Outbound, z.
|
|
23
|
+
const outboundSchema: z.ZodType<Security$Outbound, Security, z.core.$ZodTypeInternals<Security$Outbound, Security>>;
|
|
24
24
|
/** @deprecated use `Security$Outbound` instead. */
|
|
25
25
|
type Outbound = Security$Outbound;
|
|
26
26
|
}
|
package/models/security.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
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 Security$inboundSchema = z.object({
|
|
8
8
|
apiKey: z.string().optional(),
|
|
9
9
|
});
|
|
10
10
|
/** @internal */
|
|
11
|
-
export const Security$outboundSchema = z
|
|
11
|
+
export const Security$outboundSchema = z
|
|
12
|
+
.object({
|
|
12
13
|
apiKey: z.string().optional(),
|
|
13
14
|
});
|
|
14
15
|
/**
|
|
@@ -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 { ChatMessageContentItemText, ChatMessageContentItemText$Outbound } from "./chatmessagecontentitemtext.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -9,27 +9,27 @@ export type SystemMessage = {
|
|
|
9
9
|
name?: string | undefined;
|
|
10
10
|
};
|
|
11
11
|
/** @internal */
|
|
12
|
-
export declare const SystemMessageContent$inboundSchema: z.ZodType<SystemMessageContent,
|
|
12
|
+
export declare const SystemMessageContent$inboundSchema: z.ZodType<SystemMessageContent, unknown>;
|
|
13
13
|
/** @internal */
|
|
14
14
|
export type SystemMessageContent$Outbound = string | Array<ChatMessageContentItemText$Outbound>;
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const SystemMessageContent$outboundSchema: z.ZodType<SystemMessageContent$Outbound,
|
|
16
|
+
export declare const SystemMessageContent$outboundSchema: z.ZodType<SystemMessageContent$Outbound, SystemMessageContent>;
|
|
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 SystemMessageContent$ {
|
|
22
22
|
/** @deprecated use `SystemMessageContent$inboundSchema` instead. */
|
|
23
|
-
const inboundSchema: z.ZodType<SystemMessageContent, z.
|
|
23
|
+
const inboundSchema: z.ZodType<SystemMessageContent, unknown, z.core.$ZodTypeInternals<SystemMessageContent, unknown>>;
|
|
24
24
|
/** @deprecated use `SystemMessageContent$outboundSchema` instead. */
|
|
25
|
-
const outboundSchema: z.ZodType<SystemMessageContent$Outbound, z.
|
|
25
|
+
const outboundSchema: z.ZodType<SystemMessageContent$Outbound, SystemMessageContent, z.core.$ZodTypeInternals<SystemMessageContent$Outbound, SystemMessageContent>>;
|
|
26
26
|
/** @deprecated use `SystemMessageContent$Outbound` instead. */
|
|
27
27
|
type Outbound = SystemMessageContent$Outbound;
|
|
28
28
|
}
|
|
29
29
|
export declare function systemMessageContentToJSON(systemMessageContent: SystemMessageContent): string;
|
|
30
30
|
export declare function systemMessageContentFromJSON(jsonString: string): SafeParseResult<SystemMessageContent, SDKValidationError>;
|
|
31
31
|
/** @internal */
|
|
32
|
-
export declare const SystemMessage$inboundSchema: z.ZodType<SystemMessage,
|
|
32
|
+
export declare const SystemMessage$inboundSchema: z.ZodType<SystemMessage, unknown>;
|
|
33
33
|
/** @internal */
|
|
34
34
|
export type SystemMessage$Outbound = {
|
|
35
35
|
role: "system";
|
|
@@ -37,16 +37,16 @@ export type SystemMessage$Outbound = {
|
|
|
37
37
|
name?: string | undefined;
|
|
38
38
|
};
|
|
39
39
|
/** @internal */
|
|
40
|
-
export declare const SystemMessage$outboundSchema: z.ZodType<SystemMessage$Outbound,
|
|
40
|
+
export declare const SystemMessage$outboundSchema: z.ZodType<SystemMessage$Outbound, SystemMessage>;
|
|
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 SystemMessage$ {
|
|
46
46
|
/** @deprecated use `SystemMessage$inboundSchema` instead. */
|
|
47
|
-
const inboundSchema: z.ZodType<SystemMessage, z.
|
|
47
|
+
const inboundSchema: z.ZodType<SystemMessage, unknown, z.core.$ZodTypeInternals<SystemMessage, unknown>>;
|
|
48
48
|
/** @deprecated use `SystemMessage$outboundSchema` instead. */
|
|
49
|
-
const outboundSchema: z.ZodType<SystemMessage$Outbound, z.
|
|
49
|
+
const outboundSchema: z.ZodType<SystemMessage$Outbound, SystemMessage, z.core.$ZodTypeInternals<SystemMessage$Outbound, SystemMessage>>;
|
|
50
50
|
/** @deprecated use `SystemMessage$Outbound` instead. */
|
|
51
51
|
type Outbound = SystemMessage$Outbound;
|
|
52
52
|
}
|
package/models/systemmessage.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 { safeParse } from "../lib/schemas.js";
|
|
6
6
|
import { ChatMessageContentItemText$inboundSchema, ChatMessageContentItemText$outboundSchema, } from "./chatmessagecontentitemtext.js";
|
|
7
7
|
/** @internal */
|
|
@@ -26,7 +26,8 @@ export function systemMessageContentFromJSON(jsonString) {
|
|
|
26
26
|
return safeParse(jsonString, (x) => SystemMessageContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SystemMessageContent' from JSON`);
|
|
27
27
|
}
|
|
28
28
|
/** @internal */
|
|
29
|
-
export const SystemMessage$inboundSchema = z
|
|
29
|
+
export const SystemMessage$inboundSchema = z
|
|
30
|
+
.object({
|
|
30
31
|
role: z.literal("system"),
|
|
31
32
|
content: z.union([
|
|
32
33
|
z.string(),
|
package/models/tool.d.ts
CHANGED
|
@@ -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 ToolFunction = {
|
|
@@ -14,7 +14,7 @@ export type Tool = {
|
|
|
14
14
|
function: ToolFunction;
|
|
15
15
|
};
|
|
16
16
|
/** @internal */
|
|
17
|
-
export declare const ToolFunction$inboundSchema: z.ZodType<ToolFunction,
|
|
17
|
+
export declare const ToolFunction$inboundSchema: z.ZodType<ToolFunction, unknown>;
|
|
18
18
|
/** @internal */
|
|
19
19
|
export type ToolFunction$Outbound = {
|
|
20
20
|
name: string;
|
|
@@ -25,39 +25,39 @@ export type ToolFunction$Outbound = {
|
|
|
25
25
|
strict?: boolean | null | undefined;
|
|
26
26
|
};
|
|
27
27
|
/** @internal */
|
|
28
|
-
export declare const ToolFunction$outboundSchema: z.ZodType<ToolFunction$Outbound,
|
|
28
|
+
export declare const ToolFunction$outboundSchema: z.ZodType<ToolFunction$Outbound, ToolFunction>;
|
|
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 ToolFunction$ {
|
|
34
34
|
/** @deprecated use `ToolFunction$inboundSchema` instead. */
|
|
35
|
-
const inboundSchema: z.ZodType<ToolFunction, z.
|
|
35
|
+
const inboundSchema: z.ZodType<ToolFunction, unknown, z.core.$ZodTypeInternals<ToolFunction, unknown>>;
|
|
36
36
|
/** @deprecated use `ToolFunction$outboundSchema` instead. */
|
|
37
|
-
const outboundSchema: z.ZodType<ToolFunction$Outbound, z.
|
|
37
|
+
const outboundSchema: z.ZodType<ToolFunction$Outbound, ToolFunction, z.core.$ZodTypeInternals<ToolFunction$Outbound, ToolFunction>>;
|
|
38
38
|
/** @deprecated use `ToolFunction$Outbound` instead. */
|
|
39
39
|
type Outbound = ToolFunction$Outbound;
|
|
40
40
|
}
|
|
41
41
|
export declare function toolFunctionToJSON(toolFunction: ToolFunction): string;
|
|
42
42
|
export declare function toolFunctionFromJSON(jsonString: string): SafeParseResult<ToolFunction, SDKValidationError>;
|
|
43
43
|
/** @internal */
|
|
44
|
-
export declare const Tool$inboundSchema: z.ZodType<Tool,
|
|
44
|
+
export declare const Tool$inboundSchema: z.ZodType<Tool, unknown>;
|
|
45
45
|
/** @internal */
|
|
46
46
|
export type Tool$Outbound = {
|
|
47
47
|
type: "function";
|
|
48
48
|
function: ToolFunction$Outbound;
|
|
49
49
|
};
|
|
50
50
|
/** @internal */
|
|
51
|
-
export declare const Tool$outboundSchema: z.ZodType<Tool$Outbound,
|
|
51
|
+
export declare const Tool$outboundSchema: z.ZodType<Tool$Outbound, Tool>;
|
|
52
52
|
/**
|
|
53
53
|
* @internal
|
|
54
54
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
55
|
*/
|
|
56
56
|
export declare namespace Tool$ {
|
|
57
57
|
/** @deprecated use `Tool$inboundSchema` instead. */
|
|
58
|
-
const inboundSchema: z.ZodType<Tool, z.
|
|
58
|
+
const inboundSchema: z.ZodType<Tool, unknown, z.core.$ZodTypeInternals<Tool, unknown>>;
|
|
59
59
|
/** @deprecated use `Tool$outboundSchema` instead. */
|
|
60
|
-
const outboundSchema: z.ZodType<Tool$Outbound, z.
|
|
60
|
+
const outboundSchema: z.ZodType<Tool$Outbound, Tool, z.core.$ZodTypeInternals<Tool$Outbound, Tool>>;
|
|
61
61
|
/** @deprecated use `Tool$Outbound` instead. */
|
|
62
62
|
type Outbound = Tool$Outbound;
|
|
63
63
|
}
|
package/models/tool.js
CHANGED
|
@@ -1,20 +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 { safeParse } from "../lib/schemas.js";
|
|
6
6
|
/** @internal */
|
|
7
|
-
export const ToolFunction$inboundSchema = z
|
|
7
|
+
export const ToolFunction$inboundSchema = z
|
|
8
|
+
.object({
|
|
8
9
|
name: z.string(),
|
|
9
10
|
description: z.string().optional(),
|
|
10
|
-
parameters: z.record(z.any()).optional(),
|
|
11
|
+
parameters: z.record(z.string(), z.any()).optional(),
|
|
11
12
|
strict: z.nullable(z.boolean()).optional(),
|
|
12
13
|
});
|
|
13
14
|
/** @internal */
|
|
14
15
|
export const ToolFunction$outboundSchema = z.object({
|
|
15
16
|
name: z.string(),
|
|
16
17
|
description: z.string().optional(),
|
|
17
|
-
parameters: z.record(z.any()).optional(),
|
|
18
|
+
parameters: z.record(z.string(), z.any()).optional(),
|
|
18
19
|
strict: z.nullable(z.boolean()).optional(),
|
|
19
20
|
});
|
|
20
21
|
/**
|
|
@@ -35,8 +36,7 @@ export function toolFunctionFromJSON(jsonString) {
|
|
|
35
36
|
return safeParse(jsonString, (x) => ToolFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ToolFunction' from JSON`);
|
|
36
37
|
}
|
|
37
38
|
/** @internal */
|
|
38
|
-
export const Tool$inboundSchema = z
|
|
39
|
-
.object({
|
|
39
|
+
export const Tool$inboundSchema = z.object({
|
|
40
40
|
type: z.literal("function"),
|
|
41
41
|
function: z.lazy(() => ToolFunction$inboundSchema),
|
|
42
42
|
});
|
|
@@ -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
|
export declare const ToolCallStatus: {
|
|
4
4
|
readonly InProgress: "in_progress";
|
|
@@ -7,16 +7,16 @@ export declare const ToolCallStatus: {
|
|
|
7
7
|
};
|
|
8
8
|
export type ToolCallStatus = OpenEnum<typeof ToolCallStatus>;
|
|
9
9
|
/** @internal */
|
|
10
|
-
export declare const ToolCallStatus$inboundSchema: z.ZodType<ToolCallStatus,
|
|
10
|
+
export declare const ToolCallStatus$inboundSchema: z.ZodType<ToolCallStatus, unknown>;
|
|
11
11
|
/** @internal */
|
|
12
|
-
export declare const ToolCallStatus$outboundSchema: z.ZodType<ToolCallStatus,
|
|
12
|
+
export declare const ToolCallStatus$outboundSchema: z.ZodType<ToolCallStatus, ToolCallStatus>;
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
15
15
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
16
16
|
*/
|
|
17
17
|
export declare namespace ToolCallStatus$ {
|
|
18
18
|
/** @deprecated use `ToolCallStatus$inboundSchema` instead. */
|
|
19
|
-
const inboundSchema: z.ZodType<ToolCallStatus, z.
|
|
19
|
+
const inboundSchema: z.ZodType<ToolCallStatus, unknown, z.core.$ZodTypeInternals<ToolCallStatus, unknown>>;
|
|
20
20
|
/** @deprecated use `ToolCallStatus$outboundSchema` instead. */
|
|
21
|
-
const outboundSchema: z.ZodType<ToolCallStatus, z.
|
|
21
|
+
const outboundSchema: z.ZodType<ToolCallStatus, ToolCallStatus, z.core.$ZodTypeInternals<ToolCallStatus, ToolCallStatus>>;
|
|
22
22
|
}
|
package/models/toolcallstatus.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 { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
6
6
|
export const ToolCallStatus = {
|
|
7
7
|
InProgress: "in_progress",
|
|
@@ -11,12 +11,12 @@ export const ToolCallStatus = {
|
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const ToolCallStatus$inboundSchema = z
|
|
13
13
|
.union([
|
|
14
|
-
z.
|
|
14
|
+
z.enum(ToolCallStatus),
|
|
15
15
|
z.string().transform(catchUnrecognizedEnum),
|
|
16
16
|
]);
|
|
17
17
|
/** @internal */
|
|
18
18
|
export const ToolCallStatus$outboundSchema = z.union([
|
|
19
|
-
z.
|
|
19
|
+
z.enum(ToolCallStatus),
|
|
20
20
|
z.string().and(z.custom()),
|
|
21
21
|
]);
|
|
22
22
|
/**
|