diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 82c17265c..6052fe052 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: "" id: "" management: - docChecksum: 7bce7d8a2da7e11efd1293f527f1e472 + docChecksum: 7adefdd521a84f95cf21c833866e8925 docVersion: 1.0.0 speakeasyVersion: 1.808.1 generationVersion: 2.960.8 - releaseVersion: 1.5.181 - configChecksum: 576437db3437ab6890073cfd00a5e763 + releaseVersion: 1.5.182 + configChecksum: b90c5629aad1e0221a33e783de11132f repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true @@ -24226,4 +24226,3 @@ examples: "500": application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 -releaseNotes: "## Typescript SDK Changes:\n* `openrouter.analytics.queryAnalytics()`: \n * `request.requestBody.apiKeyTagKey` **Added**\n* `openrouter.apiKeys.list()`: \n * `request.tag` **Added**\n * `response.data[].tags` **Added**\n* `openrouter.apiKeys.create()`: \n * `request.requestBody.tags` **Added**\n * `response.data.tags` **Added**\n* `openrouter.apiKeys.get()`: `response.data.tags` **Added**\n* `openrouter.apiKeys.update()`: \n * `request.requestBody.tags` **Added**\n * `response.data.tags` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 41a3af004..54c94da5b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -38,7 +38,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true typescript: - version: 1.5.181 + version: 1.5.182 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index af9d0222a..fda4aee48 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -54040,7 +54040,7 @@ paths: - $ref: "#/components/parameters/AppCategories" /guardrails/policies/capacity: get: - description: 'List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'listCapacityPolicies' parameters: - description: 'Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned' @@ -54104,10 +54104,10 @@ paths: example: error: code: 403 - message: 'Only management keys can perform this operation' + message: 'Capacity policies are only available to Enterprise customers in the private beta.' schema: $ref: '#/components/schemas/ForbiddenResponse' - description: 'Forbidden - Authentication successful but insufficient permissions' + description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta' '404': content: application/json: @@ -54144,7 +54144,7 @@ paths: results: '$.data' type: 'offsetLimit' post: - description: 'Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'createCapacityPolicy' requestBody: content: @@ -54185,10 +54185,10 @@ paths: example: error: code: 403 - message: 'Only management keys can perform this operation' + message: 'Capacity policies are only available to Enterprise customers in the private beta.' schema: $ref: '#/components/schemas/ForbiddenResponse' - description: 'Forbidden - Authentication successful but insufficient permissions' + description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta' '404': content: application/json: @@ -54229,7 +54229,7 @@ paths: - $ref: "#/components/parameters/AppCategories" /guardrails/policies/capacity/{id}: delete: - description: 'Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'deleteCapacityPolicy' parameters: - description: 'Policy ID' @@ -54283,10 +54283,10 @@ paths: example: error: code: 403 - message: 'Only management keys can perform this operation' + message: 'Capacity policies are only available to Enterprise customers in the private beta.' schema: $ref: '#/components/schemas/ForbiddenResponse' - description: 'Forbidden - Authentication successful but insufficient permissions' + description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta' '404': content: application/json: @@ -54322,7 +54322,7 @@ paths: - 'Guardrail Policies' x-speakeasy-name-override: 'deleteCapacityPolicy' get: - description: 'Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'getCapacityPolicy' parameters: - description: 'Policy ID' @@ -54376,10 +54376,10 @@ paths: example: error: code: 403 - message: 'Only management keys can perform this operation' + message: 'Capacity policies are only available to Enterprise customers in the private beta.' schema: $ref: '#/components/schemas/ForbiddenResponse' - description: 'Forbidden - Authentication successful but insufficient permissions' + description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta' '404': content: application/json: @@ -54405,7 +54405,7 @@ paths: - 'Guardrail Policies' x-speakeasy-name-override: 'getCapacityPolicy' put: - description: 'Replace a capacity policy''s name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + description: 'Replace a capacity policy''s name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required.' operationId: 'updateCapacityPolicy' parameters: - description: 'Policy ID' @@ -54456,10 +54456,10 @@ paths: example: error: code: 403 - message: 'Only management keys can perform this operation' + message: 'Capacity policies are only available to Enterprise customers in the private beta.' schema: $ref: '#/components/schemas/ForbiddenResponse' - description: 'Forbidden - Authentication successful but insufficient permissions' + description: 'Forbidden - Insufficient permissions, or the organization does not have access to the Enterprise private beta' '404': content: application/json: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 19b902e7c..977d15464 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.808.1 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:10ae45dd713cea3f5ff56891f96a0071766d800f5e0d85b8dc9cdb94c50dc3fa - sourceBlobDigest: sha256:f4e4ac3bb373a2d416683b73c65388dc78fe64d3af97cd050e0292ca7a753ddd + sourceRevisionDigest: sha256:62cbd5a21bed07b7ee748bd70835cd2cb77d0edeb1785f70841930b19d034362 + sourceBlobDigest: sha256:e063911d64de2527b449a00cda5c9f6428d21e18d7b80270be971f152569a7c2 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:10ae45dd713cea3f5ff56891f96a0071766d800f5e0d85b8dc9cdb94c50dc3fa - sourceBlobDigest: sha256:f4e4ac3bb373a2d416683b73c65388dc78fe64d3af97cd050e0292ca7a753ddd + sourceRevisionDigest: sha256:62cbd5a21bed07b7ee748bd70835cd2cb77d0edeb1785f70841930b19d034362 + sourceBlobDigest: sha256:e063911d64de2527b449a00cda5c9f6428d21e18d7b80270be971f152569a7c2 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:e11c8af35b5057eb9dad25899596ef704dc8a7ee0e2e292b421c2c467d113c9b + codeSamplesRevisionDigest: sha256:edb5b566fce7862c3ad56adf6c4882898c85bda9e22fe1497559a5d47e16f238 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.808.1 diff --git a/RELEASES.md b/RELEASES.md index 2bb4a8188..9f25f13db 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -6186,4 +6186,14 @@ Based on: ### Generated - [typescript v1.5.181] . ### Releases -- [NPM v1.5.181] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.181 - . \ No newline at end of file +- [NPM v1.5.181] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.181 - . + +## 2026-12-05 05:20:50 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.808.1 (2.960.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.5.182] . +### Releases +- [NPM v1.5.182] https://www.npmjs.com/package/@openrouter/sdk/v/1.5.182 - . \ No newline at end of file diff --git a/docs/sdks/guardrailpolicies/README.mdx b/docs/sdks/guardrailpolicies/README.mdx index b13be795a..f2551474d 100644 --- a/docs/sdks/guardrailpolicies/README.mdx +++ b/docs/sdks/guardrailpolicies/README.mdx @@ -1680,7 +1680,7 @@ run(); ## listCapacityPolicies -List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. +List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage @@ -1767,7 +1767,7 @@ run(); ## createCapacityPolicy -Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage @@ -1885,7 +1885,7 @@ run(); ## deleteCapacityPolicy -Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage @@ -1971,7 +1971,7 @@ run(); ## getCapacityPolicy -Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage @@ -2056,7 +2056,7 @@ run(); ## updateCapacityPolicy -Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. +Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. ### Example Usage diff --git a/jsr.json b/jsr.json index 3c872d4cc..74d11c3ce 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "1.5.181", + "version": "1.5.182", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 749f961be..8a85142e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "1.5.181", + "version": "1.5.182", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.", "keywords": [ @@ -73,15 +73,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", "prepublishOnly": "npm run build", - "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", - "postinstall": "node scripts/check-types.js || true", - "prepare": "npm run build", + "test:transit": "exit 0", "test:watch": "vitest --watch --project unit", "typecheck": "tsc --noEmit", + "postinstall": "node scripts/check-types.js || true", + "prepare": "npm run build", "test": "vitest --run --project unit", - "test:e2e": "vitest --run --project e2e", - "test:transit": "exit 0", - "typecheck:transit": "exit 0" + "typecheck:transit": "exit 0", + "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js", + "test:e2e": "vitest --run --project e2e" }, "peerDependencies": { diff --git a/src/funcs/guardrailPoliciesCreateCapacityPolicy.ts b/src/funcs/guardrailPoliciesCreateCapacityPolicy.ts index fd85fafe0..3a7352220 100644 --- a/src/funcs/guardrailPoliciesCreateCapacityPolicy.ts +++ b/src/funcs/guardrailPoliciesCreateCapacityPolicy.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * Create a capacity policy * * @remarks - * Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ export function guardrailPoliciesCreateCapacityPolicy( client: OpenRouterCore, diff --git a/src/funcs/guardrailPoliciesDeleteCapacityPolicy.ts b/src/funcs/guardrailPoliciesDeleteCapacityPolicy.ts index e843511b0..057dd1dc8 100644 --- a/src/funcs/guardrailPoliciesDeleteCapacityPolicy.ts +++ b/src/funcs/guardrailPoliciesDeleteCapacityPolicy.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * Delete a capacity policy * * @remarks - * Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ export function guardrailPoliciesDeleteCapacityPolicy( client: OpenRouterCore, diff --git a/src/funcs/guardrailPoliciesGetCapacityPolicy.ts b/src/funcs/guardrailPoliciesGetCapacityPolicy.ts index 79f3175fb..51cb5687d 100644 --- a/src/funcs/guardrailPoliciesGetCapacityPolicy.ts +++ b/src/funcs/guardrailPoliciesGetCapacityPolicy.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * Get a capacity policy * * @remarks - * Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ export function guardrailPoliciesGetCapacityPolicy( client: OpenRouterCore, diff --git a/src/funcs/guardrailPoliciesListCapacityPolicies.ts b/src/funcs/guardrailPoliciesListCapacityPolicies.ts index 9996ac472..c009f12d4 100644 --- a/src/funcs/guardrailPoliciesListCapacityPolicies.ts +++ b/src/funcs/guardrailPoliciesListCapacityPolicies.ts @@ -36,7 +36,7 @@ import { * List capacity policies * * @remarks - * List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ export function guardrailPoliciesListCapacityPolicies( client: OpenRouterCore, diff --git a/src/funcs/guardrailPoliciesUpdateCapacityPolicy.ts b/src/funcs/guardrailPoliciesUpdateCapacityPolicy.ts index 46d453d00..061e57a49 100644 --- a/src/funcs/guardrailPoliciesUpdateCapacityPolicy.ts +++ b/src/funcs/guardrailPoliciesUpdateCapacityPolicy.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * Update a capacity policy * * @remarks - * Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ export function guardrailPoliciesUpdateCapacityPolicy( client: OpenRouterCore, diff --git a/src/lib/config.ts b/src/lib/config.ts index 45b6dfd76..c7c1d242a 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -74,7 +74,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "1.5.181", + sdkVersion: "1.5.182", genVersion: "2.960.8", - userAgent: "speakeasy-sdk/typescript 1.5.181 2.960.8 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 1.5.182 2.960.8 1.0.0 @openrouter/sdk", } as const; diff --git a/src/sdk/guardrailpolicies.ts b/src/sdk/guardrailpolicies.ts index 4332cf252..56f51d1ff 100644 --- a/src/sdk/guardrailpolicies.ts +++ b/src/sdk/guardrailpolicies.ts @@ -356,7 +356,7 @@ export class GuardrailPolicies extends ClientSDK { * List capacity policies * * @remarks - * List the capacity policies in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * List the capacity policies in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ async listCapacityPolicies( request: operations.ListCapacityPoliciesRequest, @@ -375,7 +375,7 @@ export class GuardrailPolicies extends ClientSDK { * Create a capacity policy * * @remarks - * Create a capacity policy in a workspace. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Create a capacity policy in a workspace. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ async createCapacityPolicy( request: operations.CreateCapacityPolicyRequest, @@ -392,7 +392,7 @@ export class GuardrailPolicies extends ClientSDK { * Delete a capacity policy * * @remarks - * Delete a capacity policy. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Delete a capacity policy. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ async deleteCapacityPolicy( request: operations.DeleteCapacityPolicyRequest, @@ -409,7 +409,7 @@ export class GuardrailPolicies extends ClientSDK { * Get a capacity policy * * @remarks - * Get a capacity policy with its member and API key assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Get a capacity policy with its member and API key assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ async getCapacityPolicy( request: operations.GetCapacityPolicyRequest, @@ -426,7 +426,7 @@ export class GuardrailPolicies extends ClientSDK { * Update a capacity policy * * @remarks - * Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature. [Management key](/docs/guides/overview/auth/management-api-keys) required. + * Replace a capacity policy's name and config, and optionally its assignments. Enterprise private beta feature: organizations without access receive 403. [Management key](/docs/guides/overview/auth/management-api-keys) required. */ async updateCapacityPolicy( request: operations.UpdateCapacityPolicyRequest,