@openrouter/sdk 0.13.7 → 0.13.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/README.md +3 -9
- package/esm/funcs/benchmarksGetBenchmarks.d.ts +19 -0
- package/esm/funcs/{datasetsGetBenchmarksDesignArena.js → benchmarksGetBenchmarks.js} +11 -10
- package/esm/funcs/classificationsGetTaskClassifications.d.ts +37 -0
- package/esm/funcs/classificationsGetTaskClassifications.js +119 -0
- package/esm/funcs/imagesGenerate.d.ts +30 -0
- package/esm/funcs/imagesGenerate.js +95 -0
- package/esm/funcs/imagesListModelEndpoints.d.ts +19 -0
- package/esm/funcs/imagesListModelEndpoints.js +107 -0
- package/esm/funcs/{datasetsGetBenchmarksDesignArena.d.ts → imagesListModels.d.ts} +4 -4
- package/esm/funcs/{datasetsGetBenchmarksArtificialAnalysis.js → imagesListModels.js} +10 -15
- package/esm/funcs/workspacesDeleteBudget.d.ts +19 -0
- package/esm/funcs/workspacesDeleteBudget.js +107 -0
- package/esm/funcs/workspacesListBudgets.d.ts +19 -0
- package/esm/funcs/workspacesListBudgets.js +103 -0
- package/esm/funcs/workspacesSetBudget.d.ts +19 -0
- package/esm/funcs/workspacesSetBudget.js +110 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/advisorreasoning.d.ts +1 -0
- package/esm/models/advisorreasoning.js +1 -0
- package/esm/models/anthropicadvisormessageusageiteration.d.ts +24 -0
- package/esm/models/anthropicadvisormessageusageiteration.js +36 -0
- package/esm/models/anthropiccompactionusageiteration.d.ts +23 -0
- package/esm/models/anthropiccompactionusageiteration.js +35 -0
- package/esm/models/anthropicdocumentblockparam.d.ts +5 -4
- package/esm/models/anthropicdocumentblockparam.js +3 -0
- package/esm/models/anthropicfiledocumentsource.d.ts +14 -0
- package/esm/models/anthropicfiledocumentsource.js +19 -0
- package/esm/models/anthropiciterationcachecreation.d.ts +11 -0
- package/esm/models/anthropiciterationcachecreation.js +21 -0
- package/esm/models/anthropicmessageusageiteration.d.ts +24 -0
- package/esm/models/anthropicmessageusageiteration.js +36 -0
- package/esm/models/anthropicspeed.d.ts +10 -0
- package/esm/models/anthropicspeed.js +12 -0
- package/esm/models/anthropicunknownusageiteration.d.ts +16 -0
- package/esm/models/anthropicunknownusageiteration.js +30 -0
- package/esm/models/anthropicusageiteration.d.ts +12 -0
- package/esm/models/anthropicusageiteration.js +21 -0
- package/esm/models/apierrortype.d.ts +41 -0
- package/esm/models/apierrortype.js +40 -0
- package/esm/models/booleancapability.d.ts +13 -0
- package/esm/models/booleancapability.js +14 -0
- package/esm/models/byokproviderslug.d.ts +3 -0
- package/esm/models/byokproviderslug.js +3 -0
- package/esm/models/capabilitydescriptor.d.ts +15 -0
- package/esm/models/capabilitydescriptor.js +19 -0
- package/esm/models/chatrequest.d.ts +2 -0
- package/esm/models/chatrequest.js +2 -0
- package/esm/models/chatstreamchunk.d.ts +25 -4
- package/esm/models/chatstreamchunk.js +19 -4
- package/esm/models/chatusage.d.ts +32 -8
- package/esm/models/chatusage.js +25 -8
- package/esm/models/chatwebsearchshorthand.d.ts +1 -1
- package/esm/models/contentpartimage.d.ts +9 -2
- package/esm/models/contentpartimage.js +6 -1
- package/esm/models/debugevent.d.ts +42 -0
- package/esm/models/debugevent.js +58 -0
- package/esm/models/deleteworkspacebudgetresponse.d.ts +13 -0
- package/esm/models/deleteworkspacebudgetresponse.js +14 -0
- package/esm/models/enumcapability.d.ts +14 -0
- package/esm/models/enumcapability.js +15 -0
- package/esm/models/fusionplugin.d.ts +1 -0
- package/esm/models/fusionplugin.js +1 -0
- package/esm/models/fusionservertoolconfig.d.ts +8 -1
- package/esm/models/fusionservertoolconfig.js +4 -0
- package/esm/models/imageendpoint.d.ts +41 -0
- package/esm/models/imageendpoint.js +33 -0
- package/esm/models/imagegencompletedevent.d.ts +29 -0
- package/esm/models/imagegencompletedevent.js +23 -0
- package/esm/models/imagegenerationrequest.d.ts +908 -0
- package/esm/models/imagegenerationrequest.js +266 -0
- package/esm/models/imagegenerationresponse.d.ts +34 -0
- package/esm/models/imagegenerationresponse.js +29 -0
- package/esm/models/imagegenerationservertool.d.ts +15 -15
- package/esm/models/imagegenerationservertool.js +15 -17
- package/esm/models/imagegenerationusage.d.ts +119 -0
- package/esm/models/imagegenerationusage.js +93 -0
- package/esm/models/imagegenpartialimageevent.d.ts +24 -0
- package/esm/models/imagegenpartialimageevent.js +22 -0
- package/esm/models/imagegenstreamerrorevent.d.ts +44 -0
- package/esm/models/imagegenstreamerrorevent.js +25 -0
- package/esm/models/imagemodelarchitecture.d.ts +19 -0
- package/esm/models/imagemodelarchitecture.js +23 -0
- package/esm/models/imagemodelendpointsresponse.d.ts +18 -0
- package/esm/models/imagemodelendpointsresponse.js +16 -0
- package/esm/models/imagemodellistitem.d.ts +42 -0
- package/esm/models/imagemodellistitem.js +29 -0
- package/esm/models/imagemodelslistresponse.d.ts +14 -0
- package/esm/models/imagemodelslistresponse.js +15 -0
- package/esm/models/imageoutputmodality.d.ts +16 -0
- package/esm/models/imageoutputmodality.js +18 -0
- package/esm/models/imagepricingentry.d.ts +35 -0
- package/esm/models/imagepricingentry.js +41 -0
- package/esm/models/imagestreamingresponse.d.ts +18 -0
- package/esm/models/imagestreamingresponse.js +43 -0
- package/esm/models/index.d.ts +44 -7
- package/esm/models/index.js +44 -7
- package/esm/models/inputreference.d.ts +6 -2
- package/esm/models/inputreference.js +1 -1
- package/esm/models/legacywebsearchservertool.d.ts +1 -1
- package/esm/models/listworkspacebudgetsresponse.d.ts +14 -0
- package/esm/models/listworkspacebudgetsresponse.js +15 -0
- package/esm/models/messagesrequest.d.ts +6 -6
- package/esm/models/messagesrequest.js +4 -5
- package/esm/models/model.d.ts +5 -0
- package/esm/models/model.js +2 -0
- package/esm/models/modelreasoning.d.ts +49 -0
- package/esm/models/modelreasoning.js +42 -0
- package/esm/models/observabilityarizedestination.d.ts +3 -0
- package/esm/models/openresponsesresult.d.ts +5 -0
- package/esm/models/openresponsesresult.js +3 -0
- package/esm/models/operations/createembeddings.d.ts +19 -0
- package/esm/models/operations/createembeddings.js +20 -0
- package/esm/models/operations/createimages.d.ts +63 -0
- package/esm/models/operations/createimages.js +44 -0
- package/esm/models/operations/{getbenchmarksartificialanalysis.d.ts → deleteworkspacebudget.d.ts} +15 -9
- package/esm/models/operations/deleteworkspacebudget.js +23 -0
- package/esm/models/operations/getbenchmarks.d.ts +120 -0
- package/esm/models/operations/getbenchmarks.js +60 -0
- package/esm/models/operations/getmodels.d.ts +5 -3
- package/esm/models/operations/getmodels.js +3 -1
- package/esm/models/operations/{getbenchmarksdesignarena.d.ts → gettaskclassifications.d.ts} +16 -28
- package/esm/models/operations/gettaskclassifications.js +29 -0
- package/esm/models/operations/index.d.ts +8 -2
- package/esm/models/operations/index.js +8 -2
- package/esm/models/operations/listbyokkeys.d.ts +3 -0
- package/esm/models/operations/listbyokkeys.js +3 -0
- package/esm/models/operations/listimagemodelendpoints.d.ts +63 -0
- package/esm/models/operations/listimagemodelendpoints.js +22 -0
- package/esm/models/operations/listimagemodels.d.ts +53 -0
- package/esm/models/operations/listimagemodels.js +20 -0
- package/esm/models/operations/listworkspacebudgets.d.ts +58 -0
- package/esm/models/operations/listworkspacebudgets.js +21 -0
- package/esm/models/operations/queryanalytics.d.ts +7 -3
- package/esm/models/operations/queryanalytics.js +1 -0
- package/esm/models/operations/upsertworkspacebudget.d.ts +66 -0
- package/esm/models/operations/upsertworkspacebudget.js +25 -0
- package/esm/models/preview20250311websearchservertool.d.ts +1 -1
- package/esm/models/previewwebsearchservertool.d.ts +1 -1
- package/esm/models/providername.d.ts +3 -0
- package/esm/models/providername.js +3 -0
- package/esm/models/provideroptions.d.ts +19 -1
- package/esm/models/provideroptions.js +5 -0
- package/esm/models/providerresponse.d.ts +3 -0
- package/esm/models/providerresponse.js +3 -0
- package/esm/models/rangecapability.d.ts +15 -0
- package/esm/models/rangecapability.js +16 -0
- package/esm/models/reasoningeffort.d.ts +1 -0
- package/esm/models/reasoningeffort.js +1 -0
- package/esm/models/responsesrequest.d.ts +6 -0
- package/esm/models/responsesrequest.js +2 -0
- package/esm/models/speechrequest.d.ts +1 -1
- package/esm/models/streamevents.d.ts +2 -1
- package/esm/models/streamevents.js +2 -0
- package/esm/models/sttrequest.d.ts +1 -1
- package/esm/models/subagentreasoning.d.ts +1 -0
- package/esm/models/subagentreasoning.js +1 -0
- package/esm/models/taskclassificationitem.d.ts +42 -0
- package/esm/models/taskclassificationitem.js +32 -0
- package/esm/models/taskclassificationmacrocategory.d.ts +25 -0
- package/esm/models/taskclassificationmacrocategory.js +23 -0
- package/esm/models/taskclassificationmodel.d.ts +21 -0
- package/esm/models/taskclassificationmodel.js +22 -0
- package/esm/models/taskclassificationresponse.d.ts +33 -0
- package/esm/models/taskclassificationresponse.js +33 -0
- package/esm/models/{benchmarkpricing.d.ts → unifiedbenchmarkpricing.d.ts} +4 -4
- package/esm/models/unifiedbenchmarkpricing.js +15 -0
- package/esm/models/{benchmarksaaitem.d.ts → unifiedbenchmarksaaitem.d.ts} +14 -10
- package/esm/models/unifiedbenchmarksaaitem.js +30 -0
- package/esm/models/{benchmarksdaitem.d.ts → unifiedbenchmarksdaitem.d.ts} +11 -7
- package/esm/models/{benchmarksdaitem.js → unifiedbenchmarksdaitem.js} +8 -7
- package/esm/models/unifiedbenchmarksmeta.d.ts +63 -0
- package/esm/models/unifiedbenchmarksmeta.js +46 -0
- package/esm/models/unifiedbenchmarksresponse.d.ts +19 -0
- package/esm/models/unifiedbenchmarksresponse.js +30 -0
- package/esm/models/upsertworkspacebudgetrequest.d.ts +15 -0
- package/esm/models/upsertworkspacebudgetrequest.js +18 -0
- package/esm/models/upsertworkspacebudgetresponse.d.ts +11 -0
- package/esm/models/upsertworkspacebudgetresponse.js +15 -0
- package/esm/models/videogenerationrequest.d.ts +33 -15
- package/esm/models/videogenerationrequest.js +16 -11
- package/esm/models/websearchconfig.d.ts +1 -1
- package/esm/models/websearchservertool.d.ts +1 -1
- package/esm/models/websearchservertoolconfig.d.ts +1 -1
- package/esm/models/workspacebudget.d.ts +48 -0
- package/esm/models/workspacebudget.js +39 -0
- package/esm/models/workspacebudgetinterval.d.ts +18 -0
- package/esm/models/workspacebudgetinterval.js +17 -0
- package/esm/sdk/benchmarks.d.ts +13 -0
- package/esm/sdk/benchmarks.js +19 -0
- package/esm/sdk/classifications.d.ts +31 -0
- package/esm/sdk/classifications.js +37 -0
- package/esm/sdk/datasets.d.ts +0 -14
- package/esm/sdk/datasets.js +0 -20
- package/esm/sdk/images.d.ts +38 -0
- package/esm/sdk/images.js +33 -0
- package/esm/sdk/sdk.d.ts +9 -0
- package/esm/sdk/sdk.js +12 -0
- package/esm/sdk/workspaces.d.ts +21 -0
- package/esm/sdk/workspaces.js +30 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
- package/esm/funcs/datasetsGetBenchmarksArtificialAnalysis.d.ts +0 -19
- package/esm/models/benchmarkpricing.js +0 -15
- package/esm/models/benchmarksaaitem.js +0 -29
- package/esm/models/benchmarksaameta.d.ts +0 -70
- package/esm/models/benchmarksaameta.js +0 -50
- package/esm/models/benchmarksaaresponse.d.ts +0 -13
- package/esm/models/benchmarksaaresponse.js +0 -17
- package/esm/models/benchmarksdameta.d.ts +0 -98
- package/esm/models/benchmarksdameta.js +0 -62
- package/esm/models/benchmarksdaresponse.d.ts +0 -13
- package/esm/models/benchmarksdaresponse.js +0 -17
- package/esm/models/operations/getbenchmarksartificialanalysis.js +0 -22
- package/esm/models/operations/getbenchmarksdesignarena.js +0 -36
|
@@ -6,6 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
|
+
import { ApiErrorType$inboundSchema } from "./apierrortype.js";
|
|
9
10
|
import { ApplyPatchServerTool$inboundSchema, } from "./applypatchservertool.js";
|
|
10
11
|
import { BaseInputsUnion$inboundSchema, } from "./baseinputsunion.js";
|
|
11
12
|
import { BaseReasoningConfig$inboundSchema, } from "./basereasoningconfig.js";
|
|
@@ -118,6 +119,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
118
119
|
truncation: z.nullable(Truncation$inboundSchema).optional(),
|
|
119
120
|
usage: z.nullable(Usage$inboundSchema).optional(),
|
|
120
121
|
user: z.nullable(z.string()).optional(),
|
|
122
|
+
error_type: ApiErrorType$inboundSchema.optional(),
|
|
121
123
|
openrouter_metadata: OpenRouterMetadata$inboundSchema.optional(),
|
|
122
124
|
}).transform((v) => {
|
|
123
125
|
return remap$(v, {
|
|
@@ -137,6 +139,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
|
|
|
137
139
|
"tool_choice": "toolChoice",
|
|
138
140
|
"top_logprobs": "topLogprobs",
|
|
139
141
|
"top_p": "topP",
|
|
142
|
+
"error_type": "errorType",
|
|
140
143
|
"openrouter_metadata": "openrouterMetadata",
|
|
141
144
|
});
|
|
142
145
|
});
|
|
@@ -132,6 +132,14 @@ export declare const ObjectT: {
|
|
|
132
132
|
readonly List: "list";
|
|
133
133
|
};
|
|
134
134
|
export type ObjectT = ClosedEnum<typeof ObjectT>;
|
|
135
|
+
/**
|
|
136
|
+
* Breakdown of upstream inference costs
|
|
137
|
+
*/
|
|
138
|
+
export type CostDetails = {
|
|
139
|
+
upstreamInferenceCompletionsCost: number;
|
|
140
|
+
upstreamInferenceCost?: number | null | undefined;
|
|
141
|
+
upstreamInferencePromptCost: number;
|
|
142
|
+
};
|
|
135
143
|
/**
|
|
136
144
|
* Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included.
|
|
137
145
|
*/
|
|
@@ -165,6 +173,14 @@ export type CreateEmbeddingsUsage = {
|
|
|
165
173
|
* Cost of the request in credits
|
|
166
174
|
*/
|
|
167
175
|
cost?: number | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* Breakdown of upstream inference costs
|
|
178
|
+
*/
|
|
179
|
+
costDetails?: CostDetails | null | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* Whether a request was made using a Bring Your Own Key configuration
|
|
182
|
+
*/
|
|
183
|
+
isByok?: boolean | undefined;
|
|
168
184
|
/**
|
|
169
185
|
* Number of tokens in the input
|
|
170
186
|
*/
|
|
@@ -277,6 +293,9 @@ export declare function createEmbeddingsDataFromJSON(jsonString: string): SafePa
|
|
|
277
293
|
/** @internal */
|
|
278
294
|
export declare const ObjectT$inboundSchema: z.ZodEnum<typeof ObjectT>;
|
|
279
295
|
/** @internal */
|
|
296
|
+
export declare const CostDetails$inboundSchema: z.ZodType<CostDetails, unknown>;
|
|
297
|
+
export declare function costDetailsFromJSON(jsonString: string): SafeParseResult<CostDetails, SDKValidationError>;
|
|
298
|
+
/** @internal */
|
|
280
299
|
export declare const PromptTokensDetails$inboundSchema: z.ZodType<PromptTokensDetails, unknown>;
|
|
281
300
|
export declare function promptTokensDetailsFromJSON(jsonString: string): SafeParseResult<PromptTokensDetails, SDKValidationError>;
|
|
282
301
|
/** @internal */
|
|
@@ -147,6 +147,22 @@ export function createEmbeddingsDataFromJSON(jsonString) {
|
|
|
147
147
|
/** @internal */
|
|
148
148
|
export const ObjectT$inboundSchema = z.enum(ObjectT);
|
|
149
149
|
/** @internal */
|
|
150
|
+
export const CostDetails$inboundSchema = z
|
|
151
|
+
.object({
|
|
152
|
+
upstream_inference_completions_cost: z.number(),
|
|
153
|
+
upstream_inference_cost: z.nullable(z.number()).optional(),
|
|
154
|
+
upstream_inference_prompt_cost: z.number(),
|
|
155
|
+
}).transform((v) => {
|
|
156
|
+
return remap$(v, {
|
|
157
|
+
"upstream_inference_completions_cost": "upstreamInferenceCompletionsCost",
|
|
158
|
+
"upstream_inference_cost": "upstreamInferenceCost",
|
|
159
|
+
"upstream_inference_prompt_cost": "upstreamInferencePromptCost",
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
export function costDetailsFromJSON(jsonString) {
|
|
163
|
+
return safeParse(jsonString, (x) => CostDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CostDetails' from JSON`);
|
|
164
|
+
}
|
|
165
|
+
/** @internal */
|
|
150
166
|
export const PromptTokensDetails$inboundSchema = z.object({
|
|
151
167
|
audio_tokens: z.int().optional(),
|
|
152
168
|
file_tokens: z.int().optional(),
|
|
@@ -168,12 +184,16 @@ export function promptTokensDetailsFromJSON(jsonString) {
|
|
|
168
184
|
/** @internal */
|
|
169
185
|
export const CreateEmbeddingsUsage$inboundSchema = z.object({
|
|
170
186
|
cost: z.number().optional(),
|
|
187
|
+
cost_details: z.nullable(z.lazy(() => CostDetails$inboundSchema)).optional(),
|
|
188
|
+
is_byok: z.boolean().optional(),
|
|
171
189
|
prompt_tokens: z.int(),
|
|
172
190
|
prompt_tokens_details: z.lazy(() => PromptTokensDetails$inboundSchema)
|
|
173
191
|
.optional(),
|
|
174
192
|
total_tokens: z.int(),
|
|
175
193
|
}).transform((v) => {
|
|
176
194
|
return remap$(v, {
|
|
195
|
+
"cost_details": "costDetails",
|
|
196
|
+
"is_byok": "isByok",
|
|
177
197
|
"prompt_tokens": "promptTokens",
|
|
178
198
|
"prompt_tokens_details": "promptTokensDetails",
|
|
179
199
|
"total_tokens": "totalTokens",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { EventStream } from "../../lib/event-streams.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
import * as models from "../index.js";
|
|
6
|
+
export type CreateImagesGlobals = {
|
|
7
|
+
/**
|
|
8
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* This is used to track API usage per application.
|
|
12
|
+
*/
|
|
13
|
+
httpReferer?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
*/
|
|
19
|
+
appTitle?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
*/
|
|
25
|
+
appCategories?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
export type CreateImagesRequest = {
|
|
28
|
+
/**
|
|
29
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This is used to track API usage per application.
|
|
33
|
+
*/
|
|
34
|
+
httpReferer?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
*/
|
|
40
|
+
appTitle?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
*/
|
|
46
|
+
appCategories?: string | undefined;
|
|
47
|
+
imageGenerationRequest: models.ImageGenerationRequest;
|
|
48
|
+
};
|
|
49
|
+
export type CreateImagesResponse = models.ImageGenerationResponse | EventStream<models.ImageStreamingResponseData>;
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type CreateImagesRequest$Outbound = {
|
|
52
|
+
"HTTP-Referer"?: string | undefined;
|
|
53
|
+
appTitle?: string | undefined;
|
|
54
|
+
appCategories?: string | undefined;
|
|
55
|
+
ImageGenerationRequest: models.ImageGenerationRequest$Outbound;
|
|
56
|
+
};
|
|
57
|
+
/** @internal */
|
|
58
|
+
export declare const CreateImagesRequest$outboundSchema: z.ZodType<CreateImagesRequest$Outbound, CreateImagesRequest>;
|
|
59
|
+
export declare function createImagesRequestToJSON(createImagesRequest: CreateImagesRequest): string;
|
|
60
|
+
/** @internal */
|
|
61
|
+
export declare const CreateImagesResponse$inboundSchema: z.ZodType<CreateImagesResponse, unknown>;
|
|
62
|
+
export declare function createImagesResponseFromJSON(jsonString: string): SafeParseResult<CreateImagesResponse, SDKValidationError>;
|
|
63
|
+
//# sourceMappingURL=createimages.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0a478467f700
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { EventStream } from "../../lib/event-streams.js";
|
|
7
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import * as models from "../index.js";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const CreateImagesRequest$outboundSchema = z.object({
|
|
12
|
+
httpReferer: z.string().optional(),
|
|
13
|
+
appTitle: z.string().optional(),
|
|
14
|
+
appCategories: z.string().optional(),
|
|
15
|
+
imageGenerationRequest: models.ImageGenerationRequest$outboundSchema,
|
|
16
|
+
}).transform((v) => {
|
|
17
|
+
return remap$(v, {
|
|
18
|
+
httpReferer: "HTTP-Referer",
|
|
19
|
+
imageGenerationRequest: "ImageGenerationRequest",
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
export function createImagesRequestToJSON(createImagesRequest) {
|
|
23
|
+
return JSON.stringify(CreateImagesRequest$outboundSchema.parse(createImagesRequest));
|
|
24
|
+
}
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const CreateImagesResponse$inboundSchema = z.union([
|
|
27
|
+
models.ImageGenerationResponse$inboundSchema,
|
|
28
|
+
z.custom(x => x instanceof ReadableStream)
|
|
29
|
+
.transform(stream => {
|
|
30
|
+
return new EventStream(stream, rawEvent => {
|
|
31
|
+
if (rawEvent.data === "[DONE]")
|
|
32
|
+
return { done: true, value: undefined };
|
|
33
|
+
return {
|
|
34
|
+
done: false,
|
|
35
|
+
value: models.ImageStreamingResponse$inboundSchema.parse(rawEvent)
|
|
36
|
+
?.data,
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
41
|
+
export function createImagesResponseFromJSON(jsonString) {
|
|
42
|
+
return safeParse(jsonString, (x) => CreateImagesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateImagesResponse' from JSON`);
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=createimages.js.map
|
package/esm/models/operations/{getbenchmarksartificialanalysis.d.ts → deleteworkspacebudget.d.ts}
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
export type DeleteWorkspaceBudgetGlobals = {
|
|
3
4
|
/**
|
|
4
5
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
6
|
*
|
|
@@ -20,7 +21,7 @@ export type GetBenchmarksArtificialAnalysisGlobals = {
|
|
|
20
21
|
*/
|
|
21
22
|
appCategories?: string | undefined;
|
|
22
23
|
};
|
|
23
|
-
export type
|
|
24
|
+
export type DeleteWorkspaceBudgetRequest = {
|
|
24
25
|
/**
|
|
25
26
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
27
|
*
|
|
@@ -41,18 +42,23 @@ export type GetBenchmarksArtificialAnalysisRequest = {
|
|
|
41
42
|
*/
|
|
42
43
|
appCategories?: string | undefined;
|
|
43
44
|
/**
|
|
44
|
-
*
|
|
45
|
+
* The workspace ID (UUID) or slug
|
|
45
46
|
*/
|
|
46
|
-
|
|
47
|
+
id: string;
|
|
48
|
+
/**
|
|
49
|
+
* Budget reset interval. Use "lifetime" for a one-time budget that never resets.
|
|
50
|
+
*/
|
|
51
|
+
interval: models.WorkspaceBudgetInterval;
|
|
47
52
|
};
|
|
48
53
|
/** @internal */
|
|
49
|
-
export type
|
|
54
|
+
export type DeleteWorkspaceBudgetRequest$Outbound = {
|
|
50
55
|
"HTTP-Referer"?: string | undefined;
|
|
51
56
|
appTitle?: string | undefined;
|
|
52
57
|
appCategories?: string | undefined;
|
|
53
|
-
|
|
58
|
+
id: string;
|
|
59
|
+
interval: string;
|
|
54
60
|
};
|
|
55
61
|
/** @internal */
|
|
56
|
-
export declare const
|
|
57
|
-
export declare function
|
|
58
|
-
//# sourceMappingURL=
|
|
62
|
+
export declare const DeleteWorkspaceBudgetRequest$outboundSchema: z.ZodType<DeleteWorkspaceBudgetRequest$Outbound, DeleteWorkspaceBudgetRequest>;
|
|
63
|
+
export declare function deleteWorkspaceBudgetRequestToJSON(deleteWorkspaceBudgetRequest: DeleteWorkspaceBudgetRequest): string;
|
|
64
|
+
//# sourceMappingURL=deleteworkspacebudget.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f9fd25ea4948
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const DeleteWorkspaceBudgetRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
id: z.string(),
|
|
14
|
+
interval: models.WorkspaceBudgetInterval$outboundSchema,
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
httpReferer: "HTTP-Referer",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function deleteWorkspaceBudgetRequestToJSON(deleteWorkspaceBudgetRequest) {
|
|
21
|
+
return JSON.stringify(DeleteWorkspaceBudgetRequest$outboundSchema.parse(deleteWorkspaceBudgetRequest));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=deleteworkspacebudget.js.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
3
|
+
export type GetBenchmarksGlobals = {
|
|
4
|
+
/**
|
|
5
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is used to track API usage per application.
|
|
9
|
+
*/
|
|
10
|
+
httpReferer?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*/
|
|
16
|
+
appTitle?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
*/
|
|
22
|
+
appCategories?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Source: {
|
|
28
|
+
readonly ArtificialAnalysis: "artificial-analysis";
|
|
29
|
+
readonly DesignArena: "design-arena";
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.
|
|
33
|
+
*/
|
|
34
|
+
export type Source = OpenEnum<typeof Source>;
|
|
35
|
+
/**
|
|
36
|
+
* Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.
|
|
37
|
+
*/
|
|
38
|
+
export declare const TaskType: {
|
|
39
|
+
readonly Coding: "coding";
|
|
40
|
+
readonly Intelligence: "intelligence";
|
|
41
|
+
readonly Agentic: "agentic";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.
|
|
45
|
+
*/
|
|
46
|
+
export type TaskType = OpenEnum<typeof TaskType>;
|
|
47
|
+
/**
|
|
48
|
+
* Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
|
|
49
|
+
*/
|
|
50
|
+
export declare const Arena: {
|
|
51
|
+
readonly Models: "models";
|
|
52
|
+
readonly Builders: "builders";
|
|
53
|
+
readonly Agents: "agents";
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
|
|
57
|
+
*/
|
|
58
|
+
export type Arena = OpenEnum<typeof Arena>;
|
|
59
|
+
export type GetBenchmarksRequest = {
|
|
60
|
+
/**
|
|
61
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* This is used to track API usage per application.
|
|
65
|
+
*/
|
|
66
|
+
httpReferer?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
*/
|
|
72
|
+
appTitle?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
*/
|
|
78
|
+
appCategories?: string | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.
|
|
81
|
+
*/
|
|
82
|
+
source?: Source | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.
|
|
85
|
+
*/
|
|
86
|
+
taskType?: TaskType | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
|
|
89
|
+
*/
|
|
90
|
+
arena?: Arena | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Design Arena only: category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories.
|
|
93
|
+
*/
|
|
94
|
+
category?: string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Maximum number of items to return. When omitted, all matching results are returned.
|
|
97
|
+
*/
|
|
98
|
+
maxResults?: number | undefined;
|
|
99
|
+
};
|
|
100
|
+
/** @internal */
|
|
101
|
+
export declare const Source$outboundSchema: z.ZodType<string, Source>;
|
|
102
|
+
/** @internal */
|
|
103
|
+
export declare const TaskType$outboundSchema: z.ZodType<string, TaskType>;
|
|
104
|
+
/** @internal */
|
|
105
|
+
export declare const Arena$outboundSchema: z.ZodType<string, Arena>;
|
|
106
|
+
/** @internal */
|
|
107
|
+
export type GetBenchmarksRequest$Outbound = {
|
|
108
|
+
"HTTP-Referer"?: string | undefined;
|
|
109
|
+
appTitle?: string | undefined;
|
|
110
|
+
appCategories?: string | undefined;
|
|
111
|
+
source?: string | undefined;
|
|
112
|
+
task_type?: string | undefined;
|
|
113
|
+
arena?: string | undefined;
|
|
114
|
+
category?: string | undefined;
|
|
115
|
+
max_results?: number | undefined;
|
|
116
|
+
};
|
|
117
|
+
/** @internal */
|
|
118
|
+
export declare const GetBenchmarksRequest$outboundSchema: z.ZodType<GetBenchmarksRequest$Outbound, GetBenchmarksRequest>;
|
|
119
|
+
export declare function getBenchmarksRequestToJSON(getBenchmarksRequest: GetBenchmarksRequest): string;
|
|
120
|
+
//# sourceMappingURL=getbenchmarks.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 52eb1eb063ae
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
/**
|
|
9
|
+
* Benchmark source to query. Determines the shape of the returned items. When omitted, returns results from all sources.
|
|
10
|
+
*/
|
|
11
|
+
export const Source = {
|
|
12
|
+
ArtificialAnalysis: "artificial-analysis",
|
|
13
|
+
DesignArena: "design-arena",
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Filter results by task type. For Artificial Analysis, maps to the corresponding index. For Design Arena, maps to the matching category.
|
|
17
|
+
*/
|
|
18
|
+
export const TaskType = {
|
|
19
|
+
Coding: "coding",
|
|
20
|
+
Intelligence: "intelligence",
|
|
21
|
+
Agentic: "agentic",
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Design Arena only: arena to query. Defaults to `models` when source is `design-arena`.
|
|
25
|
+
*/
|
|
26
|
+
export const Arena = {
|
|
27
|
+
Models: "models",
|
|
28
|
+
Builders: "builders",
|
|
29
|
+
Agents: "agents",
|
|
30
|
+
};
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const Source$outboundSchema = openEnums
|
|
33
|
+
.outboundSchema(Source);
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const TaskType$outboundSchema = openEnums
|
|
36
|
+
.outboundSchema(TaskType);
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const Arena$outboundSchema = openEnums
|
|
39
|
+
.outboundSchema(Arena);
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const GetBenchmarksRequest$outboundSchema = z.object({
|
|
42
|
+
httpReferer: z.string().optional(),
|
|
43
|
+
appTitle: z.string().optional(),
|
|
44
|
+
appCategories: z.string().optional(),
|
|
45
|
+
source: Source$outboundSchema.optional(),
|
|
46
|
+
taskType: TaskType$outboundSchema.optional(),
|
|
47
|
+
arena: Arena$outboundSchema.optional(),
|
|
48
|
+
category: z.string().optional(),
|
|
49
|
+
maxResults: z.int().optional(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
httpReferer: "HTTP-Referer",
|
|
53
|
+
taskType: "task_type",
|
|
54
|
+
maxResults: "max_results",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
export function getBenchmarksRequestToJSON(getBenchmarksRequest) {
|
|
58
|
+
return JSON.stringify(GetBenchmarksRequest$outboundSchema.parse(getBenchmarksRequest));
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=getbenchmarks.js.map
|
|
@@ -43,7 +43,7 @@ export declare const GetModelsCategory: {
|
|
|
43
43
|
*/
|
|
44
44
|
export type GetModelsCategory = OpenEnum<typeof GetModelsCategory>;
|
|
45
45
|
/**
|
|
46
|
-
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
|
|
46
|
+
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
|
|
47
47
|
*/
|
|
48
48
|
export declare const GetModelsSort: {
|
|
49
49
|
readonly MostPopular: "most-popular";
|
|
@@ -54,9 +54,11 @@ export declare const GetModelsSort: {
|
|
|
54
54
|
readonly ContextHighToLow: "context-high-to-low";
|
|
55
55
|
readonly ThroughputHighToLow: "throughput-high-to-low";
|
|
56
56
|
readonly LatencyLowToHigh: "latency-low-to-high";
|
|
57
|
+
readonly IntelligenceHighToLow: "intelligence-high-to-low";
|
|
58
|
+
readonly DesignArenaEloHighToLow: "design-arena-elo-high-to-low";
|
|
57
59
|
};
|
|
58
60
|
/**
|
|
59
|
-
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
|
|
61
|
+
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
|
|
60
62
|
*/
|
|
61
63
|
export type GetModelsSort = OpenEnum<typeof GetModelsSort>;
|
|
62
64
|
/**
|
|
@@ -123,7 +125,7 @@ export type GetModelsRequest = {
|
|
|
123
125
|
*/
|
|
124
126
|
outputModalities?: string | undefined;
|
|
125
127
|
/**
|
|
126
|
-
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
|
|
128
|
+
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
|
|
127
129
|
*/
|
|
128
130
|
sort?: GetModelsSort | undefined;
|
|
129
131
|
/**
|
|
@@ -23,7 +23,7 @@ export const GetModelsCategory = {
|
|
|
23
23
|
Academia: "academia",
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date). When omitted, the existing default ordering is preserved.
|
|
26
|
+
* Sort the returned models server-side. Prefer this over fetching the full list and sorting client-side. Options: pricing-low-to-high, pricing-high-to-low (average prompt/completion price), context-high-to-low (context length), throughput-high-to-low, latency-low-to-high (recent median performance), most-popular, top-weekly (tokens processed in the last week), newest (creation date), intelligence-high-to-low (Artificial Analysis intelligence index), design-arena-elo-high-to-low (best Design Arena ELO across arenas). Models without a score for the chosen benchmark are placed last. When omitted, the existing default ordering is preserved.
|
|
27
27
|
*/
|
|
28
28
|
export const GetModelsSort = {
|
|
29
29
|
MostPopular: "most-popular",
|
|
@@ -34,6 +34,8 @@ export const GetModelsSort = {
|
|
|
34
34
|
ContextHighToLow: "context-high-to-low",
|
|
35
35
|
ThroughputHighToLow: "throughput-high-to-low",
|
|
36
36
|
LatencyLowToHigh: "latency-low-to-high",
|
|
37
|
+
IntelligenceHighToLow: "intelligence-high-to-low",
|
|
38
|
+
DesignArenaEloHighToLow: "design-arena-elo-high-to-low",
|
|
37
39
|
};
|
|
38
40
|
/**
|
|
39
41
|
* Filter by distillation capability. "true" returns only distillable models, "false" excludes them.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
+
export type GetTaskClassificationsGlobals = {
|
|
4
4
|
/**
|
|
5
5
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
6
|
*
|
|
@@ -22,18 +22,16 @@ export type GetBenchmarksDesignArenaGlobals = {
|
|
|
22
22
|
appCategories?: string | undefined;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
|
|
26
26
|
*/
|
|
27
|
-
export declare const
|
|
28
|
-
readonly
|
|
29
|
-
readonly Builders: "builders";
|
|
30
|
-
readonly Agents: "agents";
|
|
27
|
+
export declare const Window: {
|
|
28
|
+
readonly Sevend: "7d";
|
|
31
29
|
};
|
|
32
30
|
/**
|
|
33
|
-
*
|
|
31
|
+
* Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
|
|
34
32
|
*/
|
|
35
|
-
export type
|
|
36
|
-
export type
|
|
33
|
+
export type Window = ClosedEnum<typeof Window>;
|
|
34
|
+
export type GetTaskClassificationsRequest = {
|
|
37
35
|
/**
|
|
38
36
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
39
37
|
*
|
|
@@ -54,30 +52,20 @@ export type GetBenchmarksDesignArenaRequest = {
|
|
|
54
52
|
*/
|
|
55
53
|
appCategories?: string | undefined;
|
|
56
54
|
/**
|
|
57
|
-
*
|
|
55
|
+
* Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
|
|
58
56
|
*/
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Category within the arena (e.g. `codecategories`, `uicomponent`, `gamedev`, `3d`, `dataviz`, `image`, `video`, `svg`). When omitted, returns all categories.
|
|
62
|
-
*/
|
|
63
|
-
category?: string | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* Max results to return: per category when no category filter is applied (1–100, default 50).
|
|
66
|
-
*/
|
|
67
|
-
maxResults?: number | undefined;
|
|
57
|
+
window?: Window | undefined;
|
|
68
58
|
};
|
|
69
59
|
/** @internal */
|
|
70
|
-
export declare const
|
|
60
|
+
export declare const Window$outboundSchema: z.ZodEnum<typeof Window>;
|
|
71
61
|
/** @internal */
|
|
72
|
-
export type
|
|
62
|
+
export type GetTaskClassificationsRequest$Outbound = {
|
|
73
63
|
"HTTP-Referer"?: string | undefined;
|
|
74
64
|
appTitle?: string | undefined;
|
|
75
65
|
appCategories?: string | undefined;
|
|
76
|
-
|
|
77
|
-
category?: string | undefined;
|
|
78
|
-
max_results: number;
|
|
66
|
+
window: string;
|
|
79
67
|
};
|
|
80
68
|
/** @internal */
|
|
81
|
-
export declare const
|
|
82
|
-
export declare function
|
|
83
|
-
//# sourceMappingURL=
|
|
69
|
+
export declare const GetTaskClassificationsRequest$outboundSchema: z.ZodType<GetTaskClassificationsRequest$Outbound, GetTaskClassificationsRequest>;
|
|
70
|
+
export declare function getTaskClassificationsRequestToJSON(getTaskClassificationsRequest: GetTaskClassificationsRequest): string;
|
|
71
|
+
//# sourceMappingURL=gettaskclassifications.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8482753ddd33
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/**
|
|
8
|
+
* Trailing time window for the classification data. Currently only `7d` (trailing 7 days) is supported.
|
|
9
|
+
*/
|
|
10
|
+
export const Window = {
|
|
11
|
+
Sevend: "7d",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const Window$outboundSchema = z.enum(Window);
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GetTaskClassificationsRequest$outboundSchema = z.object({
|
|
17
|
+
httpReferer: z.string().optional(),
|
|
18
|
+
appTitle: z.string().optional(),
|
|
19
|
+
appCategories: z.string().optional(),
|
|
20
|
+
window: Window$outboundSchema.default("7d"),
|
|
21
|
+
}).transform((v) => {
|
|
22
|
+
return remap$(v, {
|
|
23
|
+
httpReferer: "HTTP-Referer",
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
export function getTaskClassificationsRequestToJSON(getTaskClassificationsRequest) {
|
|
27
|
+
return JSON.stringify(GetTaskClassificationsRequest$outboundSchema.parse(getTaskClassificationsRequest));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=gettaskclassifications.js.map
|