@openrouter/sdk 0.1.10 → 0.1.13
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/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/chatgenerationparams.d.ts +2 -1
- package/esm/models/chatgenerationparams.js +4 -4
- package/esm/models/chatmessagecontentitem.d.ts +4 -0
- package/esm/models/chatmessagecontentitem.js +2 -0
- package/esm/models/chatmessagecontentitemaudio.d.ts +1 -1
- package/esm/models/chatmessagecontentitemaudio.js +3 -10
- package/esm/models/chatmessagecontentitemimage.d.ts +1 -1
- package/esm/models/chatmessagecontentitemimage.js +3 -10
- package/esm/models/chatmessagecontentitemvideo.d.ts +48 -11
- package/esm/models/chatmessagecontentitemvideo.js +64 -11
- package/esm/models/chatresponsechoice.d.ts +21 -1
- package/esm/models/chatresponsechoice.js +25 -1
- package/esm/models/chatstreamingresponsechunk.d.ts +1 -1
- package/esm/models/chatstreamingresponsechunk.js +1 -1
- package/esm/models/completionchoice.js +2 -6
- package/esm/models/createchargerequest.d.ts +1 -1
- package/esm/models/createchargerequest.js +3 -4
- package/esm/models/datacollection.d.ts +26 -0
- package/esm/models/datacollection.js +19 -0
- package/esm/models/endpointstatus.js +2 -7
- package/esm/models/imagegenerationstatus.d.ts +1 -1
- package/esm/models/imagegenerationstatus.js +3 -11
- package/esm/models/index.d.ts +2 -2
- package/esm/models/index.js +2 -2
- package/esm/models/inputmodality.js +2 -7
- package/esm/models/instructtype.js +2 -7
- package/esm/models/listendpointsresponse.js +3 -6
- package/esm/models/modelarchitecture.js +2 -6
- package/esm/models/modelgroup.js +2 -7
- package/esm/models/openairesponsesincludable.d.ts +1 -1
- package/esm/models/openairesponsesincludable.js +2 -5
- package/esm/models/openairesponsesincompletedetails.js +3 -6
- package/esm/models/openairesponsesreasoningeffort.d.ts +2 -1
- package/esm/models/openairesponsesreasoningeffort.js +4 -11
- package/esm/models/openairesponsesresponsestatus.js +2 -7
- package/esm/models/openairesponsesservicetier.js +2 -7
- package/esm/models/openairesponsestruncation.js +2 -7
- package/esm/models/openresponsesreasoning.d.ts +2 -1
- package/esm/models/openresponsesreasoning.js +3 -4
- package/esm/models/openresponsesrequest.d.ts +8 -40
- package/esm/models/openresponsesrequest.js +10 -49
- package/esm/models/openresponsesresponsetext.d.ts +1 -1
- package/esm/models/openresponsesresponsetext.js +2 -4
- package/esm/models/operations/createauthkeyscode.d.ts +1 -1
- package/esm/models/operations/createauthkeyscode.js +2 -4
- package/esm/models/operations/createembeddings.d.ts +82 -61
- package/esm/models/operations/createembeddings.js +72 -52
- package/esm/models/operations/createkeys.d.ts +2 -2
- package/esm/models/operations/createkeys.js +3 -5
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +1 -1
- package/esm/models/operations/exchangeauthcodeforapikey.js +3 -4
- package/esm/models/operations/getcurrentkey.d.ts +4 -0
- package/esm/models/operations/getcurrentkey.js +2 -0
- package/esm/models/operations/getgeneration.js +3 -6
- package/esm/models/operations/getkey.js +1 -1
- package/esm/models/operations/getparameters.d.ts +3 -9
- package/esm/models/operations/getparameters.js +5 -18
- package/esm/models/operations/list.js +1 -1
- package/esm/models/operations/updatekeys.d.ts +1 -1
- package/esm/models/operations/updatekeys.js +3 -5
- package/esm/models/outputmodality.js +2 -7
- package/esm/models/parameter.js +3 -7
- package/esm/models/providername.d.ts +3 -27
- package/esm/models/providername.js +5 -37
- package/esm/models/providersort.d.ts +17 -0
- package/esm/models/providersort.js +15 -0
- package/esm/models/publicendpoint.d.ts +4 -0
- package/esm/models/publicendpoint.js +4 -6
- package/esm/models/publicpricing.d.ts +4 -0
- package/esm/models/publicpricing.js +2 -0
- package/esm/models/quantization.d.ts +1 -1
- package/esm/models/quantization.js +2 -5
- package/esm/models/reasoningsummaryverbosity.d.ts +1 -1
- package/esm/models/reasoningsummaryverbosity.js +3 -11
- package/esm/models/responseinputaudio.d.ts +1 -1
- package/esm/models/responseinputaudio.js +3 -10
- package/esm/models/responseinputimage.d.ts +1 -1
- package/esm/models/responseinputimage.js +3 -10
- package/esm/models/responseserrorfield.js +3 -6
- package/esm/models/responsessearchcontextsize.d.ts +1 -1
- package/esm/models/responsessearchcontextsize.js +3 -11
- package/esm/models/responsetextconfig.js +2 -6
- package/esm/models/toolcallstatus.d.ts +1 -1
- package/esm/models/toolcallstatus.js +3 -11
- package/esm/models/websearchstatus.d.ts +1 -1
- package/esm/models/websearchstatus.js +3 -11
- package/esm/types/enums.d.ts +10 -6
- package/esm/types/enums.js +38 -1
- package/esm/types/index.d.ts +0 -1
- package/esm/types/index.js +0 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/esm/models/chatcompletionfinishreason.d.ts +0 -13
- package/esm/models/chatcompletionfinishreason.js +0 -19
- package/esm/models/chatstreamingchoice.d.ts +0 -16
- package/esm/models/chatstreamingchoice.js +0 -24
package/esm/lib/config.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
37
37
|
export declare const SDK_METADATA: {
|
|
38
38
|
readonly language: "typescript";
|
|
39
39
|
readonly openapiDocVersion: "1.0.0";
|
|
40
|
-
readonly sdkVersion: "0.1.
|
|
41
|
-
readonly genVersion: "2.
|
|
42
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.1.
|
|
40
|
+
readonly sdkVersion: "0.1.13";
|
|
41
|
+
readonly genVersion: "2.755.9";
|
|
42
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.1.13 2.755.9 1.0.0 @openrouter/sdk";
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
|
|
|
25
25
|
export const SDK_METADATA = {
|
|
26
26
|
language: "typescript",
|
|
27
27
|
openapiDocVersion: "1.0.0",
|
|
28
|
-
sdkVersion: "0.1.
|
|
29
|
-
genVersion: "2.
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 0.1.
|
|
28
|
+
sdkVersion: "0.1.13",
|
|
29
|
+
genVersion: "2.755.9",
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 0.1.13 2.755.9 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -7,6 +7,7 @@ import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./r
|
|
|
7
7
|
import { ResponseFormatTextGrammar, ResponseFormatTextGrammar$Outbound } from "./responseformattextgrammar.js";
|
|
8
8
|
import { ToolDefinitionJson, ToolDefinitionJson$Outbound } from "./tooldefinitionjson.js";
|
|
9
9
|
export declare const Effort: {
|
|
10
|
+
readonly None: "none";
|
|
10
11
|
readonly Minimal: "minimal";
|
|
11
12
|
readonly Low: "low";
|
|
12
13
|
readonly Medium: "medium";
|
|
@@ -57,7 +58,7 @@ export type ChatGenerationParams = {
|
|
|
57
58
|
user?: string | undefined;
|
|
58
59
|
};
|
|
59
60
|
/** @internal */
|
|
60
|
-
export declare const Effort$outboundSchema: z.ZodType<
|
|
61
|
+
export declare const Effort$outboundSchema: z.ZodType<string, Effort>;
|
|
61
62
|
/** @internal */
|
|
62
63
|
export type Reasoning$Outbound = {
|
|
63
64
|
effort?: string | null | undefined;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
6
7
|
import { ChatStreamOptions$outboundSchema, } from "./chatstreamoptions.js";
|
|
7
8
|
import { Message$outboundSchema, } from "./message.js";
|
|
8
9
|
import { ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js";
|
|
@@ -10,16 +11,15 @@ import { ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonsc
|
|
|
10
11
|
import { ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js";
|
|
11
12
|
import { ToolDefinitionJson$outboundSchema, } from "./tooldefinitionjson.js";
|
|
12
13
|
export const Effort = {
|
|
14
|
+
None: "none",
|
|
13
15
|
Minimal: "minimal",
|
|
14
16
|
Low: "low",
|
|
15
17
|
Medium: "medium",
|
|
16
18
|
High: "high",
|
|
17
19
|
};
|
|
18
20
|
/** @internal */
|
|
19
|
-
export const Effort$outboundSchema =
|
|
20
|
-
|
|
21
|
-
z.string().and(z.custom()),
|
|
22
|
-
]);
|
|
21
|
+
export const Effort$outboundSchema = openEnums
|
|
22
|
+
.outboundSchema(Effort);
|
|
23
23
|
/** @internal */
|
|
24
24
|
export const Reasoning$outboundSchema = z.object({
|
|
25
25
|
effort: z.nullable(Effort$outboundSchema).optional(),
|
|
@@ -13,6 +13,8 @@ export type ChatMessageContentItem = (ChatMessageContentItemText & {
|
|
|
13
13
|
type: "input_audio";
|
|
14
14
|
}) | (ChatMessageContentItemVideo & {
|
|
15
15
|
type: "input_video";
|
|
16
|
+
}) | (ChatMessageContentItemVideo & {
|
|
17
|
+
type: "video_url";
|
|
16
18
|
});
|
|
17
19
|
/** @internal */
|
|
18
20
|
export declare const ChatMessageContentItem$inboundSchema: z.ZodType<ChatMessageContentItem, unknown>;
|
|
@@ -25,6 +27,8 @@ export type ChatMessageContentItem$Outbound = (ChatMessageContentItemText$Outbou
|
|
|
25
27
|
type: "input_audio";
|
|
26
28
|
}) | (ChatMessageContentItemVideo$Outbound & {
|
|
27
29
|
type: "input_video";
|
|
30
|
+
}) | (ChatMessageContentItemVideo$Outbound & {
|
|
31
|
+
type: "video_url";
|
|
28
32
|
});
|
|
29
33
|
/** @internal */
|
|
30
34
|
export declare const ChatMessageContentItem$outboundSchema: z.ZodType<ChatMessageContentItem$Outbound, ChatMessageContentItem>;
|
|
@@ -13,6 +13,7 @@ export const ChatMessageContentItem$inboundSchema = z.union([
|
|
|
13
13
|
ChatMessageContentItemImage$inboundSchema.and(z.object({ type: z.literal("image_url") })),
|
|
14
14
|
ChatMessageContentItemAudio$inboundSchema.and(z.object({ type: z.literal("input_audio") })),
|
|
15
15
|
ChatMessageContentItemVideo$inboundSchema.and(z.object({ type: z.literal("input_video") })),
|
|
16
|
+
z.lazy(() => ChatMessageContentItemVideo$inboundSchema).and(z.object({ type: z.literal("video_url") })),
|
|
16
17
|
]);
|
|
17
18
|
/** @internal */
|
|
18
19
|
export const ChatMessageContentItem$outboundSchema = z.union([
|
|
@@ -20,6 +21,7 @@ export const ChatMessageContentItem$outboundSchema = z.union([
|
|
|
20
21
|
ChatMessageContentItemImage$outboundSchema.and(z.object({ type: z.literal("image_url") })),
|
|
21
22
|
ChatMessageContentItemAudio$outboundSchema.and(z.object({ type: z.literal("input_audio") })),
|
|
22
23
|
ChatMessageContentItemVideo$outboundSchema.and(z.object({ type: z.literal("input_video") })),
|
|
24
|
+
z.lazy(() => ChatMessageContentItemVideo$outboundSchema).and(z.object({ type: z.literal("video_url") })),
|
|
23
25
|
]);
|
|
24
26
|
export function chatMessageContentItemToJSON(chatMessageContentItem) {
|
|
25
27
|
return JSON.stringify(ChatMessageContentItem$outboundSchema.parse(chatMessageContentItem));
|
|
@@ -23,7 +23,7 @@ export type ChatMessageContentItemAudio = {
|
|
|
23
23
|
/** @internal */
|
|
24
24
|
export declare const ChatMessageContentItemAudioFormat$inboundSchema: z.ZodType<ChatMessageContentItemAudioFormat, unknown>;
|
|
25
25
|
/** @internal */
|
|
26
|
-
export declare const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType<
|
|
26
|
+
export declare const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType<string, ChatMessageContentItemAudioFormat>;
|
|
27
27
|
/** @internal */
|
|
28
28
|
export declare const ChatMessageContentItemAudioInputAudio$inboundSchema: z.ZodType<ChatMessageContentItemAudioInputAudio, unknown>;
|
|
29
29
|
/** @internal */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
import
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
8
|
export const ChatMessageContentItemAudioFormat = {
|
|
9
9
|
Wav: "wav",
|
|
10
10
|
Mp3: "mp3",
|
|
@@ -15,16 +15,9 @@ export const ChatMessageContentItemAudioFormat = {
|
|
|
15
15
|
Pcm24: "pcm24",
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
|
-
export const ChatMessageContentItemAudioFormat$inboundSchema =
|
|
19
|
-
.union([
|
|
20
|
-
z.enum(ChatMessageContentItemAudioFormat),
|
|
21
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
22
|
-
]);
|
|
18
|
+
export const ChatMessageContentItemAudioFormat$inboundSchema = openEnums.inboundSchema(ChatMessageContentItemAudioFormat);
|
|
23
19
|
/** @internal */
|
|
24
|
-
export const ChatMessageContentItemAudioFormat$outboundSchema =
|
|
25
|
-
z.enum(ChatMessageContentItemAudioFormat),
|
|
26
|
-
z.string().and(z.custom()),
|
|
27
|
-
]);
|
|
20
|
+
export const ChatMessageContentItemAudioFormat$outboundSchema = openEnums.outboundSchema(ChatMessageContentItemAudioFormat);
|
|
28
21
|
/** @internal */
|
|
29
22
|
export const ChatMessageContentItemAudioInputAudio$inboundSchema = z.object({
|
|
30
23
|
data: z.string(),
|
|
@@ -19,7 +19,7 @@ export type ChatMessageContentItemImage = {
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
export declare const ChatMessageContentItemImageDetail$inboundSchema: z.ZodType<ChatMessageContentItemImageDetail, unknown>;
|
|
21
21
|
/** @internal */
|
|
22
|
-
export declare const ChatMessageContentItemImageDetail$outboundSchema: z.ZodType<
|
|
22
|
+
export declare const ChatMessageContentItemImageDetail$outboundSchema: z.ZodType<string, ChatMessageContentItemImageDetail>;
|
|
23
23
|
/** @internal */
|
|
24
24
|
export declare const ImageUrl$inboundSchema: z.ZodType<ImageUrl, unknown>;
|
|
25
25
|
/** @internal */
|
|
@@ -4,23 +4,16 @@
|
|
|
4
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
|
-
import
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
8
|
export const ChatMessageContentItemImageDetail = {
|
|
9
9
|
Auto: "auto",
|
|
10
10
|
Low: "low",
|
|
11
11
|
High: "high",
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export const ChatMessageContentItemImageDetail$inboundSchema =
|
|
15
|
-
.union([
|
|
16
|
-
z.enum(ChatMessageContentItemImageDetail),
|
|
17
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
18
|
-
]);
|
|
14
|
+
export const ChatMessageContentItemImageDetail$inboundSchema = openEnums.inboundSchema(ChatMessageContentItemImageDetail);
|
|
19
15
|
/** @internal */
|
|
20
|
-
export const ChatMessageContentItemImageDetail$outboundSchema =
|
|
21
|
-
z.enum(ChatMessageContentItemImageDetail),
|
|
22
|
-
z.string().and(z.custom()),
|
|
23
|
-
]);
|
|
16
|
+
export const ChatMessageContentItemImageDetail$outboundSchema = openEnums.outboundSchema(ChatMessageContentItemImageDetail);
|
|
24
17
|
/** @internal */
|
|
25
18
|
export const ImageUrl$inboundSchema = z.object({
|
|
26
19
|
url: z.string(),
|
|
@@ -1,31 +1,68 @@
|
|
|
1
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
|
-
export type
|
|
4
|
+
export type VideoUrl2 = {
|
|
5
5
|
url: string;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type ChatMessageContentItemVideoVideoURL = {
|
|
8
|
+
type: "video_url";
|
|
9
|
+
videoUrl: VideoUrl2;
|
|
10
|
+
};
|
|
11
|
+
export type VideoUrl1 = {
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
14
|
+
export type ChatMessageContentItemVideoInputVideo = {
|
|
8
15
|
type: "input_video";
|
|
9
|
-
videoUrl:
|
|
16
|
+
videoUrl: VideoUrl1;
|
|
10
17
|
};
|
|
18
|
+
export type ChatMessageContentItemVideo = ChatMessageContentItemVideoInputVideo | ChatMessageContentItemVideoVideoURL;
|
|
11
19
|
/** @internal */
|
|
12
|
-
export declare const
|
|
20
|
+
export declare const VideoUrl2$inboundSchema: z.ZodType<VideoUrl2, unknown>;
|
|
13
21
|
/** @internal */
|
|
14
|
-
export type
|
|
22
|
+
export type VideoUrl2$Outbound = {
|
|
15
23
|
url: string;
|
|
16
24
|
};
|
|
17
25
|
/** @internal */
|
|
18
|
-
export declare const
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
26
|
+
export declare const VideoUrl2$outboundSchema: z.ZodType<VideoUrl2$Outbound, VideoUrl2>;
|
|
27
|
+
export declare function videoUrl2ToJSON(videoUrl2: VideoUrl2): string;
|
|
28
|
+
export declare function videoUrl2FromJSON(jsonString: string): SafeParseResult<VideoUrl2, SDKValidationError>;
|
|
21
29
|
/** @internal */
|
|
22
|
-
export declare const
|
|
30
|
+
export declare const ChatMessageContentItemVideoVideoURL$inboundSchema: z.ZodType<ChatMessageContentItemVideoVideoURL, unknown>;
|
|
23
31
|
/** @internal */
|
|
24
|
-
export type
|
|
32
|
+
export type ChatMessageContentItemVideoVideoURL$Outbound = {
|
|
33
|
+
type: "video_url";
|
|
34
|
+
video_url: VideoUrl2$Outbound;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const ChatMessageContentItemVideoVideoURL$outboundSchema: z.ZodType<ChatMessageContentItemVideoVideoURL$Outbound, ChatMessageContentItemVideoVideoURL>;
|
|
38
|
+
export declare function chatMessageContentItemVideoVideoURLToJSON(chatMessageContentItemVideoVideoURL: ChatMessageContentItemVideoVideoURL): string;
|
|
39
|
+
export declare function chatMessageContentItemVideoVideoURLFromJSON(jsonString: string): SafeParseResult<ChatMessageContentItemVideoVideoURL, SDKValidationError>;
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const VideoUrl1$inboundSchema: z.ZodType<VideoUrl1, unknown>;
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type VideoUrl1$Outbound = {
|
|
44
|
+
url: string;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const VideoUrl1$outboundSchema: z.ZodType<VideoUrl1$Outbound, VideoUrl1>;
|
|
48
|
+
export declare function videoUrl1ToJSON(videoUrl1: VideoUrl1): string;
|
|
49
|
+
export declare function videoUrl1FromJSON(jsonString: string): SafeParseResult<VideoUrl1, SDKValidationError>;
|
|
50
|
+
/** @internal */
|
|
51
|
+
export declare const ChatMessageContentItemVideoInputVideo$inboundSchema: z.ZodType<ChatMessageContentItemVideoInputVideo, unknown>;
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type ChatMessageContentItemVideoInputVideo$Outbound = {
|
|
25
54
|
type: "input_video";
|
|
26
|
-
video_url:
|
|
55
|
+
video_url: VideoUrl1$Outbound;
|
|
27
56
|
};
|
|
28
57
|
/** @internal */
|
|
58
|
+
export declare const ChatMessageContentItemVideoInputVideo$outboundSchema: z.ZodType<ChatMessageContentItemVideoInputVideo$Outbound, ChatMessageContentItemVideoInputVideo>;
|
|
59
|
+
export declare function chatMessageContentItemVideoInputVideoToJSON(chatMessageContentItemVideoInputVideo: ChatMessageContentItemVideoInputVideo): string;
|
|
60
|
+
export declare function chatMessageContentItemVideoInputVideoFromJSON(jsonString: string): SafeParseResult<ChatMessageContentItemVideoInputVideo, SDKValidationError>;
|
|
61
|
+
/** @internal */
|
|
62
|
+
export declare const ChatMessageContentItemVideo$inboundSchema: z.ZodType<ChatMessageContentItemVideo, unknown>;
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type ChatMessageContentItemVideo$Outbound = ChatMessageContentItemVideoInputVideo$Outbound | ChatMessageContentItemVideoVideoURL$Outbound;
|
|
65
|
+
/** @internal */
|
|
29
66
|
export declare const ChatMessageContentItemVideo$outboundSchema: z.ZodType<ChatMessageContentItemVideo$Outbound, ChatMessageContentItemVideo>;
|
|
30
67
|
export declare function chatMessageContentItemVideoToJSON(chatMessageContentItemVideo: ChatMessageContentItemVideo): string;
|
|
31
68
|
export declare function chatMessageContentItemVideoFromJSON(jsonString: string): SafeParseResult<ChatMessageContentItemVideo, SDKValidationError>;
|
|
@@ -5,38 +5,91 @@ import * as z from "zod/v4";
|
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
/** @internal */
|
|
8
|
-
export const
|
|
8
|
+
export const VideoUrl2$inboundSchema = z.object({
|
|
9
9
|
url: z.string(),
|
|
10
10
|
});
|
|
11
11
|
/** @internal */
|
|
12
|
-
export const
|
|
13
|
-
.object({
|
|
12
|
+
export const VideoUrl2$outboundSchema = z.object({
|
|
14
13
|
url: z.string(),
|
|
15
14
|
});
|
|
16
|
-
export function
|
|
17
|
-
return JSON.stringify(
|
|
15
|
+
export function videoUrl2ToJSON(videoUrl2) {
|
|
16
|
+
return JSON.stringify(VideoUrl2$outboundSchema.parse(videoUrl2));
|
|
18
17
|
}
|
|
19
|
-
export function
|
|
20
|
-
return safeParse(jsonString, (x) =>
|
|
18
|
+
export function videoUrl2FromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => VideoUrl2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VideoUrl2' from JSON`);
|
|
21
20
|
}
|
|
22
21
|
/** @internal */
|
|
23
|
-
export const
|
|
22
|
+
export const ChatMessageContentItemVideoVideoURL$inboundSchema = z.object({
|
|
23
|
+
type: z.literal("video_url"),
|
|
24
|
+
video_url: z.lazy(() => VideoUrl2$inboundSchema),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"video_url": "videoUrl",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ChatMessageContentItemVideoVideoURL$outboundSchema = z.object({
|
|
32
|
+
type: z.literal("video_url"),
|
|
33
|
+
videoUrl: z.lazy(() => VideoUrl2$outboundSchema),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
videoUrl: "video_url",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
export function chatMessageContentItemVideoVideoURLToJSON(chatMessageContentItemVideoVideoURL) {
|
|
40
|
+
return JSON.stringify(ChatMessageContentItemVideoVideoURL$outboundSchema.parse(chatMessageContentItemVideoVideoURL));
|
|
41
|
+
}
|
|
42
|
+
export function chatMessageContentItemVideoVideoURLFromJSON(jsonString) {
|
|
43
|
+
return safeParse(jsonString, (x) => ChatMessageContentItemVideoVideoURL$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatMessageContentItemVideoVideoURL' from JSON`);
|
|
44
|
+
}
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const VideoUrl1$inboundSchema = z.object({
|
|
47
|
+
url: z.string(),
|
|
48
|
+
});
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const VideoUrl1$outboundSchema = z.object({
|
|
51
|
+
url: z.string(),
|
|
52
|
+
});
|
|
53
|
+
export function videoUrl1ToJSON(videoUrl1) {
|
|
54
|
+
return JSON.stringify(VideoUrl1$outboundSchema.parse(videoUrl1));
|
|
55
|
+
}
|
|
56
|
+
export function videoUrl1FromJSON(jsonString) {
|
|
57
|
+
return safeParse(jsonString, (x) => VideoUrl1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VideoUrl1' from JSON`);
|
|
58
|
+
}
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const ChatMessageContentItemVideoInputVideo$inboundSchema = z.object({
|
|
24
61
|
type: z.literal("input_video"),
|
|
25
|
-
video_url: z.lazy(() =>
|
|
62
|
+
video_url: z.lazy(() => VideoUrl1$inboundSchema),
|
|
26
63
|
}).transform((v) => {
|
|
27
64
|
return remap$(v, {
|
|
28
65
|
"video_url": "videoUrl",
|
|
29
66
|
});
|
|
30
67
|
});
|
|
31
68
|
/** @internal */
|
|
32
|
-
export const
|
|
69
|
+
export const ChatMessageContentItemVideoInputVideo$outboundSchema = z.object({
|
|
33
70
|
type: z.literal("input_video"),
|
|
34
|
-
videoUrl: z.lazy(() =>
|
|
71
|
+
videoUrl: z.lazy(() => VideoUrl1$outboundSchema),
|
|
35
72
|
}).transform((v) => {
|
|
36
73
|
return remap$(v, {
|
|
37
74
|
videoUrl: "video_url",
|
|
38
75
|
});
|
|
39
76
|
});
|
|
77
|
+
export function chatMessageContentItemVideoInputVideoToJSON(chatMessageContentItemVideoInputVideo) {
|
|
78
|
+
return JSON.stringify(ChatMessageContentItemVideoInputVideo$outboundSchema.parse(chatMessageContentItemVideoInputVideo));
|
|
79
|
+
}
|
|
80
|
+
export function chatMessageContentItemVideoInputVideoFromJSON(jsonString) {
|
|
81
|
+
return safeParse(jsonString, (x) => ChatMessageContentItemVideoInputVideo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatMessageContentItemVideoInputVideo' from JSON`);
|
|
82
|
+
}
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const ChatMessageContentItemVideo$inboundSchema = z.union([
|
|
85
|
+
z.lazy(() => ChatMessageContentItemVideoInputVideo$inboundSchema),
|
|
86
|
+
z.lazy(() => ChatMessageContentItemVideoVideoURL$inboundSchema),
|
|
87
|
+
]);
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const ChatMessageContentItemVideo$outboundSchema = z.union([
|
|
90
|
+
z.lazy(() => ChatMessageContentItemVideoInputVideo$outboundSchema),
|
|
91
|
+
z.lazy(() => ChatMessageContentItemVideoVideoURL$outboundSchema),
|
|
92
|
+
]);
|
|
40
93
|
export function chatMessageContentItemVideoToJSON(chatMessageContentItemVideo) {
|
|
41
94
|
return JSON.stringify(ChatMessageContentItemVideo$outboundSchema.parse(chatMessageContentItemVideo));
|
|
42
95
|
}
|
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { AssistantMessage } from "./assistantmessage.js";
|
|
4
|
-
import { ChatCompletionFinishReason } from "./chatcompletionfinishreason.js";
|
|
5
5
|
import { ChatMessageTokenLogprobs } from "./chatmessagetokenlogprobs.js";
|
|
6
|
+
import { ChatStreamingMessageChunk } from "./chatstreamingmessagechunk.js";
|
|
6
7
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
8
|
+
export declare const ChatCompletionFinishReason: {
|
|
9
|
+
readonly ToolCalls: "tool_calls";
|
|
10
|
+
readonly Stop: "stop";
|
|
11
|
+
readonly Length: "length";
|
|
12
|
+
readonly ContentFilter: "content_filter";
|
|
13
|
+
readonly Error: "error";
|
|
14
|
+
};
|
|
15
|
+
export type ChatCompletionFinishReason = OpenEnum<typeof ChatCompletionFinishReason>;
|
|
7
16
|
export type ChatResponseChoice = {
|
|
8
17
|
finishReason: ChatCompletionFinishReason | null;
|
|
9
18
|
index: number;
|
|
10
19
|
message: AssistantMessage;
|
|
11
20
|
logprobs?: ChatMessageTokenLogprobs | null | undefined;
|
|
12
21
|
};
|
|
22
|
+
export type ChatStreamingChoice = {
|
|
23
|
+
delta: ChatStreamingMessageChunk;
|
|
24
|
+
finishReason: ChatCompletionFinishReason | null;
|
|
25
|
+
index: number;
|
|
26
|
+
logprobs?: ChatMessageTokenLogprobs | null | undefined;
|
|
27
|
+
};
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const ChatCompletionFinishReason$inboundSchema: z.ZodType<ChatCompletionFinishReason, unknown>;
|
|
13
30
|
/** @internal */
|
|
14
31
|
export declare const ChatResponseChoice$inboundSchema: z.ZodType<ChatResponseChoice, unknown>;
|
|
15
32
|
export declare function chatResponseChoiceFromJSON(jsonString: string): SafeParseResult<ChatResponseChoice, SDKValidationError>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const ChatStreamingChoice$inboundSchema: z.ZodType<ChatStreamingChoice, unknown>;
|
|
35
|
+
export declare function chatStreamingChoiceFromJSON(jsonString: string): SafeParseResult<ChatStreamingChoice, SDKValidationError>;
|
|
16
36
|
//# sourceMappingURL=chatresponsechoice.d.ts.map
|
|
@@ -4,9 +4,19 @@
|
|
|
4
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
|
+
import * as openEnums from "../types/enums.js";
|
|
7
8
|
import { AssistantMessage$inboundSchema, } from "./assistantmessage.js";
|
|
8
|
-
import { ChatCompletionFinishReason$inboundSchema, } from "./chatcompletionfinishreason.js";
|
|
9
9
|
import { ChatMessageTokenLogprobs$inboundSchema, } from "./chatmessagetokenlogprobs.js";
|
|
10
|
+
import { ChatStreamingMessageChunk$inboundSchema, } from "./chatstreamingmessagechunk.js";
|
|
11
|
+
export const ChatCompletionFinishReason = {
|
|
12
|
+
ToolCalls: "tool_calls",
|
|
13
|
+
Stop: "stop",
|
|
14
|
+
Length: "length",
|
|
15
|
+
ContentFilter: "content_filter",
|
|
16
|
+
Error: "error",
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ChatCompletionFinishReason$inboundSchema = openEnums.inboundSchema(ChatCompletionFinishReason);
|
|
10
20
|
/** @internal */
|
|
11
21
|
export const ChatResponseChoice$inboundSchema = z.object({
|
|
12
22
|
finish_reason: z.nullable(ChatCompletionFinishReason$inboundSchema),
|
|
@@ -21,4 +31,18 @@ export const ChatResponseChoice$inboundSchema = z.object({
|
|
|
21
31
|
export function chatResponseChoiceFromJSON(jsonString) {
|
|
22
32
|
return safeParse(jsonString, (x) => ChatResponseChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatResponseChoice' from JSON`);
|
|
23
33
|
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ChatStreamingChoice$inboundSchema = z.object({
|
|
36
|
+
delta: ChatStreamingMessageChunk$inboundSchema,
|
|
37
|
+
finish_reason: z.nullable(ChatCompletionFinishReason$inboundSchema),
|
|
38
|
+
index: z.number(),
|
|
39
|
+
logprobs: z.nullable(ChatMessageTokenLogprobs$inboundSchema).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"finish_reason": "finishReason",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
export function chatStreamingChoiceFromJSON(jsonString) {
|
|
46
|
+
return safeParse(jsonString, (x) => ChatStreamingChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatStreamingChoice' from JSON`);
|
|
47
|
+
}
|
|
24
48
|
//# sourceMappingURL=chatresponsechoice.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { ChatGenerationTokenUsage } from "./chatgenerationtokenusage.js";
|
|
4
|
-
import { ChatStreamingChoice } from "./
|
|
4
|
+
import { ChatStreamingChoice } from "./chatresponsechoice.js";
|
|
5
5
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
6
|
export type ChatStreamingResponseChunkError = {
|
|
7
7
|
message: string;
|
|
@@ -5,7 +5,7 @@ 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, } from "./chatgenerationtokenusage.js";
|
|
8
|
-
import { ChatStreamingChoice$inboundSchema, } from "./
|
|
8
|
+
import { ChatStreamingChoice$inboundSchema, } from "./chatresponsechoice.js";
|
|
9
9
|
/** @internal */
|
|
10
10
|
export const ChatStreamingResponseChunkError$inboundSchema = z.object({
|
|
11
11
|
message: z.string(),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
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
|
-
import
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
8
|
import { CompletionLogprobs$inboundSchema, } from "./completionlogprobs.js";
|
|
9
9
|
export const CompletionFinishReason = {
|
|
10
10
|
Stop: "stop",
|
|
@@ -12,11 +12,7 @@ export const CompletionFinishReason = {
|
|
|
12
12
|
ContentFilter: "content_filter",
|
|
13
13
|
};
|
|
14
14
|
/** @internal */
|
|
15
|
-
export const CompletionFinishReason$inboundSchema =
|
|
16
|
-
.union([
|
|
17
|
-
z.enum(CompletionFinishReason),
|
|
18
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
19
|
-
]);
|
|
15
|
+
export const CompletionFinishReason$inboundSchema = openEnums.inboundSchema(CompletionFinishReason);
|
|
20
16
|
/** @internal */
|
|
21
17
|
export const CompletionChoice$inboundSchema = z.object({
|
|
22
18
|
text: z.string(),
|
|
@@ -15,7 +15,7 @@ export type CreateChargeRequest = {
|
|
|
15
15
|
chainId: ChainId;
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
|
-
export declare const ChainId$outboundSchema: z.ZodType<
|
|
18
|
+
export declare const ChainId$outboundSchema: z.ZodType<number, ChainId>;
|
|
19
19
|
/** @internal */
|
|
20
20
|
export type CreateChargeRequest$Outbound = {
|
|
21
21
|
amount: number;
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
6
7
|
export const ChainId = {
|
|
7
8
|
One: 1,
|
|
8
9
|
OneHundredAndThirtySeven: 137,
|
|
9
10
|
EightThousandFourHundredAndFiftyThree: 8453,
|
|
10
11
|
};
|
|
11
12
|
/** @internal */
|
|
12
|
-
export const ChainId$outboundSchema =
|
|
13
|
-
|
|
14
|
-
z.number().and(z.custom()),
|
|
15
|
-
]);
|
|
13
|
+
export const ChainId$outboundSchema = openEnums
|
|
14
|
+
.outboundSchemaInt(ChainId);
|
|
16
15
|
/** @internal */
|
|
17
16
|
export const CreateChargeRequest$outboundSchema = z.object({
|
|
18
17
|
amount: z.number(),
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
8
|
+
*
|
|
9
|
+
* - deny: use only providers which do not collect user data.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DataCollection: {
|
|
12
|
+
readonly Deny: "deny";
|
|
13
|
+
readonly Allow: "allow";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
20
|
+
*
|
|
21
|
+
* - deny: use only providers which do not collect user data.
|
|
22
|
+
*/
|
|
23
|
+
export type DataCollection = OpenEnum<typeof DataCollection>;
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const DataCollection$outboundSchema: z.ZodType<string, DataCollection>;
|
|
26
|
+
//# sourceMappingURL=datacollection.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
5
|
+
/**
|
|
6
|
+
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
10
|
+
*
|
|
11
|
+
* - deny: use only providers which do not collect user data.
|
|
12
|
+
*/
|
|
13
|
+
export const DataCollection = {
|
|
14
|
+
Deny: "deny",
|
|
15
|
+
Allow: "allow",
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const DataCollection$outboundSchema = openEnums.outboundSchema(DataCollection);
|
|
19
|
+
//# sourceMappingURL=datacollection.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
import { catchUnrecognizedEnum } from "../types/enums.js";
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
6
5
|
export const EndpointStatus = {
|
|
7
6
|
Zero: 0,
|
|
8
7
|
Minus1: -1,
|
|
@@ -12,9 +11,5 @@ export const EndpointStatus = {
|
|
|
12
11
|
Minus10: -10,
|
|
13
12
|
};
|
|
14
13
|
/** @internal */
|
|
15
|
-
export const EndpointStatus$inboundSchema =
|
|
16
|
-
.union([
|
|
17
|
-
z.enum(EndpointStatus),
|
|
18
|
-
z.number().transform(catchUnrecognizedEnum),
|
|
19
|
-
]);
|
|
14
|
+
export const EndpointStatus$inboundSchema = openEnums.inboundSchemaInt(EndpointStatus);
|
|
20
15
|
//# sourceMappingURL=endpointstatus.js.map
|
|
@@ -10,5 +10,5 @@ export type ImageGenerationStatus = OpenEnum<typeof ImageGenerationStatus>;
|
|
|
10
10
|
/** @internal */
|
|
11
11
|
export declare const ImageGenerationStatus$inboundSchema: z.ZodType<ImageGenerationStatus, unknown>;
|
|
12
12
|
/** @internal */
|
|
13
|
-
export declare const ImageGenerationStatus$outboundSchema: z.ZodType<
|
|
13
|
+
export declare const ImageGenerationStatus$outboundSchema: z.ZodType<string, ImageGenerationStatus>;
|
|
14
14
|
//# sourceMappingURL=imagegenerationstatus.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
6
5
|
export const ImageGenerationStatus = {
|
|
7
6
|
InProgress: "in_progress",
|
|
8
7
|
Completed: "completed",
|
|
@@ -10,14 +9,7 @@ export const ImageGenerationStatus = {
|
|
|
10
9
|
Failed: "failed",
|
|
11
10
|
};
|
|
12
11
|
/** @internal */
|
|
13
|
-
export const ImageGenerationStatus$inboundSchema =
|
|
14
|
-
.union([
|
|
15
|
-
z.enum(ImageGenerationStatus),
|
|
16
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
17
|
-
]);
|
|
12
|
+
export const ImageGenerationStatus$inboundSchema = openEnums.inboundSchema(ImageGenerationStatus);
|
|
18
13
|
/** @internal */
|
|
19
|
-
export const ImageGenerationStatus$outboundSchema =
|
|
20
|
-
z.enum(ImageGenerationStatus),
|
|
21
|
-
z.string().and(z.custom()),
|
|
22
|
-
]);
|
|
14
|
+
export const ImageGenerationStatus$outboundSchema = openEnums.outboundSchema(ImageGenerationStatus);
|
|
23
15
|
//# sourceMappingURL=imagegenerationstatus.js.map
|