@openrouter/sdk 1.2.94 → 1.2.96

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.
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create a SCIM group mapping
14
14
  *
15
15
  * @remarks
16
- * Create a SCIM group-to-workspace role mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
16
+ * Create a SCIM group-to-workspace role mapping. Creating a mapping that already exists with the same role succeeds and re-applies the mapping to the group members. Requesting a different role for an existing mapping returns 409. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
17
  */
18
18
  export declare function scimCreate(client: OpenRouterCore, request: operations.CreateScimGroupMappingRequest, options?: RequestOptions): APIPromise<Result<models.CreateScimGroupMappingResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.ConflictResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
19
  //# sourceMappingURL=scimCreate.d.ts.map
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Create a SCIM group mapping
18
18
  *
19
19
  * @remarks
20
- * Create a SCIM group-to-workspace role mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
+ * Create a SCIM group-to-workspace role mapping. Creating a mapping that already exists with the same role succeeds and re-applies the mapping to the group members. Requesting a different role for an existing mapping returns 409. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
21
  */
22
22
  export function scimCreate(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.2.94";
53
+ readonly sdkVersion: "1.2.96";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.94 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.96 2.914.0 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.2.94",
32
+ sdkVersion: "1.2.96",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.94 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.96 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -10,6 +10,10 @@ export type OpenRouterMetadata = {
10
10
  attempt: number;
11
11
  attempts?: Array<RouterAttempt> | undefined;
12
12
  endpoints: EndpointsMetadata;
13
+ /**
14
+ * Milliseconds measured for the generation, from dispatching the upstream request until its response body ended. Divide the completion token count by this for throughput. Absent when no upstream request was dispatched.
15
+ */
16
+ generationTime?: number | undefined;
13
17
  isByok: boolean;
14
18
  params?: RouterParams | undefined;
15
19
  pipeline?: Array<PipelineStage> | undefined;
@@ -15,6 +15,7 @@ export const OpenRouterMetadata$inboundSchema = z.object({
15
15
  attempt: z.int(),
16
16
  attempts: z.array(RouterAttempt$inboundSchema).optional(),
17
17
  endpoints: EndpointsMetadata$inboundSchema,
18
+ generation_time: z.int().optional(),
18
19
  is_byok: z.boolean(),
19
20
  params: RouterParams$inboundSchema.optional(),
20
21
  pipeline: z.array(PipelineStage$inboundSchema).optional(),
@@ -24,6 +25,7 @@ export const OpenRouterMetadata$inboundSchema = z.object({
24
25
  summary: z.string(),
25
26
  }).transform((v) => {
26
27
  return remap$(v, {
28
+ "generation_time": "generationTime",
27
29
  "is_byok": "isByok",
28
30
  });
29
31
  });
package/esm/sdk/scim.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare class Scim extends ClientSDK {
16
16
  * Create a SCIM group mapping
17
17
  *
18
18
  * @remarks
19
- * Create a SCIM group-to-workspace role mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
19
+ * Create a SCIM group-to-workspace role mapping. Creating a mapping that already exists with the same role succeeds and re-applies the mapping to the group members. Requesting a different role for an existing mapping returns 409. [Management key](/docs/guides/overview/auth/management-api-keys) required.
20
20
  */
21
21
  create(request: operations.CreateScimGroupMappingRequest, options?: RequestOptions): Promise<models.CreateScimGroupMappingResponse>;
22
22
  /**
package/esm/sdk/scim.js CHANGED
@@ -25,7 +25,7 @@ export class Scim extends ClientSDK {
25
25
  * Create a SCIM group mapping
26
26
  *
27
27
  * @remarks
28
- * Create a SCIM group-to-workspace role mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
28
+ * Create a SCIM group-to-workspace role mapping. Creating a mapping that already exists with the same role succeeds and re-applies the mapping to the group members. Requesting a different role for an existing mapping returns 409. [Management key](/docs/guides/overview/auth/management-api-keys) required.
29
29
  */
30
30
  async create(request, options) {
31
31
  return unwrapAsync(scimCreate(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.94",
5
+ "version": "1.2.96",
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.2.94",
3
+ "version": "1.2.96",
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,13 +73,13 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
+ "postinstall": "node scripts/check-types.js || true",
77
+ "prepare": "npm run build",
78
+ "test:watch": "vitest --watch --project unit",
79
+ "typecheck:transit": "exit 0",
76
80
  "compile": "tsc",
77
81
  "test": "vitest --run --project unit",
78
82
  "test:e2e": "vitest --run --project e2e",
79
- "test:watch": "vitest --watch --project unit",
80
- "typecheck:transit": "exit 0",
81
- "postinstall": "node scripts/check-types.js || true",
82
- "prepare": "npm run build",
83
83
  "test:transit": "exit 0",
84
84
  "typecheck": "tsc --noEmit"
85
85
  },