@openrouter/sdk 0.1.9 → 0.1.11
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/chatcompletionfinishreason.js +2 -7
- package/esm/models/chatgenerationparams.d.ts +1 -1
- package/esm/models/chatgenerationparams.js +3 -4
- 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/completionchoice.js +2 -6
- package/esm/models/createchargerequest.d.ts +1 -1
- package/esm/models/createchargerequest.js +3 -4
- 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/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/openairesponsesinputunion.d.ts +5 -5
- package/esm/models/openairesponsesinputunion.js +5 -5
- package/esm/models/openairesponsesreasoningeffort.d.ts +1 -1
- package/esm/models/openairesponsesreasoningeffort.js +3 -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/openresponsesfunctioncalloutput.d.ts +4 -4
- package/esm/models/openresponsesfunctioncalloutput.js +2 -2
- package/esm/models/openresponsesfunctiontoolcall.d.ts +2 -2
- package/esm/models/openresponsesfunctiontoolcall.js +1 -1
- package/esm/models/openresponsesinput.d.ts +4 -4
- package/esm/models/openresponsesinput.js +4 -4
- package/esm/models/openresponsesreasoning.d.ts +1 -1
- package/esm/models/openresponsesreasoning.js +2 -4
- package/esm/models/openresponsesrequest.d.ts +6 -6
- package/esm/models/openresponsesrequest.js +10 -27
- 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 +2 -2
- package/esm/models/operations/createembeddings.js +4 -8
- package/esm/models/operations/createkeys.d.ts +2 -2
- package/esm/models/operations/createkeys.js +2 -4
- 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/getparameters.d.ts +1 -1
- package/esm/models/operations/getparameters.js +3 -10
- package/esm/models/operations/updatekeys.d.ts +1 -1
- package/esm/models/operations/updatekeys.js +2 -4
- package/esm/models/outputmodality.js +2 -7
- package/esm/models/parameter.js +3 -7
- package/esm/models/providername.d.ts +1 -1
- package/esm/models/providername.js +3 -11
- package/esm/models/publicendpoint.js +2 -6
- 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/responsesoutputitem.d.ts +1 -1
- package/esm/models/responsesoutputitem.js +1 -1
- package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
- package/esm/models/responsesoutputitemreasoning.js +2 -2
- 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
|
@@ -12,10 +12,10 @@ export const OpenResponsesFunctionCallOutputType$outboundSchema = z.enum(OpenRes
|
|
|
12
12
|
/** @internal */
|
|
13
13
|
export const OpenResponsesFunctionCallOutput$outboundSchema = z.object({
|
|
14
14
|
type: OpenResponsesFunctionCallOutputType$outboundSchema,
|
|
15
|
-
id: z.string(),
|
|
15
|
+
id: z.nullable(z.string()).optional(),
|
|
16
16
|
callId: z.string(),
|
|
17
17
|
output: z.string(),
|
|
18
|
-
status: ToolCallStatus$outboundSchema.optional(),
|
|
18
|
+
status: z.nullable(ToolCallStatus$outboundSchema).optional(),
|
|
19
19
|
}).transform((v) => {
|
|
20
20
|
return remap$(v, {
|
|
21
21
|
callId: "call_id",
|
|
@@ -14,7 +14,7 @@ export type OpenResponsesFunctionToolCall = {
|
|
|
14
14
|
name: string;
|
|
15
15
|
arguments: string;
|
|
16
16
|
id: string;
|
|
17
|
-
status?: ToolCallStatus | undefined;
|
|
17
|
+
status?: ToolCallStatus | null | undefined;
|
|
18
18
|
};
|
|
19
19
|
/** @internal */
|
|
20
20
|
export declare const OpenResponsesFunctionToolCallType$outboundSchema: z.ZodEnum<typeof OpenResponsesFunctionToolCallType>;
|
|
@@ -25,7 +25,7 @@ export type OpenResponsesFunctionToolCall$Outbound = {
|
|
|
25
25
|
name: string;
|
|
26
26
|
arguments: string;
|
|
27
27
|
id: string;
|
|
28
|
-
status?: string | undefined;
|
|
28
|
+
status?: string | null | undefined;
|
|
29
29
|
};
|
|
30
30
|
/** @internal */
|
|
31
31
|
export declare const OpenResponsesFunctionToolCall$outboundSchema: z.ZodType<OpenResponsesFunctionToolCall$Outbound, OpenResponsesFunctionToolCall>;
|
|
@@ -16,7 +16,7 @@ export const OpenResponsesFunctionToolCall$outboundSchema = z.object({
|
|
|
16
16
|
name: z.string(),
|
|
17
17
|
arguments: z.string(),
|
|
18
18
|
id: z.string(),
|
|
19
|
-
status: ToolCallStatus$outboundSchema.optional(),
|
|
19
|
+
status: z.nullable(ToolCallStatus$outboundSchema).optional(),
|
|
20
20
|
}).transform((v) => {
|
|
21
21
|
return remap$(v, {
|
|
22
22
|
callId: "call_id",
|
|
@@ -10,18 +10,18 @@ import { ResponsesOutputItemFunctionCall, ResponsesOutputItemFunctionCall$Outbou
|
|
|
10
10
|
import { ResponsesOutputItemReasoning, ResponsesOutputItemReasoning$Outbound } from "./responsesoutputitemreasoning.js";
|
|
11
11
|
import { ResponsesOutputMessage, ResponsesOutputMessage$Outbound } from "./responsesoutputmessage.js";
|
|
12
12
|
import { ResponsesWebSearchCallOutput, ResponsesWebSearchCallOutput$Outbound } from "./responseswebsearchcalloutput.js";
|
|
13
|
-
export type OpenResponsesInput1 = OpenResponsesFunctionToolCall |
|
|
13
|
+
export type OpenResponsesInput1 = OpenResponsesFunctionToolCall | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning | OpenResponsesFunctionCallOutput | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage | OpenResponsesInputMessageItem;
|
|
14
14
|
/**
|
|
15
15
|
* Input for a response request - can be a string or array of items
|
|
16
16
|
*/
|
|
17
|
-
export type OpenResponsesInput = string | Array<OpenResponsesFunctionToolCall |
|
|
17
|
+
export type OpenResponsesInput = string | Array<OpenResponsesFunctionToolCall | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning | OpenResponsesFunctionCallOutput | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage | OpenResponsesInputMessageItem>;
|
|
18
18
|
/** @internal */
|
|
19
|
-
export type OpenResponsesInput1$Outbound = OpenResponsesFunctionToolCall$Outbound |
|
|
19
|
+
export type OpenResponsesInput1$Outbound = OpenResponsesFunctionToolCall$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputItemReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound | OpenResponsesInputMessageItem$Outbound;
|
|
20
20
|
/** @internal */
|
|
21
21
|
export declare const OpenResponsesInput1$outboundSchema: z.ZodType<OpenResponsesInput1$Outbound, OpenResponsesInput1>;
|
|
22
22
|
export declare function openResponsesInput1ToJSON(openResponsesInput1: OpenResponsesInput1): string;
|
|
23
23
|
/** @internal */
|
|
24
|
-
export type OpenResponsesInput$Outbound = string | Array<OpenResponsesFunctionToolCall$Outbound |
|
|
24
|
+
export type OpenResponsesInput$Outbound = string | Array<OpenResponsesFunctionToolCall$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputItemReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound | OpenResponsesInputMessageItem$Outbound>;
|
|
25
25
|
/** @internal */
|
|
26
26
|
export declare const OpenResponsesInput$outboundSchema: z.ZodType<OpenResponsesInput$Outbound, OpenResponsesInput>;
|
|
27
27
|
export declare function openResponsesInputToJSON(openResponsesInput: OpenResponsesInput): string;
|
|
@@ -16,16 +16,16 @@ import { ResponsesWebSearchCallOutput$outboundSchema, } from "./responseswebsear
|
|
|
16
16
|
/** @internal */
|
|
17
17
|
export const OpenResponsesInput1$outboundSchema = z.union([
|
|
18
18
|
OpenResponsesFunctionToolCall$outboundSchema,
|
|
19
|
-
OpenResponsesFunctionCallOutput$outboundSchema,
|
|
20
19
|
ResponsesOutputMessage$outboundSchema,
|
|
21
20
|
ResponsesOutputItemFunctionCall$outboundSchema,
|
|
22
21
|
ResponsesOutputItemFileSearchCall$outboundSchema,
|
|
23
22
|
OpenResponsesReasoning$outboundSchema,
|
|
23
|
+
OpenResponsesFunctionCallOutput$outboundSchema,
|
|
24
|
+
ResponsesOutputItemReasoning$outboundSchema,
|
|
24
25
|
ResponsesWebSearchCallOutput$outboundSchema,
|
|
25
26
|
ResponsesImageGenerationCall$outboundSchema,
|
|
26
27
|
OpenResponsesEasyInputMessage$outboundSchema,
|
|
27
28
|
OpenResponsesInputMessageItem$outboundSchema,
|
|
28
|
-
ResponsesOutputItemReasoning$outboundSchema,
|
|
29
29
|
]);
|
|
30
30
|
export function openResponsesInput1ToJSON(openResponsesInput1) {
|
|
31
31
|
return JSON.stringify(OpenResponsesInput1$outboundSchema.parse(openResponsesInput1));
|
|
@@ -35,16 +35,16 @@ export const OpenResponsesInput$outboundSchema = z.union([
|
|
|
35
35
|
z.string(),
|
|
36
36
|
z.array(z.union([
|
|
37
37
|
OpenResponsesFunctionToolCall$outboundSchema,
|
|
38
|
-
OpenResponsesFunctionCallOutput$outboundSchema,
|
|
39
38
|
ResponsesOutputMessage$outboundSchema,
|
|
40
39
|
ResponsesOutputItemFunctionCall$outboundSchema,
|
|
41
40
|
ResponsesOutputItemFileSearchCall$outboundSchema,
|
|
42
41
|
OpenResponsesReasoning$outboundSchema,
|
|
42
|
+
OpenResponsesFunctionCallOutput$outboundSchema,
|
|
43
|
+
ResponsesOutputItemReasoning$outboundSchema,
|
|
43
44
|
ResponsesWebSearchCallOutput$outboundSchema,
|
|
44
45
|
ResponsesImageGenerationCall$outboundSchema,
|
|
45
46
|
OpenResponsesEasyInputMessage$outboundSchema,
|
|
46
47
|
OpenResponsesInputMessageItem$outboundSchema,
|
|
47
|
-
ResponsesOutputItemReasoning$outboundSchema,
|
|
48
48
|
])),
|
|
49
49
|
]);
|
|
50
50
|
export function openResponsesInputToJSON(openResponsesInput) {
|
|
@@ -53,7 +53,7 @@ export type OpenResponsesReasoningStatusUnion$Outbound = string | string | strin
|
|
|
53
53
|
export declare const OpenResponsesReasoningStatusUnion$outboundSchema: z.ZodType<OpenResponsesReasoningStatusUnion$Outbound, OpenResponsesReasoningStatusUnion>;
|
|
54
54
|
export declare function openResponsesReasoningStatusUnionToJSON(openResponsesReasoningStatusUnion: OpenResponsesReasoningStatusUnion): string;
|
|
55
55
|
/** @internal */
|
|
56
|
-
export declare const OpenResponsesReasoningFormat$outboundSchema: z.ZodType<
|
|
56
|
+
export declare const OpenResponsesReasoningFormat$outboundSchema: z.ZodType<string, OpenResponsesReasoningFormat>;
|
|
57
57
|
/** @internal */
|
|
58
58
|
export type OpenResponsesReasoning$Outbound = {
|
|
59
59
|
type: string;
|
|
@@ -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 { ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js";
|
|
7
8
|
import { ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js";
|
|
8
9
|
export const OpenResponsesReasoningType = {
|
|
@@ -41,10 +42,7 @@ export function openResponsesReasoningStatusUnionToJSON(openResponsesReasoningSt
|
|
|
41
42
|
return JSON.stringify(OpenResponsesReasoningStatusUnion$outboundSchema.parse(openResponsesReasoningStatusUnion));
|
|
42
43
|
}
|
|
43
44
|
/** @internal */
|
|
44
|
-
export const OpenResponsesReasoningFormat$outboundSchema =
|
|
45
|
-
z.enum(OpenResponsesReasoningFormat),
|
|
46
|
-
z.string().and(z.custom()),
|
|
47
|
-
]);
|
|
45
|
+
export const OpenResponsesReasoningFormat$outboundSchema = openEnums.outboundSchema(OpenResponsesReasoningFormat);
|
|
48
46
|
/** @internal */
|
|
49
47
|
export const OpenResponsesReasoning$outboundSchema = z.object({
|
|
50
48
|
type: OpenResponsesReasoningType$outboundSchema,
|
|
@@ -275,11 +275,11 @@ export type OpenResponsesRequestToolUnion$Outbound = OpenResponsesRequestToolFun
|
|
|
275
275
|
export declare const OpenResponsesRequestToolUnion$outboundSchema: z.ZodType<OpenResponsesRequestToolUnion$Outbound, OpenResponsesRequestToolUnion>;
|
|
276
276
|
export declare function openResponsesRequestToolUnionToJSON(openResponsesRequestToolUnion: OpenResponsesRequestToolUnion): string;
|
|
277
277
|
/** @internal */
|
|
278
|
-
export declare const ServiceTier$outboundSchema: z.ZodType<
|
|
278
|
+
export declare const ServiceTier$outboundSchema: z.ZodType<string, ServiceTier>;
|
|
279
279
|
/** @internal */
|
|
280
|
-
export declare const Truncation$outboundSchema: z.ZodType<
|
|
280
|
+
export declare const Truncation$outboundSchema: z.ZodType<string, Truncation>;
|
|
281
281
|
/** @internal */
|
|
282
|
-
export declare const DataCollection$outboundSchema: z.ZodType<
|
|
282
|
+
export declare const DataCollection$outboundSchema: z.ZodType<string, DataCollection>;
|
|
283
283
|
/** @internal */
|
|
284
284
|
export type Order$Outbound = string | string;
|
|
285
285
|
/** @internal */
|
|
@@ -296,7 +296,7 @@ export type Ignore$Outbound = string | string;
|
|
|
296
296
|
export declare const Ignore$outboundSchema: z.ZodType<Ignore$Outbound, Ignore>;
|
|
297
297
|
export declare function ignoreToJSON(ignore: Ignore): string;
|
|
298
298
|
/** @internal */
|
|
299
|
-
export declare const Sort$outboundSchema: z.ZodType<
|
|
299
|
+
export declare const Sort$outboundSchema: z.ZodType<string, Sort>;
|
|
300
300
|
/** @internal */
|
|
301
301
|
export type MaxPrice$Outbound = {
|
|
302
302
|
prompt?: any | undefined;
|
|
@@ -328,7 +328,7 @@ export declare function providerToJSON(provider: Provider): string;
|
|
|
328
328
|
/** @internal */
|
|
329
329
|
export declare const IdFileParser$outboundSchema: z.ZodEnum<typeof IdFileParser>;
|
|
330
330
|
/** @internal */
|
|
331
|
-
export declare const PdfEngine$outboundSchema: z.ZodType<
|
|
331
|
+
export declare const PdfEngine$outboundSchema: z.ZodType<string, PdfEngine>;
|
|
332
332
|
/** @internal */
|
|
333
333
|
export type Pdf$Outbound = {
|
|
334
334
|
engine?: string | undefined;
|
|
@@ -348,7 +348,7 @@ export declare function pluginFileParserToJSON(pluginFileParser: PluginFileParse
|
|
|
348
348
|
/** @internal */
|
|
349
349
|
export declare const IdWeb$outboundSchema: z.ZodEnum<typeof IdWeb>;
|
|
350
350
|
/** @internal */
|
|
351
|
-
export declare const Engine$outboundSchema: z.ZodType<
|
|
351
|
+
export declare const Engine$outboundSchema: z.ZodType<string, Engine>;
|
|
352
352
|
/** @internal */
|
|
353
353
|
export type PluginWeb$Outbound = {
|
|
354
354
|
id: string;
|
|
@@ -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 { OpenAIResponsesIncludable$outboundSchema, } from "./openairesponsesincludable.js";
|
|
7
8
|
import { OpenAIResponsesPrompt$outboundSchema, } from "./openairesponsesprompt.js";
|
|
8
9
|
import { OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js";
|
|
@@ -91,22 +92,11 @@ export function openResponsesRequestToolUnionToJSON(openResponsesRequestToolUnio
|
|
|
91
92
|
return JSON.stringify(OpenResponsesRequestToolUnion$outboundSchema.parse(openResponsesRequestToolUnion));
|
|
92
93
|
}
|
|
93
94
|
/** @internal */
|
|
94
|
-
export const ServiceTier$outboundSchema =
|
|
95
|
-
.union([
|
|
96
|
-
z.enum(ServiceTier),
|
|
97
|
-
z.string().and(z.custom()),
|
|
98
|
-
]);
|
|
95
|
+
export const ServiceTier$outboundSchema = openEnums.outboundSchema(ServiceTier);
|
|
99
96
|
/** @internal */
|
|
100
|
-
export const Truncation$outboundSchema =
|
|
101
|
-
.union([
|
|
102
|
-
z.enum(Truncation),
|
|
103
|
-
z.string().and(z.custom()),
|
|
104
|
-
]);
|
|
97
|
+
export const Truncation$outboundSchema = openEnums.outboundSchema(Truncation);
|
|
105
98
|
/** @internal */
|
|
106
|
-
export const DataCollection$outboundSchema =
|
|
107
|
-
z.enum(DataCollection),
|
|
108
|
-
z.string().and(z.custom()),
|
|
109
|
-
]);
|
|
99
|
+
export const DataCollection$outboundSchema = openEnums.outboundSchema(DataCollection);
|
|
110
100
|
/** @internal */
|
|
111
101
|
export const Order$outboundSchema = z.union([
|
|
112
102
|
ProviderName$outboundSchema,
|
|
@@ -130,10 +120,8 @@ export function ignoreToJSON(ignore) {
|
|
|
130
120
|
return JSON.stringify(Ignore$outboundSchema.parse(ignore));
|
|
131
121
|
}
|
|
132
122
|
/** @internal */
|
|
133
|
-
export const Sort$outboundSchema =
|
|
134
|
-
|
|
135
|
-
z.string().and(z.custom()),
|
|
136
|
-
]);
|
|
123
|
+
export const Sort$outboundSchema = openEnums
|
|
124
|
+
.outboundSchema(Sort);
|
|
137
125
|
/** @internal */
|
|
138
126
|
export const MaxPrice$outboundSchema = z
|
|
139
127
|
.object({
|
|
@@ -176,11 +164,8 @@ export function providerToJSON(provider) {
|
|
|
176
164
|
export const IdFileParser$outboundSchema = z
|
|
177
165
|
.enum(IdFileParser);
|
|
178
166
|
/** @internal */
|
|
179
|
-
export const PdfEngine$outboundSchema =
|
|
180
|
-
.
|
|
181
|
-
z.enum(PdfEngine),
|
|
182
|
-
z.string().and(z.custom()),
|
|
183
|
-
]);
|
|
167
|
+
export const PdfEngine$outboundSchema = openEnums
|
|
168
|
+
.outboundSchema(PdfEngine);
|
|
184
169
|
/** @internal */
|
|
185
170
|
export const Pdf$outboundSchema = z.object({
|
|
186
171
|
engine: PdfEngine$outboundSchema.optional(),
|
|
@@ -204,10 +189,8 @@ export function pluginFileParserToJSON(pluginFileParser) {
|
|
|
204
189
|
/** @internal */
|
|
205
190
|
export const IdWeb$outboundSchema = z.enum(IdWeb);
|
|
206
191
|
/** @internal */
|
|
207
|
-
export const Engine$outboundSchema =
|
|
208
|
-
|
|
209
|
-
z.string().and(z.custom()),
|
|
210
|
-
]);
|
|
192
|
+
export const Engine$outboundSchema = openEnums
|
|
193
|
+
.outboundSchema(Engine);
|
|
211
194
|
/** @internal */
|
|
212
195
|
export const PluginWeb$outboundSchema = z.object({
|
|
213
196
|
id: IdWeb$outboundSchema,
|
|
@@ -18,7 +18,7 @@ export type OpenResponsesResponseText = {
|
|
|
18
18
|
verbosity?: OpenResponsesResponseTextVerbosity | null | undefined;
|
|
19
19
|
};
|
|
20
20
|
/** @internal */
|
|
21
|
-
export declare const OpenResponsesResponseTextVerbosity$outboundSchema: z.ZodType<
|
|
21
|
+
export declare const OpenResponsesResponseTextVerbosity$outboundSchema: z.ZodType<string, OpenResponsesResponseTextVerbosity>;
|
|
22
22
|
/** @internal */
|
|
23
23
|
export type OpenResponsesResponseText$Outbound = {
|
|
24
24
|
format?: ResponseFormatTextConfig$Outbound | undefined;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
5
6
|
import { ResponseFormatTextConfig$outboundSchema, } from "./responseformattextconfig.js";
|
|
6
7
|
export const OpenResponsesResponseTextVerbosity = {
|
|
7
8
|
High: "high",
|
|
@@ -9,10 +10,7 @@ export const OpenResponsesResponseTextVerbosity = {
|
|
|
9
10
|
Medium: "medium",
|
|
10
11
|
};
|
|
11
12
|
/** @internal */
|
|
12
|
-
export const OpenResponsesResponseTextVerbosity$outboundSchema =
|
|
13
|
-
z.enum(OpenResponsesResponseTextVerbosity),
|
|
14
|
-
z.string().and(z.custom()),
|
|
15
|
-
]);
|
|
13
|
+
export const OpenResponsesResponseTextVerbosity$outboundSchema = openEnums.outboundSchema(OpenResponsesResponseTextVerbosity);
|
|
16
14
|
/** @internal */
|
|
17
15
|
export const OpenResponsesResponseText$outboundSchema = z.object({
|
|
18
16
|
format: ResponseFormatTextConfig$outboundSchema.optional(),
|
|
@@ -62,7 +62,7 @@ export type CreateAuthKeysCodeResponse = {
|
|
|
62
62
|
data: CreateAuthKeysCodeData;
|
|
63
63
|
};
|
|
64
64
|
/** @internal */
|
|
65
|
-
export declare const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType<
|
|
65
|
+
export declare const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType<string, CreateAuthKeysCodeCodeChallengeMethod>;
|
|
66
66
|
/** @internal */
|
|
67
67
|
export type CreateAuthKeysCodeRequest$Outbound = {
|
|
68
68
|
callback_url: string;
|
|
@@ -4,6 +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 * as openEnums from "../../types/enums.js";
|
|
7
8
|
/**
|
|
8
9
|
* The method used to generate the code challenge
|
|
9
10
|
*/
|
|
@@ -12,10 +13,7 @@ export const CreateAuthKeysCodeCodeChallengeMethod = {
|
|
|
12
13
|
Plain: "plain",
|
|
13
14
|
};
|
|
14
15
|
/** @internal */
|
|
15
|
-
export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema =
|
|
16
|
-
z.enum(CreateAuthKeysCodeCodeChallengeMethod),
|
|
17
|
-
z.string().and(z.custom()),
|
|
18
|
-
]);
|
|
16
|
+
export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema = openEnums.outboundSchema(CreateAuthKeysCodeCodeChallengeMethod);
|
|
19
17
|
/** @internal */
|
|
20
18
|
export const CreateAuthKeysCodeRequest$outboundSchema = z.object({
|
|
21
19
|
callbackUrl: z.string(),
|
|
@@ -169,7 +169,7 @@ export type Input$Outbound = string | Array<string> | Array<number> | Array<Arra
|
|
|
169
169
|
export declare const Input$outboundSchema: z.ZodType<Input$Outbound, Input>;
|
|
170
170
|
export declare function inputToJSON(input: Input): string;
|
|
171
171
|
/** @internal */
|
|
172
|
-
export declare const DataCollection$outboundSchema: z.ZodType<
|
|
172
|
+
export declare const DataCollection$outboundSchema: z.ZodType<string, DataCollection>;
|
|
173
173
|
/** @internal */
|
|
174
174
|
export type Order$Outbound = string | string;
|
|
175
175
|
/** @internal */
|
|
@@ -186,7 +186,7 @@ export type Ignore$Outbound = string | string;
|
|
|
186
186
|
export declare const Ignore$outboundSchema: z.ZodType<Ignore$Outbound, Ignore>;
|
|
187
187
|
export declare function ignoreToJSON(ignore: Ignore): string;
|
|
188
188
|
/** @internal */
|
|
189
|
-
export declare const Sort$outboundSchema: z.ZodType<
|
|
189
|
+
export declare const Sort$outboundSchema: z.ZodType<string, Sort>;
|
|
190
190
|
/** @internal */
|
|
191
191
|
export type MaxPrice$Outbound = {
|
|
192
192
|
prompt?: any | undefined;
|
|
@@ -4,6 +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 * as openEnums from "../../types/enums.js";
|
|
7
8
|
import * as models from "../index.js";
|
|
8
9
|
/**
|
|
9
10
|
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
@@ -47,10 +48,7 @@ export function inputToJSON(input) {
|
|
|
47
48
|
return JSON.stringify(Input$outboundSchema.parse(input));
|
|
48
49
|
}
|
|
49
50
|
/** @internal */
|
|
50
|
-
export const DataCollection$outboundSchema =
|
|
51
|
-
z.enum(DataCollection),
|
|
52
|
-
z.string().and(z.custom()),
|
|
53
|
-
]);
|
|
51
|
+
export const DataCollection$outboundSchema = openEnums.outboundSchema(DataCollection);
|
|
54
52
|
/** @internal */
|
|
55
53
|
export const Order$outboundSchema = z.union([
|
|
56
54
|
models.ProviderName$outboundSchema,
|
|
@@ -74,10 +72,8 @@ export function ignoreToJSON(ignore) {
|
|
|
74
72
|
return JSON.stringify(Ignore$outboundSchema.parse(ignore));
|
|
75
73
|
}
|
|
76
74
|
/** @internal */
|
|
77
|
-
export const Sort$outboundSchema =
|
|
78
|
-
|
|
79
|
-
z.string().and(z.custom()),
|
|
80
|
-
]);
|
|
75
|
+
export const Sort$outboundSchema = openEnums
|
|
76
|
+
.outboundSchema(Sort);
|
|
81
77
|
/** @internal */
|
|
82
78
|
export const MaxPrice$outboundSchema = z
|
|
83
79
|
.object({
|
|
@@ -32,7 +32,7 @@ export type CreateKeysRequest = {
|
|
|
32
32
|
*/
|
|
33
33
|
includeByokInLimit?: boolean | undefined;
|
|
34
34
|
/**
|
|
35
|
-
* Optional ISO 8601 timestamp
|
|
35
|
+
* Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
|
|
36
36
|
*/
|
|
37
37
|
expiresAt?: Date | null | undefined;
|
|
38
38
|
};
|
|
@@ -131,7 +131,7 @@ export type CreateKeysResponse = {
|
|
|
131
131
|
key: string;
|
|
132
132
|
};
|
|
133
133
|
/** @internal */
|
|
134
|
-
export declare const CreateKeysLimitReset$outboundSchema: z.ZodType<
|
|
134
|
+
export declare const CreateKeysLimitReset$outboundSchema: z.ZodType<string, CreateKeysLimitReset>;
|
|
135
135
|
/** @internal */
|
|
136
136
|
export type CreateKeysRequest$Outbound = {
|
|
137
137
|
name: string;
|
|
@@ -4,6 +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 * as openEnums from "../../types/enums.js";
|
|
7
8
|
/**
|
|
8
9
|
* Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
9
10
|
*/
|
|
@@ -13,10 +14,7 @@ export const CreateKeysLimitReset = {
|
|
|
13
14
|
Monthly: "monthly",
|
|
14
15
|
};
|
|
15
16
|
/** @internal */
|
|
16
|
-
export const CreateKeysLimitReset$outboundSchema =
|
|
17
|
-
z.enum(CreateKeysLimitReset),
|
|
18
|
-
z.string().and(z.custom()),
|
|
19
|
-
]);
|
|
17
|
+
export const CreateKeysLimitReset$outboundSchema = openEnums.outboundSchema(CreateKeysLimitReset);
|
|
20
18
|
/** @internal */
|
|
21
19
|
export const CreateKeysRequest$outboundSchema = z.object({
|
|
22
20
|
name: z.string(),
|
|
@@ -41,7 +41,7 @@ export type ExchangeAuthCodeForAPIKeyResponse = {
|
|
|
41
41
|
userId: string | null;
|
|
42
42
|
};
|
|
43
43
|
/** @internal */
|
|
44
|
-
export declare const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: z.ZodType<
|
|
44
|
+
export declare const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: z.ZodType<string, ExchangeAuthCodeForAPIKeyCodeChallengeMethod>;
|
|
45
45
|
/** @internal */
|
|
46
46
|
export type ExchangeAuthCodeForAPIKeyRequest$Outbound = {
|
|
47
47
|
code: string;
|
|
@@ -4,6 +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 * as openEnums from "../../types/enums.js";
|
|
7
8
|
/**
|
|
8
9
|
* The method used to generate the code challenge
|
|
9
10
|
*/
|
|
@@ -12,10 +13,8 @@ export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod = {
|
|
|
12
13
|
Plain: "plain",
|
|
13
14
|
};
|
|
14
15
|
/** @internal */
|
|
15
|
-
export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema =
|
|
16
|
-
|
|
17
|
-
z.string().and(z.custom()),
|
|
18
|
-
]);
|
|
16
|
+
export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema = openEnums
|
|
17
|
+
.outboundSchema(ExchangeAuthCodeForAPIKeyCodeChallengeMethod);
|
|
19
18
|
/** @internal */
|
|
20
19
|
export const ExchangeAuthCodeForAPIKeyRequest$outboundSchema = z.object({
|
|
21
20
|
code: z.string(),
|
|
@@ -84,6 +84,10 @@ export type GetCurrentKeyData = {
|
|
|
84
84
|
* Whether to include external BYOK usage in the credit limit
|
|
85
85
|
*/
|
|
86
86
|
includeByokInLimit: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* ISO 8601 UTC timestamp when the API key expires, or null if no expiration
|
|
89
|
+
*/
|
|
90
|
+
expiresAt?: Date | null | undefined;
|
|
87
91
|
/**
|
|
88
92
|
* Legacy rate limit information about a key. Will always return -1.
|
|
89
93
|
*
|
|
@@ -30,6 +30,7 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
30
30
|
limit_remaining: z.nullable(z.number()),
|
|
31
31
|
limit_reset: z.nullable(z.string()),
|
|
32
32
|
include_byok_in_limit: z.boolean(),
|
|
33
|
+
expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
33
34
|
rate_limit: z.lazy(() => RateLimit$inboundSchema),
|
|
34
35
|
}).transform((v) => {
|
|
35
36
|
return remap$(v, {
|
|
@@ -45,6 +46,7 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
45
46
|
"limit_remaining": "limitRemaining",
|
|
46
47
|
"limit_reset": "limitReset",
|
|
47
48
|
"include_byok_in_limit": "includeByokInLimit",
|
|
49
|
+
"expires_at": "expiresAt",
|
|
48
50
|
"rate_limit": "rateLimit",
|
|
49
51
|
});
|
|
50
52
|
});
|
|
@@ -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
|
/**
|
|
9
9
|
* Type of API used for the generation
|
|
10
10
|
*/
|
|
@@ -20,11 +20,8 @@ export function getGenerationRequestToJSON(getGenerationRequest) {
|
|
|
20
20
|
return JSON.stringify(GetGenerationRequest$outboundSchema.parse(getGenerationRequest));
|
|
21
21
|
}
|
|
22
22
|
/** @internal */
|
|
23
|
-
export const ApiType$inboundSchema =
|
|
24
|
-
.
|
|
25
|
-
z.enum(ApiType),
|
|
26
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
27
|
-
]);
|
|
23
|
+
export const ApiType$inboundSchema = openEnums
|
|
24
|
+
.inboundSchema(ApiType);
|
|
28
25
|
/** @internal */
|
|
29
26
|
export const GetGenerationData$inboundSchema = z.object({
|
|
30
27
|
id: z.string(),
|
|
@@ -137,7 +137,7 @@ export type GetParametersSecurity$Outbound = {
|
|
|
137
137
|
export declare const GetParametersSecurity$outboundSchema: z.ZodType<GetParametersSecurity$Outbound, GetParametersSecurity>;
|
|
138
138
|
export declare function getParametersSecurityToJSON(getParametersSecurity: GetParametersSecurity): string;
|
|
139
139
|
/** @internal */
|
|
140
|
-
export declare const GetParametersProvider$outboundSchema: z.ZodType<
|
|
140
|
+
export declare const GetParametersProvider$outboundSchema: z.ZodType<string, GetParametersProvider>;
|
|
141
141
|
/** @internal */
|
|
142
142
|
export type GetParametersRequest$Outbound = {
|
|
143
143
|
author: 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
|
export const GetParametersProvider = {
|
|
9
9
|
Ai21: "AI21",
|
|
10
10
|
AionLabs: "AionLabs",
|
|
@@ -108,10 +108,7 @@ export function getParametersSecurityToJSON(getParametersSecurity) {
|
|
|
108
108
|
return JSON.stringify(GetParametersSecurity$outboundSchema.parse(getParametersSecurity));
|
|
109
109
|
}
|
|
110
110
|
/** @internal */
|
|
111
|
-
export const GetParametersProvider$outboundSchema =
|
|
112
|
-
z.enum(GetParametersProvider),
|
|
113
|
-
z.string().and(z.custom()),
|
|
114
|
-
]);
|
|
111
|
+
export const GetParametersProvider$outboundSchema = openEnums.outboundSchema(GetParametersProvider);
|
|
115
112
|
/** @internal */
|
|
116
113
|
export const GetParametersRequest$outboundSchema = z.object({
|
|
117
114
|
author: z.string(),
|
|
@@ -122,11 +119,7 @@ export function getParametersRequestToJSON(getParametersRequest) {
|
|
|
122
119
|
return JSON.stringify(GetParametersRequest$outboundSchema.parse(getParametersRequest));
|
|
123
120
|
}
|
|
124
121
|
/** @internal */
|
|
125
|
-
export const SupportedParameter$inboundSchema =
|
|
126
|
-
.union([
|
|
127
|
-
z.enum(SupportedParameter),
|
|
128
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
129
|
-
]);
|
|
122
|
+
export const SupportedParameter$inboundSchema = openEnums.inboundSchema(SupportedParameter);
|
|
130
123
|
/** @internal */
|
|
131
124
|
export const GetParametersData$inboundSchema = z.object({
|
|
132
125
|
model: z.string(),
|
|
@@ -134,7 +134,7 @@ export type UpdateKeysResponse = {
|
|
|
134
134
|
data: UpdateKeysData;
|
|
135
135
|
};
|
|
136
136
|
/** @internal */
|
|
137
|
-
export declare const UpdateKeysLimitReset$outboundSchema: z.ZodType<
|
|
137
|
+
export declare const UpdateKeysLimitReset$outboundSchema: z.ZodType<string, UpdateKeysLimitReset>;
|
|
138
138
|
/** @internal */
|
|
139
139
|
export type UpdateKeysRequestBody$Outbound = {
|
|
140
140
|
name?: string | undefined;
|
|
@@ -4,6 +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 * as openEnums from "../../types/enums.js";
|
|
7
8
|
/**
|
|
8
9
|
* New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
|
|
9
10
|
*/
|
|
@@ -13,10 +14,7 @@ export const UpdateKeysLimitReset = {
|
|
|
13
14
|
Monthly: "monthly",
|
|
14
15
|
};
|
|
15
16
|
/** @internal */
|
|
16
|
-
export const UpdateKeysLimitReset$outboundSchema =
|
|
17
|
-
z.enum(UpdateKeysLimitReset),
|
|
18
|
-
z.string().and(z.custom()),
|
|
19
|
-
]);
|
|
17
|
+
export const UpdateKeysLimitReset$outboundSchema = openEnums.outboundSchema(UpdateKeysLimitReset);
|
|
20
18
|
/** @internal */
|
|
21
19
|
export const UpdateKeysRequestBody$outboundSchema = z.object({
|
|
22
20
|
name: z.string().optional(),
|
|
@@ -1,17 +1,12 @@
|
|
|
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 OutputModality = {
|
|
7
6
|
Text: "text",
|
|
8
7
|
Image: "image",
|
|
9
8
|
Embeddings: "embeddings",
|
|
10
9
|
};
|
|
11
10
|
/** @internal */
|
|
12
|
-
export const OutputModality$inboundSchema =
|
|
13
|
-
.union([
|
|
14
|
-
z.enum(OutputModality),
|
|
15
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
16
|
-
]);
|
|
11
|
+
export const OutputModality$inboundSchema = openEnums.inboundSchema(OutputModality);
|
|
17
12
|
//# sourceMappingURL=outputmodality.js.map
|
package/esm/models/parameter.js
CHANGED
|
@@ -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 Parameter = {
|
|
7
6
|
Temperature: "temperature",
|
|
8
7
|
TopP: "top_p",
|
|
@@ -29,9 +28,6 @@ export const Parameter = {
|
|
|
29
28
|
Verbosity: "verbosity",
|
|
30
29
|
};
|
|
31
30
|
/** @internal */
|
|
32
|
-
export const Parameter$inboundSchema =
|
|
33
|
-
.
|
|
34
|
-
z.enum(Parameter),
|
|
35
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
36
|
-
]);
|
|
31
|
+
export const Parameter$inboundSchema = openEnums
|
|
32
|
+
.inboundSchema(Parameter);
|
|
37
33
|
//# sourceMappingURL=parameter.js.map
|
|
@@ -92,5 +92,5 @@ export type ProviderName = OpenEnum<typeof ProviderName>;
|
|
|
92
92
|
/** @internal */
|
|
93
93
|
export declare const ProviderName$inboundSchema: z.ZodType<ProviderName, unknown>;
|
|
94
94
|
/** @internal */
|
|
95
|
-
export declare const ProviderName$outboundSchema: z.ZodType<
|
|
95
|
+
export declare const ProviderName$outboundSchema: z.ZodType<string, ProviderName>;
|
|
96
96
|
//# sourceMappingURL=providername.d.ts.map
|