@openrouter/sdk 1.5.125 → 1.5.127

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.
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Get available analytics metrics and dimensions
13
13
  *
14
14
  * @remarks
15
- * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
15
+ * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Custom access requires an organization-scoped key with `analytics:view`. Workspace-scoped keys with base Read Only or Read Write access are also accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
16
  */
17
17
  export declare function analyticsGetAnalyticsMeta(client: OpenRouterCore, request?: operations.GetAnalyticsMetaRequest | undefined, options?: RequestOptions): APIPromise<Result<operations.GetAnalyticsMetaResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=analyticsGetAnalyticsMeta.d.ts.map
@@ -15,7 +15,7 @@ import { APIPromise } from "../types/async.js";
15
15
  * Get available analytics metrics and dimensions
16
16
  *
17
17
  * @remarks
18
- * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
18
+ * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Custom access requires an organization-scoped key with `analytics:view`. Workspace-scoped keys with base Read Only or Read Write access are also accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
19
  */
20
20
  export function analyticsGetAnalyticsMeta(client, request, options) {
21
21
  return new APIPromise($do(client, request, options));
@@ -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). 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
+ * 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). For Custom keys, `api_key_hash` also requires `api_keys:view_all` and does not resolve deleted keys. `user_id` also requires `workspace_members:view` on an explicit non-default workspace; organization and default-workspace member filtering requires `org_members:view`, which is not available as a Custom grant. [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
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Get user activity grouped by endpoint
17
17
  *
18
18
  * @remarks
19
- * 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.
19
+ * 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). For Custom keys, `api_key_hash` also requires `api_keys:view_all` and does not resolve deleted keys. `user_id` also requires `workspace_members:view` on an explicit non-default workspace; organization and default-workspace member filtering requires `org_members:view`, which is not available as a Custom grant. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
20
  */
21
21
  export function analyticsGetUserActivity(client, request, options) {
22
22
  return new APIPromise($do(client, request, options));
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Query analytics data
13
13
  *
14
14
  * @remarks
15
- * Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
15
+ * Execute an analytics query with specified metrics, dimensions, filters, and time range. Custom access requires an organization-scoped key with `analytics:view`; grouping or filtering by `api_key_id` or `api_key_tag` also requires `api_keys:view_all`, and by `user` requires `org_members:view`. Key hash filters resolve only non-deleted ordinary keys. Workspace-scoped keys with base Read Only or Read Write access can query only their own workspace: a `workspace` filter naming another workspace is refused, legacy rows with no workspace are excluded (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
16
  */
17
17
  export declare function analyticsQueryAnalytics(client: OpenRouterCore, request: operations.QueryAnalyticsRequest, options?: RequestOptions): APIPromise<Result<operations.QueryAnalyticsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.RequestTimeoutResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=analyticsQueryAnalytics.d.ts.map
@@ -15,7 +15,7 @@ import { APIPromise } from "../types/async.js";
15
15
  * Query analytics data
16
16
  *
17
17
  * @remarks
18
- * Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
18
+ * Execute an analytics query with specified metrics, dimensions, filters, and time range. Custom access requires an organization-scoped key with `analytics:view`; grouping or filtering by `api_key_id` or `api_key_tag` also requires `api_keys:view_all`, and by `user` requires `org_members:view`. Key hash filters resolve only non-deleted ordinary keys. Workspace-scoped keys with base Read Only or Read Write access can query only their own workspace: a `workspace` filter naming another workspace is refused, legacy rows with no workspace are excluded (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
19
  */
20
20
  export function analyticsQueryAnalytics(client, request, options) {
21
21
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create an observability destination
14
14
  *
15
15
  * @remarks
16
- * Create a new observability destination. A maximum of 5 destinations per type is allowed. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Create a new observability destination. A maximum of 5 enabled destinations per workspace, across all types, is allowed; disabled destinations do not count. A workspace already above the cap keeps its enabled destinations but cannot create or enable more until fewer than 5 are enabled. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function observabilityCreate(client: OpenRouterCore, request: operations.CreateObservabilityDestinationRequest, options?: RequestOptions): APIPromise<Result<models.CreateObservabilityDestinationResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=observabilityCreate.d.ts.map
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Create an observability destination
17
17
  *
18
18
  * @remarks
19
- * Create a new observability destination. A maximum of 5 destinations per type is allowed. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
+ * Create a new observability destination. A maximum of 5 enabled destinations per workspace, across all types, is allowed; disabled destinations do not count. A workspace already above the cap keeps its enabled destinations but cannot create or enable more until fewer than 5 are enabled. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
20
  */
21
21
  export function observabilityCreate(client, request, options) {
22
22
  return new APIPromise($do(client, request, options));
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Update an observability destination
14
14
  *
15
15
  * @remarks
16
- * Update an existing observability destination. Only the fields provided in the request body are updated. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Update an existing observability destination. Only the fields provided in the request body are updated. Enabling a disabled destination returns 400 while the workspace already has 5 enabled destinations. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function observabilityUpdate(client: OpenRouterCore, request: operations.UpdateObservabilityDestinationRequest, options?: RequestOptions): APIPromise<Result<models.UpdateObservabilityDestinationResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=observabilityUpdate.d.ts.map
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Update an observability destination
17
17
  *
18
18
  * @remarks
19
- * Update an existing observability destination. Only the fields provided in the request body are updated. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
+ * Update an existing observability destination. Only the fields provided in the request body are updated. Enabling a disabled destination returns 400 while the workspace already has 5 enabled destinations. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
20
  */
21
21
  export function observabilityUpdate(client, request, options) {
22
22
  return new APIPromise($do(client, request, options));
@@ -12,9 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Start a SCIM directory sync
13
13
  *
14
14
  * @remarks
15
- * Start a SCIM directory sync. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
16
- *
17
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
15
+ * Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
18
16
  */
19
17
  export declare function scimCreateSyncJob(client: OpenRouterCore, request?: operations.CreateScimSyncJobRequest | undefined, options?: RequestOptions): APIPromise<Result<operations.CreateScimSyncJobResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
20
18
  //# sourceMappingURL=scimCreateSyncJob.d.ts.map
@@ -15,9 +15,7 @@ import { APIPromise } from "../types/async.js";
15
15
  * Start a SCIM directory sync
16
16
  *
17
17
  * @remarks
18
- * Start a SCIM directory sync. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
19
- *
20
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
18
+ * Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
19
  */
22
20
  export function scimCreateSyncJob(client, request, options) {
23
21
  return new APIPromise($do(client, request, options));
@@ -13,9 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Delete a SCIM group mapping
14
14
  *
15
15
  * @remarks
16
- * Delete a SCIM group-to-workspace mapping. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
17
- *
18
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
16
+ * Delete a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
17
  */
20
18
  export declare function scimDelete(client: OpenRouterCore, request: operations.DeleteScimGroupMappingRequest, options?: RequestOptions): APIPromise<Result<models.DeleteScimGroupMappingResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
21
19
  //# sourceMappingURL=scimDelete.d.ts.map
@@ -16,9 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Delete a SCIM group mapping
17
17
  *
18
18
  * @remarks
19
- * Delete a SCIM group-to-workspace mapping. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
20
- *
21
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
19
+ * Delete a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
22
20
  */
23
21
  export function scimDelete(client, request, options) {
24
22
  return new APIPromise($do(client, request, options));
@@ -13,9 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Update a SCIM group mapping
14
14
  *
15
15
  * @remarks
16
- * Update a SCIM group mapping role. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
17
- *
18
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
16
+ * Update a SCIM group mapping role. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
17
  */
20
18
  export declare function scimUpdate(client: OpenRouterCore, request: operations.UpdateScimGroupMappingRequest, options?: RequestOptions): APIPromise<Result<models.UpdateScimGroupMappingResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
21
19
  //# sourceMappingURL=scimUpdate.d.ts.map
@@ -16,9 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * Update a SCIM group mapping
17
17
  *
18
18
  * @remarks
19
- * Update a SCIM group mapping role. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
20
- *
21
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
19
+ * Update a SCIM group mapping role. [Management key](/docs/guides/overview/auth/management-api-keys) required.
22
20
  */
23
21
  export function scimUpdate(client, request, options) {
24
22
  return new APIPromise($do(client, request, options));
@@ -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: "1.5.125";
52
+ readonly sdkVersion: "1.5.127";
53
53
  readonly genVersion: "2.960.8";
54
- readonly userAgent: "speakeasy-sdk/typescript 1.5.125 2.960.8 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.127 2.960.8 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
25
25
  export const SDK_METADATA = {
26
26
  language: "typescript",
27
27
  openapiDocVersion: "1.0.0",
28
- sdkVersion: "1.5.125",
28
+ sdkVersion: "1.5.127",
29
29
  genVersion: "2.960.8",
30
- userAgent: "speakeasy-sdk/typescript 1.5.125 2.960.8 1.0.0 @openrouter/sdk",
30
+ userAgent: "speakeasy-sdk/typescript 1.5.127 2.960.8 1.0.0 @openrouter/sdk",
31
31
  };
32
32
  //# sourceMappingURL=config.js.map
@@ -1,6 +1,9 @@
1
1
  import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Workspace metadata. Configuration fields are omitted without permission to view workspace settings.
6
+ */
4
7
  export type Workspace = {
5
8
  /**
6
9
  * ISO 8601 timestamp of when the workspace was created
@@ -17,15 +20,15 @@ export type Workspace = {
17
20
  /**
18
21
  * Default image model for this workspace
19
22
  */
20
- defaultImageModel: string | null;
23
+ defaultImageModel?: string | null | undefined;
21
24
  /**
22
25
  * Default provider sort preference (price, throughput, latency, exacto)
23
26
  */
24
- defaultProviderSort: string | null;
27
+ defaultProviderSort?: string | null | undefined;
25
28
  /**
26
29
  * Default text model for this workspace
27
30
  */
28
- defaultTextModel: string | null;
31
+ defaultTextModel?: string | null | undefined;
29
32
  /**
30
33
  * Description of the workspace
31
34
  */
@@ -39,29 +42,29 @@ export type Workspace = {
39
42
  */
40
43
  id: string;
41
44
  /**
42
- * Whether BYOK (bring-your-own-key) spend counts toward this workspace's budgets. Set it via the workspace budget endpoints.
45
+ * Whether BYOK (bring-your-own-key) spend counts toward this workspace's budgets. Omitted without settings and budget visibility. Set it via the workspace budget endpoints.
43
46
  */
44
47
  includeByokInBudgets?: boolean | undefined;
45
48
  /**
46
- * Optional array of API key IDs to filter I/O logging. Null means all keys are logged.
49
+ * API key IDs used to filter I/O logging. Null means all keys are logged. Omitted without access to workspace settings and API key identifiers.
47
50
  */
48
- ioLoggingApiKeyIds: Array<number> | null;
51
+ ioLoggingApiKeyIds?: Array<number> | null | undefined;
49
52
  /**
50
53
  * Sampling rate for I/O logging (0.0001-1). 1 means 100% of requests are logged.
51
54
  */
52
- ioLoggingSamplingRate: number;
55
+ ioLoggingSamplingRate?: number | undefined;
53
56
  /**
54
57
  * Whether data discount logging is enabled for this workspace
55
58
  */
56
- isDataDiscountLoggingEnabled: boolean;
59
+ isDataDiscountLoggingEnabled?: boolean | undefined;
57
60
  /**
58
61
  * Whether broadcast is enabled for this workspace
59
62
  */
60
- isObservabilityBroadcastEnabled: boolean;
63
+ isObservabilityBroadcastEnabled?: boolean | undefined;
61
64
  /**
62
65
  * Whether private logging is enabled for this workspace
63
66
  */
64
- isObservabilityIoLoggingEnabled: boolean;
67
+ isObservabilityIoLoggingEnabled?: boolean | undefined;
65
68
  /**
66
69
  * Name of the workspace
67
70
  */
@@ -9,18 +9,18 @@ export const Workspace$inboundSchema = z.object({
9
9
  created_at: z.string(),
10
10
  created_by: z.nullable(z.string()),
11
11
  default_guardrail_id: z.string(),
12
- default_image_model: z.nullable(z.string()),
13
- default_provider_sort: z.nullable(z.string()),
14
- default_text_model: z.nullable(z.string()),
12
+ default_image_model: z.nullable(z.string()).optional(),
13
+ default_provider_sort: z.nullable(z.string()).optional(),
14
+ default_text_model: z.nullable(z.string()).optional(),
15
15
  description: z.nullable(z.string()),
16
16
  disabled_server_tools: z.nullable(z.array(z.string())).optional(),
17
17
  id: z.string(),
18
18
  include_byok_in_budgets: z.boolean().optional(),
19
- io_logging_api_key_ids: z.nullable(z.array(z.int())),
20
- io_logging_sampling_rate: z.number(),
21
- is_data_discount_logging_enabled: z.boolean(),
22
- is_observability_broadcast_enabled: z.boolean(),
23
- is_observability_io_logging_enabled: z.boolean(),
19
+ io_logging_api_key_ids: z.nullable(z.array(z.int())).optional(),
20
+ io_logging_sampling_rate: z.number().optional(),
21
+ is_data_discount_logging_enabled: z.boolean().optional(),
22
+ is_observability_broadcast_enabled: z.boolean().optional(),
23
+ is_observability_io_logging_enabled: z.boolean().optional(),
24
24
  name: z.string(),
25
25
  slug: z.string(),
26
26
  updated_at: z.nullable(z.string()),
@@ -6,21 +6,21 @@ 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). 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.
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). For Custom keys, `api_key_hash` also requires `api_keys:view_all` and does not resolve deleted keys. `user_id` also requires `workspace_members:view` on an explicit non-default workspace; organization and default-workspace member filtering requires `org_members:view`, which is not available as a Custom grant. [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
  /**
13
13
  * Get available analytics metrics and dimensions
14
14
  *
15
15
  * @remarks
16
- * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Custom access requires an organization-scoped key with `analytics:view`. Workspace-scoped keys with base Read Only or Read Write access are also accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  getAnalyticsMeta(request?: operations.GetAnalyticsMetaRequest | undefined, options?: RequestOptions): Promise<operations.GetAnalyticsMetaResponse>;
19
19
  /**
20
20
  * Query analytics data
21
21
  *
22
22
  * @remarks
23
- * Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
23
+ * Execute an analytics query with specified metrics, dimensions, filters, and time range. Custom access requires an organization-scoped key with `analytics:view`; grouping or filtering by `api_key_id` or `api_key_tag` also requires `api_keys:view_all`, and by `user` requires `org_members:view`. Key hash filters resolve only non-deleted ordinary keys. Workspace-scoped keys with base Read Only or Read Write access can query only their own workspace: a `workspace` filter naming another workspace is refused, legacy rows with no workspace are excluded (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
24
24
  */
25
25
  queryAnalytics(request: operations.QueryAnalyticsRequest, options?: RequestOptions): Promise<operations.QueryAnalyticsResponse>;
26
26
  }
@@ -11,7 +11,7 @@ export class Analytics extends ClientSDK {
11
11
  * Get user activity grouped by endpoint
12
12
  *
13
13
  * @remarks
14
- * 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.
14
+ * 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). For Custom keys, `api_key_hash` also requires `api_keys:view_all` and does not resolve deleted keys. `user_id` also requires `workspace_members:view` on an explicit non-default workspace; organization and default-workspace member filtering requires `org_members:view`, which is not available as a Custom grant. [Management key](/docs/guides/overview/auth/management-api-keys) required.
15
15
  */
16
16
  async getUserActivity(request, options) {
17
17
  return unwrapAsync(analyticsGetUserActivity(this, request, options));
@@ -20,7 +20,7 @@ export class Analytics extends ClientSDK {
20
20
  * Get available analytics metrics and dimensions
21
21
  *
22
22
  * @remarks
23
- * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Workspace-scoped management keys are accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
23
+ * Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. Custom access requires an organization-scoped key with `analytics:view`. Workspace-scoped keys with base Read Only or Read Write access are also accepted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
24
24
  */
25
25
  async getAnalyticsMeta(request, options) {
26
26
  return unwrapAsync(analyticsGetAnalyticsMeta(this, request, options));
@@ -29,7 +29,7 @@ export class Analytics extends ClientSDK {
29
29
  * Query analytics data
30
30
  *
31
31
  * @remarks
32
- * Execute an analytics query with specified metrics, dimensions, filters, and time range. A workspace-scoped management key needs `activity:view_all` on its own workspace and reads only that workspace: it is refused a `workspace` filter naming another workspace, it excludes legacy rows with no workspace (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
32
+ * Execute an analytics query with specified metrics, dimensions, filters, and time range. Custom access requires an organization-scoped key with `analytics:view`; grouping or filtering by `api_key_id` or `api_key_tag` also requires `api_keys:view_all`, and by `user` requires `org_members:view`. Key hash filters resolve only non-deleted ordinary keys. Workspace-scoped keys with base Read Only or Read Write access can query only their own workspace: a `workspace` filter naming another workspace is refused, legacy rows with no workspace are excluded (including for the default workspace), and possible-cache metrics such as `possible_cached_tokens` return 400. [Management key](/docs/guides/overview/auth/management-api-keys) required.
33
33
  */
34
34
  async queryAnalytics(request, options) {
35
35
  return unwrapAsync(analyticsQueryAnalytics(this, request, options));
@@ -16,7 +16,7 @@ export declare class Observability extends ClientSDK {
16
16
  * Create an observability destination
17
17
  *
18
18
  * @remarks
19
- * Create a new observability destination. A maximum of 5 destinations per type is allowed. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
+ * Create a new observability destination. A maximum of 5 enabled destinations per workspace, across all types, is allowed; disabled destinations do not count. A workspace already above the cap keeps its enabled destinations but cannot create or enable more until fewer than 5 are enabled. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
20
  */
21
21
  create(request: operations.CreateObservabilityDestinationRequest, options?: RequestOptions): Promise<models.CreateObservabilityDestinationResponse>;
22
22
  /**
@@ -37,7 +37,7 @@ export declare class Observability extends ClientSDK {
37
37
  * Update an observability destination
38
38
  *
39
39
  * @remarks
40
- * Update an existing observability destination. Only the fields provided in the request body are updated. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
40
+ * Update an existing observability destination. Only the fields provided in the request body are updated. Enabling a disabled destination returns 400 while the workspace already has 5 enabled destinations. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
41
41
  */
42
42
  update(request: operations.UpdateObservabilityDestinationRequest, options?: RequestOptions): Promise<models.UpdateObservabilityDestinationResponse>;
43
43
  }
@@ -23,7 +23,7 @@ export class Observability extends ClientSDK {
23
23
  * Create an observability destination
24
24
  *
25
25
  * @remarks
26
- * Create a new observability destination. A maximum of 5 destinations per type is allowed. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
26
+ * Create a new observability destination. A maximum of 5 enabled destinations per workspace, across all types, is allowed; disabled destinations do not count. A workspace already above the cap keeps its enabled destinations but cannot create or enable more until fewer than 5 are enabled. Defaults to the authenticated entity's default workspace, or a workspace-scoped management key's own workspace; use the `workspace_id` body field to scope to a different workspace. A workspace-scoped management key can only create in its own workspace; any other `workspace_id` returns 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.
27
27
  */
28
28
  async create(request, options) {
29
29
  return unwrapAsync(observabilityCreate(this, request, options));
@@ -50,7 +50,7 @@ export class Observability extends ClientSDK {
50
50
  * Update an observability destination
51
51
  *
52
52
  * @remarks
53
- * Update an existing observability destination. Only the fields provided in the request body are updated. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
53
+ * Update an existing observability destination. Only the fields provided in the request body are updated. Enabling a disabled destination returns 400 while the workspace already has 5 enabled destinations. A workspace-scoped management key only reaches destinations in its own workspace; any other `id` returns 404. [Management key](/docs/guides/overview/auth/management-api-keys) required.
54
54
  */
55
55
  async update(request, options) {
56
56
  return unwrapAsync(observabilityUpdate(this, request, options));
package/esm/sdk/scim.d.ts CHANGED
@@ -25,9 +25,7 @@ export declare class Scim extends ClientSDK {
25
25
  * Delete a SCIM group mapping
26
26
  *
27
27
  * @remarks
28
- * Delete a SCIM group-to-workspace mapping. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
29
- *
30
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
28
+ * Delete a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
31
29
  */
32
30
  delete(request: operations.DeleteScimGroupMappingRequest, options?: RequestOptions): Promise<models.DeleteScimGroupMappingResponse>;
33
31
  /**
@@ -41,9 +39,7 @@ export declare class Scim extends ClientSDK {
41
39
  * Update a SCIM group mapping
42
40
  *
43
41
  * @remarks
44
- * Update a SCIM group mapping role. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
45
- *
46
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
42
+ * Update a SCIM group mapping role. [Management key](/docs/guides/overview/auth/management-api-keys) required.
47
43
  */
48
44
  update(request: operations.UpdateScimGroupMappingRequest, options?: RequestOptions): Promise<models.UpdateScimGroupMappingResponse>;
49
45
  /**
@@ -59,9 +55,7 @@ export declare class Scim extends ClientSDK {
59
55
  * Start a SCIM directory sync
60
56
  *
61
57
  * @remarks
62
- * Start a SCIM directory sync. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
63
- *
64
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
58
+ * Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
65
59
  */
66
60
  createSyncJob(request?: operations.CreateScimSyncJobRequest | undefined, options?: RequestOptions): Promise<operations.CreateScimSyncJobResponse>;
67
61
  /**
package/esm/sdk/scim.js CHANGED
@@ -37,9 +37,7 @@ export class Scim extends ClientSDK {
37
37
  * Delete a SCIM group mapping
38
38
  *
39
39
  * @remarks
40
- * Delete a SCIM group-to-workspace mapping. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
41
- *
42
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
40
+ * Delete a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
43
41
  */
44
42
  async delete(request, options) {
45
43
  return unwrapAsync(scimDelete(this, request, options));
@@ -57,9 +55,7 @@ export class Scim extends ClientSDK {
57
55
  * Update a SCIM group mapping
58
56
  *
59
57
  * @remarks
60
- * Update a SCIM group mapping role. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
61
- *
62
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
58
+ * Update a SCIM group mapping role. [Management key](/docs/guides/overview/auth/management-api-keys) required.
63
59
  */
64
60
  async update(request, options) {
65
61
  return unwrapAsync(scimUpdate(this, request, options));
@@ -77,9 +73,7 @@ export class Scim extends ClientSDK {
77
73
  * Start a SCIM directory sync
78
74
  *
79
75
  * @remarks
80
- * Start a SCIM directory sync. Disabled: no API key can perform this write, including management keys. Use the organization settings in the dashboard, which require step-up verification. A valid management key for an organization with SCIM access receives 403; an invalid key still receives 401 and an organization without SCIM access receives 404.
81
- *
82
- * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
76
+ * Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
83
77
  */
84
78
  async createSyncJob(request, options) {
85
79
  return unwrapAsync(scimCreateSyncJob(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.125",
5
+ "version": "1.5.127",
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.125",
3
+ "version": "1.5.127",
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": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
- "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
77
- "prepare": "npm run build",
78
- "test": "vitest --run --project unit",
79
76
  "typecheck": "tsc --noEmit",
80
77
  "typecheck:transit": "exit 0",
81
78
  "postinstall": "node scripts/check-types.js || true",
82
79
  "test:e2e": "vitest --run --project e2e",
83
80
  "test:transit": "exit 0",
84
- "test:watch": "vitest --watch --project unit"
81
+ "test:watch": "vitest --watch --project unit",
82
+ "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
83
+ "prepare": "npm run build",
84
+ "test": "vitest --run --project unit"
85
85
  },
86
86
  "peerDependencies": {
87
87