@openrouter/sdk 1.4.10 → 1.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/funcs/endUsersCreate.d.ts +19 -0
- package/esm/funcs/endUsersCreate.js +100 -0
- package/esm/funcs/endUsersDelete.d.ts +18 -0
- package/esm/funcs/endUsersDelete.js +103 -0
- package/esm/funcs/endUsersGet.d.ts +19 -0
- package/esm/funcs/endUsersGet.js +103 -0
- package/esm/funcs/endUsersList.d.ts +21 -0
- package/esm/funcs/endUsersList.js +135 -0
- package/esm/funcs/endUsersUpdate.d.ts +19 -0
- package/esm/funcs/endUsersUpdate.js +106 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/createenduserrequest.d.ts +15 -0
- package/esm/models/createenduserrequest.js +13 -0
- package/esm/models/enduser.d.ts +25 -0
- package/esm/models/enduser.js +24 -0
- package/esm/models/enduserresponse.d.ts +11 -0
- package/esm/models/enduserresponse.js +15 -0
- package/esm/models/index.d.ts +5 -0
- package/esm/models/index.js +5 -0
- package/esm/models/listendusersresponse.d.ts +15 -0
- package/esm/models/listendusersresponse.js +21 -0
- package/esm/models/operations/createenduser.d.ts +56 -0
- package/esm/models/operations/createenduser.js +23 -0
- package/esm/models/operations/deleteenduser.d.ts +58 -0
- package/esm/models/operations/deleteenduser.js +21 -0
- package/esm/models/operations/getenduser.d.ts +58 -0
- package/esm/models/operations/getenduser.js +21 -0
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.js +5 -0
- package/esm/models/operations/listendusers.d.ts +82 -0
- package/esm/models/operations/listendusers.js +38 -0
- package/esm/models/operations/updateenduser.d.ts +61 -0
- package/esm/models/operations/updateenduser.js +24 -0
- package/esm/models/updateenduserrequest.d.ts +15 -0
- package/esm/models/updateenduserrequest.js +18 -0
- package/esm/sdk/endusers.d.ts +44 -0
- package/esm/sdk/endusers.js +60 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7fb2aab2b543
|
|
4
|
+
*/
|
|
5
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { EndUserResponse$inboundSchema as models_EndUserResponse$inboundSchema } from "../models/enduserresponse.js";
|
|
14
|
+
import { UpdateEndUserRequest$outboundSchema as operations_UpdateEndUserRequest$outboundSchema } from "../models/operations/updateenduser.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Update a registered end user
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Update registration state without changing identity. State changes do not enforce inference access. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
|
+
*/
|
|
22
|
+
export function endUsersUpdate(client, request, options) {
|
|
23
|
+
return new APIPromise($do(client, request, options));
|
|
24
|
+
}
|
|
25
|
+
async function $do(client, request, options) {
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_UpdateEndUserRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
|
+
if (!parsed.ok) {
|
|
28
|
+
return [parsed, { status: "invalid" }];
|
|
29
|
+
}
|
|
30
|
+
const payload = parsed.value;
|
|
31
|
+
const body = encodeJSON("body", payload.UpdateEndUserRequest, {
|
|
32
|
+
explode: true,
|
|
33
|
+
});
|
|
34
|
+
const pathParams = {
|
|
35
|
+
user: encodeSimple("user", payload.user, {
|
|
36
|
+
explode: false,
|
|
37
|
+
charEncoding: "percent",
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
const path = pathToFunc("/end-users/{user}")(pathParams);
|
|
41
|
+
const headers = new Headers(compactMap({
|
|
42
|
+
"Content-Type": "application/json",
|
|
43
|
+
Accept: "application/json",
|
|
44
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
45
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
46
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
47
|
+
}));
|
|
48
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
49
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
50
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
51
|
+
const context = {
|
|
52
|
+
options: client._options,
|
|
53
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
54
|
+
operationID: "updateEndUser",
|
|
55
|
+
oAuth2Scopes: null,
|
|
56
|
+
resolvedSecurity: requestSecurity,
|
|
57
|
+
securitySource: client._options.apiKey,
|
|
58
|
+
retryConfig: options?.retries
|
|
59
|
+
|| client._options.retryConfig
|
|
60
|
+
|| {
|
|
61
|
+
strategy: "backoff",
|
|
62
|
+
backoff: {
|
|
63
|
+
initialInterval: 500,
|
|
64
|
+
maxInterval: 60000,
|
|
65
|
+
exponent: 1.5,
|
|
66
|
+
maxElapsedTime: 3600000,
|
|
67
|
+
},
|
|
68
|
+
retryConnectionErrors: true,
|
|
69
|
+
}
|
|
70
|
+
|| { strategy: "none" },
|
|
71
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
72
|
+
};
|
|
73
|
+
const requestRes = client._createRequest(context, {
|
|
74
|
+
security: requestSecurity,
|
|
75
|
+
method: "PATCH",
|
|
76
|
+
baseURL: options?.serverURL,
|
|
77
|
+
path: path,
|
|
78
|
+
headers: headers,
|
|
79
|
+
body: body,
|
|
80
|
+
userAgent: client._options.userAgent,
|
|
81
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
82
|
+
}, options);
|
|
83
|
+
if (!requestRes.ok) {
|
|
84
|
+
return [requestRes, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const req = requestRes.value;
|
|
87
|
+
const doResult = await client._do(req, {
|
|
88
|
+
context,
|
|
89
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
90
|
+
retryConfig: context.retryConfig,
|
|
91
|
+
retryCodes: context.retryCodes,
|
|
92
|
+
});
|
|
93
|
+
if (!doResult.ok) {
|
|
94
|
+
return [doResult, { status: "request-error", request: req }];
|
|
95
|
+
}
|
|
96
|
+
const response = doResult.value;
|
|
97
|
+
const responseFields = {
|
|
98
|
+
HttpMeta: { Response: response, Request: req },
|
|
99
|
+
};
|
|
100
|
+
const [result] = await M.match(M.json(200, models_EndUserResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
101
|
+
if (!result.ok) {
|
|
102
|
+
return [result, { status: "complete", request: req, response }];
|
|
103
|
+
}
|
|
104
|
+
return [result, { status: "complete", request: req, response }];
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=endUsersUpdate.js.map
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.4.
|
|
53
|
+
readonly sdkVersion: "1.4.11";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.4.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.4.11 2.914.0 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.4.
|
|
32
|
+
sdkVersion: "1.4.11",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.4.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.4.11 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type CreateEndUserRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
5
|
+
*/
|
|
6
|
+
user: string;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type CreateEndUserRequest$Outbound = {
|
|
10
|
+
user: string;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const CreateEndUserRequest$outboundSchema: z.ZodType<CreateEndUserRequest$Outbound, CreateEndUserRequest>;
|
|
14
|
+
export declare function createEndUserRequestToJSON(createEndUserRequest: CreateEndUserRequest): string;
|
|
15
|
+
//# sourceMappingURL=createenduserrequest.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ff82d51467ad
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const CreateEndUserRequest$outboundSchema = z.object({
|
|
8
|
+
user: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export function createEndUserRequestToJSON(createEndUserRequest) {
|
|
11
|
+
return JSON.stringify(CreateEndUserRequest$outboundSchema.parse(createEndUserRequest));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=createenduserrequest.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type EndUser = {
|
|
5
|
+
/**
|
|
6
|
+
* Registration creation time.
|
|
7
|
+
*/
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
/**
|
|
10
|
+
* Whether this registration is active. Not an inference authorization decision.
|
|
11
|
+
*/
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Last registration lifecycle update time.
|
|
15
|
+
*/
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
/**
|
|
18
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
19
|
+
*/
|
|
20
|
+
user: string;
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
export declare const EndUser$inboundSchema: z.ZodType<EndUser, unknown>;
|
|
24
|
+
export declare function endUserFromJSON(jsonString: string): SafeParseResult<EndUser, SDKValidationError>;
|
|
25
|
+
//# sourceMappingURL=enduser.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f0f7f996359a
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const EndUser$inboundSchema = z.object({
|
|
10
|
+
created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
|
|
11
|
+
is_active: z.boolean(),
|
|
12
|
+
updated_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
|
|
13
|
+
user: z.string(),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"created_at": "createdAt",
|
|
17
|
+
"is_active": "isActive",
|
|
18
|
+
"updated_at": "updatedAt",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function endUserFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => EndUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndUser' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=enduser.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { EndUser } from "./enduser.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type EndUserResponse = {
|
|
6
|
+
data: EndUser;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const EndUserResponse$inboundSchema: z.ZodType<EndUserResponse, unknown>;
|
|
10
|
+
export declare function endUserResponseFromJSON(jsonString: string): SafeParseResult<EndUserResponse, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=enduserresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8e60bf584de3
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { EndUser$inboundSchema } from "./enduser.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const EndUserResponse$inboundSchema = z.object({
|
|
10
|
+
data: EndUser$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function endUserResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => EndUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndUserResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=enduserresponse.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -260,6 +260,7 @@ export * from "./contextcompressionplugin.js";
|
|
|
260
260
|
export * from "./costdetails.js";
|
|
261
261
|
export * from "./createbyokkeyrequest.js";
|
|
262
262
|
export * from "./createbyokkeyresponse.js";
|
|
263
|
+
export * from "./createenduserrequest.js";
|
|
263
264
|
export * from "./createguardrailrequest.js";
|
|
264
265
|
export * from "./createguardrailresponse.js";
|
|
265
266
|
export * from "./createinternrequest.js";
|
|
@@ -305,6 +306,8 @@ export * from "./edgenetworktimeoutresponseerrordata.js";
|
|
|
305
306
|
export * from "./endpointinfo.js";
|
|
306
307
|
export * from "./endpointsmetadata.js";
|
|
307
308
|
export * from "./endpointstatus.js";
|
|
309
|
+
export * from "./enduser.js";
|
|
310
|
+
export * from "./enduserresponse.js";
|
|
308
311
|
export * from "./enumcapability.js";
|
|
309
312
|
export * from "./errorevent.js";
|
|
310
313
|
export * from "./failabletoolcallstatus.js";
|
|
@@ -441,6 +444,7 @@ export * from "./legacychatcontentvideoinput.js";
|
|
|
441
444
|
export * from "./legacywebsearchservertool.js";
|
|
442
445
|
export * from "./listbyokkeysresponse.js";
|
|
443
446
|
export * from "./listendpointsresponse.js";
|
|
447
|
+
export * from "./listendusersresponse.js";
|
|
444
448
|
export * from "./listguardrailsresponse.js";
|
|
445
449
|
export * from "./listkeyassignmentsresponse.js";
|
|
446
450
|
export * from "./listmemberassignmentsresponse.js";
|
|
@@ -776,6 +780,7 @@ export * from "./unifiedbenchmarkssearchrunconfig.js";
|
|
|
776
780
|
export * from "./unprocessableentityresponseerrordata.js";
|
|
777
781
|
export * from "./updatebyokkeyrequest.js";
|
|
778
782
|
export * from "./updatebyokkeyresponse.js";
|
|
783
|
+
export * from "./updateenduserrequest.js";
|
|
779
784
|
export * from "./updateguardrailrequest.js";
|
|
780
785
|
export * from "./updateguardrailresponse.js";
|
|
781
786
|
export * from "./updateinternrequest.js";
|
package/esm/models/index.js
CHANGED
|
@@ -264,6 +264,7 @@ export * from "./contextcompressionplugin.js";
|
|
|
264
264
|
export * from "./costdetails.js";
|
|
265
265
|
export * from "./createbyokkeyrequest.js";
|
|
266
266
|
export * from "./createbyokkeyresponse.js";
|
|
267
|
+
export * from "./createenduserrequest.js";
|
|
267
268
|
export * from "./createguardrailrequest.js";
|
|
268
269
|
export * from "./createguardrailresponse.js";
|
|
269
270
|
export * from "./createinternrequest.js";
|
|
@@ -309,6 +310,8 @@ export * from "./edgenetworktimeoutresponseerrordata.js";
|
|
|
309
310
|
export * from "./endpointinfo.js";
|
|
310
311
|
export * from "./endpointsmetadata.js";
|
|
311
312
|
export * from "./endpointstatus.js";
|
|
313
|
+
export * from "./enduser.js";
|
|
314
|
+
export * from "./enduserresponse.js";
|
|
312
315
|
export * from "./enumcapability.js";
|
|
313
316
|
export * from "./errorevent.js";
|
|
314
317
|
export * from "./failabletoolcallstatus.js";
|
|
@@ -445,6 +448,7 @@ export * from "./legacychatcontentvideoinput.js";
|
|
|
445
448
|
export * from "./legacywebsearchservertool.js";
|
|
446
449
|
export * from "./listbyokkeysresponse.js";
|
|
447
450
|
export * from "./listendpointsresponse.js";
|
|
451
|
+
export * from "./listendusersresponse.js";
|
|
448
452
|
export * from "./listguardrailsresponse.js";
|
|
449
453
|
export * from "./listkeyassignmentsresponse.js";
|
|
450
454
|
export * from "./listmemberassignmentsresponse.js";
|
|
@@ -780,6 +784,7 @@ export * from "./unifiedbenchmarkssearchrunconfig.js";
|
|
|
780
784
|
export * from "./unprocessableentityresponseerrordata.js";
|
|
781
785
|
export * from "./updatebyokkeyrequest.js";
|
|
782
786
|
export * from "./updatebyokkeyresponse.js";
|
|
787
|
+
export * from "./updateenduserrequest.js";
|
|
783
788
|
export * from "./updateguardrailrequest.js";
|
|
784
789
|
export * from "./updateguardrailresponse.js";
|
|
785
790
|
export * from "./updateinternrequest.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { EndUser } from "./enduser.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type ListEndUsersResponse = {
|
|
6
|
+
data: Array<EndUser>;
|
|
7
|
+
/**
|
|
8
|
+
* Number of registrations matching the filters before pagination.
|
|
9
|
+
*/
|
|
10
|
+
totalCount: number;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ListEndUsersResponse$inboundSchema: z.ZodType<ListEndUsersResponse, unknown>;
|
|
14
|
+
export declare function listEndUsersResponseFromJSON(jsonString: string): SafeParseResult<ListEndUsersResponse, SDKValidationError>;
|
|
15
|
+
//# sourceMappingURL=listendusersresponse.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: dc07ec7c7cd3
|
|
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 { EndUser$inboundSchema } from "./enduser.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ListEndUsersResponse$inboundSchema = z.object({
|
|
11
|
+
data: z.array(EndUser$inboundSchema),
|
|
12
|
+
total_count: z.int(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
"total_count": "totalCount",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function listEndUsersResponseFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => ListEndUsersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEndUsersResponse' from JSON`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=listendusersresponse.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
export type CreateEndUserGlobals = {
|
|
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
|
+
export type CreateEndUserRequest = {
|
|
25
|
+
/**
|
|
26
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is used to track API usage per application.
|
|
30
|
+
*/
|
|
31
|
+
httpReferer?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*/
|
|
37
|
+
appTitle?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
*/
|
|
43
|
+
appCategories?: string | undefined;
|
|
44
|
+
createEndUserRequest: models.CreateEndUserRequest;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type CreateEndUserRequest$Outbound = {
|
|
48
|
+
"HTTP-Referer"?: string | undefined;
|
|
49
|
+
appTitle?: string | undefined;
|
|
50
|
+
appCategories?: string | undefined;
|
|
51
|
+
CreateEndUserRequest: models.CreateEndUserRequest$Outbound;
|
|
52
|
+
};
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const CreateEndUserRequest$outboundSchema: z.ZodType<CreateEndUserRequest$Outbound, CreateEndUserRequest>;
|
|
55
|
+
export declare function createEndUserRequestToJSON(createEndUserRequest: CreateEndUserRequest): string;
|
|
56
|
+
//# sourceMappingURL=createenduser.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0f247a9b55fb
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { CreateEndUserRequest$outboundSchema as models_CreateEndUserRequest$outboundSchema } from "../createenduserrequest.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CreateEndUserRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
createEndUserRequest: models_CreateEndUserRequest$outboundSchema,
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
httpReferer: "HTTP-Referer",
|
|
17
|
+
createEndUserRequest: "CreateEndUserRequest",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function createEndUserRequestToJSON(createEndUserRequest) {
|
|
21
|
+
return JSON.stringify(CreateEndUserRequest$outboundSchema.parse(createEndUserRequest));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=createenduser.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type DeleteEndUserGlobals = {
|
|
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 DeleteEndUserRequest = {
|
|
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
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
45
|
+
*/
|
|
46
|
+
user: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type DeleteEndUserRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
user: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const DeleteEndUserRequest$outboundSchema: z.ZodType<DeleteEndUserRequest$Outbound, DeleteEndUserRequest>;
|
|
57
|
+
export declare function deleteEndUserRequestToJSON(deleteEndUserRequest: DeleteEndUserRequest): string;
|
|
58
|
+
//# sourceMappingURL=deleteenduser.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3ae73f681eb2
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const DeleteEndUserRequest$outboundSchema = z.object({
|
|
9
|
+
httpReferer: z.string().optional(),
|
|
10
|
+
appTitle: z.string().optional(),
|
|
11
|
+
appCategories: z.string().optional(),
|
|
12
|
+
user: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function deleteEndUserRequestToJSON(deleteEndUserRequest) {
|
|
19
|
+
return JSON.stringify(DeleteEndUserRequest$outboundSchema.parse(deleteEndUserRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=deleteenduser.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type GetEndUserGlobals = {
|
|
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 GetEndUserRequest = {
|
|
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
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
45
|
+
*/
|
|
46
|
+
user: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type GetEndUserRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
user: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const GetEndUserRequest$outboundSchema: z.ZodType<GetEndUserRequest$Outbound, GetEndUserRequest>;
|
|
57
|
+
export declare function getEndUserRequestToJSON(getEndUserRequest: GetEndUserRequest): string;
|
|
58
|
+
//# sourceMappingURL=getenduser.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a59cb5362b77
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const GetEndUserRequest$outboundSchema = z.object({
|
|
9
|
+
httpReferer: z.string().optional(),
|
|
10
|
+
appTitle: z.string().optional(),
|
|
11
|
+
appCategories: z.string().optional(),
|
|
12
|
+
user: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function getEndUserRequestToJSON(getEndUserRequest) {
|
|
19
|
+
return JSON.stringify(GetEndUserRequest$outboundSchema.parse(getEndUserRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getenduser.js.map
|
|
@@ -14,6 +14,7 @@ export * from "./createauthkeyscode.js";
|
|
|
14
14
|
export * from "./createbatches.js";
|
|
15
15
|
export * from "./createbyokkey.js";
|
|
16
16
|
export * from "./createembeddings.js";
|
|
17
|
+
export * from "./createenduser.js";
|
|
17
18
|
export * from "./createguardrail.js";
|
|
18
19
|
export * from "./createimages.js";
|
|
19
20
|
export * from "./createintern.js";
|
|
@@ -34,6 +35,7 @@ export * from "./createvideos.js";
|
|
|
34
35
|
export * from "./createworkspace.js";
|
|
35
36
|
export * from "./deletebatch.js";
|
|
36
37
|
export * from "./deletebyokkey.js";
|
|
38
|
+
export * from "./deleteenduser.js";
|
|
37
39
|
export * from "./deletefile.js";
|
|
38
40
|
export * from "./deleteguardrail.js";
|
|
39
41
|
export * from "./deleteintern.js";
|
|
@@ -58,6 +60,7 @@ export * from "./getbyokkey.js";
|
|
|
58
60
|
export * from "./getcontainerfile.js";
|
|
59
61
|
export * from "./getcredits.js";
|
|
60
62
|
export * from "./getcurrentkey.js";
|
|
63
|
+
export * from "./getenduser.js";
|
|
61
64
|
export * from "./getfilemetadata.js";
|
|
62
65
|
export * from "./getgeneration.js";
|
|
63
66
|
export * from "./getguardrail.js";
|
|
@@ -89,6 +92,7 @@ export * from "./listcontainerfiles.js";
|
|
|
89
92
|
export * from "./listembeddingsmodels.js";
|
|
90
93
|
export * from "./listendpoints.js";
|
|
91
94
|
export * from "./listendpointszdr.js";
|
|
95
|
+
export * from "./listendusers.js";
|
|
92
96
|
export * from "./listfiles.js";
|
|
93
97
|
export * from "./listgenerationcontent.js";
|
|
94
98
|
export * from "./listguardrailkeyassignments.js";
|
|
@@ -128,6 +132,7 @@ export * from "./storevaultsecret.js";
|
|
|
128
132
|
export * from "./submitgenerationfeedback.js";
|
|
129
133
|
export * from "./suspendintern.js";
|
|
130
134
|
export * from "./updatebyokkey.js";
|
|
135
|
+
export * from "./updateenduser.js";
|
|
131
136
|
export * from "./updateguardrail.js";
|
|
132
137
|
export * from "./updateintern.js";
|
|
133
138
|
export * from "./updatekeys.js";
|