@openrouter/sdk 0.12.16 → 0.12.17
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/generationsGetGeneration.d.ts +2 -1
- package/esm/funcs/generationsGetGeneration.js +2 -1
- package/esm/funcs/generationsListGenerationContent.d.ts +16 -0
- package/esm/funcs/generationsListGenerationContent.js +108 -0
- package/esm/funcs/workspacesBulkAddMembers.d.ts +19 -0
- package/esm/funcs/workspacesBulkAddMembers.js +105 -0
- package/esm/funcs/workspacesBulkRemoveMembers.d.ts +19 -0
- package/esm/funcs/workspacesBulkRemoveMembers.js +105 -0
- package/esm/funcs/workspacesCreate.d.ts +19 -0
- package/esm/funcs/workspacesCreate.js +99 -0
- package/esm/funcs/workspacesDelete.d.ts +19 -0
- package/esm/funcs/workspacesDelete.js +102 -0
- package/esm/funcs/workspacesGet.d.ts +19 -0
- package/esm/funcs/workspacesGet.js +102 -0
- package/esm/funcs/workspacesList.d.ts +21 -0
- package/esm/funcs/workspacesList.js +133 -0
- package/esm/funcs/workspacesUpdate.d.ts +19 -0
- package/esm/funcs/workspacesUpdate.js +105 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/bulkaddworkspacemembersrequest.d.ts +15 -0
- package/esm/models/bulkaddworkspacemembersrequest.js +18 -0
- package/esm/models/bulkaddworkspacemembersresponse.d.ts +18 -0
- package/esm/models/bulkaddworkspacemembersresponse.js +21 -0
- package/esm/models/bulkremoveworkspacemembersrequest.d.ts +15 -0
- package/esm/models/bulkremoveworkspacemembersrequest.js +18 -0
- package/esm/models/bulkremoveworkspacemembersresponse.d.ts +13 -0
- package/esm/models/bulkremoveworkspacemembersresponse.js +19 -0
- package/esm/models/createworkspacerequest.d.ts +55 -0
- package/esm/models/createworkspacerequest.js +31 -0
- package/esm/models/createworkspaceresponse.d.ts +11 -0
- package/esm/models/createworkspaceresponse.js +15 -0
- package/esm/models/deleteworkspaceresponse.d.ts +13 -0
- package/esm/models/deleteworkspaceresponse.js +14 -0
- package/esm/models/generationcontentdata.d.ts +55 -0
- package/esm/models/generationcontentdata.js +45 -0
- package/esm/models/generationcontentresponse.d.ts +17 -0
- package/esm/models/generationcontentresponse.js +15 -0
- package/esm/models/generationresponse.d.ts +198 -0
- package/esm/models/generationresponse.js +109 -0
- package/esm/models/getworkspaceresponse.d.ts +11 -0
- package/esm/models/getworkspaceresponse.js +15 -0
- package/esm/models/index.d.ts +16 -0
- package/esm/models/index.js +16 -0
- package/esm/models/listworkspacesresponse.d.ts +18 -0
- package/esm/models/listworkspacesresponse.js +21 -0
- package/esm/models/modelscountresponse.d.ts +4 -4
- package/esm/models/modelscountresponse.js +4 -4
- package/esm/models/operations/bulkaddworkspacemembers.d.ts +61 -0
- package/esm/models/operations/bulkaddworkspacemembers.js +24 -0
- package/esm/models/operations/bulkremoveworkspacemembers.d.ts +61 -0
- package/esm/models/operations/bulkremoveworkspacemembers.js +24 -0
- package/esm/models/operations/createworkspace.d.ts +56 -0
- package/esm/models/operations/createworkspace.js +23 -0
- package/esm/models/operations/deleteworkspace.d.ts +58 -0
- package/esm/models/operations/deleteworkspace.js +21 -0
- package/esm/models/operations/getgeneration.d.ts +0 -196
- package/esm/models/operations/getgeneration.js +0 -102
- package/esm/models/operations/getworkspace.d.ts +58 -0
- package/esm/models/operations/getworkspace.js +21 -0
- package/esm/models/operations/index.d.ts +8 -0
- package/esm/models/operations/index.js +8 -0
- package/esm/models/operations/listgenerationcontent.d.ts +58 -0
- package/esm/models/operations/listgenerationcontent.js +21 -0
- package/esm/models/operations/listworkspaces.d.ts +72 -0
- package/esm/models/operations/listworkspaces.js +35 -0
- package/esm/models/operations/updateworkspace.d.ts +61 -0
- package/esm/models/operations/updateworkspace.js +24 -0
- package/esm/models/updateworkspacerequest.d.ts +55 -0
- package/esm/models/updateworkspacerequest.js +31 -0
- package/esm/models/updateworkspaceresponse.d.ts +11 -0
- package/esm/models/updateworkspaceresponse.js +15 -0
- package/esm/models/workspace.d.ts +61 -0
- package/esm/models/workspace.js +39 -0
- package/esm/models/workspacemember.d.ts +43 -0
- package/esm/models/workspacemember.js +35 -0
- package/esm/sdk/generations.d.ts +6 -1
- package/esm/sdk/generations.js +7 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/workspaces.d.ts +58 -0
- package/esm/sdk/workspaces.js +80 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { 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";
|
|
6
2
|
export type GetGenerationGlobals = {
|
|
7
3
|
/**
|
|
8
4
|
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
@@ -49,190 +45,6 @@ export type GetGenerationRequest = {
|
|
|
49
45
|
*/
|
|
50
46
|
id: string;
|
|
51
47
|
};
|
|
52
|
-
/**
|
|
53
|
-
* Type of API used for the generation
|
|
54
|
-
*/
|
|
55
|
-
export declare const ApiType: {
|
|
56
|
-
readonly Completions: "completions";
|
|
57
|
-
readonly Embeddings: "embeddings";
|
|
58
|
-
readonly Rerank: "rerank";
|
|
59
|
-
readonly Tts: "tts";
|
|
60
|
-
readonly Video: "video";
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Type of API used for the generation
|
|
64
|
-
*/
|
|
65
|
-
export type ApiType = OpenEnum<typeof ApiType>;
|
|
66
|
-
/**
|
|
67
|
-
* Generation data
|
|
68
|
-
*/
|
|
69
|
-
export type GetGenerationData = {
|
|
70
|
-
/**
|
|
71
|
-
* Type of API used for the generation
|
|
72
|
-
*/
|
|
73
|
-
apiType: ApiType | null;
|
|
74
|
-
/**
|
|
75
|
-
* ID of the app that made the request
|
|
76
|
-
*/
|
|
77
|
-
appId: number | null;
|
|
78
|
-
/**
|
|
79
|
-
* Discount applied due to caching
|
|
80
|
-
*/
|
|
81
|
-
cacheDiscount: number | null;
|
|
82
|
-
/**
|
|
83
|
-
* Whether the generation was cancelled
|
|
84
|
-
*/
|
|
85
|
-
cancelled: boolean | null;
|
|
86
|
-
/**
|
|
87
|
-
* ISO 8601 timestamp of when the generation was created
|
|
88
|
-
*/
|
|
89
|
-
createdAt: string;
|
|
90
|
-
/**
|
|
91
|
-
* External user identifier
|
|
92
|
-
*/
|
|
93
|
-
externalUser: string | null;
|
|
94
|
-
/**
|
|
95
|
-
* Reason the generation finished
|
|
96
|
-
*/
|
|
97
|
-
finishReason: string | null;
|
|
98
|
-
/**
|
|
99
|
-
* Time taken for generation in milliseconds
|
|
100
|
-
*/
|
|
101
|
-
generationTime: number | null;
|
|
102
|
-
/**
|
|
103
|
-
* Referer header from the request
|
|
104
|
-
*/
|
|
105
|
-
httpReferer: string | null;
|
|
106
|
-
/**
|
|
107
|
-
* Unique identifier for the generation
|
|
108
|
-
*/
|
|
109
|
-
id: string;
|
|
110
|
-
/**
|
|
111
|
-
* Whether this used bring-your-own-key
|
|
112
|
-
*/
|
|
113
|
-
isByok: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Total latency in milliseconds
|
|
116
|
-
*/
|
|
117
|
-
latency: number | null;
|
|
118
|
-
/**
|
|
119
|
-
* Model used for the generation
|
|
120
|
-
*/
|
|
121
|
-
model: string;
|
|
122
|
-
/**
|
|
123
|
-
* Moderation latency in milliseconds
|
|
124
|
-
*/
|
|
125
|
-
moderationLatency: number | null;
|
|
126
|
-
/**
|
|
127
|
-
* Native finish reason as reported by provider
|
|
128
|
-
*/
|
|
129
|
-
nativeFinishReason: string | null;
|
|
130
|
-
/**
|
|
131
|
-
* Native cached tokens as reported by provider
|
|
132
|
-
*/
|
|
133
|
-
nativeTokensCached: number | null;
|
|
134
|
-
/**
|
|
135
|
-
* Native completion tokens as reported by provider
|
|
136
|
-
*/
|
|
137
|
-
nativeTokensCompletion: number | null;
|
|
138
|
-
/**
|
|
139
|
-
* Native completion image tokens as reported by provider
|
|
140
|
-
*/
|
|
141
|
-
nativeTokensCompletionImages: number | null;
|
|
142
|
-
/**
|
|
143
|
-
* Native prompt tokens as reported by provider
|
|
144
|
-
*/
|
|
145
|
-
nativeTokensPrompt: number | null;
|
|
146
|
-
/**
|
|
147
|
-
* Native reasoning tokens as reported by provider
|
|
148
|
-
*/
|
|
149
|
-
nativeTokensReasoning: number | null;
|
|
150
|
-
/**
|
|
151
|
-
* Number of audio inputs in the prompt
|
|
152
|
-
*/
|
|
153
|
-
numInputAudioPrompt: number | null;
|
|
154
|
-
/**
|
|
155
|
-
* Number of media items in the completion
|
|
156
|
-
*/
|
|
157
|
-
numMediaCompletion: number | null;
|
|
158
|
-
/**
|
|
159
|
-
* Number of media items in the prompt
|
|
160
|
-
*/
|
|
161
|
-
numMediaPrompt: number | null;
|
|
162
|
-
/**
|
|
163
|
-
* Number of search results included
|
|
164
|
-
*/
|
|
165
|
-
numSearchResults: number | null;
|
|
166
|
-
/**
|
|
167
|
-
* Origin URL of the request
|
|
168
|
-
*/
|
|
169
|
-
origin: string;
|
|
170
|
-
/**
|
|
171
|
-
* Name of the provider that served the request
|
|
172
|
-
*/
|
|
173
|
-
providerName: string | null;
|
|
174
|
-
/**
|
|
175
|
-
* List of provider responses for this generation, including fallback attempts
|
|
176
|
-
*/
|
|
177
|
-
providerResponses: Array<models.ProviderResponse> | null;
|
|
178
|
-
/**
|
|
179
|
-
* Unique identifier grouping all generations from a single API request
|
|
180
|
-
*/
|
|
181
|
-
requestId?: string | null | undefined;
|
|
182
|
-
/**
|
|
183
|
-
* Router used for the request (e.g., openrouter/auto)
|
|
184
|
-
*/
|
|
185
|
-
router: string | null;
|
|
186
|
-
/**
|
|
187
|
-
* Session identifier grouping multiple generations in the same session
|
|
188
|
-
*/
|
|
189
|
-
sessionId?: string | null | undefined;
|
|
190
|
-
/**
|
|
191
|
-
* Whether the response was streamed
|
|
192
|
-
*/
|
|
193
|
-
streamed: boolean | null;
|
|
194
|
-
/**
|
|
195
|
-
* Number of tokens in the completion
|
|
196
|
-
*/
|
|
197
|
-
tokensCompletion: number | null;
|
|
198
|
-
/**
|
|
199
|
-
* Number of tokens in the prompt
|
|
200
|
-
*/
|
|
201
|
-
tokensPrompt: number | null;
|
|
202
|
-
/**
|
|
203
|
-
* Total cost of the generation in USD
|
|
204
|
-
*/
|
|
205
|
-
totalCost: number;
|
|
206
|
-
/**
|
|
207
|
-
* Upstream provider's identifier for this generation
|
|
208
|
-
*/
|
|
209
|
-
upstreamId: string | null;
|
|
210
|
-
/**
|
|
211
|
-
* Cost charged by the upstream provider
|
|
212
|
-
*/
|
|
213
|
-
upstreamInferenceCost: number | null;
|
|
214
|
-
/**
|
|
215
|
-
* Usage amount in USD
|
|
216
|
-
*/
|
|
217
|
-
usage: number;
|
|
218
|
-
/**
|
|
219
|
-
* User-Agent header from the request
|
|
220
|
-
*/
|
|
221
|
-
userAgent: string | null;
|
|
222
|
-
/**
|
|
223
|
-
* The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)
|
|
224
|
-
*/
|
|
225
|
-
webSearchEngine: string | null;
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* Generation response
|
|
229
|
-
*/
|
|
230
|
-
export type GetGenerationResponse = {
|
|
231
|
-
/**
|
|
232
|
-
* Generation data
|
|
233
|
-
*/
|
|
234
|
-
data: GetGenerationData;
|
|
235
|
-
};
|
|
236
48
|
/** @internal */
|
|
237
49
|
export type GetGenerationRequest$Outbound = {
|
|
238
50
|
"HTTP-Referer"?: string | undefined;
|
|
@@ -243,12 +55,4 @@ export type GetGenerationRequest$Outbound = {
|
|
|
243
55
|
/** @internal */
|
|
244
56
|
export declare const GetGenerationRequest$outboundSchema: z.ZodType<GetGenerationRequest$Outbound, GetGenerationRequest>;
|
|
245
57
|
export declare function getGenerationRequestToJSON(getGenerationRequest: GetGenerationRequest): string;
|
|
246
|
-
/** @internal */
|
|
247
|
-
export declare const ApiType$inboundSchema: z.ZodType<ApiType, unknown>;
|
|
248
|
-
/** @internal */
|
|
249
|
-
export declare const GetGenerationData$inboundSchema: z.ZodType<GetGenerationData, unknown>;
|
|
250
|
-
export declare function getGenerationDataFromJSON(jsonString: string): SafeParseResult<GetGenerationData, SDKValidationError>;
|
|
251
|
-
/** @internal */
|
|
252
|
-
export declare const GetGenerationResponse$inboundSchema: z.ZodType<GetGenerationResponse, unknown>;
|
|
253
|
-
export declare function getGenerationResponseFromJSON(jsonString: string): SafeParseResult<GetGenerationResponse, SDKValidationError>;
|
|
254
58
|
//# sourceMappingURL=getgeneration.d.ts.map
|
|
@@ -4,19 +4,6 @@
|
|
|
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 openEnums from "../../types/enums.js";
|
|
9
|
-
import * as models from "../index.js";
|
|
10
|
-
/**
|
|
11
|
-
* Type of API used for the generation
|
|
12
|
-
*/
|
|
13
|
-
export const ApiType = {
|
|
14
|
-
Completions: "completions",
|
|
15
|
-
Embeddings: "embeddings",
|
|
16
|
-
Rerank: "rerank",
|
|
17
|
-
Tts: "tts",
|
|
18
|
-
Video: "video",
|
|
19
|
-
};
|
|
20
7
|
/** @internal */
|
|
21
8
|
export const GetGenerationRequest$outboundSchema = z.object({
|
|
22
9
|
httpReferer: z.string().optional(),
|
|
@@ -31,93 +18,4 @@ export const GetGenerationRequest$outboundSchema = z.object({
|
|
|
31
18
|
export function getGenerationRequestToJSON(getGenerationRequest) {
|
|
32
19
|
return JSON.stringify(GetGenerationRequest$outboundSchema.parse(getGenerationRequest));
|
|
33
20
|
}
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const ApiType$inboundSchema = openEnums
|
|
36
|
-
.inboundSchema(ApiType);
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const GetGenerationData$inboundSchema = z.object({
|
|
39
|
-
api_type: z.nullable(ApiType$inboundSchema),
|
|
40
|
-
app_id: z.nullable(z.int()),
|
|
41
|
-
cache_discount: z.nullable(z.number()),
|
|
42
|
-
cancelled: z.nullable(z.boolean()),
|
|
43
|
-
created_at: z.string(),
|
|
44
|
-
external_user: z.nullable(z.string()),
|
|
45
|
-
finish_reason: z.nullable(z.string()),
|
|
46
|
-
generation_time: z.nullable(z.number()),
|
|
47
|
-
http_referer: z.nullable(z.string()),
|
|
48
|
-
id: z.string(),
|
|
49
|
-
is_byok: z.boolean(),
|
|
50
|
-
latency: z.nullable(z.number()),
|
|
51
|
-
model: z.string(),
|
|
52
|
-
moderation_latency: z.nullable(z.number()),
|
|
53
|
-
native_finish_reason: z.nullable(z.string()),
|
|
54
|
-
native_tokens_cached: z.nullable(z.int()),
|
|
55
|
-
native_tokens_completion: z.nullable(z.int()),
|
|
56
|
-
native_tokens_completion_images: z.nullable(z.int()),
|
|
57
|
-
native_tokens_prompt: z.nullable(z.int()),
|
|
58
|
-
native_tokens_reasoning: z.nullable(z.int()),
|
|
59
|
-
num_input_audio_prompt: z.nullable(z.int()),
|
|
60
|
-
num_media_completion: z.nullable(z.int()),
|
|
61
|
-
num_media_prompt: z.nullable(z.int()),
|
|
62
|
-
num_search_results: z.nullable(z.int()),
|
|
63
|
-
origin: z.string(),
|
|
64
|
-
provider_name: z.nullable(z.string()),
|
|
65
|
-
provider_responses: z.nullable(z.array(models.ProviderResponse$inboundSchema)),
|
|
66
|
-
request_id: z.nullable(z.string()).optional(),
|
|
67
|
-
router: z.nullable(z.string()),
|
|
68
|
-
session_id: z.nullable(z.string()).optional(),
|
|
69
|
-
streamed: z.nullable(z.boolean()),
|
|
70
|
-
tokens_completion: z.nullable(z.int()),
|
|
71
|
-
tokens_prompt: z.nullable(z.int()),
|
|
72
|
-
total_cost: z.number(),
|
|
73
|
-
upstream_id: z.nullable(z.string()),
|
|
74
|
-
upstream_inference_cost: z.nullable(z.number()),
|
|
75
|
-
usage: z.number(),
|
|
76
|
-
user_agent: z.nullable(z.string()),
|
|
77
|
-
web_search_engine: z.nullable(z.string()),
|
|
78
|
-
}).transform((v) => {
|
|
79
|
-
return remap$(v, {
|
|
80
|
-
"api_type": "apiType",
|
|
81
|
-
"app_id": "appId",
|
|
82
|
-
"cache_discount": "cacheDiscount",
|
|
83
|
-
"created_at": "createdAt",
|
|
84
|
-
"external_user": "externalUser",
|
|
85
|
-
"finish_reason": "finishReason",
|
|
86
|
-
"generation_time": "generationTime",
|
|
87
|
-
"http_referer": "httpReferer",
|
|
88
|
-
"is_byok": "isByok",
|
|
89
|
-
"moderation_latency": "moderationLatency",
|
|
90
|
-
"native_finish_reason": "nativeFinishReason",
|
|
91
|
-
"native_tokens_cached": "nativeTokensCached",
|
|
92
|
-
"native_tokens_completion": "nativeTokensCompletion",
|
|
93
|
-
"native_tokens_completion_images": "nativeTokensCompletionImages",
|
|
94
|
-
"native_tokens_prompt": "nativeTokensPrompt",
|
|
95
|
-
"native_tokens_reasoning": "nativeTokensReasoning",
|
|
96
|
-
"num_input_audio_prompt": "numInputAudioPrompt",
|
|
97
|
-
"num_media_completion": "numMediaCompletion",
|
|
98
|
-
"num_media_prompt": "numMediaPrompt",
|
|
99
|
-
"num_search_results": "numSearchResults",
|
|
100
|
-
"provider_name": "providerName",
|
|
101
|
-
"provider_responses": "providerResponses",
|
|
102
|
-
"request_id": "requestId",
|
|
103
|
-
"session_id": "sessionId",
|
|
104
|
-
"tokens_completion": "tokensCompletion",
|
|
105
|
-
"tokens_prompt": "tokensPrompt",
|
|
106
|
-
"total_cost": "totalCost",
|
|
107
|
-
"upstream_id": "upstreamId",
|
|
108
|
-
"upstream_inference_cost": "upstreamInferenceCost",
|
|
109
|
-
"user_agent": "userAgent",
|
|
110
|
-
"web_search_engine": "webSearchEngine",
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
export function getGenerationDataFromJSON(jsonString) {
|
|
114
|
-
return safeParse(jsonString, (x) => GetGenerationData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGenerationData' from JSON`);
|
|
115
|
-
}
|
|
116
|
-
/** @internal */
|
|
117
|
-
export const GetGenerationResponse$inboundSchema = z.object({
|
|
118
|
-
data: z.lazy(() => GetGenerationData$inboundSchema),
|
|
119
|
-
});
|
|
120
|
-
export function getGenerationResponseFromJSON(jsonString) {
|
|
121
|
-
return safeParse(jsonString, (x) => GetGenerationResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGenerationResponse' from JSON`);
|
|
122
|
-
}
|
|
123
21
|
//# sourceMappingURL=getgeneration.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type GetWorkspaceGlobals = {
|
|
3
|
+
/**
|
|
4
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This is used to track API usage per application.
|
|
8
|
+
*/
|
|
9
|
+
httpReferer?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*/
|
|
15
|
+
appTitle?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
21
|
+
appCategories?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type GetWorkspaceRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is used to track API usage per application.
|
|
29
|
+
*/
|
|
30
|
+
httpReferer?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
appTitle?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
appCategories?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The workspace ID (UUID) or slug
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type GetWorkspaceRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
id: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const GetWorkspaceRequest$outboundSchema: z.ZodType<GetWorkspaceRequest$Outbound, GetWorkspaceRequest>;
|
|
57
|
+
export declare function getWorkspaceRequestToJSON(getWorkspaceRequest: GetWorkspaceRequest): string;
|
|
58
|
+
//# sourceMappingURL=getworkspace.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: bd847aca12d8
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const GetWorkspaceRequest$outboundSchema = z.object({
|
|
9
|
+
httpReferer: z.string().optional(),
|
|
10
|
+
appTitle: z.string().optional(),
|
|
11
|
+
appCategories: z.string().optional(),
|
|
12
|
+
id: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function getWorkspaceRequestToJSON(getWorkspaceRequest) {
|
|
19
|
+
return JSON.stringify(GetWorkspaceRequest$outboundSchema.parse(getWorkspaceRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getworkspace.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from "./bulkaddworkspacemembers.js";
|
|
1
2
|
export * from "./bulkassignkeystoguardrail.js";
|
|
2
3
|
export * from "./bulkassignmemberstoguardrail.js";
|
|
4
|
+
export * from "./bulkremoveworkspacemembers.js";
|
|
3
5
|
export * from "./bulkunassignkeysfromguardrail.js";
|
|
4
6
|
export * from "./bulkunassignmembersfromguardrail.js";
|
|
5
7
|
export * from "./createauthkeyscode.js";
|
|
@@ -10,8 +12,10 @@ export * from "./creatererank.js";
|
|
|
10
12
|
export * from "./createresponses.js";
|
|
11
13
|
export * from "./createtts.js";
|
|
12
14
|
export * from "./createvideos.js";
|
|
15
|
+
export * from "./createworkspace.js";
|
|
13
16
|
export * from "./deleteguardrail.js";
|
|
14
17
|
export * from "./deletekeys.js";
|
|
18
|
+
export * from "./deleteworkspace.js";
|
|
15
19
|
export * from "./exchangeauthcodeforapikey.js";
|
|
16
20
|
export * from "./getcredits.js";
|
|
17
21
|
export * from "./getcurrentkey.js";
|
|
@@ -21,10 +25,12 @@ export * from "./getkey.js";
|
|
|
21
25
|
export * from "./getmodels.js";
|
|
22
26
|
export * from "./getuseractivity.js";
|
|
23
27
|
export * from "./getvideos.js";
|
|
28
|
+
export * from "./getworkspace.js";
|
|
24
29
|
export * from "./list.js";
|
|
25
30
|
export * from "./listembeddingsmodels.js";
|
|
26
31
|
export * from "./listendpoints.js";
|
|
27
32
|
export * from "./listendpointszdr.js";
|
|
33
|
+
export * from "./listgenerationcontent.js";
|
|
28
34
|
export * from "./listguardrailkeyassignments.js";
|
|
29
35
|
export * from "./listguardrailmemberassignments.js";
|
|
30
36
|
export * from "./listguardrails.js";
|
|
@@ -36,7 +42,9 @@ export * from "./listorganizationmembers.js";
|
|
|
36
42
|
export * from "./listproviders.js";
|
|
37
43
|
export * from "./listvideoscontent.js";
|
|
38
44
|
export * from "./listvideosmodels.js";
|
|
45
|
+
export * from "./listworkspaces.js";
|
|
39
46
|
export * from "./sendchatcompletionrequest.js";
|
|
40
47
|
export * from "./updateguardrail.js";
|
|
41
48
|
export * from "./updatekeys.js";
|
|
49
|
+
export * from "./updateworkspace.js";
|
|
42
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
* @generated-id: 0d9ffaf774d2
|
|
4
4
|
*/
|
|
5
|
+
export * from "./bulkaddworkspacemembers.js";
|
|
5
6
|
export * from "./bulkassignkeystoguardrail.js";
|
|
6
7
|
export * from "./bulkassignmemberstoguardrail.js";
|
|
8
|
+
export * from "./bulkremoveworkspacemembers.js";
|
|
7
9
|
export * from "./bulkunassignkeysfromguardrail.js";
|
|
8
10
|
export * from "./bulkunassignmembersfromguardrail.js";
|
|
9
11
|
export * from "./createauthkeyscode.js";
|
|
@@ -14,8 +16,10 @@ export * from "./creatererank.js";
|
|
|
14
16
|
export * from "./createresponses.js";
|
|
15
17
|
export * from "./createtts.js";
|
|
16
18
|
export * from "./createvideos.js";
|
|
19
|
+
export * from "./createworkspace.js";
|
|
17
20
|
export * from "./deleteguardrail.js";
|
|
18
21
|
export * from "./deletekeys.js";
|
|
22
|
+
export * from "./deleteworkspace.js";
|
|
19
23
|
export * from "./exchangeauthcodeforapikey.js";
|
|
20
24
|
export * from "./getcredits.js";
|
|
21
25
|
export * from "./getcurrentkey.js";
|
|
@@ -25,10 +29,12 @@ export * from "./getkey.js";
|
|
|
25
29
|
export * from "./getmodels.js";
|
|
26
30
|
export * from "./getuseractivity.js";
|
|
27
31
|
export * from "./getvideos.js";
|
|
32
|
+
export * from "./getworkspace.js";
|
|
28
33
|
export * from "./list.js";
|
|
29
34
|
export * from "./listembeddingsmodels.js";
|
|
30
35
|
export * from "./listendpoints.js";
|
|
31
36
|
export * from "./listendpointszdr.js";
|
|
37
|
+
export * from "./listgenerationcontent.js";
|
|
32
38
|
export * from "./listguardrailkeyassignments.js";
|
|
33
39
|
export * from "./listguardrailmemberassignments.js";
|
|
34
40
|
export * from "./listguardrails.js";
|
|
@@ -40,7 +46,9 @@ export * from "./listorganizationmembers.js";
|
|
|
40
46
|
export * from "./listproviders.js";
|
|
41
47
|
export * from "./listvideoscontent.js";
|
|
42
48
|
export * from "./listvideosmodels.js";
|
|
49
|
+
export * from "./listworkspaces.js";
|
|
43
50
|
export * from "./sendchatcompletionrequest.js";
|
|
44
51
|
export * from "./updateguardrail.js";
|
|
45
52
|
export * from "./updatekeys.js";
|
|
53
|
+
export * from "./updateworkspace.js";
|
|
46
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type ListGenerationContentGlobals = {
|
|
3
|
+
/**
|
|
4
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This is used to track API usage per application.
|
|
8
|
+
*/
|
|
9
|
+
httpReferer?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*/
|
|
15
|
+
appTitle?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
21
|
+
appCategories?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type ListGenerationContentRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is used to track API usage per application.
|
|
29
|
+
*/
|
|
30
|
+
httpReferer?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
*/
|
|
36
|
+
appTitle?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
*/
|
|
42
|
+
appCategories?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* The generation ID
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type ListGenerationContentRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
id: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const ListGenerationContentRequest$outboundSchema: z.ZodType<ListGenerationContentRequest$Outbound, ListGenerationContentRequest>;
|
|
57
|
+
export declare function listGenerationContentRequestToJSON(listGenerationContentRequest: ListGenerationContentRequest): string;
|
|
58
|
+
//# sourceMappingURL=listgenerationcontent.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 75c4167b92a2
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ListGenerationContentRequest$outboundSchema = z.object({
|
|
9
|
+
httpReferer: z.string().optional(),
|
|
10
|
+
appTitle: z.string().optional(),
|
|
11
|
+
appCategories: z.string().optional(),
|
|
12
|
+
id: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function listGenerationContentRequestToJSON(listGenerationContentRequest) {
|
|
19
|
+
return JSON.stringify(ListGenerationContentRequest$outboundSchema.parse(listGenerationContentRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=listgenerationcontent.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
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";
|
|
5
|
+
export type ListWorkspacesGlobals = {
|
|
6
|
+
/**
|
|
7
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* This is used to track API usage per application.
|
|
11
|
+
*/
|
|
12
|
+
httpReferer?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*/
|
|
18
|
+
appTitle?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
*/
|
|
24
|
+
appCategories?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
export type ListWorkspacesRequest = {
|
|
27
|
+
/**
|
|
28
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* This is used to track API usage per application.
|
|
32
|
+
*/
|
|
33
|
+
httpReferer?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
*/
|
|
39
|
+
appTitle?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
*/
|
|
45
|
+
appCategories?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Number of records to skip for pagination
|
|
48
|
+
*/
|
|
49
|
+
offset?: number | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum number of records to return (max 100)
|
|
52
|
+
*/
|
|
53
|
+
limit?: number | undefined;
|
|
54
|
+
};
|
|
55
|
+
export type ListWorkspacesResponse = {
|
|
56
|
+
result: models.ListWorkspacesResponse;
|
|
57
|
+
};
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type ListWorkspacesRequest$Outbound = {
|
|
60
|
+
"HTTP-Referer"?: string | undefined;
|
|
61
|
+
appTitle?: string | undefined;
|
|
62
|
+
appCategories?: string | undefined;
|
|
63
|
+
offset?: number | null | undefined;
|
|
64
|
+
limit?: number | undefined;
|
|
65
|
+
};
|
|
66
|
+
/** @internal */
|
|
67
|
+
export declare const ListWorkspacesRequest$outboundSchema: z.ZodType<ListWorkspacesRequest$Outbound, ListWorkspacesRequest>;
|
|
68
|
+
export declare function listWorkspacesRequestToJSON(listWorkspacesRequest: ListWorkspacesRequest): string;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export declare const ListWorkspacesResponse$inboundSchema: z.ZodType<ListWorkspacesResponse, unknown>;
|
|
71
|
+
export declare function listWorkspacesResponseFromJSON(jsonString: string): SafeParseResult<ListWorkspacesResponse, SDKValidationError>;
|
|
72
|
+
//# sourceMappingURL=listworkspaces.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 04f9b5b78c0f
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as models from "../index.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ListWorkspacesRequest$outboundSchema = z.object({
|
|
11
|
+
httpReferer: z.string().optional(),
|
|
12
|
+
appTitle: z.string().optional(),
|
|
13
|
+
appCategories: z.string().optional(),
|
|
14
|
+
offset: z.nullable(z.int()).optional(),
|
|
15
|
+
limit: z.int().optional(),
|
|
16
|
+
}).transform((v) => {
|
|
17
|
+
return remap$(v, {
|
|
18
|
+
httpReferer: "HTTP-Referer",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function listWorkspacesRequestToJSON(listWorkspacesRequest) {
|
|
22
|
+
return JSON.stringify(ListWorkspacesRequest$outboundSchema.parse(listWorkspacesRequest));
|
|
23
|
+
}
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ListWorkspacesResponse$inboundSchema = z.object({
|
|
26
|
+
Result: models.ListWorkspacesResponse$inboundSchema,
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"Result": "result",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
export function listWorkspacesResponseFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => ListWorkspacesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkspacesResponse' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=listworkspaces.js.map
|