@openrouter/sdk 0.13.44 → 0.13.46
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/funcs/byokList.js +1 -1
- package/esm/funcs/embeddingsListModels.d.ts +4 -2
- package/esm/funcs/embeddingsListModels.js +45 -8
- package/esm/funcs/guardrailsList.js +1 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +1 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +1 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +1 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +1 -1
- package/esm/funcs/modelsList.d.ts +4 -2
- package/esm/funcs/modelsList.js +39 -7
- package/esm/funcs/modelsListForUser.d.ts +4 -2
- package/esm/funcs/modelsListForUser.js +45 -8
- package/esm/funcs/observabilityList.js +1 -1
- package/esm/funcs/organizationListMembers.js +1 -1
- package/esm/funcs/presetsList.js +1 -1
- package/esm/funcs/presetsListVersions.js +1 -1
- package/esm/funcs/workspacesList.js +1 -1
- package/esm/funcs/workspacesListMembers.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/additionaltoolsitem.d.ts +5 -5
- package/esm/models/additionaltoolsitem.js +3 -3
- package/esm/models/anthropiccitationsearchresultlocationparam.d.ts +24 -0
- package/esm/models/{anthropiccitationsearchresultlocation.js → anthropiccitationsearchresultlocationparam.js} +5 -5
- package/esm/models/anthropiccitationwebsearchresultlocationparam.d.ts +20 -0
- package/esm/models/{anthropiccitationwebsearchresultlocation.js → anthropiccitationwebsearchresultlocationparam.js} +5 -5
- package/esm/models/anthropictextblockparam.d.ts +6 -6
- package/esm/models/anthropictextblockparam.js +6 -6
- package/esm/models/chatformatjsonobjectconfig.d.ts +15 -0
- package/esm/models/chatformatjsonobjectconfig.js +13 -0
- package/esm/models/chatrequest.d.ts +5 -5
- package/esm/models/chatrequest.js +3 -3
- package/esm/models/createobservabilitydestinationrequest.d.ts +3 -3
- package/esm/models/createobservabilitydestinationrequest.js +2 -2
- package/esm/models/imagegenerationproviderpreferences.d.ts +811 -0
- package/esm/models/imagegenerationproviderpreferences.js +208 -0
- package/esm/models/imagegenerationrequest.d.ts +4 -753
- package/esm/models/imagegenerationrequest.js +2 -162
- package/esm/models/imageinputmodality.d.ts +13 -0
- package/esm/models/imageinputmodality.js +15 -0
- package/esm/models/imagemodelarchitecture.d.ts +2 -2
- package/esm/models/imagemodelarchitecture.js +2 -2
- package/esm/models/index.d.ts +10 -2
- package/esm/models/index.js +10 -2
- package/esm/models/legacychatcontentvideo.d.ts +3 -3
- package/esm/models/legacychatcontentvideo.js +3 -3
- package/esm/models/legacychatcontentvideoinput.d.ts +23 -0
- package/esm/models/legacychatcontentvideoinput.js +21 -0
- package/esm/models/messagesrequest.d.ts +5 -5
- package/esm/models/messagesrequest.js +3 -3
- package/esm/models/messagessearchmodelsservertool.d.ts +28 -0
- package/esm/models/messagessearchmodelsservertool.js +20 -0
- package/esm/models/modelarchitecture.d.ts +2 -35
- package/esm/models/modelarchitecture.js +2 -32
- package/esm/models/modelslistresponse.d.ts +20 -0
- package/esm/models/modelslistresponse.js +14 -0
- package/esm/models/observabilityfilterrulegroup.d.ts +94 -0
- package/esm/models/observabilityfilterrulegroup.js +103 -0
- package/esm/models/observabilityfilterrulesconfig.d.ts +3 -100
- package/esm/models/observabilityfilterrulesconfig.js +2 -105
- package/esm/models/observabilityfilterrulesconfignullable.d.ts +18 -0
- package/esm/models/observabilityfilterrulesconfignullable.js +15 -0
- package/esm/models/operations/createembeddings.d.ts +1 -12
- package/esm/models/operations/createembeddings.js +1 -17
- package/esm/models/operations/getmodels.d.ts +19 -0
- package/esm/models/operations/getmodels.js +15 -0
- package/esm/models/operations/listbyokkeys.d.ts +2 -2
- package/esm/models/operations/listbyokkeys.js +2 -2
- package/esm/models/operations/listembeddingsmodels.d.ts +19 -0
- package/esm/models/operations/listembeddingsmodels.js +15 -0
- package/esm/models/operations/listguardrailkeyassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailkeyassignments.js +2 -2
- package/esm/models/operations/listguardrailmemberassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailmemberassignments.js +2 -2
- package/esm/models/operations/listguardrails.d.ts +2 -2
- package/esm/models/operations/listguardrails.js +2 -2
- package/esm/models/operations/listkeyassignments.d.ts +2 -2
- package/esm/models/operations/listkeyassignments.js +2 -2
- package/esm/models/operations/listmemberassignments.d.ts +2 -2
- package/esm/models/operations/listmemberassignments.js +2 -2
- package/esm/models/operations/listmodelsuser.d.ts +19 -0
- package/esm/models/operations/listmodelsuser.js +15 -0
- package/esm/models/operations/listobservabilitydestinations.d.ts +2 -2
- package/esm/models/operations/listobservabilitydestinations.js +2 -2
- package/esm/models/operations/listorganizationmembers.d.ts +2 -2
- package/esm/models/operations/listorganizationmembers.js +2 -2
- package/esm/models/operations/listpresets.d.ts +2 -2
- package/esm/models/operations/listpresets.js +2 -2
- package/esm/models/operations/listpresetversions.d.ts +2 -2
- package/esm/models/operations/listpresetversions.js +2 -2
- package/esm/models/operations/listworkspacemembers.d.ts +2 -2
- package/esm/models/operations/listworkspacemembers.js +2 -2
- package/esm/models/operations/listworkspaces.d.ts +2 -2
- package/esm/models/operations/listworkspaces.js +2 -2
- package/esm/models/providerpreferences.d.ts +16 -16
- package/esm/models/providerpreferences.js +12 -19
- package/esm/models/responsesrequest.d.ts +5 -5
- package/esm/models/responsesrequest.js +3 -3
- package/esm/models/searchmodelsservertoolopenrouter.d.ts +28 -0
- package/esm/models/searchmodelsservertoolopenrouter.js +20 -0
- package/esm/models/updateobservabilitydestinationrequest.d.ts +3 -3
- package/esm/models/updateobservabilitydestinationrequest.js +2 -2
- package/esm/sdk/embeddings.d.ts +4 -2
- package/esm/sdk/embeddings.js +2 -1
- package/esm/sdk/models.d.ts +7 -2
- package/esm/sdk/models.js +3 -2
- package/jsr.json +1 -1
- package/package.json +5 -5
- package/esm/models/anthropiccitationsearchresultlocation.d.ts +0 -24
- package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +0 -20
|
@@ -147,22 +147,6 @@ 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 */
|
|
166
150
|
export const PromptTokensDetails$inboundSchema = z.object({
|
|
167
151
|
audio_tokens: z.int().optional(),
|
|
168
152
|
file_tokens: z.int().optional(),
|
|
@@ -184,7 +168,7 @@ export function promptTokensDetailsFromJSON(jsonString) {
|
|
|
184
168
|
/** @internal */
|
|
185
169
|
export const CreateEmbeddingsUsage$inboundSchema = z.object({
|
|
186
170
|
cost: z.number().optional(),
|
|
187
|
-
cost_details: z.nullable(
|
|
171
|
+
cost_details: z.nullable(models.CostDetails$inboundSchema).optional(),
|
|
188
172
|
is_byok: z.boolean().optional(),
|
|
189
173
|
prompt_tokens: z.int(),
|
|
190
174
|
prompt_tokens_details: z.lazy(() => PromptTokensDetails$inboundSchema)
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
import * as models from "../index.js";
|
|
3
6
|
export type GetModelsGlobals = {
|
|
4
7
|
/**
|
|
5
8
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
@@ -114,6 +117,14 @@ export type GetModelsRequest = {
|
|
|
114
117
|
* @remarks
|
|
115
118
|
*/
|
|
116
119
|
appCategories?: string | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
|
|
122
|
+
*/
|
|
123
|
+
offset?: number | null | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
|
|
126
|
+
*/
|
|
127
|
+
limit?: number | undefined;
|
|
117
128
|
/**
|
|
118
129
|
* Filter models by use case category
|
|
119
130
|
*/
|
|
@@ -223,6 +234,9 @@ export type GetModelsRequest = {
|
|
|
223
234
|
*/
|
|
224
235
|
maxToolSuccessRate?: number | null | undefined;
|
|
225
236
|
};
|
|
237
|
+
export type GetModelsResponse = {
|
|
238
|
+
result: models.ModelsListResponse;
|
|
239
|
+
};
|
|
226
240
|
/** @internal */
|
|
227
241
|
export declare const GetModelsCategory$outboundSchema: z.ZodType<string, GetModelsCategory>;
|
|
228
242
|
/** @internal */
|
|
@@ -238,6 +252,8 @@ export type GetModelsRequest$Outbound = {
|
|
|
238
252
|
"HTTP-Referer"?: string | undefined;
|
|
239
253
|
appTitle?: string | undefined;
|
|
240
254
|
appCategories?: string | undefined;
|
|
255
|
+
offset: number | null;
|
|
256
|
+
limit: number;
|
|
241
257
|
category?: string | undefined;
|
|
242
258
|
supported_parameters?: string | undefined;
|
|
243
259
|
output_modalities?: string | undefined;
|
|
@@ -269,4 +285,7 @@ export type GetModelsRequest$Outbound = {
|
|
|
269
285
|
/** @internal */
|
|
270
286
|
export declare const GetModelsRequest$outboundSchema: z.ZodType<GetModelsRequest$Outbound, GetModelsRequest>;
|
|
271
287
|
export declare function getModelsRequestToJSON(getModelsRequest: GetModelsRequest): string;
|
|
288
|
+
/** @internal */
|
|
289
|
+
export declare const GetModelsResponse$inboundSchema: z.ZodType<GetModelsResponse, unknown>;
|
|
290
|
+
export declare function getModelsResponseFromJSON(jsonString: string): SafeParseResult<GetModelsResponse, SDKValidationError>;
|
|
272
291
|
//# sourceMappingURL=getmodels.d.ts.map
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import * as models from "../index.js";
|
|
8
10
|
/**
|
|
9
11
|
* Filter models by use case category
|
|
10
12
|
*/
|
|
@@ -73,6 +75,8 @@ export const GetModelsRequest$outboundSchema = z.object({
|
|
|
73
75
|
httpReferer: z.string().optional(),
|
|
74
76
|
appTitle: z.string().optional(),
|
|
75
77
|
appCategories: z.string().optional(),
|
|
78
|
+
offset: z.nullable(z.int().default(0)),
|
|
79
|
+
limit: z.int().default(500),
|
|
76
80
|
category: GetModelsCategory$outboundSchema.optional(),
|
|
77
81
|
supportedParameters: z.string().optional(),
|
|
78
82
|
outputModalities: z.string().optional(),
|
|
@@ -126,4 +130,15 @@ export const GetModelsRequest$outboundSchema = z.object({
|
|
|
126
130
|
export function getModelsRequestToJSON(getModelsRequest) {
|
|
127
131
|
return JSON.stringify(GetModelsRequest$outboundSchema.parse(getModelsRequest));
|
|
128
132
|
}
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const GetModelsResponse$inboundSchema = z.object({
|
|
135
|
+
Result: models.ModelsListResponse$inboundSchema,
|
|
136
|
+
}).transform((v) => {
|
|
137
|
+
return remap$(v, {
|
|
138
|
+
"Result": "result",
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
export function getModelsResponseFromJSON(jsonString) {
|
|
142
|
+
return safeParse(jsonString, (x) => GetModelsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetModelsResponse' from JSON`);
|
|
143
|
+
}
|
|
129
144
|
//# sourceMappingURL=getmodels.js.map
|
|
@@ -170,8 +170,8 @@ export type ListBYOKKeysRequest$Outbound = {
|
|
|
170
170
|
"HTTP-Referer"?: string | undefined;
|
|
171
171
|
appTitle?: string | undefined;
|
|
172
172
|
appCategories?: string | undefined;
|
|
173
|
-
offset
|
|
174
|
-
limit
|
|
173
|
+
offset: number | null;
|
|
174
|
+
limit: number;
|
|
175
175
|
workspace_id?: string | undefined;
|
|
176
176
|
provider?: string | undefined;
|
|
177
177
|
};
|
|
@@ -110,8 +110,8 @@ export const ListBYOKKeysRequest$outboundSchema = z.object({
|
|
|
110
110
|
httpReferer: z.string().optional(),
|
|
111
111
|
appTitle: z.string().optional(),
|
|
112
112
|
appCategories: z.string().optional(),
|
|
113
|
-
offset: z.nullable(z.int()
|
|
114
|
-
limit: z.int().
|
|
113
|
+
offset: z.nullable(z.int().default(0)),
|
|
114
|
+
limit: z.int().default(50),
|
|
115
115
|
workspaceId: z.string().optional(),
|
|
116
116
|
provider: Provider$outboundSchema.optional(),
|
|
117
117
|
}).transform((v) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import * as models from "../index.js";
|
|
2
5
|
export type ListEmbeddingsModelsGlobals = {
|
|
3
6
|
/**
|
|
4
7
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
@@ -40,14 +43,30 @@ export type ListEmbeddingsModelsRequest = {
|
|
|
40
43
|
* @remarks
|
|
41
44
|
*/
|
|
42
45
|
appCategories?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
|
|
48
|
+
*/
|
|
49
|
+
offset?: number | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
|
|
52
|
+
*/
|
|
53
|
+
limit?: number | undefined;
|
|
54
|
+
};
|
|
55
|
+
export type ListEmbeddingsModelsResponse = {
|
|
56
|
+
result: models.ModelsListResponse;
|
|
43
57
|
};
|
|
44
58
|
/** @internal */
|
|
45
59
|
export type ListEmbeddingsModelsRequest$Outbound = {
|
|
46
60
|
"HTTP-Referer"?: string | undefined;
|
|
47
61
|
appTitle?: string | undefined;
|
|
48
62
|
appCategories?: string | undefined;
|
|
63
|
+
offset: number | null;
|
|
64
|
+
limit: number;
|
|
49
65
|
};
|
|
50
66
|
/** @internal */
|
|
51
67
|
export declare const ListEmbeddingsModelsRequest$outboundSchema: z.ZodType<ListEmbeddingsModelsRequest$Outbound, ListEmbeddingsModelsRequest>;
|
|
52
68
|
export declare function listEmbeddingsModelsRequestToJSON(listEmbeddingsModelsRequest: ListEmbeddingsModelsRequest): string;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export declare const ListEmbeddingsModelsResponse$inboundSchema: z.ZodType<ListEmbeddingsModelsResponse, unknown>;
|
|
71
|
+
export declare function listEmbeddingsModelsResponseFromJSON(jsonString: string): SafeParseResult<ListEmbeddingsModelsResponse, SDKValidationError>;
|
|
53
72
|
//# sourceMappingURL=listembeddingsmodels.d.ts.map
|
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as models from "../index.js";
|
|
7
9
|
/** @internal */
|
|
8
10
|
export const ListEmbeddingsModelsRequest$outboundSchema = z.object({
|
|
9
11
|
httpReferer: z.string().optional(),
|
|
10
12
|
appTitle: z.string().optional(),
|
|
11
13
|
appCategories: z.string().optional(),
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(500),
|
|
12
16
|
}).transform((v) => {
|
|
13
17
|
return remap$(v, {
|
|
14
18
|
httpReferer: "HTTP-Referer",
|
|
@@ -17,4 +21,15 @@ export const ListEmbeddingsModelsRequest$outboundSchema = z.object({
|
|
|
17
21
|
export function listEmbeddingsModelsRequestToJSON(listEmbeddingsModelsRequest) {
|
|
18
22
|
return JSON.stringify(ListEmbeddingsModelsRequest$outboundSchema.parse(listEmbeddingsModelsRequest));
|
|
19
23
|
}
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ListEmbeddingsModelsResponse$inboundSchema = z.object({
|
|
26
|
+
Result: models.ModelsListResponse$inboundSchema,
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"Result": "result",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
export function listEmbeddingsModelsResponseFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => ListEmbeddingsModelsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEmbeddingsModelsResponse' from JSON`);
|
|
34
|
+
}
|
|
20
35
|
//# sourceMappingURL=listembeddingsmodels.js.map
|
|
@@ -65,8 +65,8 @@ export type ListGuardrailKeyAssignmentsRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
id: string;
|
|
68
|
-
offset
|
|
69
|
-
limit
|
|
68
|
+
offset: number | null;
|
|
69
|
+
limit: number;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
72
72
|
export declare const ListGuardrailKeyAssignmentsRequest$outboundSchema: z.ZodType<ListGuardrailKeyAssignmentsRequest$Outbound, ListGuardrailKeyAssignmentsRequest>;
|
|
@@ -12,8 +12,8 @@ export const ListGuardrailKeyAssignmentsRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
id: z.string(),
|
|
15
|
-
offset: z.nullable(z.int()
|
|
16
|
-
limit: z.int().
|
|
15
|
+
offset: z.nullable(z.int().default(0)),
|
|
16
|
+
limit: z.int().default(50),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
19
19
|
httpReferer: "HTTP-Referer",
|
|
@@ -65,8 +65,8 @@ export type ListGuardrailMemberAssignmentsRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
id: string;
|
|
68
|
-
offset
|
|
69
|
-
limit
|
|
68
|
+
offset: number | null;
|
|
69
|
+
limit: number;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
72
72
|
export declare const ListGuardrailMemberAssignmentsRequest$outboundSchema: z.ZodType<ListGuardrailMemberAssignmentsRequest$Outbound, ListGuardrailMemberAssignmentsRequest>;
|
|
@@ -12,8 +12,8 @@ export const ListGuardrailMemberAssignmentsRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
id: z.string(),
|
|
15
|
-
offset: z.nullable(z.int()
|
|
16
|
-
limit: z.int().
|
|
15
|
+
offset: z.nullable(z.int().default(0)),
|
|
16
|
+
limit: z.int().default(50),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
19
19
|
httpReferer: "HTTP-Referer",
|
|
@@ -64,8 +64,8 @@ export type ListGuardrailsRequest$Outbound = {
|
|
|
64
64
|
"HTTP-Referer"?: string | undefined;
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
|
-
offset
|
|
68
|
-
limit
|
|
67
|
+
offset: number | null;
|
|
68
|
+
limit: number;
|
|
69
69
|
workspace_id?: string | undefined;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
@@ -11,8 +11,8 @@ export const ListGuardrailsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
workspaceId: z.string().optional(),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
@@ -60,8 +60,8 @@ export type ListKeyAssignmentsRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset
|
|
64
|
-
limit
|
|
63
|
+
offset: number | null;
|
|
64
|
+
limit: number;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
67
67
|
export declare const ListKeyAssignmentsRequest$outboundSchema: z.ZodType<ListKeyAssignmentsRequest$Outbound, ListKeyAssignmentsRequest>;
|
|
@@ -11,8 +11,8 @@ export const ListKeyAssignmentsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
18
18
|
httpReferer: "HTTP-Referer",
|
|
@@ -60,8 +60,8 @@ export type ListMemberAssignmentsRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset
|
|
64
|
-
limit
|
|
63
|
+
offset: number | null;
|
|
64
|
+
limit: number;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
67
67
|
export declare const ListMemberAssignmentsRequest$outboundSchema: z.ZodType<ListMemberAssignmentsRequest$Outbound, ListMemberAssignmentsRequest>;
|
|
@@ -11,8 +11,8 @@ export const ListMemberAssignmentsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
18
18
|
httpReferer: "HTTP-Referer",
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import * as models from "../index.js";
|
|
2
5
|
export type ListModelsUserGlobals = {
|
|
3
6
|
/**
|
|
4
7
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
@@ -43,6 +46,17 @@ export type ListModelsUserRequest = {
|
|
|
43
46
|
* @remarks
|
|
44
47
|
*/
|
|
45
48
|
appCategories?: string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned
|
|
51
|
+
*/
|
|
52
|
+
offset?: number | null | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Maximum number of records to return (max 1000). When both offset and limit are omitted, the full list is returned
|
|
55
|
+
*/
|
|
56
|
+
limit?: number | undefined;
|
|
57
|
+
};
|
|
58
|
+
export type ListModelsUserResponse = {
|
|
59
|
+
result: models.ModelsListResponse;
|
|
46
60
|
};
|
|
47
61
|
/** @internal */
|
|
48
62
|
export type ListModelsUserSecurity$Outbound = {
|
|
@@ -56,8 +70,13 @@ export type ListModelsUserRequest$Outbound = {
|
|
|
56
70
|
"HTTP-Referer"?: string | undefined;
|
|
57
71
|
appTitle?: string | undefined;
|
|
58
72
|
appCategories?: string | undefined;
|
|
73
|
+
offset: number | null;
|
|
74
|
+
limit: number;
|
|
59
75
|
};
|
|
60
76
|
/** @internal */
|
|
61
77
|
export declare const ListModelsUserRequest$outboundSchema: z.ZodType<ListModelsUserRequest$Outbound, ListModelsUserRequest>;
|
|
62
78
|
export declare function listModelsUserRequestToJSON(listModelsUserRequest: ListModelsUserRequest): string;
|
|
79
|
+
/** @internal */
|
|
80
|
+
export declare const ListModelsUserResponse$inboundSchema: z.ZodType<ListModelsUserResponse, unknown>;
|
|
81
|
+
export declare function listModelsUserResponseFromJSON(jsonString: string): SafeParseResult<ListModelsUserResponse, SDKValidationError>;
|
|
63
82
|
//# sourceMappingURL=listmodelsuser.d.ts.map
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as models from "../index.js";
|
|
7
9
|
/** @internal */
|
|
8
10
|
export const ListModelsUserSecurity$outboundSchema = z.object({
|
|
9
11
|
bearer: z.string(),
|
|
@@ -16,6 +18,8 @@ export const ListModelsUserRequest$outboundSchema = z.object({
|
|
|
16
18
|
httpReferer: z.string().optional(),
|
|
17
19
|
appTitle: z.string().optional(),
|
|
18
20
|
appCategories: z.string().optional(),
|
|
21
|
+
offset: z.nullable(z.int().default(0)),
|
|
22
|
+
limit: z.int().default(500),
|
|
19
23
|
}).transform((v) => {
|
|
20
24
|
return remap$(v, {
|
|
21
25
|
httpReferer: "HTTP-Referer",
|
|
@@ -24,4 +28,15 @@ export const ListModelsUserRequest$outboundSchema = z.object({
|
|
|
24
28
|
export function listModelsUserRequestToJSON(listModelsUserRequest) {
|
|
25
29
|
return JSON.stringify(ListModelsUserRequest$outboundSchema.parse(listModelsUserRequest));
|
|
26
30
|
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ListModelsUserResponse$inboundSchema = z.object({
|
|
33
|
+
Result: models.ModelsListResponse$inboundSchema,
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"Result": "result",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
export function listModelsUserResponseFromJSON(jsonString) {
|
|
40
|
+
return safeParse(jsonString, (x) => ListModelsUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListModelsUserResponse' from JSON`);
|
|
41
|
+
}
|
|
27
42
|
//# sourceMappingURL=listmodelsuser.js.map
|
|
@@ -64,8 +64,8 @@ export type ListObservabilityDestinationsRequest$Outbound = {
|
|
|
64
64
|
"HTTP-Referer"?: string | undefined;
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
|
-
offset
|
|
68
|
-
limit
|
|
67
|
+
offset: number | null;
|
|
68
|
+
limit: number;
|
|
69
69
|
workspace_id?: string | undefined;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
@@ -11,8 +11,8 @@ export const ListObservabilityDestinationsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
workspaceId: z.string().optional(),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
@@ -106,8 +106,8 @@ export type ListOrganizationMembersRequest$Outbound = {
|
|
|
106
106
|
"HTTP-Referer"?: string | undefined;
|
|
107
107
|
appTitle?: string | undefined;
|
|
108
108
|
appCategories?: string | undefined;
|
|
109
|
-
offset
|
|
110
|
-
limit
|
|
109
|
+
offset: number | null;
|
|
110
|
+
limit: number;
|
|
111
111
|
};
|
|
112
112
|
/** @internal */
|
|
113
113
|
export declare const ListOrganizationMembersRequest$outboundSchema: z.ZodType<ListOrganizationMembersRequest$Outbound, ListOrganizationMembersRequest>;
|
|
@@ -18,8 +18,8 @@ export const ListOrganizationMembersRequest$outboundSchema = z.object({
|
|
|
18
18
|
httpReferer: z.string().optional(),
|
|
19
19
|
appTitle: z.string().optional(),
|
|
20
20
|
appCategories: z.string().optional(),
|
|
21
|
-
offset: z.nullable(z.int()
|
|
22
|
-
limit: z.int().
|
|
21
|
+
offset: z.nullable(z.int().default(0)),
|
|
22
|
+
limit: z.int().default(50),
|
|
23
23
|
}).transform((v) => {
|
|
24
24
|
return remap$(v, {
|
|
25
25
|
httpReferer: "HTTP-Referer",
|
|
@@ -60,8 +60,8 @@ export type ListPresetsRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset
|
|
64
|
-
limit
|
|
63
|
+
offset: number | null;
|
|
64
|
+
limit: number;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
67
67
|
export declare const ListPresetsRequest$outboundSchema: z.ZodType<ListPresetsRequest$Outbound, ListPresetsRequest>;
|
|
@@ -11,8 +11,8 @@ export const ListPresetsRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
18
18
|
httpReferer: "HTTP-Referer",
|
|
@@ -65,8 +65,8 @@ export type ListPresetVersionsRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
slug: string;
|
|
68
|
-
offset
|
|
69
|
-
limit
|
|
68
|
+
offset: number | null;
|
|
69
|
+
limit: number;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
72
72
|
export declare const ListPresetVersionsRequest$outboundSchema: z.ZodType<ListPresetVersionsRequest$Outbound, ListPresetVersionsRequest>;
|
|
@@ -12,8 +12,8 @@ export const ListPresetVersionsRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
slug: z.string(),
|
|
15
|
-
offset: z.nullable(z.int()
|
|
16
|
-
limit: z.int().
|
|
15
|
+
offset: z.nullable(z.int().default(0)),
|
|
16
|
+
limit: z.int().default(50),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
19
19
|
httpReferer: "HTTP-Referer",
|
|
@@ -65,8 +65,8 @@ export type ListWorkspaceMembersRequest$Outbound = {
|
|
|
65
65
|
appTitle?: string | undefined;
|
|
66
66
|
appCategories?: string | undefined;
|
|
67
67
|
id: string;
|
|
68
|
-
offset
|
|
69
|
-
limit
|
|
68
|
+
offset: number | null;
|
|
69
|
+
limit: number;
|
|
70
70
|
};
|
|
71
71
|
/** @internal */
|
|
72
72
|
export declare const ListWorkspaceMembersRequest$outboundSchema: z.ZodType<ListWorkspaceMembersRequest$Outbound, ListWorkspaceMembersRequest>;
|
|
@@ -12,8 +12,8 @@ export const ListWorkspaceMembersRequest$outboundSchema = z.object({
|
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
14
|
id: z.string(),
|
|
15
|
-
offset: z.nullable(z.int()
|
|
16
|
-
limit: z.int().
|
|
15
|
+
offset: z.nullable(z.int().default(0)),
|
|
16
|
+
limit: z.int().default(50),
|
|
17
17
|
}).transform((v) => {
|
|
18
18
|
return remap$(v, {
|
|
19
19
|
httpReferer: "HTTP-Referer",
|
|
@@ -60,8 +60,8 @@ export type ListWorkspacesRequest$Outbound = {
|
|
|
60
60
|
"HTTP-Referer"?: string | undefined;
|
|
61
61
|
appTitle?: string | undefined;
|
|
62
62
|
appCategories?: string | undefined;
|
|
63
|
-
offset
|
|
64
|
-
limit
|
|
63
|
+
offset: number | null;
|
|
64
|
+
limit: number;
|
|
65
65
|
};
|
|
66
66
|
/** @internal */
|
|
67
67
|
export declare const ListWorkspacesRequest$outboundSchema: z.ZodType<ListWorkspacesRequest$Outbound, ListWorkspacesRequest>;
|
|
@@ -11,8 +11,8 @@ export const ListWorkspacesRequest$outboundSchema = z.object({
|
|
|
11
11
|
httpReferer: z.string().optional(),
|
|
12
12
|
appTitle: z.string().optional(),
|
|
13
13
|
appCategories: z.string().optional(),
|
|
14
|
-
offset: z.nullable(z.int()
|
|
15
|
-
limit: z.int().
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
18
18
|
httpReferer: "HTTP-Referer",
|
|
@@ -27,7 +27,7 @@ export declare const DataCollection: {
|
|
|
27
27
|
* - deny: use only providers which do not collect user data.
|
|
28
28
|
*/
|
|
29
29
|
export type DataCollection = OpenEnum<typeof DataCollection>;
|
|
30
|
-
export type
|
|
30
|
+
export type ProviderPreferencesIgnore = ProviderName | string;
|
|
31
31
|
/**
|
|
32
32
|
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
33
33
|
*/
|
|
@@ -53,12 +53,12 @@ export type MaxPrice = {
|
|
|
53
53
|
*/
|
|
54
54
|
request?: string | undefined;
|
|
55
55
|
};
|
|
56
|
-
export type
|
|
57
|
-
export type
|
|
56
|
+
export type ProviderPreferencesOnly = ProviderName | string;
|
|
57
|
+
export type ProviderPreferencesOrder = ProviderName | string;
|
|
58
58
|
/**
|
|
59
59
|
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
60
60
|
*/
|
|
61
|
-
export type
|
|
61
|
+
export type ProviderPreferencesSort = ProviderSort | ProviderSortConfig | any;
|
|
62
62
|
/**
|
|
63
63
|
* When multiple model providers are available, optionally indicate your routing preference.
|
|
64
64
|
*/
|
|
@@ -128,10 +128,10 @@ export type ProviderPreferences = {
|
|
|
128
128
|
/** @internal */
|
|
129
129
|
export declare const DataCollection$outboundSchema: z.ZodType<string, DataCollection>;
|
|
130
130
|
/** @internal */
|
|
131
|
-
export type
|
|
131
|
+
export type ProviderPreferencesIgnore$Outbound = string | string;
|
|
132
132
|
/** @internal */
|
|
133
|
-
export declare const
|
|
134
|
-
export declare function
|
|
133
|
+
export declare const ProviderPreferencesIgnore$outboundSchema: z.ZodType<ProviderPreferencesIgnore$Outbound, ProviderPreferencesIgnore>;
|
|
134
|
+
export declare function providerPreferencesIgnoreToJSON(providerPreferencesIgnore: ProviderPreferencesIgnore): string;
|
|
135
135
|
/** @internal */
|
|
136
136
|
export type MaxPrice$Outbound = {
|
|
137
137
|
audio?: string | undefined;
|
|
@@ -144,20 +144,20 @@ export type MaxPrice$Outbound = {
|
|
|
144
144
|
export declare const MaxPrice$outboundSchema: z.ZodType<MaxPrice$Outbound, MaxPrice>;
|
|
145
145
|
export declare function maxPriceToJSON(maxPrice: MaxPrice): string;
|
|
146
146
|
/** @internal */
|
|
147
|
-
export type
|
|
147
|
+
export type ProviderPreferencesOnly$Outbound = string | string;
|
|
148
148
|
/** @internal */
|
|
149
|
-
export declare const
|
|
150
|
-
export declare function
|
|
149
|
+
export declare const ProviderPreferencesOnly$outboundSchema: z.ZodType<ProviderPreferencesOnly$Outbound, ProviderPreferencesOnly>;
|
|
150
|
+
export declare function providerPreferencesOnlyToJSON(providerPreferencesOnly: ProviderPreferencesOnly): string;
|
|
151
151
|
/** @internal */
|
|
152
|
-
export type
|
|
152
|
+
export type ProviderPreferencesOrder$Outbound = string | string;
|
|
153
153
|
/** @internal */
|
|
154
|
-
export declare const
|
|
155
|
-
export declare function
|
|
154
|
+
export declare const ProviderPreferencesOrder$outboundSchema: z.ZodType<ProviderPreferencesOrder$Outbound, ProviderPreferencesOrder>;
|
|
155
|
+
export declare function providerPreferencesOrderToJSON(providerPreferencesOrder: ProviderPreferencesOrder): string;
|
|
156
156
|
/** @internal */
|
|
157
|
-
export type
|
|
157
|
+
export type ProviderPreferencesSort$Outbound = string | ProviderSortConfig$Outbound | any;
|
|
158
158
|
/** @internal */
|
|
159
|
-
export declare const
|
|
160
|
-
export declare function
|
|
159
|
+
export declare const ProviderPreferencesSort$outboundSchema: z.ZodType<ProviderPreferencesSort$Outbound, ProviderPreferencesSort>;
|
|
160
|
+
export declare function providerPreferencesSortToJSON(providerPreferencesSort: ProviderPreferencesSort): string;
|
|
161
161
|
/** @internal */
|
|
162
162
|
export type ProviderPreferences$Outbound = {
|
|
163
163
|
allow_fallbacks?: boolean | null | undefined;
|