@openrouter/sdk 1.5.82 → 1.5.84

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.
Files changed (38) hide show
  1. package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
  2. package/esm/funcs/analyticsGetUserActivity.js +1 -1
  3. package/esm/funcs/guardrailsBulkAssignKeys.d.ts +1 -1
  4. package/esm/funcs/guardrailsBulkAssignKeys.js +1 -1
  5. package/esm/funcs/guardrailsBulkAssignMembers.d.ts +1 -1
  6. package/esm/funcs/guardrailsBulkAssignMembers.js +1 -1
  7. package/esm/funcs/guardrailsBulkUnassignKeys.d.ts +1 -1
  8. package/esm/funcs/guardrailsBulkUnassignKeys.js +1 -1
  9. package/esm/funcs/guardrailsBulkUnassignMembers.d.ts +1 -1
  10. package/esm/funcs/guardrailsBulkUnassignMembers.js +1 -1
  11. package/esm/funcs/guardrailsCreate.d.ts +1 -1
  12. package/esm/funcs/guardrailsCreate.js +1 -1
  13. package/esm/funcs/guardrailsDelete.d.ts +1 -1
  14. package/esm/funcs/guardrailsDelete.js +1 -1
  15. package/esm/funcs/guardrailsGet.d.ts +1 -1
  16. package/esm/funcs/guardrailsGet.js +1 -1
  17. package/esm/funcs/guardrailsList.d.ts +1 -1
  18. package/esm/funcs/guardrailsList.js +1 -1
  19. package/esm/funcs/guardrailsListGuardrailKeyAssignments.d.ts +1 -1
  20. package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +1 -1
  21. package/esm/funcs/guardrailsListGuardrailMemberAssignments.d.ts +1 -1
  22. package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +1 -1
  23. package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
  24. package/esm/funcs/guardrailsListKeyAssignments.js +1 -1
  25. package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
  26. package/esm/funcs/guardrailsListMemberAssignments.js +1 -1
  27. package/esm/funcs/guardrailsUpdate.d.ts +1 -1
  28. package/esm/funcs/guardrailsUpdate.js +1 -1
  29. package/esm/lib/config.d.ts +2 -2
  30. package/esm/lib/config.js +2 -2
  31. package/esm/models/createguardrailrequest.d.ts +1 -1
  32. package/esm/models/operations/listguardrails.d.ts +1 -1
  33. package/esm/sdk/analytics.d.ts +1 -1
  34. package/esm/sdk/analytics.js +1 -1
  35. package/esm/sdk/guardrails.d.ts +13 -13
  36. package/esm/sdk/guardrails.js +13 -13
  37. package/jsr.json +1 -1
  38. package/package.json +8 -8
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Get user activity grouped by endpoint
14
14
  *
15
15
  * @remarks
16
- * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: an omitted `workspace_id` defaults to it, a `workspace_id` naming any other workspace returns 403, `api_key_hash` and `user_id` resolve only keys and members of that workspace, and legacy activity with no workspace is excluded (including for the default workspace). [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function analyticsGetUserActivity(client: OpenRouterCore, request?: operations.GetUserActivityRequest | undefined, options?: RequestOptions): APIPromise<Result<models.ActivityResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=analyticsGetUserActivity.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Get user activity grouped by endpoint
18
18
  *
19
19
  * @remarks
20
- * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: an omitted `workspace_id` defaults to it, a `workspace_id` naming any other workspace returns 403, `api_key_hash` and `user_id` resolve only keys and members of that workspace, and legacy activity with no workspace is excluded (including for the default workspace). [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function analyticsGetUserActivity(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Bulk assign keys to a guardrail
14
14
  *
15
15
  * @remarks
16
- * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsBulkAssignKeys(client: OpenRouterCore, request: operations.BulkAssignKeysToGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.BulkAssignKeysResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsBulkAssignKeys.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Bulk assign keys to a guardrail
18
18
  *
19
19
  * @remarks
20
- * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsBulkAssignKeys(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Bulk assign members to a guardrail
14
14
  *
15
15
  * @remarks
16
- * Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Assign multiple organization members to a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsBulkAssignMembers(client: OpenRouterCore, request: operations.BulkAssignMembersToGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.BulkAssignMembersResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsBulkAssignMembers.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Bulk assign members to a guardrail
18
18
  *
19
19
  * @remarks
20
- * Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Assign multiple organization members to a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsBulkAssignMembers(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Bulk unassign keys from a guardrail
14
14
  *
15
15
  * @remarks
16
- * Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Unassign multiple API keys from a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsBulkUnassignKeys(client: OpenRouterCore, request: operations.BulkUnassignKeysFromGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.BulkUnassignKeysResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsBulkUnassignKeys.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Bulk unassign keys from a guardrail
18
18
  *
19
19
  * @remarks
20
- * Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Unassign multiple API keys from a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsBulkUnassignKeys(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Bulk unassign members from a guardrail
14
14
  *
15
15
  * @remarks
16
- * Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Unassign multiple organization members from a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsBulkUnassignMembers(client: OpenRouterCore, request: operations.BulkUnassignMembersFromGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.BulkUnassignMembersResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsBulkUnassignMembers.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Bulk unassign members from a guardrail
18
18
  *
19
19
  * @remarks
20
- * Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Unassign multiple organization members from a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsBulkUnassignMembers(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create a guardrail
14
14
  *
15
15
  * @remarks
16
- * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. A workspace-scoped management key creates in its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsCreate(client: OpenRouterCore, request: operations.CreateGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.CreateGuardrailResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsCreate.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Create a guardrail
18
18
  *
19
19
  * @remarks
20
- * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. A workspace-scoped management key creates in its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsCreate(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Delete a guardrail
14
14
  *
15
15
  * @remarks
16
- * Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Delete an existing guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsDelete(client: OpenRouterCore, request: operations.DeleteGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.DeleteGuardrailResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsDelete.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Delete a guardrail
18
18
  *
19
19
  * @remarks
20
- * Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Delete an existing guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsDelete(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Get a guardrail
14
14
  *
15
15
  * @remarks
16
- * Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Get a single guardrail by ID. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsGet(client: OpenRouterCore, request: operations.GetGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.GetGuardrailResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsGet.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Get a guardrail
18
18
  *
19
19
  * @remarks
20
- * Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Get a single guardrail by ID. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsGet(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
13
13
  * List guardrails
14
14
  *
15
15
  * @remarks
16
- * List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * List all guardrails for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsList(client: OpenRouterCore, request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListGuardrailsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
19
19
  offset: number;
@@ -17,7 +17,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
17
17
  * List guardrails
18
18
  *
19
19
  * @remarks
20
- * List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * List all guardrails for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsList(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
13
13
  * List key assignments for a guardrail
14
14
  *
15
15
  * @remarks
16
- * List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * List all API key assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsListGuardrailKeyAssignments(client: OpenRouterCore, request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListGuardrailKeyAssignmentsResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
19
19
  offset: number;
@@ -17,7 +17,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
17
17
  * List key assignments for a guardrail
18
18
  *
19
19
  * @remarks
20
- * List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * List all API key assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsListGuardrailKeyAssignments(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
13
13
  * List member assignments for a guardrail
14
14
  *
15
15
  * @remarks
16
- * List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * List all organization member assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsListGuardrailMemberAssignments(client: OpenRouterCore, request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListGuardrailMemberAssignmentsResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
19
19
  offset: number;
@@ -17,7 +17,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
17
17
  * List member assignments for a guardrail
18
18
  *
19
19
  * @remarks
20
- * List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * List all organization member assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsListGuardrailMemberAssignments(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
13
13
  * List all key assignments
14
14
  *
15
15
  * @remarks
16
- * List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * List all API key guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsListKeyAssignments(client: OpenRouterCore, request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListKeyAssignmentsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
19
19
  offset: number;
@@ -17,7 +17,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
17
17
  * List all key assignments
18
18
  *
19
19
  * @remarks
20
- * List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * List all API key guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsListKeyAssignments(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { PageIterator } from "../types/operations.js";
13
13
  * List all member assignments
14
14
  *
15
15
  * @remarks
16
- * List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * List all organization member guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsListMemberAssignments(client: OpenRouterCore, request?: operations.ListMemberAssignmentsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListMemberAssignmentsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
19
19
  offset: number;
@@ -17,7 +17,7 @@ import { createPageIterator, haltIterator, } from "../types/operations.js";
17
17
  * List all member assignments
18
18
  *
19
19
  * @remarks
20
- * List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * List all organization member guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsListMemberAssignments(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Update a guardrail
14
14
  *
15
15
  * @remarks
16
- * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function guardrailsUpdate(client: OpenRouterCore, request: operations.UpdateGuardrailRequest, options?: RequestOptions): APIPromise<Result<models.UpdateGuardrailResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=guardrailsUpdate.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Update a guardrail
18
18
  *
19
19
  * @remarks
20
- * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function guardrailsUpdate(client, request, options) {
23
23
  return new APIPromise($do(client, request, options));
@@ -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.5.82";
53
+ readonly sdkVersion: "1.5.84";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.82 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.84 2.950.13 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.5.82",
32
+ sdkVersion: "1.5.84",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.82 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.84 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -103,7 +103,7 @@ export type CreateGuardrailRequest = {
103
103
  */
104
104
  resetInterval?: GuardrailInterval | null | undefined;
105
105
  /**
106
- * The workspace to create the guardrail in. When omitted, the guardrail is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. This only places the guardrail in the workspace; the created guardrail enforces nothing for that workspace's traffic until it is assigned to API keys or members. To restrict all traffic in a workspace, update the workspace's default guardrail instead.
106
+ * The workspace to create the guardrail in. When omitted, an organization management key creates the guardrail in the default workspace (a 400 if that default has been deleted, so pass `workspace_id` explicitly) and a workspace-scoped key creates it in its own workspace. A workspace-scoped key gets a 403 for any other workspace. This only places the guardrail in the workspace; the created guardrail enforces nothing for that workspace's traffic until it is assigned to API keys or members. To restrict all traffic in a workspace, update the workspace's default guardrail instead.
107
107
  */
108
108
  workspaceId?: string | undefined;
109
109
  };
@@ -52,7 +52,7 @@ export type ListGuardrailsRequest = {
52
52
  */
53
53
  limit?: number | undefined;
54
54
  /**
55
- * Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
55
+ * Filter guardrails by workspace ID. When omitted, an organization management key gets guardrails in the default workspace and a workspace-scoped key gets guardrails in its own workspace. A workspace-scoped key gets 403 for any other workspace.
56
56
  */
57
57
  workspaceId?: string | undefined;
58
58
  };
@@ -6,7 +6,7 @@ export declare class Analytics extends ClientSDK {
6
6
  * Get user activity grouped by endpoint
7
7
  *
8
8
  * @remarks
9
- * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). [Management key](/docs/guides/overview/auth/management-api-keys) required.
9
+ * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: an omitted `workspace_id` defaults to it, a `workspace_id` naming any other workspace returns 403, `api_key_hash` and `user_id` resolve only keys and members of that workspace, and legacy activity with no workspace is excluded (including for the default workspace). [Management key](/docs/guides/overview/auth/management-api-keys) required.
10
10
  */
11
11
  getUserActivity(request?: operations.GetUserActivityRequest | undefined, options?: RequestOptions): Promise<models.ActivityResponse>;
12
12
  /**
@@ -12,7 +12,7 @@ export class Analytics extends ClientSDK {
12
12
  * Get user activity grouped by endpoint
13
13
  *
14
14
  * @remarks
15
- * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). [Management key](/docs/guides/overview/auth/management-api-keys) required.
15
+ * Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: an omitted `workspace_id` defaults to it, a `workspace_id` naming any other workspace returns 403, `api_key_hash` and `user_id` resolve only keys and members of that workspace, and legacy activity with no workspace is excluded (including for the default workspace). [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
16
  */
17
17
  async getUserActivity(request, options) {
18
18
  return unwrapAsync(analyticsGetUserActivity(this, request, options));
@@ -7,7 +7,7 @@ export declare class Guardrails extends ClientSDK {
7
7
  * List guardrails
8
8
  *
9
9
  * @remarks
10
- * List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
10
+ * List all guardrails for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
11
11
  */
12
12
  list(request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListGuardrailsResponse, {
13
13
  offset: number;
@@ -16,35 +16,35 @@ export declare class Guardrails extends ClientSDK {
16
16
  * Create a guardrail
17
17
  *
18
18
  * @remarks
19
- * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
+ * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. A workspace-scoped management key creates in its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
20
  */
21
21
  create(request: operations.CreateGuardrailRequest, options?: RequestOptions): Promise<models.CreateGuardrailResponse>;
22
22
  /**
23
23
  * Delete a guardrail
24
24
  *
25
25
  * @remarks
26
- * Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
26
+ * Delete an existing guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
27
27
  */
28
28
  delete(request: operations.DeleteGuardrailRequest, options?: RequestOptions): Promise<models.DeleteGuardrailResponse>;
29
29
  /**
30
30
  * Get a guardrail
31
31
  *
32
32
  * @remarks
33
- * Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
33
+ * Get a single guardrail by ID. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
34
34
  */
35
35
  get(request: operations.GetGuardrailRequest, options?: RequestOptions): Promise<models.GetGuardrailResponse>;
36
36
  /**
37
37
  * Update a guardrail
38
38
  *
39
39
  * @remarks
40
- * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
40
+ * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
41
41
  */
42
42
  update(request: operations.UpdateGuardrailRequest, options?: RequestOptions): Promise<models.UpdateGuardrailResponse>;
43
43
  /**
44
44
  * List key assignments for a guardrail
45
45
  *
46
46
  * @remarks
47
- * List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
47
+ * List all API key assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
48
48
  */
49
49
  listGuardrailKeyAssignments(request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions): Promise<PageIterator<operations.ListGuardrailKeyAssignmentsResponse, {
50
50
  offset: number;
@@ -53,21 +53,21 @@ export declare class Guardrails extends ClientSDK {
53
53
  * Bulk assign keys to a guardrail
54
54
  *
55
55
  * @remarks
56
- * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
56
+ * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
57
57
  */
58
58
  bulkAssignKeys(request: operations.BulkAssignKeysToGuardrailRequest, options?: RequestOptions): Promise<models.BulkAssignKeysResponse>;
59
59
  /**
60
60
  * Bulk unassign keys from a guardrail
61
61
  *
62
62
  * @remarks
63
- * Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
63
+ * Unassign multiple API keys from a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
64
64
  */
65
65
  bulkUnassignKeys(request: operations.BulkUnassignKeysFromGuardrailRequest, options?: RequestOptions): Promise<models.BulkUnassignKeysResponse>;
66
66
  /**
67
67
  * List member assignments for a guardrail
68
68
  *
69
69
  * @remarks
70
- * List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
70
+ * List all organization member assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
71
71
  */
72
72
  listGuardrailMemberAssignments(request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions): Promise<PageIterator<operations.ListGuardrailMemberAssignmentsResponse, {
73
73
  offset: number;
@@ -76,21 +76,21 @@ export declare class Guardrails extends ClientSDK {
76
76
  * Bulk assign members to a guardrail
77
77
  *
78
78
  * @remarks
79
- * Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
79
+ * Assign multiple organization members to a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
80
80
  */
81
81
  bulkAssignMembers(request: operations.BulkAssignMembersToGuardrailRequest, options?: RequestOptions): Promise<models.BulkAssignMembersResponse>;
82
82
  /**
83
83
  * Bulk unassign members from a guardrail
84
84
  *
85
85
  * @remarks
86
- * Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
86
+ * Unassign multiple organization members from a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
87
87
  */
88
88
  bulkUnassignMembers(request: operations.BulkUnassignMembersFromGuardrailRequest, options?: RequestOptions): Promise<models.BulkUnassignMembersResponse>;
89
89
  /**
90
90
  * List all key assignments
91
91
  *
92
92
  * @remarks
93
- * List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
93
+ * List all API key guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
94
94
  */
95
95
  listKeyAssignments(request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListKeyAssignmentsResponse, {
96
96
  offset: number;
@@ -99,7 +99,7 @@ export declare class Guardrails extends ClientSDK {
99
99
  * List all member assignments
100
100
  *
101
101
  * @remarks
102
- * List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
102
+ * List all organization member guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
103
103
  */
104
104
  listMemberAssignments(request?: operations.ListMemberAssignmentsRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListMemberAssignmentsResponse, {
105
105
  offset: number;
@@ -23,7 +23,7 @@ export class Guardrails extends ClientSDK {
23
23
  * List guardrails
24
24
  *
25
25
  * @remarks
26
- * List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
26
+ * List all guardrails for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
27
27
  */
28
28
  async list(request, options) {
29
29
  return unwrapResultIterator(guardrailsList(this, request, options));
@@ -32,7 +32,7 @@ export class Guardrails extends ClientSDK {
32
32
  * Create a guardrail
33
33
  *
34
34
  * @remarks
35
- * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. [Management key](/docs/guides/overview/auth/management-api-keys) required.
35
+ * Create a new guardrail for the authenticated user. A newly created guardrail enforces nothing until it is assigned to API keys or organization members; `workspace_id` places the guardrail in a workspace but does not apply it to that workspace's traffic. To restrict all traffic in a workspace, update the workspace's default guardrail instead. Set `allowed_data_regions` to enforce [In-Region Routing](/docs/guides/features/in-region-routing#enforcing-in-region-routing-with-guardrails): governed requests must arrive through one of the listed OpenRouter domains and are rejected with a 403 otherwise. A workspace-scoped management key creates in its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
36
36
  */
37
37
  async create(request, options) {
38
38
  return unwrapAsync(guardrailsCreate(this, request, options));
@@ -41,7 +41,7 @@ export class Guardrails extends ClientSDK {
41
41
  * Delete a guardrail
42
42
  *
43
43
  * @remarks
44
- * Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
44
+ * Delete an existing guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
45
45
  */
46
46
  async delete(request, options) {
47
47
  return unwrapAsync(guardrailsDelete(this, request, options));
@@ -50,7 +50,7 @@ export class Guardrails extends ClientSDK {
50
50
  * Get a guardrail
51
51
  *
52
52
  * @remarks
53
- * Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
53
+ * Get a single guardrail by ID. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
54
54
  */
55
55
  async get(request, options) {
56
56
  return unwrapAsync(guardrailsGet(this, request, options));
@@ -59,7 +59,7 @@ export class Guardrails extends ClientSDK {
59
59
  * Update a guardrail
60
60
  *
61
61
  * @remarks
62
- * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
62
+ * Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
63
63
  */
64
64
  async update(request, options) {
65
65
  return unwrapAsync(guardrailsUpdate(this, request, options));
@@ -68,7 +68,7 @@ export class Guardrails extends ClientSDK {
68
68
  * List key assignments for a guardrail
69
69
  *
70
70
  * @remarks
71
- * List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
71
+ * List all API key assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
72
72
  */
73
73
  async listGuardrailKeyAssignments(request, options) {
74
74
  return unwrapResultIterator(guardrailsListGuardrailKeyAssignments(this, request, options));
@@ -77,7 +77,7 @@ export class Guardrails extends ClientSDK {
77
77
  * Bulk assign keys to a guardrail
78
78
  *
79
79
  * @remarks
80
- * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
80
+ * Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
81
81
  */
82
82
  async bulkAssignKeys(request, options) {
83
83
  return unwrapAsync(guardrailsBulkAssignKeys(this, request, options));
@@ -86,7 +86,7 @@ export class Guardrails extends ClientSDK {
86
86
  * Bulk unassign keys from a guardrail
87
87
  *
88
88
  * @remarks
89
- * Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
89
+ * Unassign multiple API keys from a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace (any other returns 404), and a batch naming an unknown or out-of-workspace key hash is rejected with 400 before anything changes. [Management key](/docs/guides/overview/auth/management-api-keys) required.
90
90
  */
91
91
  async bulkUnassignKeys(request, options) {
92
92
  return unwrapAsync(guardrailsBulkUnassignKeys(this, request, options));
@@ -95,7 +95,7 @@ export class Guardrails extends ClientSDK {
95
95
  * List member assignments for a guardrail
96
96
  *
97
97
  * @remarks
98
- * List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
98
+ * List all organization member assignments for a specific guardrail. A workspace-scoped management key reaches only guardrails in its own workspace; any other guardrail returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
99
99
  */
100
100
  async listGuardrailMemberAssignments(request, options) {
101
101
  return unwrapResultIterator(guardrailsListGuardrailMemberAssignments(this, request, options));
@@ -104,7 +104,7 @@ export class Guardrails extends ClientSDK {
104
104
  * Bulk assign members to a guardrail
105
105
  *
106
106
  * @remarks
107
- * Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
107
+ * Assign multiple organization members to a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
108
108
  */
109
109
  async bulkAssignMembers(request, options) {
110
110
  return unwrapAsync(guardrailsBulkAssignMembers(this, request, options));
@@ -113,7 +113,7 @@ export class Guardrails extends ClientSDK {
113
113
  * Bulk unassign members from a guardrail
114
114
  *
115
115
  * @remarks
116
- * Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
116
+ * Unassign multiple organization members from a specific guardrail. Requires an organization-scoped management key; workspace-scoped management keys return 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
117
117
  */
118
118
  async bulkUnassignMembers(request, options) {
119
119
  return unwrapAsync(guardrailsBulkUnassignMembers(this, request, options));
@@ -122,7 +122,7 @@ export class Guardrails extends ClientSDK {
122
122
  * List all key assignments
123
123
  *
124
124
  * @remarks
125
- * List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
125
+ * List all API key guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
126
126
  */
127
127
  async listKeyAssignments(request, options) {
128
128
  return unwrapResultIterator(guardrailsListKeyAssignments(this, request, options));
@@ -131,7 +131,7 @@ export class Guardrails extends ClientSDK {
131
131
  * List all member assignments
132
132
  *
133
133
  * @remarks
134
- * List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
134
+ * List all organization member guardrail assignments for the authenticated user. A workspace-scoped management key lists only its own workspace, which `workspace_id` defaults to; naming another workspace returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
135
135
  */
136
136
  async listMemberAssignments(request, options) {
137
137
  return unwrapResultIterator(guardrailsListMemberAssignments(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.82",
5
+ "version": "1.5.84",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.5.82",
3
+ "version": "1.5.84",
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": [
@@ -21,8 +21,8 @@
21
21
  "license": "Apache-2.0",
22
22
  "packageManager": "pnpm@10.22.0",
23
23
  "publishConfig": {
24
- "access": "public",
25
- "provenance": true
24
+ "provenance": true,
25
+ "access": "public"
26
26
  },
27
27
  "type": "module",
28
28
  "main": "./esm/index.js",
@@ -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
+ "test": "vitest --run --project unit",
77
+ "test:e2e": "vitest --run --project e2e",
76
78
  "test:transit": "exit 0",
77
79
  "typecheck": "tsc --noEmit",
78
- "postinstall": "node scripts/check-types.js || true",
79
- "test:watch": "vitest --watch --project unit",
80
80
  "typecheck:transit": "exit 0",
81
- "compile": "tsc && node scripts/unbarrel-imports.js",
82
81
  "prepare": "npm run build",
83
- "test": "vitest --run --project unit",
84
- "test:e2e": "vitest --run --project e2e"
82
+ "test:watch": "vitest --watch --project unit",
83
+ "compile": "tsc && node scripts/unbarrel-imports.js",
84
+ "postinstall": "node scripts/check-types.js || true"
85
85
  },
86
86
  "peerDependencies": {
87
87