@openrouter/sdk 1.2.130 → 1.2.132

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 (64) hide show
  1. package/esm/funcs/vaultCopyVaultSecretsToIntern.d.ts +21 -0
  2. package/esm/funcs/vaultCopyVaultSecretsToIntern.js +108 -0
  3. package/esm/funcs/vaultDeleteInternVaultSecret.d.ts +20 -0
  4. package/esm/funcs/vaultDeleteInternVaultSecret.js +109 -0
  5. package/esm/funcs/vaultDeleteVaultSecret.d.ts +20 -0
  6. package/esm/funcs/vaultDeleteVaultSecret.js +105 -0
  7. package/esm/funcs/vaultListInternVaultSecrets.d.ts +21 -0
  8. package/esm/funcs/vaultListInternVaultSecrets.js +110 -0
  9. package/esm/funcs/vaultListVaultSecrets.d.ts +21 -0
  10. package/esm/funcs/vaultListVaultSecrets.js +104 -0
  11. package/esm/funcs/vaultStoreInternVaultSecret.d.ts +21 -0
  12. package/esm/funcs/vaultStoreInternVaultSecret.js +112 -0
  13. package/esm/funcs/vaultStoreVaultSecret.d.ts +21 -0
  14. package/esm/funcs/vaultStoreVaultSecret.js +108 -0
  15. package/esm/lib/config.d.ts +2 -2
  16. package/esm/lib/config.js +2 -2
  17. package/esm/models/imagegenerationrequest.d.ts +5 -0
  18. package/esm/models/imagegenerationrequest.js +2 -0
  19. package/esm/models/index.d.ts +6 -0
  20. package/esm/models/index.js +6 -0
  21. package/esm/models/operations/copyvaultsecretstointern.d.ts +61 -0
  22. package/esm/models/operations/copyvaultsecretstointern.js +24 -0
  23. package/esm/models/operations/createembeddings.d.ts +5 -0
  24. package/esm/models/operations/createembeddings.js +2 -0
  25. package/esm/models/operations/creatererank.d.ts +5 -0
  26. package/esm/models/operations/creatererank.js +2 -0
  27. package/esm/models/operations/deleteinternvaultsecret.d.ts +63 -0
  28. package/esm/models/operations/deleteinternvaultsecret.js +22 -0
  29. package/esm/models/operations/deletevaultsecret.d.ts +58 -0
  30. package/esm/models/operations/deletevaultsecret.js +21 -0
  31. package/esm/models/operations/index.d.ts +7 -0
  32. package/esm/models/operations/index.js +7 -0
  33. package/esm/models/operations/listinternvaultsecrets.d.ts +68 -0
  34. package/esm/models/operations/listinternvaultsecrets.js +23 -0
  35. package/esm/models/operations/listvaultsecrets.d.ts +63 -0
  36. package/esm/models/operations/listvaultsecrets.js +22 -0
  37. package/esm/models/operations/storeinternvaultsecret.d.ts +66 -0
  38. package/esm/models/operations/storeinternvaultsecret.js +25 -0
  39. package/esm/models/operations/storevaultsecret.d.ts +61 -0
  40. package/esm/models/operations/storevaultsecret.js +24 -0
  41. package/esm/models/speechrequest.d.ts +5 -0
  42. package/esm/models/speechrequest.js +2 -0
  43. package/esm/models/sttrequest.d.ts +5 -0
  44. package/esm/models/sttrequest.js +2 -0
  45. package/esm/models/vaultsecret.d.ts +16 -0
  46. package/esm/models/vaultsecret.js +23 -0
  47. package/esm/models/vaultsecretcopyrequest.d.ts +18 -0
  48. package/esm/models/vaultsecretcopyrequest.js +13 -0
  49. package/esm/models/vaultsecretcopyresponse.d.ts +14 -0
  50. package/esm/models/vaultsecretcopyresponse.js +15 -0
  51. package/esm/models/vaultsecretlistresponse.d.ts +18 -0
  52. package/esm/models/vaultsecretlistresponse.js +21 -0
  53. package/esm/models/vaultsecretresponse.d.ts +17 -0
  54. package/esm/models/vaultsecretresponse.js +15 -0
  55. package/esm/models/vaultsecretwriterequest.d.ts +23 -0
  56. package/esm/models/vaultsecretwriterequest.js +14 -0
  57. package/esm/models/videogenerationrequest.d.ts +5 -0
  58. package/esm/models/videogenerationrequest.js +2 -0
  59. package/esm/sdk/sdk.d.ts +3 -0
  60. package/esm/sdk/sdk.js +4 -0
  61. package/esm/sdk/vault.d.ts +55 -0
  62. package/esm/sdk/vault.js +79 -0
  63. package/jsr.json +1 -1
  64. package/package.json +8 -8
@@ -32,6 +32,7 @@ export const STTRequest$outboundSchema = z.object({
32
32
  model: z.string(),
33
33
  provider: z.lazy(() => STTRequestProvider$outboundSchema).optional(),
34
34
  responseFormat: STTRequestResponseFormat$outboundSchema.optional(),
35
+ sessionId: z.string().optional(),
35
36
  temperature: z.number().optional(),
36
37
  timestampGranularities: z.array(STTTimestampGranularity$outboundSchema)
37
38
  .optional(),
@@ -41,6 +42,7 @@ export const STTRequest$outboundSchema = z.object({
41
42
  return remap$(v, {
42
43
  inputAudio: "input_audio",
43
44
  responseFormat: "response_format",
45
+ sessionId: "session_id",
44
46
  timestampGranularities: "timestamp_granularities",
45
47
  });
46
48
  });
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Metadata for one stored secret. The secret value is never returned. `fingerprint` is a keyed SHA-256 digest of the value: equal fingerprints within one scope mean equal values, but a workspace secret and its intern copy carry different fingerprints. `hosts` and `fingerprint` are `null` only for legacy rows written before host binding was required; storing the secret again assigns hosts.
6
+ */
7
+ export type VaultSecret = {
8
+ createdAt: Date;
9
+ fingerprint: string | null;
10
+ hosts: Array<string> | null;
11
+ name: string;
12
+ };
13
+ /** @internal */
14
+ export declare const VaultSecret$inboundSchema: z.ZodType<VaultSecret, unknown>;
15
+ export declare function vaultSecretFromJSON(jsonString: string): SafeParseResult<VaultSecret, SDKValidationError>;
16
+ //# sourceMappingURL=vaultsecret.d.ts.map
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: daa0ae6ffc96
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const VaultSecret$inboundSchema = z
10
+ .object({
11
+ created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
12
+ fingerprint: z.nullable(z.string()),
13
+ hosts: z.nullable(z.array(z.string())),
14
+ name: z.string(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "created_at": "createdAt",
18
+ });
19
+ });
20
+ export function vaultSecretFromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => VaultSecret$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultSecret' from JSON`);
22
+ }
23
+ //# sourceMappingURL=vaultsecret.js.map
@@ -0,0 +1,18 @@
1
+ import * as z from "zod/v4";
2
+ /**
3
+ * Workspace secrets to copy into the intern scope.
4
+ */
5
+ export type VaultSecretCopyRequest = {
6
+ /**
7
+ * Names of workspace secrets to copy, 1 to 100 unique entries. Every name must exist in the workspace scope.
8
+ */
9
+ names: Array<string>;
10
+ };
11
+ /** @internal */
12
+ export type VaultSecretCopyRequest$Outbound = {
13
+ names: Array<string>;
14
+ };
15
+ /** @internal */
16
+ export declare const VaultSecretCopyRequest$outboundSchema: z.ZodType<VaultSecretCopyRequest$Outbound, VaultSecretCopyRequest>;
17
+ export declare function vaultSecretCopyRequestToJSON(vaultSecretCopyRequest: VaultSecretCopyRequest): string;
18
+ //# sourceMappingURL=vaultsecretcopyrequest.d.ts.map
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ed56afa8cfc5
4
+ */
5
+ import * as z from "zod/v4";
6
+ /** @internal */
7
+ export const VaultSecretCopyRequest$outboundSchema = z.object({
8
+ names: z.array(z.string()),
9
+ });
10
+ export function vaultSecretCopyRequestToJSON(vaultSecretCopyRequest) {
11
+ return JSON.stringify(VaultSecretCopyRequest$outboundSchema.parse(vaultSecretCopyRequest));
12
+ }
13
+ //# sourceMappingURL=vaultsecretcopyrequest.js.map
@@ -0,0 +1,14 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { VaultSecret } from "./vaultsecret.js";
5
+ /**
6
+ * Metadata for the copies now stored in the intern scope, one entry per requested name.
7
+ */
8
+ export type VaultSecretCopyResponse = {
9
+ data: Array<VaultSecret>;
10
+ };
11
+ /** @internal */
12
+ export declare const VaultSecretCopyResponse$inboundSchema: z.ZodType<VaultSecretCopyResponse, unknown>;
13
+ export declare function vaultSecretCopyResponseFromJSON(jsonString: string): SafeParseResult<VaultSecretCopyResponse, SDKValidationError>;
14
+ //# sourceMappingURL=vaultsecretcopyresponse.d.ts.map
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: acc6c964e820
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { VaultSecret$inboundSchema } from "./vaultsecret.js";
8
+ /** @internal */
9
+ export const VaultSecretCopyResponse$inboundSchema = z.object({
10
+ data: z.array(VaultSecret$inboundSchema),
11
+ });
12
+ export function vaultSecretCopyResponseFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => VaultSecretCopyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultSecretCopyResponse' from JSON`);
14
+ }
15
+ //# sourceMappingURL=vaultsecretcopyresponse.js.map
@@ -0,0 +1,18 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { VaultSecret } from "./vaultsecret.js";
5
+ /**
6
+ * One page of secret metadata for the selected scope.
7
+ */
8
+ export type VaultSecretListResponse = {
9
+ data: Array<VaultSecret>;
10
+ /**
11
+ * True when more secrets exist beyond this page. Request the next page with `offset` increased by the number of returned entries.
12
+ */
13
+ hasMore: boolean;
14
+ };
15
+ /** @internal */
16
+ export declare const VaultSecretListResponse$inboundSchema: z.ZodType<VaultSecretListResponse, unknown>;
17
+ export declare function vaultSecretListResponseFromJSON(jsonString: string): SafeParseResult<VaultSecretListResponse, SDKValidationError>;
18
+ //# sourceMappingURL=vaultsecretlistresponse.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 18eb8bc829ef
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { VaultSecret$inboundSchema } from "./vaultsecret.js";
9
+ /** @internal */
10
+ export const VaultSecretListResponse$inboundSchema = z.object({
11
+ data: z.array(VaultSecret$inboundSchema),
12
+ has_more: z.boolean(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ "has_more": "hasMore",
16
+ });
17
+ });
18
+ export function vaultSecretListResponseFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => VaultSecretListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultSecretListResponse' from JSON`);
20
+ }
21
+ //# sourceMappingURL=vaultsecretlistresponse.js.map
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { VaultSecret } from "./vaultsecret.js";
5
+ /**
6
+ * Metadata for the stored secret.
7
+ */
8
+ export type VaultSecretResponse = {
9
+ /**
10
+ * Metadata for one stored secret. The secret value is never returned. `fingerprint` is a keyed SHA-256 digest of the value: equal fingerprints within one scope mean equal values, but a workspace secret and its intern copy carry different fingerprints. `hosts` and `fingerprint` are `null` only for legacy rows written before host binding was required; storing the secret again assigns hosts.
11
+ */
12
+ data: VaultSecret;
13
+ };
14
+ /** @internal */
15
+ export declare const VaultSecretResponse$inboundSchema: z.ZodType<VaultSecretResponse, unknown>;
16
+ export declare function vaultSecretResponseFromJSON(jsonString: string): SafeParseResult<VaultSecretResponse, SDKValidationError>;
17
+ //# sourceMappingURL=vaultsecretresponse.d.ts.map
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: c801ca16aec4
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { VaultSecret$inboundSchema } from "./vaultsecret.js";
8
+ /** @internal */
9
+ export const VaultSecretResponse$inboundSchema = z.object({
10
+ data: VaultSecret$inboundSchema,
11
+ });
12
+ export function vaultSecretResponseFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => VaultSecretResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultSecretResponse' from JSON`);
14
+ }
15
+ //# sourceMappingURL=vaultsecretresponse.js.map
@@ -0,0 +1,23 @@
1
+ import * as z from "zod/v4";
2
+ /**
3
+ * Secret value and the exact hostnames it may be released to.
4
+ */
5
+ export type VaultSecretWriteRequest = {
6
+ /**
7
+ * Exact DNS hostnames the secret may be sent to, 1 to 100 entries. Each entry is lowercased and a trailing dot is removed, so `API.Example.com.` is stored as `api.example.com`. Schemes, ports, paths, wildcards and empty values are rejected. Duplicates after normalization are collapsed. Matching is exact: a secret bound to `api.example.com` is never released to `example.com` or any other hostname.
8
+ */
9
+ hosts: Array<string>;
10
+ /**
11
+ * Secret value, 1 to 65536 characters. It is encrypted at rest and never returned.
12
+ */
13
+ value: string;
14
+ };
15
+ /** @internal */
16
+ export type VaultSecretWriteRequest$Outbound = {
17
+ hosts: Array<string>;
18
+ value: string;
19
+ };
20
+ /** @internal */
21
+ export declare const VaultSecretWriteRequest$outboundSchema: z.ZodType<VaultSecretWriteRequest$Outbound, VaultSecretWriteRequest>;
22
+ export declare function vaultSecretWriteRequestToJSON(vaultSecretWriteRequest: VaultSecretWriteRequest): string;
23
+ //# sourceMappingURL=vaultsecretwriterequest.d.ts.map
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: fa3836b8b8e1
4
+ */
5
+ import * as z from "zod/v4";
6
+ /** @internal */
7
+ export const VaultSecretWriteRequest$outboundSchema = z.object({
8
+ hosts: z.array(z.string()),
9
+ value: z.string(),
10
+ });
11
+ export function vaultSecretWriteRequestToJSON(vaultSecretWriteRequest) {
12
+ return JSON.stringify(VaultSecretWriteRequest$outboundSchema.parse(vaultSecretWriteRequest));
13
+ }
14
+ //# sourceMappingURL=vaultsecretwriterequest.js.map
@@ -517,6 +517,10 @@ export type VideoGenerationRequest = {
517
517
  * If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
518
518
  */
519
519
  seed?: number | undefined;
520
+ /**
521
+ * A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.
522
+ */
523
+ sessionId?: string | undefined;
520
524
  /**
521
525
  * Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio.
522
526
  */
@@ -988,6 +992,7 @@ export type VideoGenerationRequest$Outbound = {
988
992
  provider?: VideoGenerationRequestProvider$Outbound | undefined;
989
993
  resolution?: string | undefined;
990
994
  seed?: number | undefined;
995
+ session_id?: string | undefined;
991
996
  size?: string | undefined;
992
997
  trace?: TraceConfig$Outbound | undefined;
993
998
  upscale_factor?: number | undefined;
@@ -241,6 +241,7 @@ export const VideoGenerationRequest$outboundSchema = z.object({
241
241
  .optional(),
242
242
  resolution: VideoGenerationRequestResolution$outboundSchema.optional(),
243
243
  seed: z.int().optional(),
244
+ sessionId: z.string().optional(),
244
245
  size: z.string().optional(),
245
246
  trace: TraceConfig$outboundSchema.optional(),
246
247
  upscaleFactor: z.number().optional(),
@@ -252,6 +253,7 @@ export const VideoGenerationRequest$outboundSchema = z.object({
252
253
  frameImages: "frame_images",
253
254
  generateAudio: "generate_audio",
254
255
  inputReferences: "input_references",
256
+ sessionId: "session_id",
255
257
  upscaleFactor: "upscale_factor",
256
258
  });
257
259
  });
package/esm/sdk/sdk.d.ts CHANGED
@@ -26,6 +26,7 @@ import { Responses } from "./responses.js";
26
26
  import { Scim } from "./scim.js";
27
27
  import { STT } from "./stt.js";
28
28
  import { TTS } from "./tts.js";
29
+ import { Vault } from "./vault.js";
29
30
  import { VideoGeneration } from "./videogeneration.js";
30
31
  import { Workspaces } from "./workspaces.js";
31
32
  import type { $ZodObject, $ZodShape, infer as zodInfer } from "zod/v4/core";
@@ -89,6 +90,8 @@ export declare class OpenRouter extends ClientSDK {
89
90
  get beta(): Beta;
90
91
  private _scim?;
91
92
  get scim(): Scim;
93
+ private _vault?;
94
+ get vault(): Vault;
92
95
  private _videoGeneration?;
93
96
  get videoGeneration(): VideoGeneration;
94
97
  private _workspaces?;
package/esm/sdk/sdk.js CHANGED
@@ -30,6 +30,7 @@ import { Responses } from "./responses.js";
30
30
  import { Scim } from "./scim.js";
31
31
  import { STT } from "./stt.js";
32
32
  import { TTS } from "./tts.js";
33
+ import { Vault } from "./vault.js";
33
34
  import { VideoGeneration } from "./videogeneration.js";
34
35
  import { Workspaces } from "./workspaces.js";
35
36
  import { callModel as callModelFunc, } from "../funcs/call-model.js";
@@ -118,6 +119,9 @@ export class OpenRouter extends ClientSDK {
118
119
  get scim() {
119
120
  return (this._scim ?? (this._scim = new Scim(this._options)));
120
121
  }
122
+ get vault() {
123
+ return (this._vault ?? (this._vault = new Vault(this._options)));
124
+ }
121
125
  get videoGeneration() {
122
126
  return (this._videoGeneration ?? (this._videoGeneration = new VideoGeneration(this._options)));
123
127
  }
@@ -0,0 +1,55 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as models from "../models/index.js";
3
+ import * as operations from "../models/operations/index.js";
4
+ export declare class Vault extends ClientSDK {
5
+ /**
6
+ * List intern secrets
7
+ *
8
+ * @remarks
9
+ * Lists secret metadata stored for one intern. Responses contain names, bound hosts, fingerprints and creation times, never secret values. Results are ordered by name and paginated with `limit` and `offset`. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
10
+ */
11
+ listInternVaultSecrets(request: operations.ListInternVaultSecretsRequest, options?: RequestOptions): Promise<models.VaultSecretListResponse>;
12
+ /**
13
+ * Delete an intern secret
14
+ *
15
+ * @remarks
16
+ * Deletes a secret stored for one intern. Returns 204 with no body on success and 404 when the secret does not exist in the selected scope. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
+ */
18
+ deleteInternVaultSecret(request: operations.DeleteInternVaultSecretRequest, options?: RequestOptions): Promise<void>;
19
+ /**
20
+ * Store an intern secret
21
+ *
22
+ * @remarks
23
+ * Creates or replaces a secret stored for one intern. The value is encrypted at rest and released only to the exact hostnames in `hosts`. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
24
+ */
25
+ storeInternVaultSecret(request: operations.StoreInternVaultSecretRequest, options?: RequestOptions): Promise<models.VaultSecretResponse>;
26
+ /**
27
+ * Copy workspace secrets to an intern
28
+ *
29
+ * @remarks
30
+ * Copies the named workspace secrets into one intern's scope, replacing any intern secret with the same name. Each copy keeps the source value and host bindings. Every name must exist in the workspace scope or the request fails with 404 and nothing is copied. A workspace secret whose `hosts` is `null` cannot be copied: the request fails with 409 and nothing is copied until that secret is stored again with hosts. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
31
+ */
32
+ copyVaultSecretsToIntern(request: operations.CopyVaultSecretsToInternRequest, options?: RequestOptions): Promise<models.VaultSecretCopyResponse>;
33
+ /**
34
+ * List workspace secrets
35
+ *
36
+ * @remarks
37
+ * Lists secret metadata for the workspace of the authenticated API key. Responses contain names, bound hosts, fingerprints and creation times, never secret values. Results are ordered by name and paginated with `limit` and `offset`. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
38
+ */
39
+ listVaultSecrets(request?: operations.ListVaultSecretsRequest | undefined, options?: RequestOptions): Promise<models.VaultSecretListResponse>;
40
+ /**
41
+ * Delete a workspace secret
42
+ *
43
+ * @remarks
44
+ * Deletes a secret from the workspace of the authenticated API key. Returns 204 with no body on success and 404 when the secret does not exist in the selected scope. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
45
+ */
46
+ deleteVaultSecret(request: operations.DeleteVaultSecretRequest, options?: RequestOptions): Promise<void>;
47
+ /**
48
+ * Store a workspace secret
49
+ *
50
+ * @remarks
51
+ * Creates or replaces a secret in the workspace of the authenticated API key. The value is encrypted at rest and released only to the exact hostnames in `hosts`. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
52
+ */
53
+ storeVaultSecret(request: operations.StoreVaultSecretRequest, options?: RequestOptions): Promise<models.VaultSecretResponse>;
54
+ }
55
+ //# sourceMappingURL=vault.d.ts.map
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: adbb922fff4a
4
+ */
5
+ import { vaultCopyVaultSecretsToIntern } from "../funcs/vaultCopyVaultSecretsToIntern.js";
6
+ import { vaultDeleteInternVaultSecret } from "../funcs/vaultDeleteInternVaultSecret.js";
7
+ import { vaultDeleteVaultSecret } from "../funcs/vaultDeleteVaultSecret.js";
8
+ import { vaultListInternVaultSecrets } from "../funcs/vaultListInternVaultSecrets.js";
9
+ import { vaultListVaultSecrets } from "../funcs/vaultListVaultSecrets.js";
10
+ import { vaultStoreInternVaultSecret } from "../funcs/vaultStoreInternVaultSecret.js";
11
+ import { vaultStoreVaultSecret } from "../funcs/vaultStoreVaultSecret.js";
12
+ import { ClientSDK } from "../lib/sdks.js";
13
+ import { unwrapAsync } from "../types/fp.js";
14
+ export class Vault extends ClientSDK {
15
+ /**
16
+ * List intern secrets
17
+ *
18
+ * @remarks
19
+ * Lists secret metadata stored for one intern. Responses contain names, bound hosts, fingerprints and creation times, never secret values. Results are ordered by name and paginated with `limit` and `offset`. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ */
21
+ async listInternVaultSecrets(request, options) {
22
+ return unwrapAsync(vaultListInternVaultSecrets(this, request, options));
23
+ }
24
+ /**
25
+ * Delete an intern secret
26
+ *
27
+ * @remarks
28
+ * Deletes a secret stored for one intern. Returns 204 with no body on success and 404 when the secret does not exist in the selected scope. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
29
+ */
30
+ async deleteInternVaultSecret(request, options) {
31
+ return unwrapAsync(vaultDeleteInternVaultSecret(this, request, options));
32
+ }
33
+ /**
34
+ * Store an intern secret
35
+ *
36
+ * @remarks
37
+ * Creates or replaces a secret stored for one intern. The value is encrypted at rest and released only to the exact hostnames in `hosts`. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
38
+ */
39
+ async storeInternVaultSecret(request, options) {
40
+ return unwrapAsync(vaultStoreInternVaultSecret(this, request, options));
41
+ }
42
+ /**
43
+ * Copy workspace secrets to an intern
44
+ *
45
+ * @remarks
46
+ * Copies the named workspace secrets into one intern's scope, replacing any intern secret with the same name. Each copy keeps the source value and host bindings. Every name must exist in the workspace scope or the request fails with 404 and nothing is copied. A workspace secret whose `hosts` is `null` cannot be copied: the request fails with 409 and nothing is copied until that secret is stored again with hosts. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
47
+ */
48
+ async copyVaultSecretsToIntern(request, options) {
49
+ return unwrapAsync(vaultCopyVaultSecretsToIntern(this, request, options));
50
+ }
51
+ /**
52
+ * List workspace secrets
53
+ *
54
+ * @remarks
55
+ * Lists secret metadata for the workspace of the authenticated API key. Responses contain names, bound hosts, fingerprints and creation times, never secret values. Results are ordered by name and paginated with `limit` and `offset`. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
56
+ */
57
+ async listVaultSecrets(request, options) {
58
+ return unwrapAsync(vaultListVaultSecrets(this, request, options));
59
+ }
60
+ /**
61
+ * Delete a workspace secret
62
+ *
63
+ * @remarks
64
+ * Deletes a secret from the workspace of the authenticated API key. Returns 204 with no body on success and 404 when the secret does not exist in the selected scope. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
65
+ */
66
+ async deleteVaultSecret(request, options) {
67
+ return unwrapAsync(vaultDeleteVaultSecret(this, request, options));
68
+ }
69
+ /**
70
+ * Store a workspace secret
71
+ *
72
+ * @remarks
73
+ * Creates or replaces a secret in the workspace of the authenticated API key. The value is encrypted at rest and released only to the exact hostnames in `hosts`. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
74
+ */
75
+ async storeVaultSecret(request, options) {
76
+ return unwrapAsync(vaultStoreVaultSecret(this, request, options));
77
+ }
78
+ }
79
+ //# sourceMappingURL=vault.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.130",
5
+ "version": "1.2.132",
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.130",
3
+ "version": "1.2.132",
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
- "provenance": true,
25
- "access": "public"
24
+ "access": "public",
25
+ "provenance": true
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",
75
75
  "prepublishOnly": "npm run build",
76
+ "typecheck": "tsc --noEmit",
77
+ "test:e2e": "vitest --run --project e2e",
78
+ "test:transit": "exit 0",
79
+ "typecheck:transit": "exit 0",
76
80
  "compile": "tsc",
77
81
  "postinstall": "node scripts/check-types.js || true",
78
82
  "prepare": "npm run build",
79
- "test:transit": "exit 0",
80
- "test:watch": "vitest --watch --project unit",
81
- "typecheck": "tsc --noEmit",
82
- "typecheck:transit": "exit 0",
83
83
  "test": "vitest --run --project unit",
84
- "test:e2e": "vitest --run --project e2e"
84
+ "test:watch": "vitest --watch --project unit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {