@openrouter/sdk 0.0.1-beta.6 → 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/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 +5 -5
- package/models/openresponsesinputitem.js +1 -1
- 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 +9 -9
- package/models/openresponseswebsearchpreview20250311tool.js +2 -3
- package/models/openresponseswebsearchpreviewtool.d.ts +9 -9
- package/models/openresponseswebsearchpreviewtool.js +2 -2
- 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 +9 -9
- package/models/responsesimagegenerationcall.js +2 -2
- package/models/responsesoutputitem.d.ts +5 -5
- package/models/responsesoutputitem.js +1 -1
- package/models/responsesoutputitemfilesearchcall.d.ts +9 -9
- package/models/responsesoutputitemfilesearchcall.js +2 -2
- package/models/responsesoutputitemfunctioncall.d.ts +9 -9
- package/models/responsesoutputitemfunctioncall.js +2 -2
- package/models/responsesoutputitemreasoning.d.ts +9 -9
- package/models/responsesoutputitemreasoning.js +2 -2
- package/models/responsesoutputmessage.d.ts +33 -33
- package/models/responsesoutputmessage.js +9 -9
- 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 +9 -9
- package/models/responseswebsearchcalloutput.js +2 -2
- 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 +9 -9
- package/models/websearchpreviewtooluserlocation.js +2 -2
- 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
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
|
/**
|
|
@@ -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";
|
|
@@ -30,132 +30,132 @@ export type ToolChoiceTypes = {
|
|
|
30
30
|
type: TypeFileSearch | ToolChoiceTypesTypeWebSearchPreview | ToolChoiceTypesTypeWebSearchPreview20250311 | TypeComputerUsePreview | TypeCodeInterpreter;
|
|
31
31
|
};
|
|
32
32
|
/** @internal */
|
|
33
|
-
export declare const TypeCodeInterpreter$inboundSchema: z.
|
|
33
|
+
export declare const TypeCodeInterpreter$inboundSchema: z.ZodEnum<typeof TypeCodeInterpreter>;
|
|
34
34
|
/** @internal */
|
|
35
|
-
export declare const TypeCodeInterpreter$outboundSchema: z.
|
|
35
|
+
export declare const TypeCodeInterpreter$outboundSchema: z.ZodEnum<typeof TypeCodeInterpreter>;
|
|
36
36
|
/**
|
|
37
37
|
* @internal
|
|
38
38
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
39
39
|
*/
|
|
40
40
|
export declare namespace TypeCodeInterpreter$ {
|
|
41
41
|
/** @deprecated use `TypeCodeInterpreter$inboundSchema` instead. */
|
|
42
|
-
const inboundSchema: z.
|
|
42
|
+
const inboundSchema: z.ZodEnum<{
|
|
43
43
|
readonly CodeInterpreter: "code_interpreter";
|
|
44
44
|
}>;
|
|
45
45
|
/** @deprecated use `TypeCodeInterpreter$outboundSchema` instead. */
|
|
46
|
-
const outboundSchema: z.
|
|
46
|
+
const outboundSchema: z.ZodEnum<{
|
|
47
47
|
readonly CodeInterpreter: "code_interpreter";
|
|
48
48
|
}>;
|
|
49
49
|
}
|
|
50
50
|
/** @internal */
|
|
51
|
-
export declare const TypeComputerUsePreview$inboundSchema: z.
|
|
51
|
+
export declare const TypeComputerUsePreview$inboundSchema: z.ZodEnum<typeof TypeComputerUsePreview>;
|
|
52
52
|
/** @internal */
|
|
53
|
-
export declare const TypeComputerUsePreview$outboundSchema: z.
|
|
53
|
+
export declare const TypeComputerUsePreview$outboundSchema: z.ZodEnum<typeof TypeComputerUsePreview>;
|
|
54
54
|
/**
|
|
55
55
|
* @internal
|
|
56
56
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
57
|
*/
|
|
58
58
|
export declare namespace TypeComputerUsePreview$ {
|
|
59
59
|
/** @deprecated use `TypeComputerUsePreview$inboundSchema` instead. */
|
|
60
|
-
const inboundSchema: z.
|
|
60
|
+
const inboundSchema: z.ZodEnum<{
|
|
61
61
|
readonly ComputerUsePreview: "computer_use_preview";
|
|
62
62
|
}>;
|
|
63
63
|
/** @deprecated use `TypeComputerUsePreview$outboundSchema` instead. */
|
|
64
|
-
const outboundSchema: z.
|
|
64
|
+
const outboundSchema: z.ZodEnum<{
|
|
65
65
|
readonly ComputerUsePreview: "computer_use_preview";
|
|
66
66
|
}>;
|
|
67
67
|
}
|
|
68
68
|
/** @internal */
|
|
69
|
-
export declare const ToolChoiceTypesTypeWebSearchPreview20250311$inboundSchema: z.
|
|
69
|
+
export declare const ToolChoiceTypesTypeWebSearchPreview20250311$inboundSchema: z.ZodEnum<typeof ToolChoiceTypesTypeWebSearchPreview20250311>;
|
|
70
70
|
/** @internal */
|
|
71
|
-
export declare const ToolChoiceTypesTypeWebSearchPreview20250311$outboundSchema: z.
|
|
71
|
+
export declare const ToolChoiceTypesTypeWebSearchPreview20250311$outboundSchema: z.ZodEnum<typeof ToolChoiceTypesTypeWebSearchPreview20250311>;
|
|
72
72
|
/**
|
|
73
73
|
* @internal
|
|
74
74
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
75
|
*/
|
|
76
76
|
export declare namespace ToolChoiceTypesTypeWebSearchPreview20250311$ {
|
|
77
77
|
/** @deprecated use `ToolChoiceTypesTypeWebSearchPreview20250311$inboundSchema` instead. */
|
|
78
|
-
const inboundSchema: z.
|
|
78
|
+
const inboundSchema: z.ZodEnum<{
|
|
79
79
|
readonly WebSearchPreview20250311: "web_search_preview_2025_03_11";
|
|
80
80
|
}>;
|
|
81
81
|
/** @deprecated use `ToolChoiceTypesTypeWebSearchPreview20250311$outboundSchema` instead. */
|
|
82
|
-
const outboundSchema: z.
|
|
82
|
+
const outboundSchema: z.ZodEnum<{
|
|
83
83
|
readonly WebSearchPreview20250311: "web_search_preview_2025_03_11";
|
|
84
84
|
}>;
|
|
85
85
|
}
|
|
86
86
|
/** @internal */
|
|
87
|
-
export declare const ToolChoiceTypesTypeWebSearchPreview$inboundSchema: z.
|
|
87
|
+
export declare const ToolChoiceTypesTypeWebSearchPreview$inboundSchema: z.ZodEnum<typeof ToolChoiceTypesTypeWebSearchPreview>;
|
|
88
88
|
/** @internal */
|
|
89
|
-
export declare const ToolChoiceTypesTypeWebSearchPreview$outboundSchema: z.
|
|
89
|
+
export declare const ToolChoiceTypesTypeWebSearchPreview$outboundSchema: z.ZodEnum<typeof ToolChoiceTypesTypeWebSearchPreview>;
|
|
90
90
|
/**
|
|
91
91
|
* @internal
|
|
92
92
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
93
93
|
*/
|
|
94
94
|
export declare namespace ToolChoiceTypesTypeWebSearchPreview$ {
|
|
95
95
|
/** @deprecated use `ToolChoiceTypesTypeWebSearchPreview$inboundSchema` instead. */
|
|
96
|
-
const inboundSchema: z.
|
|
96
|
+
const inboundSchema: z.ZodEnum<{
|
|
97
97
|
readonly WebSearchPreview: "web_search_preview";
|
|
98
98
|
}>;
|
|
99
99
|
/** @deprecated use `ToolChoiceTypesTypeWebSearchPreview$outboundSchema` instead. */
|
|
100
|
-
const outboundSchema: z.
|
|
100
|
+
const outboundSchema: z.ZodEnum<{
|
|
101
101
|
readonly WebSearchPreview: "web_search_preview";
|
|
102
102
|
}>;
|
|
103
103
|
}
|
|
104
104
|
/** @internal */
|
|
105
|
-
export declare const TypeFileSearch$inboundSchema: z.
|
|
105
|
+
export declare const TypeFileSearch$inboundSchema: z.ZodEnum<typeof TypeFileSearch>;
|
|
106
106
|
/** @internal */
|
|
107
|
-
export declare const TypeFileSearch$outboundSchema: z.
|
|
107
|
+
export declare const TypeFileSearch$outboundSchema: z.ZodEnum<typeof TypeFileSearch>;
|
|
108
108
|
/**
|
|
109
109
|
* @internal
|
|
110
110
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
111
111
|
*/
|
|
112
112
|
export declare namespace TypeFileSearch$ {
|
|
113
113
|
/** @deprecated use `TypeFileSearch$inboundSchema` instead. */
|
|
114
|
-
const inboundSchema: z.
|
|
114
|
+
const inboundSchema: z.ZodEnum<{
|
|
115
115
|
readonly FileSearch: "file_search";
|
|
116
116
|
}>;
|
|
117
117
|
/** @deprecated use `TypeFileSearch$outboundSchema` instead. */
|
|
118
|
-
const outboundSchema: z.
|
|
118
|
+
const outboundSchema: z.ZodEnum<{
|
|
119
119
|
readonly FileSearch: "file_search";
|
|
120
120
|
}>;
|
|
121
121
|
}
|
|
122
122
|
/** @internal */
|
|
123
|
-
export declare const Type$inboundSchema: z.ZodType<Type,
|
|
123
|
+
export declare const Type$inboundSchema: z.ZodType<Type, unknown>;
|
|
124
124
|
/** @internal */
|
|
125
125
|
export type Type$Outbound = string | string | string | string | string;
|
|
126
126
|
/** @internal */
|
|
127
|
-
export declare const Type$outboundSchema: z.ZodType<Type$Outbound,
|
|
127
|
+
export declare const Type$outboundSchema: z.ZodType<Type$Outbound, Type>;
|
|
128
128
|
/**
|
|
129
129
|
* @internal
|
|
130
130
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
131
131
|
*/
|
|
132
132
|
export declare namespace Type$ {
|
|
133
133
|
/** @deprecated use `Type$inboundSchema` instead. */
|
|
134
|
-
const inboundSchema: z.ZodType<Type, z.
|
|
134
|
+
const inboundSchema: z.ZodType<Type, unknown, z.core.$ZodTypeInternals<Type, unknown>>;
|
|
135
135
|
/** @deprecated use `Type$outboundSchema` instead. */
|
|
136
|
-
const outboundSchema: z.ZodType<string, z.
|
|
136
|
+
const outboundSchema: z.ZodType<string, Type, z.core.$ZodTypeInternals<string, Type>>;
|
|
137
137
|
/** @deprecated use `Type$Outbound` instead. */
|
|
138
138
|
type Outbound = Type$Outbound;
|
|
139
139
|
}
|
|
140
140
|
export declare function typeToJSON(type: Type): string;
|
|
141
141
|
export declare function typeFromJSON(jsonString: string): SafeParseResult<Type, SDKValidationError>;
|
|
142
142
|
/** @internal */
|
|
143
|
-
export declare const ToolChoiceTypes$inboundSchema: z.ZodType<ToolChoiceTypes,
|
|
143
|
+
export declare const ToolChoiceTypes$inboundSchema: z.ZodType<ToolChoiceTypes, unknown>;
|
|
144
144
|
/** @internal */
|
|
145
145
|
export type ToolChoiceTypes$Outbound = {
|
|
146
146
|
type: string | string | string | string | string;
|
|
147
147
|
};
|
|
148
148
|
/** @internal */
|
|
149
|
-
export declare const ToolChoiceTypes$outboundSchema: z.ZodType<ToolChoiceTypes$Outbound,
|
|
149
|
+
export declare const ToolChoiceTypes$outboundSchema: z.ZodType<ToolChoiceTypes$Outbound, ToolChoiceTypes>;
|
|
150
150
|
/**
|
|
151
151
|
* @internal
|
|
152
152
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
153
153
|
*/
|
|
154
154
|
export declare namespace ToolChoiceTypes$ {
|
|
155
155
|
/** @deprecated use `ToolChoiceTypes$inboundSchema` instead. */
|
|
156
|
-
const inboundSchema: z.ZodType<ToolChoiceTypes, z.
|
|
156
|
+
const inboundSchema: z.ZodType<ToolChoiceTypes, unknown, z.core.$ZodTypeInternals<ToolChoiceTypes, unknown>>;
|
|
157
157
|
/** @deprecated use `ToolChoiceTypes$outboundSchema` instead. */
|
|
158
|
-
const outboundSchema: z.ZodType<ToolChoiceTypes$Outbound, z.
|
|
158
|
+
const outboundSchema: z.ZodType<ToolChoiceTypes$Outbound, ToolChoiceTypes, z.core.$ZodTypeInternals<ToolChoiceTypes$Outbound, ToolChoiceTypes>>;
|
|
159
159
|
/** @deprecated use `ToolChoiceTypes$Outbound` instead. */
|
|
160
160
|
type Outbound = ToolChoiceTypes$Outbound;
|
|
161
161
|
}
|
|
@@ -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
|
export const TypeCodeInterpreter = {
|
|
7
7
|
CodeInterpreter: "code_interpreter",
|
|
@@ -19,7 +19,7 @@ export const TypeFileSearch = {
|
|
|
19
19
|
FileSearch: "file_search",
|
|
20
20
|
};
|
|
21
21
|
/** @internal */
|
|
22
|
-
export const TypeCodeInterpreter$inboundSchema = z.
|
|
22
|
+
export const TypeCodeInterpreter$inboundSchema = z.enum(TypeCodeInterpreter);
|
|
23
23
|
/** @internal */
|
|
24
24
|
export const TypeCodeInterpreter$outboundSchema = TypeCodeInterpreter$inboundSchema;
|
|
25
25
|
/**
|
|
@@ -34,7 +34,7 @@ export var TypeCodeInterpreter$;
|
|
|
34
34
|
TypeCodeInterpreter$.outboundSchema = TypeCodeInterpreter$outboundSchema;
|
|
35
35
|
})(TypeCodeInterpreter$ || (TypeCodeInterpreter$ = {}));
|
|
36
36
|
/** @internal */
|
|
37
|
-
export const TypeComputerUsePreview$inboundSchema = z.
|
|
37
|
+
export const TypeComputerUsePreview$inboundSchema = z.enum(TypeComputerUsePreview);
|
|
38
38
|
/** @internal */
|
|
39
39
|
export const TypeComputerUsePreview$outboundSchema = TypeComputerUsePreview$inboundSchema;
|
|
40
40
|
/**
|
|
@@ -49,8 +49,7 @@ export var TypeComputerUsePreview$;
|
|
|
49
49
|
TypeComputerUsePreview$.outboundSchema = TypeComputerUsePreview$outboundSchema;
|
|
50
50
|
})(TypeComputerUsePreview$ || (TypeComputerUsePreview$ = {}));
|
|
51
51
|
/** @internal */
|
|
52
|
-
export const ToolChoiceTypesTypeWebSearchPreview20250311$inboundSchema = z
|
|
53
|
-
.nativeEnum(ToolChoiceTypesTypeWebSearchPreview20250311);
|
|
52
|
+
export const ToolChoiceTypesTypeWebSearchPreview20250311$inboundSchema = z.enum(ToolChoiceTypesTypeWebSearchPreview20250311);
|
|
54
53
|
/** @internal */
|
|
55
54
|
export const ToolChoiceTypesTypeWebSearchPreview20250311$outboundSchema = ToolChoiceTypesTypeWebSearchPreview20250311$inboundSchema;
|
|
56
55
|
/**
|
|
@@ -65,7 +64,7 @@ export var ToolChoiceTypesTypeWebSearchPreview20250311$;
|
|
|
65
64
|
ToolChoiceTypesTypeWebSearchPreview20250311$.outboundSchema = ToolChoiceTypesTypeWebSearchPreview20250311$outboundSchema;
|
|
66
65
|
})(ToolChoiceTypesTypeWebSearchPreview20250311$ || (ToolChoiceTypesTypeWebSearchPreview20250311$ = {}));
|
|
67
66
|
/** @internal */
|
|
68
|
-
export const ToolChoiceTypesTypeWebSearchPreview$inboundSchema = z.
|
|
67
|
+
export const ToolChoiceTypesTypeWebSearchPreview$inboundSchema = z.enum(ToolChoiceTypesTypeWebSearchPreview);
|
|
69
68
|
/** @internal */
|
|
70
69
|
export const ToolChoiceTypesTypeWebSearchPreview$outboundSchema = ToolChoiceTypesTypeWebSearchPreview$inboundSchema;
|
|
71
70
|
/**
|
|
@@ -80,7 +79,8 @@ export var ToolChoiceTypesTypeWebSearchPreview$;
|
|
|
80
79
|
ToolChoiceTypesTypeWebSearchPreview$.outboundSchema = ToolChoiceTypesTypeWebSearchPreview$outboundSchema;
|
|
81
80
|
})(ToolChoiceTypesTypeWebSearchPreview$ || (ToolChoiceTypesTypeWebSearchPreview$ = {}));
|
|
82
81
|
/** @internal */
|
|
83
|
-
export const TypeFileSearch$inboundSchema = z
|
|
82
|
+
export const TypeFileSearch$inboundSchema = z
|
|
83
|
+
.enum(TypeFileSearch);
|
|
84
84
|
/** @internal */
|
|
85
85
|
export const TypeFileSearch$outboundSchema = TypeFileSearch$inboundSchema;
|
|
86
86
|
/**
|
|
@@ -95,8 +95,7 @@ export var TypeFileSearch$;
|
|
|
95
95
|
TypeFileSearch$.outboundSchema = TypeFileSearch$outboundSchema;
|
|
96
96
|
})(TypeFileSearch$ || (TypeFileSearch$ = {}));
|
|
97
97
|
/** @internal */
|
|
98
|
-
export const Type$inboundSchema = z
|
|
99
|
-
.union([
|
|
98
|
+
export const Type$inboundSchema = z.union([
|
|
100
99
|
TypeFileSearch$inboundSchema,
|
|
101
100
|
ToolChoiceTypesTypeWebSearchPreview$inboundSchema,
|
|
102
101
|
ToolChoiceTypesTypeWebSearchPreview20250311$inboundSchema,
|
|
@@ -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 { ChatMessageContentItem, ChatMessageContentItem$Outbound } from "./chatmessagecontentitem.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -9,27 +9,27 @@ export type ToolResponseMessage = {
|
|
|
9
9
|
toolCallId: string;
|
|
10
10
|
};
|
|
11
11
|
/** @internal */
|
|
12
|
-
export declare const ToolResponseMessageContent$inboundSchema: z.ZodType<ToolResponseMessageContent,
|
|
12
|
+
export declare const ToolResponseMessageContent$inboundSchema: z.ZodType<ToolResponseMessageContent, unknown>;
|
|
13
13
|
/** @internal */
|
|
14
14
|
export type ToolResponseMessageContent$Outbound = string | Array<ChatMessageContentItem$Outbound>;
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const ToolResponseMessageContent$outboundSchema: z.ZodType<ToolResponseMessageContent$Outbound,
|
|
16
|
+
export declare const ToolResponseMessageContent$outboundSchema: z.ZodType<ToolResponseMessageContent$Outbound, ToolResponseMessageContent>;
|
|
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 ToolResponseMessageContent$ {
|
|
22
22
|
/** @deprecated use `ToolResponseMessageContent$inboundSchema` instead. */
|
|
23
|
-
const inboundSchema: z.ZodType<ToolResponseMessageContent, z.
|
|
23
|
+
const inboundSchema: z.ZodType<ToolResponseMessageContent, unknown, z.core.$ZodTypeInternals<ToolResponseMessageContent, unknown>>;
|
|
24
24
|
/** @deprecated use `ToolResponseMessageContent$outboundSchema` instead. */
|
|
25
|
-
const outboundSchema: z.ZodType<ToolResponseMessageContent$Outbound, z.
|
|
25
|
+
const outboundSchema: z.ZodType<ToolResponseMessageContent$Outbound, ToolResponseMessageContent, z.core.$ZodTypeInternals<ToolResponseMessageContent$Outbound, ToolResponseMessageContent>>;
|
|
26
26
|
/** @deprecated use `ToolResponseMessageContent$Outbound` instead. */
|
|
27
27
|
type Outbound = ToolResponseMessageContent$Outbound;
|
|
28
28
|
}
|
|
29
29
|
export declare function toolResponseMessageContentToJSON(toolResponseMessageContent: ToolResponseMessageContent): string;
|
|
30
30
|
export declare function toolResponseMessageContentFromJSON(jsonString: string): SafeParseResult<ToolResponseMessageContent, SDKValidationError>;
|
|
31
31
|
/** @internal */
|
|
32
|
-
export declare const ToolResponseMessage$inboundSchema: z.ZodType<ToolResponseMessage,
|
|
32
|
+
export declare const ToolResponseMessage$inboundSchema: z.ZodType<ToolResponseMessage, unknown>;
|
|
33
33
|
/** @internal */
|
|
34
34
|
export type ToolResponseMessage$Outbound = {
|
|
35
35
|
role: "tool";
|
|
@@ -37,16 +37,16 @@ export type ToolResponseMessage$Outbound = {
|
|
|
37
37
|
tool_call_id: string;
|
|
38
38
|
};
|
|
39
39
|
/** @internal */
|
|
40
|
-
export declare const ToolResponseMessage$outboundSchema: z.ZodType<ToolResponseMessage$Outbound,
|
|
40
|
+
export declare const ToolResponseMessage$outboundSchema: z.ZodType<ToolResponseMessage$Outbound, ToolResponseMessage>;
|
|
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 ToolResponseMessage$ {
|
|
46
46
|
/** @deprecated use `ToolResponseMessage$inboundSchema` instead. */
|
|
47
|
-
const inboundSchema: z.ZodType<ToolResponseMessage, z.
|
|
47
|
+
const inboundSchema: z.ZodType<ToolResponseMessage, unknown, z.core.$ZodTypeInternals<ToolResponseMessage, unknown>>;
|
|
48
48
|
/** @deprecated use `ToolResponseMessage$outboundSchema` instead. */
|
|
49
|
-
const outboundSchema: z.ZodType<ToolResponseMessage$Outbound, z.
|
|
49
|
+
const outboundSchema: z.ZodType<ToolResponseMessage$Outbound, ToolResponseMessage, z.core.$ZodTypeInternals<ToolResponseMessage$Outbound, ToolResponseMessage>>;
|
|
50
50
|
/** @deprecated use `ToolResponseMessage$Outbound` instead. */
|
|
51
51
|
type Outbound = ToolResponseMessage$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 { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { ChatMessageContentItem$inboundSchema, ChatMessageContentItem$outboundSchema, } from "./chatmessagecontentitem.js";
|
|
@@ -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";
|
|
@@ -14,25 +14,25 @@ export type URLCitationAnnotation = {
|
|
|
14
14
|
url: string;
|
|
15
15
|
};
|
|
16
16
|
/** @internal */
|
|
17
|
-
export declare const URLCitationAnnotationType$inboundSchema: z.
|
|
17
|
+
export declare const URLCitationAnnotationType$inboundSchema: z.ZodEnum<typeof URLCitationAnnotationType>;
|
|
18
18
|
/** @internal */
|
|
19
|
-
export declare const URLCitationAnnotationType$outboundSchema: z.
|
|
19
|
+
export declare const URLCitationAnnotationType$outboundSchema: z.ZodEnum<typeof URLCitationAnnotationType>;
|
|
20
20
|
/**
|
|
21
21
|
* @internal
|
|
22
22
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
23
|
*/
|
|
24
24
|
export declare namespace URLCitationAnnotationType$ {
|
|
25
25
|
/** @deprecated use `URLCitationAnnotationType$inboundSchema` instead. */
|
|
26
|
-
const inboundSchema: z.
|
|
26
|
+
const inboundSchema: z.ZodEnum<{
|
|
27
27
|
readonly UrlCitation: "url_citation";
|
|
28
28
|
}>;
|
|
29
29
|
/** @deprecated use `URLCitationAnnotationType$outboundSchema` instead. */
|
|
30
|
-
const outboundSchema: z.
|
|
30
|
+
const outboundSchema: z.ZodEnum<{
|
|
31
31
|
readonly UrlCitation: "url_citation";
|
|
32
32
|
}>;
|
|
33
33
|
}
|
|
34
34
|
/** @internal */
|
|
35
|
-
export declare const URLCitationAnnotation$inboundSchema: z.ZodType<URLCitationAnnotation,
|
|
35
|
+
export declare const URLCitationAnnotation$inboundSchema: z.ZodType<URLCitationAnnotation, unknown>;
|
|
36
36
|
/** @internal */
|
|
37
37
|
export type URLCitationAnnotation$Outbound = {
|
|
38
38
|
type: string;
|
|
@@ -42,16 +42,16 @@ export type URLCitationAnnotation$Outbound = {
|
|
|
42
42
|
url: string;
|
|
43
43
|
};
|
|
44
44
|
/** @internal */
|
|
45
|
-
export declare const URLCitationAnnotation$outboundSchema: z.ZodType<URLCitationAnnotation$Outbound,
|
|
45
|
+
export declare const URLCitationAnnotation$outboundSchema: z.ZodType<URLCitationAnnotation$Outbound, URLCitationAnnotation>;
|
|
46
46
|
/**
|
|
47
47
|
* @internal
|
|
48
48
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
49
|
*/
|
|
50
50
|
export declare namespace URLCitationAnnotation$ {
|
|
51
51
|
/** @deprecated use `URLCitationAnnotation$inboundSchema` instead. */
|
|
52
|
-
const inboundSchema: z.ZodType<URLCitationAnnotation, z.
|
|
52
|
+
const inboundSchema: z.ZodType<URLCitationAnnotation, unknown, z.core.$ZodTypeInternals<URLCitationAnnotation, unknown>>;
|
|
53
53
|
/** @deprecated use `URLCitationAnnotation$outboundSchema` instead. */
|
|
54
|
-
const outboundSchema: z.ZodType<URLCitationAnnotation$Outbound, z.
|
|
54
|
+
const outboundSchema: z.ZodType<URLCitationAnnotation$Outbound, URLCitationAnnotation, z.core.$ZodTypeInternals<URLCitationAnnotation$Outbound, URLCitationAnnotation>>;
|
|
55
55
|
/** @deprecated use `URLCitationAnnotation$Outbound` instead. */
|
|
56
56
|
type Outbound = URLCitationAnnotation$Outbound;
|
|
57
57
|
}
|
|
@@ -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
|
export const URLCitationAnnotationType = {
|
|
8
8
|
UrlCitation: "url_citation",
|
|
9
9
|
};
|
|
10
10
|
/** @internal */
|
|
11
|
-
export const URLCitationAnnotationType$inboundSchema = z.
|
|
11
|
+
export const URLCitationAnnotationType$inboundSchema = z.enum(URLCitationAnnotationType);
|
|
12
12
|
/** @internal */
|
|
13
13
|
export const URLCitationAnnotationType$outboundSchema = URLCitationAnnotationType$inboundSchema;
|
|
14
14
|
/**
|