@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.
- package/esm/funcs/vaultCopyVaultSecretsToIntern.d.ts +21 -0
- package/esm/funcs/vaultCopyVaultSecretsToIntern.js +108 -0
- package/esm/funcs/vaultDeleteInternVaultSecret.d.ts +20 -0
- package/esm/funcs/vaultDeleteInternVaultSecret.js +109 -0
- package/esm/funcs/vaultDeleteVaultSecret.d.ts +20 -0
- package/esm/funcs/vaultDeleteVaultSecret.js +105 -0
- package/esm/funcs/vaultListInternVaultSecrets.d.ts +21 -0
- package/esm/funcs/vaultListInternVaultSecrets.js +110 -0
- package/esm/funcs/vaultListVaultSecrets.d.ts +21 -0
- package/esm/funcs/vaultListVaultSecrets.js +104 -0
- package/esm/funcs/vaultStoreInternVaultSecret.d.ts +21 -0
- package/esm/funcs/vaultStoreInternVaultSecret.js +112 -0
- package/esm/funcs/vaultStoreVaultSecret.d.ts +21 -0
- package/esm/funcs/vaultStoreVaultSecret.js +108 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/imagegenerationrequest.d.ts +5 -0
- package/esm/models/imagegenerationrequest.js +2 -0
- package/esm/models/index.d.ts +6 -0
- package/esm/models/index.js +6 -0
- package/esm/models/operations/copyvaultsecretstointern.d.ts +61 -0
- package/esm/models/operations/copyvaultsecretstointern.js +24 -0
- package/esm/models/operations/createembeddings.d.ts +5 -0
- package/esm/models/operations/createembeddings.js +2 -0
- package/esm/models/operations/creatererank.d.ts +5 -0
- package/esm/models/operations/creatererank.js +2 -0
- package/esm/models/operations/deleteinternvaultsecret.d.ts +63 -0
- package/esm/models/operations/deleteinternvaultsecret.js +22 -0
- package/esm/models/operations/deletevaultsecret.d.ts +58 -0
- package/esm/models/operations/deletevaultsecret.js +21 -0
- package/esm/models/operations/index.d.ts +7 -0
- package/esm/models/operations/index.js +7 -0
- package/esm/models/operations/listinternvaultsecrets.d.ts +68 -0
- package/esm/models/operations/listinternvaultsecrets.js +23 -0
- package/esm/models/operations/listvaultsecrets.d.ts +63 -0
- package/esm/models/operations/listvaultsecrets.js +22 -0
- package/esm/models/operations/storeinternvaultsecret.d.ts +66 -0
- package/esm/models/operations/storeinternvaultsecret.js +25 -0
- package/esm/models/operations/storevaultsecret.d.ts +61 -0
- package/esm/models/operations/storevaultsecret.js +24 -0
- package/esm/models/speechrequest.d.ts +5 -0
- package/esm/models/speechrequest.js +2 -0
- package/esm/models/sttrequest.d.ts +5 -0
- package/esm/models/sttrequest.js +2 -0
- package/esm/models/vaultsecret.d.ts +16 -0
- package/esm/models/vaultsecret.js +23 -0
- package/esm/models/vaultsecretcopyrequest.d.ts +18 -0
- package/esm/models/vaultsecretcopyrequest.js +13 -0
- package/esm/models/vaultsecretcopyresponse.d.ts +14 -0
- package/esm/models/vaultsecretcopyresponse.js +15 -0
- package/esm/models/vaultsecretlistresponse.d.ts +18 -0
- package/esm/models/vaultsecretlistresponse.js +21 -0
- package/esm/models/vaultsecretresponse.d.ts +17 -0
- package/esm/models/vaultsecretresponse.js +15 -0
- package/esm/models/vaultsecretwriterequest.d.ts +23 -0
- package/esm/models/vaultsecretwriterequest.js +14 -0
- package/esm/models/videogenerationrequest.d.ts +5 -0
- package/esm/models/videogenerationrequest.js +2 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/vault.d.ts +55 -0
- package/esm/sdk/vault.js +79 -0
- package/jsr.json +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f701a28ac32e
|
|
4
|
+
*/
|
|
5
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as models from "../models/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* List workspace secrets
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* 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.
|
|
21
|
+
*
|
|
22
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
23
|
+
*/
|
|
24
|
+
export function vaultListVaultSecrets(client, request, options) {
|
|
25
|
+
return new APIPromise($do(client, request, options));
|
|
26
|
+
}
|
|
27
|
+
async function $do(client, request, options) {
|
|
28
|
+
const parsed = safeParse(request, (value) => operations.ListVaultSecretsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
29
|
+
if (!parsed.ok) {
|
|
30
|
+
return [parsed, { status: "invalid" }];
|
|
31
|
+
}
|
|
32
|
+
const payload = parsed.value;
|
|
33
|
+
const body = null;
|
|
34
|
+
const path = pathToFunc("/vault/secrets")();
|
|
35
|
+
const query = encodeFormQuery({
|
|
36
|
+
"limit": payload?.limit,
|
|
37
|
+
"offset": payload?.offset,
|
|
38
|
+
});
|
|
39
|
+
const headers = new Headers(compactMap({
|
|
40
|
+
Accept: "application/json",
|
|
41
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
42
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload?.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
43
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
44
|
+
}));
|
|
45
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
46
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
47
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
48
|
+
const context = {
|
|
49
|
+
options: client._options,
|
|
50
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
51
|
+
operationID: "listVaultSecrets",
|
|
52
|
+
oAuth2Scopes: null,
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
securitySource: client._options.apiKey,
|
|
55
|
+
retryConfig: options?.retries
|
|
56
|
+
|| client._options.retryConfig
|
|
57
|
+
|| {
|
|
58
|
+
strategy: "backoff",
|
|
59
|
+
backoff: {
|
|
60
|
+
initialInterval: 500,
|
|
61
|
+
maxInterval: 60000,
|
|
62
|
+
exponent: 1.5,
|
|
63
|
+
maxElapsedTime: 3600000,
|
|
64
|
+
},
|
|
65
|
+
retryConnectionErrors: true,
|
|
66
|
+
}
|
|
67
|
+
|| { strategy: "none" },
|
|
68
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
69
|
+
};
|
|
70
|
+
const requestRes = client._createRequest(context, {
|
|
71
|
+
security: requestSecurity,
|
|
72
|
+
method: "GET",
|
|
73
|
+
baseURL: options?.serverURL,
|
|
74
|
+
path: path,
|
|
75
|
+
headers: headers,
|
|
76
|
+
query: query,
|
|
77
|
+
body: body,
|
|
78
|
+
userAgent: client._options.userAgent,
|
|
79
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
80
|
+
}, options);
|
|
81
|
+
if (!requestRes.ok) {
|
|
82
|
+
return [requestRes, { status: "invalid" }];
|
|
83
|
+
}
|
|
84
|
+
const req = requestRes.value;
|
|
85
|
+
const doResult = await client._do(req, {
|
|
86
|
+
context,
|
|
87
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
88
|
+
retryConfig: context.retryConfig,
|
|
89
|
+
retryCodes: context.retryCodes,
|
|
90
|
+
});
|
|
91
|
+
if (!doResult.ok) {
|
|
92
|
+
return [doResult, { status: "request-error", request: req }];
|
|
93
|
+
}
|
|
94
|
+
const response = doResult.value;
|
|
95
|
+
const responseFields = {
|
|
96
|
+
HttpMeta: { Response: response, Request: req },
|
|
97
|
+
};
|
|
98
|
+
const [result] = await M.match(M.json(200, models.VaultSecretListResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors.GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
99
|
+
if (!result.ok) {
|
|
100
|
+
return [result, { status: "complete", request: req, response }];
|
|
101
|
+
}
|
|
102
|
+
return [result, { status: "complete", request: req, response }];
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=vaultListVaultSecrets.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Store an intern secret
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
18
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
|
+
*/
|
|
20
|
+
export declare function vaultStoreInternVaultSecret(client: OpenRouterCore, request: operations.StoreInternVaultSecretRequest, options?: RequestOptions): APIPromise<Result<models.VaultSecretResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.ConflictResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
21
|
+
//# sourceMappingURL=vaultStoreInternVaultSecret.d.ts.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8216704a5d50
|
|
4
|
+
*/
|
|
5
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as models from "../models/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Store an intern secret
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* 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.
|
|
21
|
+
*
|
|
22
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
23
|
+
*/
|
|
24
|
+
export function vaultStoreInternVaultSecret(client, request, options) {
|
|
25
|
+
return new APIPromise($do(client, request, options));
|
|
26
|
+
}
|
|
27
|
+
async function $do(client, request, options) {
|
|
28
|
+
const parsed = safeParse(request, (value) => operations.StoreInternVaultSecretRequest$outboundSchema.parse(value), "Input validation failed");
|
|
29
|
+
if (!parsed.ok) {
|
|
30
|
+
return [parsed, { status: "invalid" }];
|
|
31
|
+
}
|
|
32
|
+
const payload = parsed.value;
|
|
33
|
+
const body = encodeJSON("body", payload.VaultSecretWriteRequest, {
|
|
34
|
+
explode: true,
|
|
35
|
+
});
|
|
36
|
+
const pathParams = {
|
|
37
|
+
internId: encodeSimple("internId", payload.internId, {
|
|
38
|
+
explode: false,
|
|
39
|
+
charEncoding: "percent",
|
|
40
|
+
}),
|
|
41
|
+
name: encodeSimple("name", payload.name, {
|
|
42
|
+
explode: false,
|
|
43
|
+
charEncoding: "percent",
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
46
|
+
const path = pathToFunc("/vault/interns/{internId}/secrets/{name}")(pathParams);
|
|
47
|
+
const headers = new Headers(compactMap({
|
|
48
|
+
"Content-Type": "application/json",
|
|
49
|
+
Accept: "application/json",
|
|
50
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
51
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
52
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
53
|
+
}));
|
|
54
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
55
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
56
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
57
|
+
const context = {
|
|
58
|
+
options: client._options,
|
|
59
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
60
|
+
operationID: "storeInternVaultSecret",
|
|
61
|
+
oAuth2Scopes: null,
|
|
62
|
+
resolvedSecurity: requestSecurity,
|
|
63
|
+
securitySource: client._options.apiKey,
|
|
64
|
+
retryConfig: options?.retries
|
|
65
|
+
|| client._options.retryConfig
|
|
66
|
+
|| {
|
|
67
|
+
strategy: "backoff",
|
|
68
|
+
backoff: {
|
|
69
|
+
initialInterval: 500,
|
|
70
|
+
maxInterval: 60000,
|
|
71
|
+
exponent: 1.5,
|
|
72
|
+
maxElapsedTime: 3600000,
|
|
73
|
+
},
|
|
74
|
+
retryConnectionErrors: true,
|
|
75
|
+
}
|
|
76
|
+
|| { strategy: "none" },
|
|
77
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
78
|
+
};
|
|
79
|
+
const requestRes = client._createRequest(context, {
|
|
80
|
+
security: requestSecurity,
|
|
81
|
+
method: "PUT",
|
|
82
|
+
baseURL: options?.serverURL,
|
|
83
|
+
path: path,
|
|
84
|
+
headers: headers,
|
|
85
|
+
body: body,
|
|
86
|
+
userAgent: client._options.userAgent,
|
|
87
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
88
|
+
}, options);
|
|
89
|
+
if (!requestRes.ok) {
|
|
90
|
+
return [requestRes, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const req = requestRes.value;
|
|
93
|
+
const doResult = await client._do(req, {
|
|
94
|
+
context,
|
|
95
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
96
|
+
retryConfig: context.retryConfig,
|
|
97
|
+
retryCodes: context.retryCodes,
|
|
98
|
+
});
|
|
99
|
+
if (!doResult.ok) {
|
|
100
|
+
return [doResult, { status: "request-error", request: req }];
|
|
101
|
+
}
|
|
102
|
+
const response = doResult.value;
|
|
103
|
+
const responseFields = {
|
|
104
|
+
HttpMeta: { Response: response, Request: req },
|
|
105
|
+
};
|
|
106
|
+
const [result] = await M.match(M.json(200, models.VaultSecretResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors.ConflictResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors.GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
107
|
+
if (!result.ok) {
|
|
108
|
+
return [result, { status: "complete", request: req, response }];
|
|
109
|
+
}
|
|
110
|
+
return [result, { status: "complete", request: req, response }];
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=vaultStoreInternVaultSecret.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Store a workspace secret
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
18
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
|
+
*/
|
|
20
|
+
export declare function vaultStoreVaultSecret(client: OpenRouterCore, request: operations.StoreVaultSecretRequest, options?: RequestOptions): APIPromise<Result<models.VaultSecretResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
21
|
+
//# sourceMappingURL=vaultStoreVaultSecret.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2a58f9053954
|
|
4
|
+
*/
|
|
5
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as models from "../models/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Store a workspace secret
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* 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.
|
|
21
|
+
*
|
|
22
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
23
|
+
*/
|
|
24
|
+
export function vaultStoreVaultSecret(client, request, options) {
|
|
25
|
+
return new APIPromise($do(client, request, options));
|
|
26
|
+
}
|
|
27
|
+
async function $do(client, request, options) {
|
|
28
|
+
const parsed = safeParse(request, (value) => operations.StoreVaultSecretRequest$outboundSchema.parse(value), "Input validation failed");
|
|
29
|
+
if (!parsed.ok) {
|
|
30
|
+
return [parsed, { status: "invalid" }];
|
|
31
|
+
}
|
|
32
|
+
const payload = parsed.value;
|
|
33
|
+
const body = encodeJSON("body", payload.VaultSecretWriteRequest, {
|
|
34
|
+
explode: true,
|
|
35
|
+
});
|
|
36
|
+
const pathParams = {
|
|
37
|
+
name: encodeSimple("name", payload.name, {
|
|
38
|
+
explode: false,
|
|
39
|
+
charEncoding: "percent",
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
const path = pathToFunc("/vault/secrets/{name}")(pathParams);
|
|
43
|
+
const headers = new Headers(compactMap({
|
|
44
|
+
"Content-Type": "application/json",
|
|
45
|
+
Accept: "application/json",
|
|
46
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
47
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
48
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
49
|
+
}));
|
|
50
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
51
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
52
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
53
|
+
const context = {
|
|
54
|
+
options: client._options,
|
|
55
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
56
|
+
operationID: "storeVaultSecret",
|
|
57
|
+
oAuth2Scopes: null,
|
|
58
|
+
resolvedSecurity: requestSecurity,
|
|
59
|
+
securitySource: client._options.apiKey,
|
|
60
|
+
retryConfig: options?.retries
|
|
61
|
+
|| client._options.retryConfig
|
|
62
|
+
|| {
|
|
63
|
+
strategy: "backoff",
|
|
64
|
+
backoff: {
|
|
65
|
+
initialInterval: 500,
|
|
66
|
+
maxInterval: 60000,
|
|
67
|
+
exponent: 1.5,
|
|
68
|
+
maxElapsedTime: 3600000,
|
|
69
|
+
},
|
|
70
|
+
retryConnectionErrors: true,
|
|
71
|
+
}
|
|
72
|
+
|| { strategy: "none" },
|
|
73
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
74
|
+
};
|
|
75
|
+
const requestRes = client._createRequest(context, {
|
|
76
|
+
security: requestSecurity,
|
|
77
|
+
method: "PUT",
|
|
78
|
+
baseURL: options?.serverURL,
|
|
79
|
+
path: path,
|
|
80
|
+
headers: headers,
|
|
81
|
+
body: body,
|
|
82
|
+
userAgent: client._options.userAgent,
|
|
83
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
84
|
+
}, options);
|
|
85
|
+
if (!requestRes.ok) {
|
|
86
|
+
return [requestRes, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const req = requestRes.value;
|
|
89
|
+
const doResult = await client._do(req, {
|
|
90
|
+
context,
|
|
91
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
92
|
+
retryConfig: context.retryConfig,
|
|
93
|
+
retryCodes: context.retryCodes,
|
|
94
|
+
});
|
|
95
|
+
if (!doResult.ok) {
|
|
96
|
+
return [doResult, { status: "request-error", request: req }];
|
|
97
|
+
}
|
|
98
|
+
const response = doResult.value;
|
|
99
|
+
const responseFields = {
|
|
100
|
+
HttpMeta: { Response: response, Request: req },
|
|
101
|
+
};
|
|
102
|
+
const [result] = await M.match(M.json(200, models.VaultSecretResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors.PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors.GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
103
|
+
if (!result.ok) {
|
|
104
|
+
return [result, { status: "complete", request: req, response }];
|
|
105
|
+
}
|
|
106
|
+
return [result, { status: "complete", request: req, response }];
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=vaultStoreVaultSecret.js.map
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -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.
|
|
53
|
+
readonly sdkVersion: "1.2.132";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.132 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.
|
|
32
|
+
sdkVersion: "1.2.132",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.132 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -141,6 +141,10 @@ export type ImageGenerationRequest = {
|
|
|
141
141
|
* 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.
|
|
142
142
|
*/
|
|
143
143
|
seed?: number | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* 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.
|
|
146
|
+
*/
|
|
147
|
+
sessionId?: string | undefined;
|
|
144
148
|
/**
|
|
145
149
|
* Optional. A convenience shorthand for output dimensions — pass a tier ("2K", "4K") or explicit pixels ("2048x2048") and we normalize it to the right dimensions for the chosen provider. A tier size is equivalent to setting `resolution` and combines with `aspect_ratio`. An explicit pixel size is authoritative: a mismatched `resolution` or `aspect_ratio` alongside it is rejected with a 400.
|
|
146
150
|
*/
|
|
@@ -182,6 +186,7 @@ export type ImageGenerationRequest$Outbound = {
|
|
|
182
186
|
quality?: string | undefined;
|
|
183
187
|
resolution?: string | undefined;
|
|
184
188
|
seed?: number | undefined;
|
|
189
|
+
session_id?: string | undefined;
|
|
185
190
|
size?: string | undefined;
|
|
186
191
|
stream?: boolean | undefined;
|
|
187
192
|
trace?: TraceConfig$Outbound | undefined;
|
|
@@ -98,6 +98,7 @@ export const ImageGenerationRequest$outboundSchema = z.object({
|
|
|
98
98
|
quality: ImageGenerationRequestQuality$outboundSchema.optional(),
|
|
99
99
|
resolution: ImageGenerationRequestResolution$outboundSchema.optional(),
|
|
100
100
|
seed: z.int().optional(),
|
|
101
|
+
sessionId: z.string().optional(),
|
|
101
102
|
size: z.string().optional(),
|
|
102
103
|
stream: z.boolean().optional(),
|
|
103
104
|
trace: TraceConfig$outboundSchema.optional(),
|
|
@@ -108,6 +109,7 @@ export const ImageGenerationRequest$outboundSchema = z.object({
|
|
|
108
109
|
inputReferences: "input_references",
|
|
109
110
|
outputCompression: "output_compression",
|
|
110
111
|
outputFormat: "output_format",
|
|
112
|
+
sessionId: "session_id",
|
|
111
113
|
});
|
|
112
114
|
});
|
|
113
115
|
export function imageGenerationRequestToJSON(imageGenerationRequest) {
|
package/esm/models/index.d.ts
CHANGED
|
@@ -611,6 +611,12 @@ export * from "./updateworkspaceresponse.js";
|
|
|
611
611
|
export * from "./upsertworkspacebudgetrequest.js";
|
|
612
612
|
export * from "./upsertworkspacebudgetresponse.js";
|
|
613
613
|
export * from "./urlcitation.js";
|
|
614
|
+
export * from "./vaultsecret.js";
|
|
615
|
+
export * from "./vaultsecretcopyrequest.js";
|
|
616
|
+
export * from "./vaultsecretcopyresponse.js";
|
|
617
|
+
export * from "./vaultsecretlistresponse.js";
|
|
618
|
+
export * from "./vaultsecretresponse.js";
|
|
619
|
+
export * from "./vaultsecretwriterequest.js";
|
|
614
620
|
export * from "./videogenerationrequest.js";
|
|
615
621
|
export * from "./videogenerationresponse.js";
|
|
616
622
|
export * from "./videogenerationusage.js";
|
package/esm/models/index.js
CHANGED
|
@@ -615,6 +615,12 @@ export * from "./updateworkspaceresponse.js";
|
|
|
615
615
|
export * from "./upsertworkspacebudgetrequest.js";
|
|
616
616
|
export * from "./upsertworkspacebudgetresponse.js";
|
|
617
617
|
export * from "./urlcitation.js";
|
|
618
|
+
export * from "./vaultsecret.js";
|
|
619
|
+
export * from "./vaultsecretcopyrequest.js";
|
|
620
|
+
export * from "./vaultsecretcopyresponse.js";
|
|
621
|
+
export * from "./vaultsecretlistresponse.js";
|
|
622
|
+
export * from "./vaultsecretresponse.js";
|
|
623
|
+
export * from "./vaultsecretwriterequest.js";
|
|
618
624
|
export * from "./videogenerationrequest.js";
|
|
619
625
|
export * from "./videogenerationresponse.js";
|
|
620
626
|
export * from "./videogenerationusage.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
export type CopyVaultSecretsToInternGlobals = {
|
|
4
|
+
/**
|
|
5
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is used to track API usage per application.
|
|
9
|
+
*/
|
|
10
|
+
httpReferer?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
*/
|
|
16
|
+
appTitle?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
*/
|
|
22
|
+
appCategories?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type CopyVaultSecretsToInternRequest = {
|
|
25
|
+
/**
|
|
26
|
+
* The app identifier should be your app's URL and is used as the primary identifier for rankings.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is used to track API usage per application.
|
|
30
|
+
*/
|
|
31
|
+
httpReferer?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The app display name allows you to customize how your app appears in OpenRouter's dashboard.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*/
|
|
37
|
+
appTitle?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
*/
|
|
43
|
+
appCategories?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* UUID of an intern in the workspace selected by the API key.
|
|
46
|
+
*/
|
|
47
|
+
internId: string;
|
|
48
|
+
vaultSecretCopyRequest: models.VaultSecretCopyRequest;
|
|
49
|
+
};
|
|
50
|
+
/** @internal */
|
|
51
|
+
export type CopyVaultSecretsToInternRequest$Outbound = {
|
|
52
|
+
"HTTP-Referer"?: string | undefined;
|
|
53
|
+
appTitle?: string | undefined;
|
|
54
|
+
appCategories?: string | undefined;
|
|
55
|
+
internId: string;
|
|
56
|
+
VaultSecretCopyRequest: models.VaultSecretCopyRequest$Outbound;
|
|
57
|
+
};
|
|
58
|
+
/** @internal */
|
|
59
|
+
export declare const CopyVaultSecretsToInternRequest$outboundSchema: z.ZodType<CopyVaultSecretsToInternRequest$Outbound, CopyVaultSecretsToInternRequest>;
|
|
60
|
+
export declare function copyVaultSecretsToInternRequestToJSON(copyVaultSecretsToInternRequest: CopyVaultSecretsToInternRequest): string;
|
|
61
|
+
//# sourceMappingURL=copyvaultsecretstointern.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b4e134f9886d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CopyVaultSecretsToInternRequest$outboundSchema = z.object({
|
|
10
|
+
httpReferer: z.string().optional(),
|
|
11
|
+
appTitle: z.string().optional(),
|
|
12
|
+
appCategories: z.string().optional(),
|
|
13
|
+
internId: z.string(),
|
|
14
|
+
vaultSecretCopyRequest: models.VaultSecretCopyRequest$outboundSchema,
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
httpReferer: "HTTP-Referer",
|
|
18
|
+
vaultSecretCopyRequest: "VaultSecretCopyRequest",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function copyVaultSecretsToInternRequestToJSON(copyVaultSecretsToInternRequest) {
|
|
22
|
+
return JSON.stringify(CopyVaultSecretsToInternRequest$outboundSchema.parse(copyVaultSecretsToInternRequest));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=copyvaultsecretstointern.js.map
|
|
@@ -79,6 +79,10 @@ export type CreateEmbeddingsRequestBody = {
|
|
|
79
79
|
*/
|
|
80
80
|
model: string;
|
|
81
81
|
provider?: models.ProviderPreferences | null | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* 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.
|
|
84
|
+
*/
|
|
85
|
+
sessionId?: string | undefined;
|
|
82
86
|
/**
|
|
83
87
|
* Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
|
84
88
|
*/
|
|
@@ -263,6 +267,7 @@ export type CreateEmbeddingsRequestBody$Outbound = {
|
|
|
263
267
|
input_type?: string | undefined;
|
|
264
268
|
model: string;
|
|
265
269
|
provider?: models.ProviderPreferences$Outbound | null | undefined;
|
|
270
|
+
session_id?: string | undefined;
|
|
266
271
|
trace?: models.TraceConfig$Outbound | undefined;
|
|
267
272
|
user?: string | undefined;
|
|
268
273
|
};
|
|
@@ -100,12 +100,14 @@ export const CreateEmbeddingsRequestBody$outboundSchema = z.object({
|
|
|
100
100
|
inputType: z.string().optional(),
|
|
101
101
|
model: z.string(),
|
|
102
102
|
provider: z.nullable(models.ProviderPreferences$outboundSchema).optional(),
|
|
103
|
+
sessionId: z.string().optional(),
|
|
103
104
|
trace: models.TraceConfig$outboundSchema.optional(),
|
|
104
105
|
user: z.string().optional(),
|
|
105
106
|
}).transform((v) => {
|
|
106
107
|
return remap$(v, {
|
|
107
108
|
encodingFormat: "encoding_format",
|
|
108
109
|
inputType: "input_type",
|
|
110
|
+
sessionId: "session_id",
|
|
109
111
|
});
|
|
110
112
|
});
|
|
111
113
|
export function createEmbeddingsRequestBodyToJSON(createEmbeddingsRequestBody) {
|
|
@@ -57,6 +57,10 @@ export type CreateRerankRequestBody = {
|
|
|
57
57
|
* The search query to rerank documents against
|
|
58
58
|
*/
|
|
59
59
|
query: string;
|
|
60
|
+
/**
|
|
61
|
+
* 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.
|
|
62
|
+
*/
|
|
63
|
+
sessionId?: string | undefined;
|
|
60
64
|
/**
|
|
61
65
|
* Number of most relevant documents to return
|
|
62
66
|
*/
|
|
@@ -184,6 +188,7 @@ export type CreateRerankRequestBody$Outbound = {
|
|
|
184
188
|
model: string;
|
|
185
189
|
provider?: models.ProviderPreferences$Outbound | null | undefined;
|
|
186
190
|
query: string;
|
|
191
|
+
session_id?: string | undefined;
|
|
187
192
|
top_n?: number | undefined;
|
|
188
193
|
trace?: models.TraceConfig$Outbound | undefined;
|
|
189
194
|
user?: string | undefined;
|
|
@@ -26,11 +26,13 @@ export const CreateRerankRequestBody$outboundSchema = z.object({
|
|
|
26
26
|
model: z.string(),
|
|
27
27
|
provider: z.nullable(models.ProviderPreferences$outboundSchema).optional(),
|
|
28
28
|
query: z.string(),
|
|
29
|
+
sessionId: z.string().optional(),
|
|
29
30
|
topN: z.int().optional(),
|
|
30
31
|
trace: models.TraceConfig$outboundSchema.optional(),
|
|
31
32
|
user: z.string().optional(),
|
|
32
33
|
}).transform((v) => {
|
|
33
34
|
return remap$(v, {
|
|
35
|
+
sessionId: "session_id",
|
|
34
36
|
topN: "top_n",
|
|
35
37
|
});
|
|
36
38
|
});
|