@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
|
@@ -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 ChatMessageToolCallFunction = {
|
|
@@ -11,30 +11,30 @@ export type ChatMessageToolCall = {
|
|
|
11
11
|
function: ChatMessageToolCallFunction;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const ChatMessageToolCallFunction$inboundSchema: z.ZodType<ChatMessageToolCallFunction,
|
|
14
|
+
export declare const ChatMessageToolCallFunction$inboundSchema: z.ZodType<ChatMessageToolCallFunction, unknown>;
|
|
15
15
|
/** @internal */
|
|
16
16
|
export type ChatMessageToolCallFunction$Outbound = {
|
|
17
17
|
name: string;
|
|
18
18
|
arguments: string;
|
|
19
19
|
};
|
|
20
20
|
/** @internal */
|
|
21
|
-
export declare const ChatMessageToolCallFunction$outboundSchema: z.ZodType<ChatMessageToolCallFunction$Outbound,
|
|
21
|
+
export declare const ChatMessageToolCallFunction$outboundSchema: z.ZodType<ChatMessageToolCallFunction$Outbound, ChatMessageToolCallFunction>;
|
|
22
22
|
/**
|
|
23
23
|
* @internal
|
|
24
24
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
25
|
*/
|
|
26
26
|
export declare namespace ChatMessageToolCallFunction$ {
|
|
27
27
|
/** @deprecated use `ChatMessageToolCallFunction$inboundSchema` instead. */
|
|
28
|
-
const inboundSchema: z.ZodType<ChatMessageToolCallFunction, z.
|
|
28
|
+
const inboundSchema: z.ZodType<ChatMessageToolCallFunction, unknown, z.core.$ZodTypeInternals<ChatMessageToolCallFunction, unknown>>;
|
|
29
29
|
/** @deprecated use `ChatMessageToolCallFunction$outboundSchema` instead. */
|
|
30
|
-
const outboundSchema: z.ZodType<ChatMessageToolCallFunction$Outbound, z.
|
|
30
|
+
const outboundSchema: z.ZodType<ChatMessageToolCallFunction$Outbound, ChatMessageToolCallFunction, z.core.$ZodTypeInternals<ChatMessageToolCallFunction$Outbound, ChatMessageToolCallFunction>>;
|
|
31
31
|
/** @deprecated use `ChatMessageToolCallFunction$Outbound` instead. */
|
|
32
32
|
type Outbound = ChatMessageToolCallFunction$Outbound;
|
|
33
33
|
}
|
|
34
34
|
export declare function chatMessageToolCallFunctionToJSON(chatMessageToolCallFunction: ChatMessageToolCallFunction): string;
|
|
35
35
|
export declare function chatMessageToolCallFunctionFromJSON(jsonString: string): SafeParseResult<ChatMessageToolCallFunction, SDKValidationError>;
|
|
36
36
|
/** @internal */
|
|
37
|
-
export declare const ChatMessageToolCall$inboundSchema: z.ZodType<ChatMessageToolCall,
|
|
37
|
+
export declare const ChatMessageToolCall$inboundSchema: z.ZodType<ChatMessageToolCall, unknown>;
|
|
38
38
|
/** @internal */
|
|
39
39
|
export type ChatMessageToolCall$Outbound = {
|
|
40
40
|
id: string;
|
|
@@ -42,16 +42,16 @@ export type ChatMessageToolCall$Outbound = {
|
|
|
42
42
|
function: ChatMessageToolCallFunction$Outbound;
|
|
43
43
|
};
|
|
44
44
|
/** @internal */
|
|
45
|
-
export declare const ChatMessageToolCall$outboundSchema: z.ZodType<ChatMessageToolCall$Outbound,
|
|
45
|
+
export declare const ChatMessageToolCall$outboundSchema: z.ZodType<ChatMessageToolCall$Outbound, ChatMessageToolCall>;
|
|
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 ChatMessageToolCall$ {
|
|
51
51
|
/** @deprecated use `ChatMessageToolCall$inboundSchema` instead. */
|
|
52
|
-
const inboundSchema: z.ZodType<ChatMessageToolCall, z.
|
|
52
|
+
const inboundSchema: z.ZodType<ChatMessageToolCall, unknown, z.core.$ZodTypeInternals<ChatMessageToolCall, unknown>>;
|
|
53
53
|
/** @deprecated use `ChatMessageToolCall$outboundSchema` instead. */
|
|
54
|
-
const outboundSchema: z.ZodType<ChatMessageToolCall$Outbound, z.
|
|
54
|
+
const outboundSchema: z.ZodType<ChatMessageToolCall$Outbound, ChatMessageToolCall, z.core.$ZodTypeInternals<ChatMessageToolCall$Outbound, ChatMessageToolCall>>;
|
|
55
55
|
/** @deprecated use `ChatMessageToolCall$Outbound` instead. */
|
|
56
56
|
type Outbound = ChatMessageToolCall$Outbound;
|
|
57
57
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export const ChatMessageToolCallFunction$inboundSchema = z.object({
|
package/models/chatresponse.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 { ChatGenerationTokenUsage, ChatGenerationTokenUsage$Outbound } from "./chatgenerationtokenusage.js";
|
|
4
4
|
import { ChatResponseChoice, ChatResponseChoice$Outbound } from "./chatresponsechoice.js";
|
|
@@ -13,7 +13,7 @@ export type ChatResponse = {
|
|
|
13
13
|
usage?: ChatGenerationTokenUsage | undefined;
|
|
14
14
|
};
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const ChatResponse$inboundSchema: z.ZodType<ChatResponse,
|
|
16
|
+
export declare const ChatResponse$inboundSchema: z.ZodType<ChatResponse, unknown>;
|
|
17
17
|
/** @internal */
|
|
18
18
|
export type ChatResponse$Outbound = {
|
|
19
19
|
id: string;
|
|
@@ -25,16 +25,16 @@ export type ChatResponse$Outbound = {
|
|
|
25
25
|
usage?: ChatGenerationTokenUsage$Outbound | undefined;
|
|
26
26
|
};
|
|
27
27
|
/** @internal */
|
|
28
|
-
export declare const ChatResponse$outboundSchema: z.ZodType<ChatResponse$Outbound,
|
|
28
|
+
export declare const ChatResponse$outboundSchema: z.ZodType<ChatResponse$Outbound, ChatResponse>;
|
|
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 ChatResponse$ {
|
|
34
34
|
/** @deprecated use `ChatResponse$inboundSchema` instead. */
|
|
35
|
-
const inboundSchema: z.ZodType<ChatResponse, z.
|
|
35
|
+
const inboundSchema: z.ZodType<ChatResponse, unknown, z.core.$ZodTypeInternals<ChatResponse, unknown>>;
|
|
36
36
|
/** @deprecated use `ChatResponse$outboundSchema` instead. */
|
|
37
|
-
const outboundSchema: z.ZodType<ChatResponse$Outbound, z.
|
|
37
|
+
const outboundSchema: z.ZodType<ChatResponse$Outbound, ChatResponse, z.core.$ZodTypeInternals<ChatResponse$Outbound, ChatResponse>>;
|
|
38
38
|
/** @deprecated use `ChatResponse$Outbound` instead. */
|
|
39
39
|
type Outbound = ChatResponse$Outbound;
|
|
40
40
|
}
|
package/models/chatresponse.js
CHANGED
|
@@ -1,13 +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
|
import { ChatGenerationTokenUsage$inboundSchema, ChatGenerationTokenUsage$outboundSchema, } from "./chatgenerationtokenusage.js";
|
|
8
8
|
import { ChatResponseChoice$inboundSchema, ChatResponseChoice$outboundSchema, } from "./chatresponsechoice.js";
|
|
9
9
|
/** @internal */
|
|
10
|
-
export const ChatResponse$inboundSchema = z
|
|
10
|
+
export const ChatResponse$inboundSchema = z
|
|
11
|
+
.object({
|
|
11
12
|
id: z.string(),
|
|
12
13
|
choices: z.array(ChatResponseChoice$inboundSchema),
|
|
13
14
|
created: z.number(),
|
|
@@ -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 { AssistantMessage, AssistantMessage$Outbound } from "./assistantmessage.js";
|
|
4
4
|
import { ChatCompletionFinishReason } from "./chatcompletionfinishreason.js";
|
|
@@ -11,7 +11,7 @@ export type ChatResponseChoice = {
|
|
|
11
11
|
logprobs?: ChatMessageTokenLogprobs | null | undefined;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const ChatResponseChoice$inboundSchema: z.ZodType<ChatResponseChoice,
|
|
14
|
+
export declare const ChatResponseChoice$inboundSchema: z.ZodType<ChatResponseChoice, unknown>;
|
|
15
15
|
/** @internal */
|
|
16
16
|
export type ChatResponseChoice$Outbound = {
|
|
17
17
|
finish_reason: string | null;
|
|
@@ -20,16 +20,16 @@ export type ChatResponseChoice$Outbound = {
|
|
|
20
20
|
logprobs?: ChatMessageTokenLogprobs$Outbound | null | undefined;
|
|
21
21
|
};
|
|
22
22
|
/** @internal */
|
|
23
|
-
export declare const ChatResponseChoice$outboundSchema: z.ZodType<ChatResponseChoice$Outbound,
|
|
23
|
+
export declare const ChatResponseChoice$outboundSchema: z.ZodType<ChatResponseChoice$Outbound, ChatResponseChoice>;
|
|
24
24
|
/**
|
|
25
25
|
* @internal
|
|
26
26
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
27
27
|
*/
|
|
28
28
|
export declare namespace ChatResponseChoice$ {
|
|
29
29
|
/** @deprecated use `ChatResponseChoice$inboundSchema` instead. */
|
|
30
|
-
const inboundSchema: z.ZodType<ChatResponseChoice, z.
|
|
30
|
+
const inboundSchema: z.ZodType<ChatResponseChoice, unknown, z.core.$ZodTypeInternals<ChatResponseChoice, unknown>>;
|
|
31
31
|
/** @deprecated use `ChatResponseChoice$outboundSchema` instead. */
|
|
32
|
-
const outboundSchema: z.ZodType<ChatResponseChoice$Outbound, z.
|
|
32
|
+
const outboundSchema: z.ZodType<ChatResponseChoice$Outbound, ChatResponseChoice, z.core.$ZodTypeInternals<ChatResponseChoice$Outbound, ChatResponseChoice>>;
|
|
33
33
|
/** @deprecated use `ChatResponseChoice$Outbound` instead. */
|
|
34
34
|
type Outbound = ChatResponseChoice$Outbound;
|
|
35
35
|
}
|
|
@@ -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 { AssistantMessage$inboundSchema, AssistantMessage$outboundSchema, } from "./assistantmessage.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { ChatCompletionFinishReason } from "./chatcompletionfinishreason.js";
|
|
4
4
|
import { ChatMessageTokenLogprobs, ChatMessageTokenLogprobs$Outbound } from "./chatmessagetokenlogprobs.js";
|
|
@@ -11,7 +11,7 @@ export type ChatStreamingChoice = {
|
|
|
11
11
|
logprobs?: ChatMessageTokenLogprobs | null | undefined;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const ChatStreamingChoice$inboundSchema: z.ZodType<ChatStreamingChoice,
|
|
14
|
+
export declare const ChatStreamingChoice$inboundSchema: z.ZodType<ChatStreamingChoice, unknown>;
|
|
15
15
|
/** @internal */
|
|
16
16
|
export type ChatStreamingChoice$Outbound = {
|
|
17
17
|
delta: ChatStreamingMessageChunk$Outbound;
|
|
@@ -20,16 +20,16 @@ export type ChatStreamingChoice$Outbound = {
|
|
|
20
20
|
logprobs?: ChatMessageTokenLogprobs$Outbound | null | undefined;
|
|
21
21
|
};
|
|
22
22
|
/** @internal */
|
|
23
|
-
export declare const ChatStreamingChoice$outboundSchema: z.ZodType<ChatStreamingChoice$Outbound,
|
|
23
|
+
export declare const ChatStreamingChoice$outboundSchema: z.ZodType<ChatStreamingChoice$Outbound, ChatStreamingChoice>;
|
|
24
24
|
/**
|
|
25
25
|
* @internal
|
|
26
26
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
27
27
|
*/
|
|
28
28
|
export declare namespace ChatStreamingChoice$ {
|
|
29
29
|
/** @deprecated use `ChatStreamingChoice$inboundSchema` instead. */
|
|
30
|
-
const inboundSchema: z.ZodType<ChatStreamingChoice, z.
|
|
30
|
+
const inboundSchema: z.ZodType<ChatStreamingChoice, unknown, z.core.$ZodTypeInternals<ChatStreamingChoice, unknown>>;
|
|
31
31
|
/** @deprecated use `ChatStreamingChoice$outboundSchema` instead. */
|
|
32
|
-
const outboundSchema: z.ZodType<ChatStreamingChoice$Outbound, z.
|
|
32
|
+
const outboundSchema: z.ZodType<ChatStreamingChoice$Outbound, ChatStreamingChoice, z.core.$ZodTypeInternals<ChatStreamingChoice$Outbound, ChatStreamingChoice>>;
|
|
33
33
|
/** @deprecated use `ChatStreamingChoice$Outbound` instead. */
|
|
34
34
|
type Outbound = ChatStreamingChoice$Outbound;
|
|
35
35
|
}
|
|
@@ -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 { ChatCompletionFinishReason$inboundSchema, ChatCompletionFinishReason$outboundSchema, } from "./chatcompletionfinishreason.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 { ChatStreamingMessageToolCall, ChatStreamingMessageToolCall$Outbound } from "./chatstreamingmessagetoolcall.js";
|
|
@@ -15,25 +15,25 @@ export type ChatStreamingMessageChunk = {
|
|
|
15
15
|
toolCalls?: Array<ChatStreamingMessageToolCall> | undefined;
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
|
-
export declare const ChatStreamingMessageChunkRole$inboundSchema: z.
|
|
18
|
+
export declare const ChatStreamingMessageChunkRole$inboundSchema: z.ZodEnum<typeof ChatStreamingMessageChunkRole>;
|
|
19
19
|
/** @internal */
|
|
20
|
-
export declare const ChatStreamingMessageChunkRole$outboundSchema: z.
|
|
20
|
+
export declare const ChatStreamingMessageChunkRole$outboundSchema: z.ZodEnum<typeof ChatStreamingMessageChunkRole>;
|
|
21
21
|
/**
|
|
22
22
|
* @internal
|
|
23
23
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
24
24
|
*/
|
|
25
25
|
export declare namespace ChatStreamingMessageChunkRole$ {
|
|
26
26
|
/** @deprecated use `ChatStreamingMessageChunkRole$inboundSchema` instead. */
|
|
27
|
-
const inboundSchema: z.
|
|
27
|
+
const inboundSchema: z.ZodEnum<{
|
|
28
28
|
readonly Assistant: "assistant";
|
|
29
29
|
}>;
|
|
30
30
|
/** @deprecated use `ChatStreamingMessageChunkRole$outboundSchema` instead. */
|
|
31
|
-
const outboundSchema: z.
|
|
31
|
+
const outboundSchema: z.ZodEnum<{
|
|
32
32
|
readonly Assistant: "assistant";
|
|
33
33
|
}>;
|
|
34
34
|
}
|
|
35
35
|
/** @internal */
|
|
36
|
-
export declare const ChatStreamingMessageChunk$inboundSchema: z.ZodType<ChatStreamingMessageChunk,
|
|
36
|
+
export declare const ChatStreamingMessageChunk$inboundSchema: z.ZodType<ChatStreamingMessageChunk, unknown>;
|
|
37
37
|
/** @internal */
|
|
38
38
|
export type ChatStreamingMessageChunk$Outbound = {
|
|
39
39
|
role?: string | undefined;
|
|
@@ -43,16 +43,16 @@ export type ChatStreamingMessageChunk$Outbound = {
|
|
|
43
43
|
tool_calls?: Array<ChatStreamingMessageToolCall$Outbound> | undefined;
|
|
44
44
|
};
|
|
45
45
|
/** @internal */
|
|
46
|
-
export declare const ChatStreamingMessageChunk$outboundSchema: z.ZodType<ChatStreamingMessageChunk$Outbound,
|
|
46
|
+
export declare const ChatStreamingMessageChunk$outboundSchema: z.ZodType<ChatStreamingMessageChunk$Outbound, ChatStreamingMessageChunk>;
|
|
47
47
|
/**
|
|
48
48
|
* @internal
|
|
49
49
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
50
|
*/
|
|
51
51
|
export declare namespace ChatStreamingMessageChunk$ {
|
|
52
52
|
/** @deprecated use `ChatStreamingMessageChunk$inboundSchema` instead. */
|
|
53
|
-
const inboundSchema: z.ZodType<ChatStreamingMessageChunk, z.
|
|
53
|
+
const inboundSchema: z.ZodType<ChatStreamingMessageChunk, unknown, z.core.$ZodTypeInternals<ChatStreamingMessageChunk, unknown>>;
|
|
54
54
|
/** @deprecated use `ChatStreamingMessageChunk$outboundSchema` instead. */
|
|
55
|
-
const outboundSchema: z.ZodType<ChatStreamingMessageChunk$Outbound, z.
|
|
55
|
+
const outboundSchema: z.ZodType<ChatStreamingMessageChunk$Outbound, ChatStreamingMessageChunk, z.core.$ZodTypeInternals<ChatStreamingMessageChunk$Outbound, ChatStreamingMessageChunk>>;
|
|
56
56
|
/** @deprecated use `ChatStreamingMessageChunk$Outbound` instead. */
|
|
57
57
|
type Outbound = ChatStreamingMessageChunk$Outbound;
|
|
58
58
|
}
|
|
@@ -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 { ChatStreamingMessageToolCall$inboundSchema, ChatStreamingMessageToolCall$outboundSchema, } from "./chatstreamingmessagetoolcall.js";
|
|
@@ -9,7 +9,7 @@ export const ChatStreamingMessageChunkRole = {
|
|
|
9
9
|
Assistant: "assistant",
|
|
10
10
|
};
|
|
11
11
|
/** @internal */
|
|
12
|
-
export const ChatStreamingMessageChunkRole$inboundSchema = z.
|
|
12
|
+
export const ChatStreamingMessageChunkRole$inboundSchema = z.enum(ChatStreamingMessageChunkRole);
|
|
13
13
|
/** @internal */
|
|
14
14
|
export const ChatStreamingMessageChunkRole$outboundSchema = ChatStreamingMessageChunkRole$inboundSchema;
|
|
15
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 { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type ChatStreamingMessageToolCallFunction = {
|
|
@@ -12,30 +12,30 @@ export type ChatStreamingMessageToolCall = {
|
|
|
12
12
|
function?: ChatStreamingMessageToolCallFunction | undefined;
|
|
13
13
|
};
|
|
14
14
|
/** @internal */
|
|
15
|
-
export declare const ChatStreamingMessageToolCallFunction$inboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction,
|
|
15
|
+
export declare const ChatStreamingMessageToolCallFunction$inboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction, unknown>;
|
|
16
16
|
/** @internal */
|
|
17
17
|
export type ChatStreamingMessageToolCallFunction$Outbound = {
|
|
18
18
|
name?: string | undefined;
|
|
19
19
|
arguments?: string | undefined;
|
|
20
20
|
};
|
|
21
21
|
/** @internal */
|
|
22
|
-
export declare const ChatStreamingMessageToolCallFunction$outboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction$Outbound,
|
|
22
|
+
export declare const ChatStreamingMessageToolCallFunction$outboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction$Outbound, ChatStreamingMessageToolCallFunction>;
|
|
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 ChatStreamingMessageToolCallFunction$ {
|
|
28
28
|
/** @deprecated use `ChatStreamingMessageToolCallFunction$inboundSchema` instead. */
|
|
29
|
-
const inboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction, z.
|
|
29
|
+
const inboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction, unknown, z.core.$ZodTypeInternals<ChatStreamingMessageToolCallFunction, unknown>>;
|
|
30
30
|
/** @deprecated use `ChatStreamingMessageToolCallFunction$outboundSchema` instead. */
|
|
31
|
-
const outboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction$Outbound, z.
|
|
31
|
+
const outboundSchema: z.ZodType<ChatStreamingMessageToolCallFunction$Outbound, ChatStreamingMessageToolCallFunction, z.core.$ZodTypeInternals<ChatStreamingMessageToolCallFunction$Outbound, ChatStreamingMessageToolCallFunction>>;
|
|
32
32
|
/** @deprecated use `ChatStreamingMessageToolCallFunction$Outbound` instead. */
|
|
33
33
|
type Outbound = ChatStreamingMessageToolCallFunction$Outbound;
|
|
34
34
|
}
|
|
35
35
|
export declare function chatStreamingMessageToolCallFunctionToJSON(chatStreamingMessageToolCallFunction: ChatStreamingMessageToolCallFunction): string;
|
|
36
36
|
export declare function chatStreamingMessageToolCallFunctionFromJSON(jsonString: string): SafeParseResult<ChatStreamingMessageToolCallFunction, SDKValidationError>;
|
|
37
37
|
/** @internal */
|
|
38
|
-
export declare const ChatStreamingMessageToolCall$inboundSchema: z.ZodType<ChatStreamingMessageToolCall,
|
|
38
|
+
export declare const ChatStreamingMessageToolCall$inboundSchema: z.ZodType<ChatStreamingMessageToolCall, unknown>;
|
|
39
39
|
/** @internal */
|
|
40
40
|
export type ChatStreamingMessageToolCall$Outbound = {
|
|
41
41
|
index: number;
|
|
@@ -44,16 +44,16 @@ export type ChatStreamingMessageToolCall$Outbound = {
|
|
|
44
44
|
function?: ChatStreamingMessageToolCallFunction$Outbound | undefined;
|
|
45
45
|
};
|
|
46
46
|
/** @internal */
|
|
47
|
-
export declare const ChatStreamingMessageToolCall$outboundSchema: z.ZodType<ChatStreamingMessageToolCall$Outbound,
|
|
47
|
+
export declare const ChatStreamingMessageToolCall$outboundSchema: z.ZodType<ChatStreamingMessageToolCall$Outbound, ChatStreamingMessageToolCall>;
|
|
48
48
|
/**
|
|
49
49
|
* @internal
|
|
50
50
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
51
|
*/
|
|
52
52
|
export declare namespace ChatStreamingMessageToolCall$ {
|
|
53
53
|
/** @deprecated use `ChatStreamingMessageToolCall$inboundSchema` instead. */
|
|
54
|
-
const inboundSchema: z.ZodType<ChatStreamingMessageToolCall, z.
|
|
54
|
+
const inboundSchema: z.ZodType<ChatStreamingMessageToolCall, unknown, z.core.$ZodTypeInternals<ChatStreamingMessageToolCall, unknown>>;
|
|
55
55
|
/** @deprecated use `ChatStreamingMessageToolCall$outboundSchema` instead. */
|
|
56
|
-
const outboundSchema: z.ZodType<ChatStreamingMessageToolCall$Outbound, z.
|
|
56
|
+
const outboundSchema: z.ZodType<ChatStreamingMessageToolCall$Outbound, ChatStreamingMessageToolCall, z.core.$ZodTypeInternals<ChatStreamingMessageToolCall$Outbound, ChatStreamingMessageToolCall>>;
|
|
57
57
|
/** @deprecated use `ChatStreamingMessageToolCall$Outbound` instead. */
|
|
58
58
|
type Outbound = ChatStreamingMessageToolCall$Outbound;
|
|
59
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export const ChatStreamingMessageToolCallFunction$inboundSchema = z.object({
|
|
@@ -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 { ChatGenerationTokenUsage, ChatGenerationTokenUsage$Outbound } from "./chatgenerationtokenusage.js";
|
|
4
4
|
import { ChatStreamingChoice, ChatStreamingChoice$Outbound } from "./chatstreamingchoice.js";
|
|
@@ -21,30 +21,30 @@ export type ChatStreamingResponseChunk = {
|
|
|
21
21
|
data: Data;
|
|
22
22
|
};
|
|
23
23
|
/** @internal */
|
|
24
|
-
export declare const ChatStreamingResponseChunkError$inboundSchema: z.ZodType<ChatStreamingResponseChunkError,
|
|
24
|
+
export declare const ChatStreamingResponseChunkError$inboundSchema: z.ZodType<ChatStreamingResponseChunkError, unknown>;
|
|
25
25
|
/** @internal */
|
|
26
26
|
export type ChatStreamingResponseChunkError$Outbound = {
|
|
27
27
|
message: string;
|
|
28
28
|
code: number;
|
|
29
29
|
};
|
|
30
30
|
/** @internal */
|
|
31
|
-
export declare const ChatStreamingResponseChunkError$outboundSchema: z.ZodType<ChatStreamingResponseChunkError$Outbound,
|
|
31
|
+
export declare const ChatStreamingResponseChunkError$outboundSchema: z.ZodType<ChatStreamingResponseChunkError$Outbound, ChatStreamingResponseChunkError>;
|
|
32
32
|
/**
|
|
33
33
|
* @internal
|
|
34
34
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
35
35
|
*/
|
|
36
36
|
export declare namespace ChatStreamingResponseChunkError$ {
|
|
37
37
|
/** @deprecated use `ChatStreamingResponseChunkError$inboundSchema` instead. */
|
|
38
|
-
const inboundSchema: z.ZodType<ChatStreamingResponseChunkError, z.
|
|
38
|
+
const inboundSchema: z.ZodType<ChatStreamingResponseChunkError, unknown, z.core.$ZodTypeInternals<ChatStreamingResponseChunkError, unknown>>;
|
|
39
39
|
/** @deprecated use `ChatStreamingResponseChunkError$outboundSchema` instead. */
|
|
40
|
-
const outboundSchema: z.ZodType<ChatStreamingResponseChunkError$Outbound, z.
|
|
40
|
+
const outboundSchema: z.ZodType<ChatStreamingResponseChunkError$Outbound, ChatStreamingResponseChunkError, z.core.$ZodTypeInternals<ChatStreamingResponseChunkError$Outbound, ChatStreamingResponseChunkError>>;
|
|
41
41
|
/** @deprecated use `ChatStreamingResponseChunkError$Outbound` instead. */
|
|
42
42
|
type Outbound = ChatStreamingResponseChunkError$Outbound;
|
|
43
43
|
}
|
|
44
44
|
export declare function chatStreamingResponseChunkErrorToJSON(chatStreamingResponseChunkError: ChatStreamingResponseChunkError): string;
|
|
45
45
|
export declare function chatStreamingResponseChunkErrorFromJSON(jsonString: string): SafeParseResult<ChatStreamingResponseChunkError, SDKValidationError>;
|
|
46
46
|
/** @internal */
|
|
47
|
-
export declare const Data$inboundSchema: z.ZodType<Data,
|
|
47
|
+
export declare const Data$inboundSchema: z.ZodType<Data, unknown>;
|
|
48
48
|
/** @internal */
|
|
49
49
|
export type Data$Outbound = {
|
|
50
50
|
id: string;
|
|
@@ -57,38 +57,38 @@ export type Data$Outbound = {
|
|
|
57
57
|
usage?: ChatGenerationTokenUsage$Outbound | undefined;
|
|
58
58
|
};
|
|
59
59
|
/** @internal */
|
|
60
|
-
export declare const Data$outboundSchema: z.ZodType<Data$Outbound,
|
|
60
|
+
export declare const Data$outboundSchema: z.ZodType<Data$Outbound, Data>;
|
|
61
61
|
/**
|
|
62
62
|
* @internal
|
|
63
63
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
64
|
*/
|
|
65
65
|
export declare namespace Data$ {
|
|
66
66
|
/** @deprecated use `Data$inboundSchema` instead. */
|
|
67
|
-
const inboundSchema: z.ZodType<Data, z.
|
|
67
|
+
const inboundSchema: z.ZodType<Data, unknown, z.core.$ZodTypeInternals<Data, unknown>>;
|
|
68
68
|
/** @deprecated use `Data$outboundSchema` instead. */
|
|
69
|
-
const outboundSchema: z.ZodType<Data$Outbound, z.
|
|
69
|
+
const outboundSchema: z.ZodType<Data$Outbound, Data, z.core.$ZodTypeInternals<Data$Outbound, Data>>;
|
|
70
70
|
/** @deprecated use `Data$Outbound` instead. */
|
|
71
71
|
type Outbound = Data$Outbound;
|
|
72
72
|
}
|
|
73
73
|
export declare function dataToJSON(data: Data): string;
|
|
74
74
|
export declare function dataFromJSON(jsonString: string): SafeParseResult<Data, SDKValidationError>;
|
|
75
75
|
/** @internal */
|
|
76
|
-
export declare const ChatStreamingResponseChunk$inboundSchema: z.ZodType<ChatStreamingResponseChunk,
|
|
76
|
+
export declare const ChatStreamingResponseChunk$inboundSchema: z.ZodType<ChatStreamingResponseChunk, unknown>;
|
|
77
77
|
/** @internal */
|
|
78
78
|
export type ChatStreamingResponseChunk$Outbound = {
|
|
79
79
|
data: Data$Outbound;
|
|
80
80
|
};
|
|
81
81
|
/** @internal */
|
|
82
|
-
export declare const ChatStreamingResponseChunk$outboundSchema: z.ZodType<ChatStreamingResponseChunk$Outbound,
|
|
82
|
+
export declare const ChatStreamingResponseChunk$outboundSchema: z.ZodType<ChatStreamingResponseChunk$Outbound, ChatStreamingResponseChunk>;
|
|
83
83
|
/**
|
|
84
84
|
* @internal
|
|
85
85
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
86
86
|
*/
|
|
87
87
|
export declare namespace ChatStreamingResponseChunk$ {
|
|
88
88
|
/** @deprecated use `ChatStreamingResponseChunk$inboundSchema` instead. */
|
|
89
|
-
const inboundSchema: z.ZodType<ChatStreamingResponseChunk, z.
|
|
89
|
+
const inboundSchema: z.ZodType<ChatStreamingResponseChunk, unknown, z.core.$ZodTypeInternals<ChatStreamingResponseChunk, unknown>>;
|
|
90
90
|
/** @deprecated use `ChatStreamingResponseChunk$outboundSchema` instead. */
|
|
91
|
-
const outboundSchema: z.ZodType<ChatStreamingResponseChunk$Outbound, z.
|
|
91
|
+
const outboundSchema: z.ZodType<ChatStreamingResponseChunk$Outbound, ChatStreamingResponseChunk, z.core.$ZodTypeInternals<ChatStreamingResponseChunk$Outbound, ChatStreamingResponseChunk>>;
|
|
92
92
|
/** @deprecated use `ChatStreamingResponseChunk$Outbound` instead. */
|
|
93
93
|
type Outbound = ChatStreamingResponseChunk$Outbound;
|
|
94
94
|
}
|
|
@@ -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 { ChatGenerationTokenUsage$inboundSchema, ChatGenerationTokenUsage$outboundSchema, } from "./chatgenerationtokenusage.js";
|
|
@@ -34,16 +34,14 @@ export function chatStreamingResponseChunkErrorFromJSON(jsonString) {
|
|
|
34
34
|
return safeParse(jsonString, (x) => ChatStreamingResponseChunkError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatStreamingResponseChunkError' from JSON`);
|
|
35
35
|
}
|
|
36
36
|
/** @internal */
|
|
37
|
-
export const Data$inboundSchema = z
|
|
38
|
-
.object({
|
|
37
|
+
export const Data$inboundSchema = z.object({
|
|
39
38
|
id: z.string(),
|
|
40
39
|
choices: z.array(ChatStreamingChoice$inboundSchema),
|
|
41
40
|
created: z.number(),
|
|
42
41
|
model: z.string(),
|
|
43
42
|
object: z.literal("chat.completion.chunk"),
|
|
44
43
|
system_fingerprint: z.nullable(z.string()).optional(),
|
|
45
|
-
error: z.lazy(() => ChatStreamingResponseChunkError$inboundSchema)
|
|
46
|
-
.optional(),
|
|
44
|
+
error: z.lazy(() => ChatStreamingResponseChunkError$inboundSchema).optional(),
|
|
47
45
|
usage: ChatGenerationTokenUsage$inboundSchema.optional(),
|
|
48
46
|
}).transform((v) => {
|
|
49
47
|
return remap$(v, {
|
|
@@ -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 ChatStreamOptions = {
|
|
5
5
|
includeUsage?: boolean | undefined;
|
|
6
6
|
};
|
|
7
7
|
/** @internal */
|
|
8
|
-
export declare const ChatStreamOptions$inboundSchema: z.ZodType<ChatStreamOptions,
|
|
8
|
+
export declare const ChatStreamOptions$inboundSchema: z.ZodType<ChatStreamOptions, unknown>;
|
|
9
9
|
/** @internal */
|
|
10
10
|
export type ChatStreamOptions$Outbound = {
|
|
11
11
|
include_usage?: boolean | undefined;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const ChatStreamOptions$outboundSchema: z.ZodType<ChatStreamOptions$Outbound,
|
|
14
|
+
export declare const ChatStreamOptions$outboundSchema: z.ZodType<ChatStreamOptions$Outbound, ChatStreamOptions>;
|
|
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 ChatStreamOptions$ {
|
|
20
20
|
/** @deprecated use `ChatStreamOptions$inboundSchema` instead. */
|
|
21
|
-
const inboundSchema: z.ZodType<ChatStreamOptions, z.
|
|
21
|
+
const inboundSchema: z.ZodType<ChatStreamOptions, unknown, z.core.$ZodTypeInternals<ChatStreamOptions, unknown>>;
|
|
22
22
|
/** @deprecated use `ChatStreamOptions$outboundSchema` instead. */
|
|
23
|
-
const outboundSchema: z.ZodType<ChatStreamOptions$Outbound, z.
|
|
23
|
+
const outboundSchema: z.ZodType<ChatStreamOptions$Outbound, ChatStreamOptions, z.core.$ZodTypeInternals<ChatStreamOptions$Outbound, ChatStreamOptions>>;
|
|
24
24
|
/** @deprecated use `ChatStreamOptions$Outbound` instead. */
|
|
25
25
|
type Outbound = ChatStreamOptions$Outbound;
|
|
26
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from "zod/
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { CompletionLogprobs, CompletionLogprobs$Outbound } from "./completionlogprobs.js";
|
|
@@ -16,21 +16,21 @@ export type CompletionChoice = {
|
|
|
16
16
|
finishReason: CompletionFinishReason | null;
|
|
17
17
|
};
|
|
18
18
|
/** @internal */
|
|
19
|
-
export declare const CompletionFinishReason$inboundSchema: z.ZodType<CompletionFinishReason,
|
|
19
|
+
export declare const CompletionFinishReason$inboundSchema: z.ZodType<CompletionFinishReason, unknown>;
|
|
20
20
|
/** @internal */
|
|
21
|
-
export declare const CompletionFinishReason$outboundSchema: z.ZodType<CompletionFinishReason,
|
|
21
|
+
export declare const CompletionFinishReason$outboundSchema: z.ZodType<CompletionFinishReason, CompletionFinishReason>;
|
|
22
22
|
/**
|
|
23
23
|
* @internal
|
|
24
24
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
25
|
*/
|
|
26
26
|
export declare namespace CompletionFinishReason$ {
|
|
27
27
|
/** @deprecated use `CompletionFinishReason$inboundSchema` instead. */
|
|
28
|
-
const inboundSchema: z.ZodType<CompletionFinishReason, z.
|
|
28
|
+
const inboundSchema: z.ZodType<CompletionFinishReason, unknown, z.core.$ZodTypeInternals<CompletionFinishReason, unknown>>;
|
|
29
29
|
/** @deprecated use `CompletionFinishReason$outboundSchema` instead. */
|
|
30
|
-
const outboundSchema: z.ZodType<CompletionFinishReason, z.
|
|
30
|
+
const outboundSchema: z.ZodType<CompletionFinishReason, CompletionFinishReason, z.core.$ZodTypeInternals<CompletionFinishReason, CompletionFinishReason>>;
|
|
31
31
|
}
|
|
32
32
|
/** @internal */
|
|
33
|
-
export declare const CompletionChoice$inboundSchema: z.ZodType<CompletionChoice,
|
|
33
|
+
export declare const CompletionChoice$inboundSchema: z.ZodType<CompletionChoice, unknown>;
|
|
34
34
|
/** @internal */
|
|
35
35
|
export type CompletionChoice$Outbound = {
|
|
36
36
|
text: string;
|
|
@@ -39,16 +39,16 @@ export type CompletionChoice$Outbound = {
|
|
|
39
39
|
finish_reason: string | null;
|
|
40
40
|
};
|
|
41
41
|
/** @internal */
|
|
42
|
-
export declare const CompletionChoice$outboundSchema: z.ZodType<CompletionChoice$Outbound,
|
|
42
|
+
export declare const CompletionChoice$outboundSchema: z.ZodType<CompletionChoice$Outbound, CompletionChoice>;
|
|
43
43
|
/**
|
|
44
44
|
* @internal
|
|
45
45
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
46
|
*/
|
|
47
47
|
export declare namespace CompletionChoice$ {
|
|
48
48
|
/** @deprecated use `CompletionChoice$inboundSchema` instead. */
|
|
49
|
-
const inboundSchema: z.ZodType<CompletionChoice, z.
|
|
49
|
+
const inboundSchema: z.ZodType<CompletionChoice, unknown, z.core.$ZodTypeInternals<CompletionChoice, unknown>>;
|
|
50
50
|
/** @deprecated use `CompletionChoice$outboundSchema` instead. */
|
|
51
|
-
const outboundSchema: z.ZodType<CompletionChoice$Outbound, z.
|
|
51
|
+
const outboundSchema: z.ZodType<CompletionChoice$Outbound, CompletionChoice, z.core.$ZodTypeInternals<CompletionChoice$Outbound, CompletionChoice>>;
|
|
52
52
|
/** @deprecated use `CompletionChoice$Outbound` instead. */
|
|
53
53
|
type Outbound = CompletionChoice$Outbound;
|
|
54
54
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as z from "zod/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
@@ -14,12 +14,12 @@ export const CompletionFinishReason = {
|
|
|
14
14
|
/** @internal */
|
|
15
15
|
export const CompletionFinishReason$inboundSchema = z
|
|
16
16
|
.union([
|
|
17
|
-
z.
|
|
17
|
+
z.enum(CompletionFinishReason),
|
|
18
18
|
z.string().transform(catchUnrecognizedEnum),
|
|
19
19
|
]);
|
|
20
20
|
/** @internal */
|
|
21
21
|
export const CompletionFinishReason$outboundSchema = z.union([
|
|
22
|
-
z.
|
|
22
|
+
z.enum(CompletionFinishReason),
|
|
23
23
|
z.string().and(z.custom()),
|
|
24
24
|
]);
|
|
25
25
|
/**
|