@openrouter/sdk 0.13.22 → 0.13.23
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/workspacesListMembers.d.ts +21 -0
- package/esm/funcs/workspacesListMembers.js +140 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/index.d.ts +1 -0
- package/esm/models/index.js +1 -0
- package/esm/models/listworkspacemembersresponse.d.ts +18 -0
- package/esm/models/listworkspacemembersresponse.js +21 -0
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/listworkspacemembers.d.ts +77 -0
- package/esm/models/operations/listworkspacemembers.js +36 -0
- package/esm/sdk/workspaces.d.ts +9 -0
- package/esm/sdk/workspaces.js +10 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
import { PageIterator } from "../types/operations.js";
|
|
12
|
+
/**
|
|
13
|
+
* List workspace members
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
|
+
*/
|
|
18
|
+
export declare function workspacesListMembers(client: OpenRouterCore, request: operations.ListWorkspaceMembersRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListWorkspaceMembersResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
|
+
offset: number;
|
|
20
|
+
}>>;
|
|
21
|
+
//# sourceMappingURL=workspacesListMembers.d.ts.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 52e1d4037081
|
|
4
|
+
*/
|
|
5
|
+
import { dlv } from "../lib/dlv.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as errors from "../models/errors/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
17
|
+
/**
|
|
18
|
+
* List workspace members
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
22
|
+
*/
|
|
23
|
+
export function workspacesListMembers(client, request, options) {
|
|
24
|
+
return new APIPromise($do(client, request, options));
|
|
25
|
+
}
|
|
26
|
+
async function $do(client, request, options) {
|
|
27
|
+
const parsed = safeParse(request, (value) => operations.ListWorkspaceMembersRequest$outboundSchema.parse(value), "Input validation failed");
|
|
28
|
+
if (!parsed.ok) {
|
|
29
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
30
|
+
}
|
|
31
|
+
const payload = parsed.value;
|
|
32
|
+
const body = null;
|
|
33
|
+
const pathParams = {
|
|
34
|
+
id: encodeSimple("id", payload.id, {
|
|
35
|
+
explode: false,
|
|
36
|
+
charEncoding: "percent",
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
const path = pathToFunc("/workspaces/{id}/members")(pathParams);
|
|
40
|
+
const query = encodeFormQuery({
|
|
41
|
+
"limit": payload.limit,
|
|
42
|
+
"offset": payload.offset,
|
|
43
|
+
});
|
|
44
|
+
const headers = new Headers(compactMap({
|
|
45
|
+
Accept: "application/json",
|
|
46
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
47
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
48
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
49
|
+
}));
|
|
50
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
51
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
52
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
53
|
+
const context = {
|
|
54
|
+
options: client._options,
|
|
55
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
56
|
+
operationID: "listWorkspaceMembers",
|
|
57
|
+
oAuth2Scopes: null,
|
|
58
|
+
resolvedSecurity: requestSecurity,
|
|
59
|
+
securitySource: client._options.apiKey,
|
|
60
|
+
retryConfig: options?.retries
|
|
61
|
+
|| client._options.retryConfig
|
|
62
|
+
|| {
|
|
63
|
+
strategy: "backoff",
|
|
64
|
+
backoff: {
|
|
65
|
+
initialInterval: 500,
|
|
66
|
+
maxInterval: 60000,
|
|
67
|
+
exponent: 1.5,
|
|
68
|
+
maxElapsedTime: 3600000,
|
|
69
|
+
},
|
|
70
|
+
retryConnectionErrors: true,
|
|
71
|
+
}
|
|
72
|
+
|| { strategy: "none" },
|
|
73
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
74
|
+
};
|
|
75
|
+
const requestRes = client._createRequest(context, {
|
|
76
|
+
security: requestSecurity,
|
|
77
|
+
method: "GET",
|
|
78
|
+
baseURL: options?.serverURL,
|
|
79
|
+
path: path,
|
|
80
|
+
headers: headers,
|
|
81
|
+
query: query,
|
|
82
|
+
body: body,
|
|
83
|
+
userAgent: client._options.userAgent,
|
|
84
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
85
|
+
}, options);
|
|
86
|
+
if (!requestRes.ok) {
|
|
87
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const req = requestRes.value;
|
|
90
|
+
const doResult = await client._do(req, {
|
|
91
|
+
context,
|
|
92
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
93
|
+
retryConfig: context.retryConfig,
|
|
94
|
+
retryCodes: context.retryCodes,
|
|
95
|
+
});
|
|
96
|
+
if (!doResult.ok) {
|
|
97
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
98
|
+
}
|
|
99
|
+
const response = doResult.value;
|
|
100
|
+
const responseFields = {
|
|
101
|
+
HttpMeta: { Response: response, Request: req },
|
|
102
|
+
};
|
|
103
|
+
const [result, raw] = await M.match(M.json(200, operations.ListWorkspaceMembersResponse$inboundSchema, {
|
|
104
|
+
key: "Result",
|
|
105
|
+
}), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
106
|
+
if (!result.ok) {
|
|
107
|
+
return [haltIterator(result), {
|
|
108
|
+
status: "complete",
|
|
109
|
+
request: req,
|
|
110
|
+
response,
|
|
111
|
+
}];
|
|
112
|
+
}
|
|
113
|
+
const nextFunc = (responseData) => {
|
|
114
|
+
const offset = request?.offset ?? 0;
|
|
115
|
+
if (!responseData) {
|
|
116
|
+
return { next: () => null };
|
|
117
|
+
}
|
|
118
|
+
const results = dlv(responseData, "data");
|
|
119
|
+
if (!Array.isArray(results) || !results.length) {
|
|
120
|
+
return { next: () => null };
|
|
121
|
+
}
|
|
122
|
+
const limit = request?.limit ?? 0;
|
|
123
|
+
if (results.length < limit) {
|
|
124
|
+
return { next: () => null };
|
|
125
|
+
}
|
|
126
|
+
const nextOffset = offset + results.length;
|
|
127
|
+
const nextVal = () => workspacesListMembers(client, {
|
|
128
|
+
...request,
|
|
129
|
+
offset: nextOffset,
|
|
130
|
+
}, options);
|
|
131
|
+
return { next: nextVal, "~next": { offset: nextOffset } };
|
|
132
|
+
};
|
|
133
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
134
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
135
|
+
status: "complete",
|
|
136
|
+
request: req,
|
|
137
|
+
response,
|
|
138
|
+
}];
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=workspacesListMembers.js.map
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "0.13.
|
|
52
|
+
readonly sdkVersion: "0.13.23";
|
|
53
53
|
readonly genVersion: "2.884.4";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.23 2.884.4 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "0.13.
|
|
29
|
+
sdkVersion: "0.13.23",
|
|
30
30
|
genVersion: "2.884.4",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.13.23 2.884.4 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -273,6 +273,7 @@ export * from "./listobservabilitydestinationsresponse.js";
|
|
|
273
273
|
export * from "./listpresetsresponse.js";
|
|
274
274
|
export * from "./listpresetversionsresponse.js";
|
|
275
275
|
export * from "./listworkspacebudgetsresponse.js";
|
|
276
|
+
export * from "./listworkspacemembersresponse.js";
|
|
276
277
|
export * from "./listworkspacesresponse.js";
|
|
277
278
|
export * from "./localshellcallitem.js";
|
|
278
279
|
export * from "./localshellcalloutputitem.js";
|
package/esm/models/index.js
CHANGED
|
@@ -277,6 +277,7 @@ export * from "./listobservabilitydestinationsresponse.js";
|
|
|
277
277
|
export * from "./listpresetsresponse.js";
|
|
278
278
|
export * from "./listpresetversionsresponse.js";
|
|
279
279
|
export * from "./listworkspacebudgetsresponse.js";
|
|
280
|
+
export * from "./listworkspacemembersresponse.js";
|
|
280
281
|
export * from "./listworkspacesresponse.js";
|
|
281
282
|
export * from "./localshellcallitem.js";
|
|
282
283
|
export * from "./localshellcalloutputitem.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { WorkspaceMember } from "./workspacemember.js";
|
|
5
|
+
export type ListWorkspaceMembersResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* List of workspace members
|
|
8
|
+
*/
|
|
9
|
+
data: Array<WorkspaceMember>;
|
|
10
|
+
/**
|
|
11
|
+
* Total number of members in the workspace
|
|
12
|
+
*/
|
|
13
|
+
totalCount: number;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ListWorkspaceMembersResponse$inboundSchema: z.ZodType<ListWorkspaceMembersResponse, unknown>;
|
|
17
|
+
export declare function listWorkspaceMembersResponseFromJSON(jsonString: string): SafeParseResult<ListWorkspaceMembersResponse, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=listworkspacemembersresponse.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b6bc81be6e23
|
|
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 { WorkspaceMember$inboundSchema, } from "./workspacemember.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ListWorkspaceMembersResponse$inboundSchema = z.object({
|
|
11
|
+
data: z.array(WorkspaceMember$inboundSchema),
|
|
12
|
+
total_count: z.int(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
"total_count": "totalCount",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function listWorkspaceMembersResponseFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => ListWorkspaceMembersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkspaceMembersResponse' from JSON`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=listworkspacemembersresponse.js.map
|
|
@@ -73,6 +73,7 @@ export * from "./listproviders.js";
|
|
|
73
73
|
export * from "./listvideoscontent.js";
|
|
74
74
|
export * from "./listvideosmodels.js";
|
|
75
75
|
export * from "./listworkspacebudgets.js";
|
|
76
|
+
export * from "./listworkspacemembers.js";
|
|
76
77
|
export * from "./listworkspaces.js";
|
|
77
78
|
export * from "./queryanalytics.js";
|
|
78
79
|
export * from "./sendchatcompletionrequest.js";
|
|
@@ -77,6 +77,7 @@ export * from "./listproviders.js";
|
|
|
77
77
|
export * from "./listvideoscontent.js";
|
|
78
78
|
export * from "./listvideosmodels.js";
|
|
79
79
|
export * from "./listworkspacebudgets.js";
|
|
80
|
+
export * from "./listworkspacemembers.js";
|
|
80
81
|
export * from "./listworkspaces.js";
|
|
81
82
|
export * from "./queryanalytics.js";
|
|
82
83
|
export * from "./sendchatcompletionrequest.js";
|
|
@@ -0,0 +1,77 @@
|
|
|
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 ListWorkspaceMembersGlobals = {
|
|
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 ListWorkspaceMembersRequest = {
|
|
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
|
+
* The workspace ID (UUID) or slug
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* Number of records to skip for pagination
|
|
52
|
+
*/
|
|
53
|
+
offset?: number | null | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Maximum number of records to return (max 100)
|
|
56
|
+
*/
|
|
57
|
+
limit?: number | undefined;
|
|
58
|
+
};
|
|
59
|
+
export type ListWorkspaceMembersResponse = {
|
|
60
|
+
result: models.ListWorkspaceMembersResponse;
|
|
61
|
+
};
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type ListWorkspaceMembersRequest$Outbound = {
|
|
64
|
+
"HTTP-Referer"?: string | undefined;
|
|
65
|
+
appTitle?: string | undefined;
|
|
66
|
+
appCategories?: string | undefined;
|
|
67
|
+
id: string;
|
|
68
|
+
offset?: number | null | undefined;
|
|
69
|
+
limit?: number | undefined;
|
|
70
|
+
};
|
|
71
|
+
/** @internal */
|
|
72
|
+
export declare const ListWorkspaceMembersRequest$outboundSchema: z.ZodType<ListWorkspaceMembersRequest$Outbound, ListWorkspaceMembersRequest>;
|
|
73
|
+
export declare function listWorkspaceMembersRequestToJSON(listWorkspaceMembersRequest: ListWorkspaceMembersRequest): string;
|
|
74
|
+
/** @internal */
|
|
75
|
+
export declare const ListWorkspaceMembersResponse$inboundSchema: z.ZodType<ListWorkspaceMembersResponse, unknown>;
|
|
76
|
+
export declare function listWorkspaceMembersResponseFromJSON(jsonString: string): SafeParseResult<ListWorkspaceMembersResponse, SDKValidationError>;
|
|
77
|
+
//# sourceMappingURL=listworkspacemembers.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 009ed1f62eb4
|
|
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 ListWorkspaceMembersRequest$outboundSchema = z.object({
|
|
11
|
+
httpReferer: z.string().optional(),
|
|
12
|
+
appTitle: z.string().optional(),
|
|
13
|
+
appCategories: z.string().optional(),
|
|
14
|
+
id: z.string(),
|
|
15
|
+
offset: z.nullable(z.int()).optional(),
|
|
16
|
+
limit: z.int().optional(),
|
|
17
|
+
}).transform((v) => {
|
|
18
|
+
return remap$(v, {
|
|
19
|
+
httpReferer: "HTTP-Referer",
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
export function listWorkspaceMembersRequestToJSON(listWorkspaceMembersRequest) {
|
|
23
|
+
return JSON.stringify(ListWorkspaceMembersRequest$outboundSchema.parse(listWorkspaceMembersRequest));
|
|
24
|
+
}
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ListWorkspaceMembersResponse$inboundSchema = z.object({
|
|
27
|
+
Result: models.ListWorkspaceMembersResponse$inboundSchema,
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"Result": "result",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
export function listWorkspaceMembersResponseFromJSON(jsonString) {
|
|
34
|
+
return safeParse(jsonString, (x) => ListWorkspaceMembersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkspaceMembersResponse' from JSON`);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=listworkspacemembers.js.map
|
package/esm/sdk/workspaces.d.ts
CHANGED
|
@@ -61,6 +61,15 @@ export declare class Workspaces extends ClientSDK {
|
|
|
61
61
|
* Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
62
62
|
*/
|
|
63
63
|
setBudget(request: operations.UpsertWorkspaceBudgetRequest, options?: RequestOptions): Promise<models.UpsertWorkspaceBudgetResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* List workspace members
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
69
|
+
*/
|
|
70
|
+
listMembers(request: operations.ListWorkspaceMembersRequest, options?: RequestOptions): Promise<PageIterator<operations.ListWorkspaceMembersResponse, {
|
|
71
|
+
offset: number;
|
|
72
|
+
}>>;
|
|
64
73
|
/**
|
|
65
74
|
* Bulk add members to a workspace
|
|
66
75
|
*
|
package/esm/sdk/workspaces.js
CHANGED
|
@@ -10,6 +10,7 @@ import { workspacesDeleteBudget } from "../funcs/workspacesDeleteBudget.js";
|
|
|
10
10
|
import { workspacesGet } from "../funcs/workspacesGet.js";
|
|
11
11
|
import { workspacesList } from "../funcs/workspacesList.js";
|
|
12
12
|
import { workspacesListBudgets } from "../funcs/workspacesListBudgets.js";
|
|
13
|
+
import { workspacesListMembers } from "../funcs/workspacesListMembers.js";
|
|
13
14
|
import { workspacesSetBudget } from "../funcs/workspacesSetBudget.js";
|
|
14
15
|
import { workspacesUpdate } from "../funcs/workspacesUpdate.js";
|
|
15
16
|
import { ClientSDK } from "../lib/sdks.js";
|
|
@@ -88,6 +89,15 @@ export class Workspaces extends ClientSDK {
|
|
|
88
89
|
async setBudget(request, options) {
|
|
89
90
|
return unwrapAsync(workspacesSetBudget(this, request, options));
|
|
90
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* List workspace members
|
|
94
|
+
*
|
|
95
|
+
* @remarks
|
|
96
|
+
* List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
97
|
+
*/
|
|
98
|
+
async listMembers(request, options) {
|
|
99
|
+
return unwrapResultIterator(workspacesListMembers(this, request, options));
|
|
100
|
+
}
|
|
91
101
|
/**
|
|
92
102
|
* Bulk add members to a workspace
|
|
93
103
|
*
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.23",
|
|
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",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"test": "vitest --run --project unit",
|
|
76
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
77
78
|
"prepare": "npm run build",
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
|
-
"typecheck:transit": "exit 0",
|
|
80
|
-
"compile": "tsc",
|
|
81
|
-
"test": "vitest --run --project unit",
|
|
82
79
|
"test:e2e": "vitest --run --project e2e",
|
|
83
80
|
"test:transit": "exit 0",
|
|
84
|
-
"
|
|
81
|
+
"test:watch": "vitest --watch --project unit",
|
|
82
|
+
"typecheck": "tsc --noEmit",
|
|
83
|
+
"typecheck:transit": "exit 0",
|
|
84
|
+
"compile": "tsc"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|