@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
|
@@ -18,6 +18,7 @@ export * from "./createauthkeyscode.js";
|
|
|
18
18
|
export * from "./createbatches.js";
|
|
19
19
|
export * from "./createbyokkey.js";
|
|
20
20
|
export * from "./createembeddings.js";
|
|
21
|
+
export * from "./createenduser.js";
|
|
21
22
|
export * from "./createguardrail.js";
|
|
22
23
|
export * from "./createimages.js";
|
|
23
24
|
export * from "./createintern.js";
|
|
@@ -38,6 +39,7 @@ export * from "./createvideos.js";
|
|
|
38
39
|
export * from "./createworkspace.js";
|
|
39
40
|
export * from "./deletebatch.js";
|
|
40
41
|
export * from "./deletebyokkey.js";
|
|
42
|
+
export * from "./deleteenduser.js";
|
|
41
43
|
export * from "./deletefile.js";
|
|
42
44
|
export * from "./deleteguardrail.js";
|
|
43
45
|
export * from "./deleteintern.js";
|
|
@@ -62,6 +64,7 @@ export * from "./getbyokkey.js";
|
|
|
62
64
|
export * from "./getcontainerfile.js";
|
|
63
65
|
export * from "./getcredits.js";
|
|
64
66
|
export * from "./getcurrentkey.js";
|
|
67
|
+
export * from "./getenduser.js";
|
|
65
68
|
export * from "./getfilemetadata.js";
|
|
66
69
|
export * from "./getgeneration.js";
|
|
67
70
|
export * from "./getguardrail.js";
|
|
@@ -93,6 +96,7 @@ export * from "./listcontainerfiles.js";
|
|
|
93
96
|
export * from "./listembeddingsmodels.js";
|
|
94
97
|
export * from "./listendpoints.js";
|
|
95
98
|
export * from "./listendpointszdr.js";
|
|
99
|
+
export * from "./listendusers.js";
|
|
96
100
|
export * from "./listfiles.js";
|
|
97
101
|
export * from "./listgenerationcontent.js";
|
|
98
102
|
export * from "./listguardrailkeyassignments.js";
|
|
@@ -132,6 +136,7 @@ export * from "./storevaultsecret.js";
|
|
|
132
136
|
export * from "./submitgenerationfeedback.js";
|
|
133
137
|
export * from "./suspendintern.js";
|
|
134
138
|
export * from "./updatebyokkey.js";
|
|
139
|
+
export * from "./updateenduser.js";
|
|
135
140
|
export * from "./updateguardrail.js";
|
|
136
141
|
export * from "./updateintern.js";
|
|
137
142
|
export * from "./updatekeys.js";
|
|
@@ -0,0 +1,82 @@
|
|
|
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 ListEndUsersGlobals = {
|
|
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 ListEndUsersRequest = {
|
|
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
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
56
|
+
*/
|
|
57
|
+
user?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Include deactivated registrations.
|
|
60
|
+
*/
|
|
61
|
+
includeInactive?: boolean | undefined;
|
|
62
|
+
};
|
|
63
|
+
export type ListEndUsersResponse = {
|
|
64
|
+
result: models.ListEndUsersResponse;
|
|
65
|
+
};
|
|
66
|
+
/** @internal */
|
|
67
|
+
export type ListEndUsersRequest$Outbound = {
|
|
68
|
+
"HTTP-Referer"?: string | undefined;
|
|
69
|
+
appTitle?: string | undefined;
|
|
70
|
+
appCategories?: string | undefined;
|
|
71
|
+
offset: number | null;
|
|
72
|
+
limit: number;
|
|
73
|
+
user?: string | undefined;
|
|
74
|
+
include_inactive: boolean;
|
|
75
|
+
};
|
|
76
|
+
/** @internal */
|
|
77
|
+
export declare const ListEndUsersRequest$outboundSchema: z.ZodType<ListEndUsersRequest$Outbound, ListEndUsersRequest>;
|
|
78
|
+
export declare function listEndUsersRequestToJSON(listEndUsersRequest: ListEndUsersRequest): string;
|
|
79
|
+
/** @internal */
|
|
80
|
+
export declare const ListEndUsersResponse$inboundSchema: z.ZodType<ListEndUsersResponse, unknown>;
|
|
81
|
+
export declare function listEndUsersResponseFromJSON(jsonString: string): SafeParseResult<ListEndUsersResponse, SDKValidationError>;
|
|
82
|
+
//# sourceMappingURL=listendusers.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a9ea0c370613
|
|
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 { ListEndUsersResponse$inboundSchema as models_ListEndUsersResponse$inboundSchema } from "../listendusersresponse.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ListEndUsersRequest$outboundSchema = z.object({
|
|
11
|
+
httpReferer: z.string().optional(),
|
|
12
|
+
appTitle: z.string().optional(),
|
|
13
|
+
appCategories: z.string().optional(),
|
|
14
|
+
offset: z.nullable(z.int().default(0)),
|
|
15
|
+
limit: z.int().default(50),
|
|
16
|
+
user: z.string().optional(),
|
|
17
|
+
includeInactive: z.boolean().default(false),
|
|
18
|
+
}).transform((v) => {
|
|
19
|
+
return remap$(v, {
|
|
20
|
+
httpReferer: "HTTP-Referer",
|
|
21
|
+
includeInactive: "include_inactive",
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
export function listEndUsersRequestToJSON(listEndUsersRequest) {
|
|
25
|
+
return JSON.stringify(ListEndUsersRequest$outboundSchema.parse(listEndUsersRequest));
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ListEndUsersResponse$inboundSchema = z.object({
|
|
29
|
+
Result: models_ListEndUsersResponse$inboundSchema,
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"Result": "result",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
export function listEndUsersResponseFromJSON(jsonString) {
|
|
36
|
+
return safeParse(jsonString, (x) => ListEndUsersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEndUsersResponse' from JSON`);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=listendusers.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
export type UpdateEndUserGlobals = {
|
|
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 UpdateEndUserRequest = {
|
|
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
|
+
/**
|
|
45
|
+
* Immutable case-sensitive tracking string supplied as user on inference requests. URL-encode it in resource paths.
|
|
46
|
+
*/
|
|
47
|
+
user: string;
|
|
48
|
+
updateEndUserRequest: models.UpdateEndUserRequest;
|
|
49
|
+
};
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type UpdateEndUserRequest$Outbound = {
|
|
52
|
+
"HTTP-Referer"?: string | undefined;
|
|
53
|
+
appTitle?: string | undefined;
|
|
54
|
+
appCategories?: string | undefined;
|
|
55
|
+
user: string;
|
|
56
|
+
UpdateEndUserRequest: models.UpdateEndUserRequest$Outbound;
|
|
57
|
+
};
|
|
58
|
+
/** @internal */
|
|
59
|
+
export declare const UpdateEndUserRequest$outboundSchema: z.ZodType<UpdateEndUserRequest$Outbound, UpdateEndUserRequest>;
|
|
60
|
+
export declare function updateEndUserRequestToJSON(updateEndUserRequest: UpdateEndUserRequest): string;
|
|
61
|
+
//# sourceMappingURL=updateenduser.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 15ed3e7fa116
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { UpdateEndUserRequest$outboundSchema as models_UpdateEndUserRequest$outboundSchema } from "../updateenduserrequest.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const UpdateEndUserRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
user: z.string(),
|
|
14
|
+
updateEndUserRequest: models_UpdateEndUserRequest$outboundSchema,
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
httpReferer: "HTTP-Referer",
|
|
18
|
+
updateEndUserRequest: "UpdateEndUserRequest",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function updateEndUserRequestToJSON(updateEndUserRequest) {
|
|
22
|
+
return JSON.stringify(UpdateEndUserRequest$outboundSchema.parse(updateEndUserRequest));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=updateenduser.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type UpdateEndUserRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* Registration state only; does not enforce inference access.
|
|
5
|
+
*/
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type UpdateEndUserRequest$Outbound = {
|
|
10
|
+
is_active: boolean;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const UpdateEndUserRequest$outboundSchema: z.ZodType<UpdateEndUserRequest$Outbound, UpdateEndUserRequest>;
|
|
14
|
+
export declare function updateEndUserRequestToJSON(updateEndUserRequest: UpdateEndUserRequest): string;
|
|
15
|
+
//# sourceMappingURL=updateenduserrequest.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 74fcb924ddd3
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const UpdateEndUserRequest$outboundSchema = z.object({
|
|
9
|
+
isActive: z.boolean(),
|
|
10
|
+
}).transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
isActive: "is_active",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export function updateEndUserRequestToJSON(updateEndUserRequest) {
|
|
16
|
+
return JSON.stringify(UpdateEndUserRequest$outboundSchema.parse(updateEndUserRequest));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=updateenduserrequest.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as models from "../models/index.js";
|
|
3
|
+
import * as operations from "../models/operations/index.js";
|
|
4
|
+
import { PageIterator } from "../types/operations.js";
|
|
5
|
+
export declare class EndUsers extends ClientSDK {
|
|
6
|
+
/**
|
|
7
|
+
* List registered end users
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* List registrations belonging to the authenticated organization. Inactive registrations are excluded by default. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
11
|
+
*/
|
|
12
|
+
list(request?: operations.ListEndUsersRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListEndUsersResponse, {
|
|
13
|
+
offset: number;
|
|
14
|
+
}>>;
|
|
15
|
+
/**
|
|
16
|
+
* Register an end user
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Register a caller-supplied tracking ID under the authenticated organization. No login account, policy, or credentials are created. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
*/
|
|
21
|
+
create(request: operations.CreateEndUserRequest, options?: RequestOptions): Promise<models.EndUserResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Deactivate a registered end user
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Soft-deactivate a registration while retaining its tracking ID. Repeat deactivation succeeds. This does not block inference; reactivate through PATCH. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
27
|
+
*/
|
|
28
|
+
delete(request: operations.DeleteEndUserRequest, options?: RequestOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Get a registered end user
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Retrieve an active or inactive registration by its URL-encoded, caller-supplied tracking ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
34
|
+
*/
|
|
35
|
+
get(request: operations.GetEndUserRequest, options?: RequestOptions): Promise<models.EndUserResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Update a registered end user
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Update registration state without changing identity. State changes do not enforce inference access. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
41
|
+
*/
|
|
42
|
+
update(request: operations.UpdateEndUserRequest, options?: RequestOptions): Promise<models.EndUserResponse>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=endusers.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8e12697ee658
|
|
4
|
+
*/
|
|
5
|
+
import { endUsersCreate } from "../funcs/endUsersCreate.js";
|
|
6
|
+
import { endUsersDelete } from "../funcs/endUsersDelete.js";
|
|
7
|
+
import { endUsersGet } from "../funcs/endUsersGet.js";
|
|
8
|
+
import { endUsersList } from "../funcs/endUsersList.js";
|
|
9
|
+
import { endUsersUpdate } from "../funcs/endUsersUpdate.js";
|
|
10
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
11
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
+
import { unwrapResultIterator } from "../types/operations.js";
|
|
13
|
+
export class EndUsers extends ClientSDK {
|
|
14
|
+
/**
|
|
15
|
+
* List registered end users
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* List registrations belonging to the authenticated organization. Inactive registrations are excluded by default. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
19
|
+
*/
|
|
20
|
+
async list(request, options) {
|
|
21
|
+
return unwrapResultIterator(endUsersList(this, request, options));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Register an end user
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Register a caller-supplied tracking ID under the authenticated organization. No login account, policy, or credentials are created. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
28
|
+
*/
|
|
29
|
+
async create(request, options) {
|
|
30
|
+
return unwrapAsync(endUsersCreate(this, request, options));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Deactivate a registered end user
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Soft-deactivate a registration while retaining its tracking ID. Repeat deactivation succeeds. This does not block inference; reactivate through PATCH. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
37
|
+
*/
|
|
38
|
+
async delete(request, options) {
|
|
39
|
+
return unwrapAsync(endUsersDelete(this, request, options));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get a registered end user
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Retrieve an active or inactive registration by its URL-encoded, caller-supplied tracking ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
46
|
+
*/
|
|
47
|
+
async get(request, options) {
|
|
48
|
+
return unwrapAsync(endUsersGet(this, request, options));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Update a registered end user
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Update registration state without changing identity. State changes do not enforce inference access. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
55
|
+
*/
|
|
56
|
+
async update(request, options) {
|
|
57
|
+
return unwrapAsync(endUsersUpdate(this, request, options));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=endusers.js.map
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { Credits } from "./credits.js";
|
|
|
13
13
|
import { Datasets } from "./datasets.js";
|
|
14
14
|
import { Embeddings } from "./embeddings.js";
|
|
15
15
|
import { Endpoints } from "./endpoints.js";
|
|
16
|
+
import { EndUsers } from "./endusers.js";
|
|
16
17
|
import { Files } from "./files.js";
|
|
17
18
|
import { Generations } from "./generations.js";
|
|
18
19
|
import { Guardrails } from "./guardrails.js";
|
|
@@ -70,6 +71,8 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
70
71
|
get datasets(): Datasets;
|
|
71
72
|
private _embeddings?;
|
|
72
73
|
get embeddings(): Embeddings;
|
|
74
|
+
private _endUsers?;
|
|
75
|
+
get endUsers(): EndUsers;
|
|
73
76
|
private _endpoints?;
|
|
74
77
|
get endpoints(): Endpoints;
|
|
75
78
|
private _files?;
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -17,6 +17,7 @@ import { Credits } from "./credits.js";
|
|
|
17
17
|
import { Datasets } from "./datasets.js";
|
|
18
18
|
import { Embeddings } from "./embeddings.js";
|
|
19
19
|
import { Endpoints } from "./endpoints.js";
|
|
20
|
+
import { EndUsers } from "./endusers.js";
|
|
20
21
|
import { Files } from "./files.js";
|
|
21
22
|
import { Generations } from "./generations.js";
|
|
22
23
|
import { Guardrails } from "./guardrails.js";
|
|
@@ -86,6 +87,9 @@ export class OpenRouter extends ClientSDK {
|
|
|
86
87
|
get embeddings() {
|
|
87
88
|
return (this._embeddings ?? (this._embeddings = new Embeddings(this._options)));
|
|
88
89
|
}
|
|
90
|
+
get endUsers() {
|
|
91
|
+
return (this._endUsers ?? (this._endUsers = new EndUsers(this._options)));
|
|
92
|
+
}
|
|
89
93
|
get endpoints() {
|
|
90
94
|
return (this._endpoints ?? (this._endpoints = new Endpoints(this._options)));
|
|
91
95
|
}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.11",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
76
|
+
"prepare": "npm run build",
|
|
77
77
|
"typecheck:transit": "exit 0",
|
|
78
78
|
"postinstall": "node scripts/check-types.js || true",
|
|
79
|
-
"prepare": "npm run build",
|
|
80
|
-
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
81
79
|
"test": "vitest --run --project unit",
|
|
82
80
|
"test:e2e": "vitest --run --project e2e",
|
|
83
81
|
"test:transit": "exit 0",
|
|
84
|
-
"test:watch": "vitest --watch --project unit"
|
|
82
|
+
"test:watch": "vitest --watch --project unit",
|
|
83
|
+
"typecheck": "tsc --noEmit",
|
|
84
|
+
"compile": "tsc && node scripts/unbarrel-imports.js"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|