@openrouter/sdk 1.5.84 → 1.5.86
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/endpointsList.d.ts +1 -1
- package/esm/funcs/endpointsList.js +2 -2
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +1 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +2 -2
- package/esm/funcs/guardrailPoliciesListBudgetPolicies.d.ts +1 -1
- package/esm/funcs/guardrailPoliciesListBudgetPolicies.js +7 -7
- package/esm/funcs/guardrailPoliciesListModelAvailabilityPolicies.d.ts +1 -1
- package/esm/funcs/guardrailPoliciesListModelAvailabilityPolicies.js +8 -7
- package/esm/funcs/guardrailPoliciesListModerationPolicies.d.ts +1 -1
- package/esm/funcs/guardrailPoliciesListModerationPolicies.js +7 -7
- package/esm/funcs/guardrailsListKeyAssignments.js +1 -0
- package/esm/funcs/guardrailsListMemberAssignments.js +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/changeguardrailpolicyassignmentrequest.d.ts +3 -3
- package/esm/models/changeguardrailpolicyassignmentrequest.js +1 -1
- package/esm/models/chatrequest.d.ts +22 -0
- package/esm/models/chatrequest.js +6 -0
- package/esm/models/createbudgetguardrailpolicyrequest.d.ts +3 -3
- package/esm/models/createbudgetguardrailpolicyrequest.js +1 -1
- package/esm/models/createmodelavailabilityguardrailpolicyrequest.d.ts +3 -3
- package/esm/models/createmodelavailabilityguardrailpolicyrequest.js +1 -1
- package/esm/models/createmoderationguardrailpolicyrequest.d.ts +3 -3
- package/esm/models/createmoderationguardrailpolicyrequest.js +1 -1
- package/esm/models/imagegenerationproviderpreferences.d.ts +6 -0
- package/esm/models/imagegenerationproviderpreferences.js +1 -0
- package/esm/models/operations/deletebudgetpolicy.d.ts +3 -3
- package/esm/models/operations/deletebudgetpolicy.js +1 -1
- package/esm/models/operations/deletemodelavailabilitypolicy.d.ts +3 -3
- package/esm/models/operations/deletemodelavailabilitypolicy.js +1 -1
- package/esm/models/operations/deletemoderationpolicy.d.ts +3 -3
- package/esm/models/operations/deletemoderationpolicy.js +1 -1
- package/esm/models/operations/getapikeypolicyassignment.d.ts +3 -3
- package/esm/models/operations/getapikeypolicyassignment.js +1 -1
- package/esm/models/operations/getbudgetpolicy.d.ts +3 -3
- package/esm/models/operations/getbudgetpolicy.js +1 -1
- package/esm/models/operations/getmemberpolicyassignment.d.ts +3 -3
- package/esm/models/operations/getmemberpolicyassignment.js +1 -1
- package/esm/models/operations/getmodelavailabilitypolicy.d.ts +3 -3
- package/esm/models/operations/getmodelavailabilitypolicy.js +1 -1
- package/esm/models/operations/getmoderationpolicy.d.ts +3 -3
- package/esm/models/operations/getmoderationpolicy.js +1 -1
- package/esm/models/operations/listbudgetpolicies.d.ts +3 -3
- package/esm/models/operations/listbudgetpolicies.js +1 -1
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/operations/listkeyassignments.d.ts +5 -0
- package/esm/models/operations/listkeyassignments.js +2 -0
- package/esm/models/operations/listmemberassignments.d.ts +5 -0
- package/esm/models/operations/listmemberassignments.js +2 -0
- package/esm/models/operations/listmodelavailabilitypolicies.d.ts +3 -3
- package/esm/models/operations/listmodelavailabilitypolicies.js +1 -1
- package/esm/models/operations/listmoderationpolicies.d.ts +3 -3
- package/esm/models/operations/listmoderationpolicies.js +1 -1
- package/esm/models/operations/updatekeys.d.ts +1 -1
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/provideroptions.d.ts +6 -0
- package/esm/models/provideroptions.js +1 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/updatebudgetguardrailpolicyrequest.d.ts +3 -3
- package/esm/models/updatebudgetguardrailpolicyrequest.js +1 -1
- package/esm/models/updatemodelavailabilityguardrailpolicyrequest.d.ts +3 -3
- package/esm/models/updatemodelavailabilityguardrailpolicyrequest.js +1 -1
- package/esm/models/updatemoderationguardrailpolicyrequest.d.ts +3 -3
- package/esm/models/updatemoderationguardrailpolicyrequest.js +1 -1
- package/esm/models/videogenerationrequest.d.ts +6 -0
- package/esm/models/videogenerationrequest.js +1 -0
- package/esm/sdk/guardrailpolicies.d.ts +3 -3
- package/jsr.json +1 -1
- package/package.json +7 -7
|
@@ -11,5 +11,5 @@ import { Result } from "../types/fp.js";
|
|
|
11
11
|
/**
|
|
12
12
|
* List all endpoints for a model
|
|
13
13
|
*/
|
|
14
|
-
export declare function endpointsList(client: OpenRouterCore, request: operations.ListEndpointsRequest, options?: RequestOptions): APIPromise<Result<operations.ListEndpointsResponse, errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
14
|
+
export declare function endpointsList(client: OpenRouterCore, request: operations.ListEndpointsRequest, options?: RequestOptions): APIPromise<Result<operations.ListEndpointsResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
15
15
|
//# sourceMappingURL=endpointsList.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js";
|
|
12
|
+
import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { ListEndpointsRequest$outboundSchema as operations_ListEndpointsRequest$outboundSchema, ListEndpointsResponse$inboundSchema as operations_ListEndpointsResponse$inboundSchema } from "../models/operations/listendpoints.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
/**
|
|
@@ -94,7 +94,7 @@ async function $do(client, request, options) {
|
|
|
94
94
|
const responseFields = {
|
|
95
95
|
HttpMeta: { Response: response, Request: req },
|
|
96
96
|
};
|
|
97
|
-
const [result] = await M.match(M.json(200, operations_ListEndpointsResponse$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
97
|
+
const [result] = await M.match(M.json(200, operations_ListEndpointsResponse$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
98
98
|
if (!result.ok) {
|
|
99
99
|
return [result, { status: "complete", request: req, response }];
|
|
100
100
|
}
|
|
@@ -11,5 +11,5 @@ import { Result } from "../types/fp.js";
|
|
|
11
11
|
/**
|
|
12
12
|
* Preview the impact of ZDR on the available endpoints
|
|
13
13
|
*/
|
|
14
|
-
export declare function endpointsListZdrEndpoints(client: OpenRouterCore, request?: operations.ListEndpointsZdrRequest | undefined, options?: RequestOptions): APIPromise<Result<operations.ListEndpointsZdrResponse, errors.ForbiddenResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
14
|
+
export declare function endpointsListZdrEndpoints(client: OpenRouterCore, request?: operations.ListEndpointsZdrRequest | undefined, options?: RequestOptions): APIPromise<Result<operations.ListEndpointsZdrResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
15
15
|
//# sourceMappingURL=endpointsListZdrEndpoints.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js";
|
|
12
|
+
import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { ListEndpointsZdrRequest$outboundSchema as operations_ListEndpointsZdrRequest$outboundSchema, ListEndpointsZdrResponse$inboundSchema as operations_ListEndpointsZdrResponse$inboundSchema } from "../models/operations/listendpointszdr.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
/**
|
|
@@ -84,7 +84,7 @@ async function $do(client, request, options) {
|
|
|
84
84
|
const responseFields = {
|
|
85
85
|
HttpMeta: { Response: response, Request: req },
|
|
86
86
|
};
|
|
87
|
-
const [result] = await M.match(M.json(200, operations_ListEndpointsZdrResponse$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
87
|
+
const [result] = await M.match(M.json(200, operations_ListEndpointsZdrResponse$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
88
88
|
if (!result.ok) {
|
|
89
89
|
return [result, { status: "complete", request: req, response }];
|
|
90
90
|
}
|
|
@@ -15,7 +15,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* List the budget policies in a workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
|
-
export declare function guardrailPoliciesListBudgetPolicies(client: OpenRouterCore, request
|
|
18
|
+
export declare function guardrailPoliciesListBudgetPolicies(client: OpenRouterCore, request?: operations.ListBudgetPoliciesRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListBudgetPoliciesResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
19
|
offset: number;
|
|
20
20
|
}>>;
|
|
21
21
|
//# sourceMappingURL=guardrailPoliciesListBudgetPolicies.d.ts.map
|
|
@@ -23,7 +23,7 @@ export function guardrailPoliciesListBudgetPolicies(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) => operations_ListBudgetPoliciesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_ListBudgetPoliciesRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -31,15 +31,15 @@ async function $do(client, request, options) {
|
|
|
31
31
|
const body = null;
|
|
32
32
|
const path = pathToFunc("/guardrails/policies/budget")();
|
|
33
33
|
const query = encodeFormQuery({
|
|
34
|
-
"limit": payload
|
|
35
|
-
"offset": payload
|
|
36
|
-
"workspace_id": payload
|
|
34
|
+
"limit": payload?.limit,
|
|
35
|
+
"offset": payload?.offset,
|
|
36
|
+
"workspace_id": payload?.workspace_id,
|
|
37
37
|
});
|
|
38
38
|
const headers = new Headers(compactMap({
|
|
39
39
|
Accept: "application/json",
|
|
40
|
-
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
41
|
-
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload
|
|
42
|
-
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload
|
|
40
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
41
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload?.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
42
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
43
43
|
}));
|
|
44
44
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
45
45
|
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
@@ -15,7 +15,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* List the model availability policies in a workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
|
-
export declare function guardrailPoliciesListModelAvailabilityPolicies(client: OpenRouterCore, request
|
|
18
|
+
export declare function guardrailPoliciesListModelAvailabilityPolicies(client: OpenRouterCore, request?: operations.ListModelAvailabilityPoliciesRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListModelAvailabilityPoliciesResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
19
|
offset: number;
|
|
20
20
|
}>>;
|
|
21
21
|
//# sourceMappingURL=guardrailPoliciesListModelAvailabilityPolicies.d.ts.map
|
|
@@ -23,7 +23,8 @@ export function guardrailPoliciesListModelAvailabilityPolicies(client, request,
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) => operations_ListModelAvailabilityPoliciesRequest$outboundSchema.
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_ListModelAvailabilityPoliciesRequest$outboundSchema.optional()
|
|
27
|
+
.parse(value), "Input validation failed");
|
|
27
28
|
if (!parsed.ok) {
|
|
28
29
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
29
30
|
}
|
|
@@ -31,15 +32,15 @@ async function $do(client, request, options) {
|
|
|
31
32
|
const body = null;
|
|
32
33
|
const path = pathToFunc("/guardrails/policies/model-availability")();
|
|
33
34
|
const query = encodeFormQuery({
|
|
34
|
-
"limit": payload
|
|
35
|
-
"offset": payload
|
|
36
|
-
"workspace_id": payload
|
|
35
|
+
"limit": payload?.limit,
|
|
36
|
+
"offset": payload?.offset,
|
|
37
|
+
"workspace_id": payload?.workspace_id,
|
|
37
38
|
});
|
|
38
39
|
const headers = new Headers(compactMap({
|
|
39
40
|
Accept: "application/json",
|
|
40
|
-
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
41
|
-
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload
|
|
42
|
-
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload
|
|
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" }),
|
|
43
44
|
}));
|
|
44
45
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
45
46
|
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
@@ -15,7 +15,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* List the moderation policies in a workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
|
-
export declare function guardrailPoliciesListModerationPolicies(client: OpenRouterCore, request
|
|
18
|
+
export declare function guardrailPoliciesListModerationPolicies(client: OpenRouterCore, request?: operations.ListModerationPoliciesRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListModerationPoliciesResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
19
|
offset: number;
|
|
20
20
|
}>>;
|
|
21
21
|
//# sourceMappingURL=guardrailPoliciesListModerationPolicies.d.ts.map
|
|
@@ -23,7 +23,7 @@ export function guardrailPoliciesListModerationPolicies(client, request, options
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) => operations_ListModerationPoliciesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_ListModerationPoliciesRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -31,15 +31,15 @@ async function $do(client, request, options) {
|
|
|
31
31
|
const body = null;
|
|
32
32
|
const path = pathToFunc("/guardrails/policies/moderation")();
|
|
33
33
|
const query = encodeFormQuery({
|
|
34
|
-
"limit": payload
|
|
35
|
-
"offset": payload
|
|
36
|
-
"workspace_id": payload
|
|
34
|
+
"limit": payload?.limit,
|
|
35
|
+
"offset": payload?.offset,
|
|
36
|
+
"workspace_id": payload?.workspace_id,
|
|
37
37
|
});
|
|
38
38
|
const headers = new Headers(compactMap({
|
|
39
39
|
Accept: "application/json",
|
|
40
|
-
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
41
|
-
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload
|
|
42
|
-
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload
|
|
40
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
41
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload?.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
42
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
43
43
|
}));
|
|
44
44
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
45
45
|
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
@@ -33,6 +33,7 @@ async function $do(client, request, options) {
|
|
|
33
33
|
const query = encodeFormQuery({
|
|
34
34
|
"limit": payload?.limit,
|
|
35
35
|
"offset": payload?.offset,
|
|
36
|
+
"workspace_id": payload?.workspace_id,
|
|
36
37
|
});
|
|
37
38
|
const headers = new Headers(compactMap({
|
|
38
39
|
Accept: "application/json",
|
|
@@ -33,6 +33,7 @@ async function $do(client, request, options) {
|
|
|
33
33
|
const query = encodeFormQuery({
|
|
34
34
|
"limit": payload?.limit,
|
|
35
35
|
"offset": payload?.offset,
|
|
36
|
+
"workspace_id": payload?.workspace_id,
|
|
36
37
|
});
|
|
37
38
|
const headers = new Headers(compactMap({
|
|
38
39
|
Accept: "application/json",
|
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.5.
|
|
53
|
+
readonly sdkVersion: "1.5.86";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.86 2.950.13 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.5.
|
|
32
|
+
sdkVersion: "1.5.86",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.86 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -110,6 +110,7 @@ export declare const BYOKProviderSlug: {
|
|
|
110
110
|
readonly Seed: "seed";
|
|
111
111
|
readonly Siliconflow: "siliconflow";
|
|
112
112
|
readonly Sourceful: "sourceful";
|
|
113
|
+
readonly Speechify: "speechify";
|
|
113
114
|
readonly Stepfun: "stepfun";
|
|
114
115
|
readonly Streamlake: "streamlake";
|
|
115
116
|
readonly Switchpoint: "switchpoint";
|
|
@@ -29,9 +29,9 @@ export type ChangeGuardrailPolicyAssignmentRequest = {
|
|
|
29
29
|
*/
|
|
30
30
|
policyType: ChangeGuardrailPolicyAssignmentRequestPolicyType;
|
|
31
31
|
/**
|
|
32
|
-
* Workspace the policy belongs to
|
|
32
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
33
33
|
*/
|
|
34
|
-
workspaceId
|
|
34
|
+
workspaceId?: string | undefined;
|
|
35
35
|
};
|
|
36
36
|
/** @internal */
|
|
37
37
|
export declare const ChangeGuardrailPolicyAssignmentRequestPolicyType$outboundSchema: z.ZodType<string, ChangeGuardrailPolicyAssignmentRequestPolicyType>;
|
|
@@ -41,7 +41,7 @@ export type ChangeGuardrailPolicyAssignmentRequest$Outbound = {
|
|
|
41
41
|
expected_assignment: GuardrailPolicyAssignmentState$Outbound;
|
|
42
42
|
policy_id: string;
|
|
43
43
|
policy_type: string;
|
|
44
|
-
workspace_id
|
|
44
|
+
workspace_id?: string | undefined;
|
|
45
45
|
};
|
|
46
46
|
/** @internal */
|
|
47
47
|
export declare const ChangeGuardrailPolicyAssignmentRequest$outboundSchema: z.ZodType<ChangeGuardrailPolicyAssignmentRequest$Outbound, ChangeGuardrailPolicyAssignmentRequest>;
|
|
@@ -23,7 +23,7 @@ export const ChangeGuardrailPolicyAssignmentRequest$outboundSchema = z.object({
|
|
|
23
23
|
expectedAssignment: GuardrailPolicyAssignmentState$outboundSchema,
|
|
24
24
|
policyId: z.string(),
|
|
25
25
|
policyType: ChangeGuardrailPolicyAssignmentRequestPolicyType$outboundSchema,
|
|
26
|
-
workspaceId: z.string(),
|
|
26
|
+
workspaceId: z.string().optional(),
|
|
27
27
|
}).transform((v) => {
|
|
28
28
|
return remap$(v, {
|
|
29
29
|
expectedAssignment: "expected_assignment",
|
|
@@ -27,6 +27,8 @@ import { ParetoRouterPlugin, ParetoRouterPlugin$Outbound } from "./paretorouterp
|
|
|
27
27
|
import { Prediction, Prediction$Outbound } from "./prediction.js";
|
|
28
28
|
import { PromptCacheOptions, PromptCacheOptions$Outbound } from "./promptcacheoptions.js";
|
|
29
29
|
import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpreferences.js";
|
|
30
|
+
import { ReasoningContext } from "./reasoningcontext.js";
|
|
31
|
+
import { ReasoningMode } from "./reasoningmode.js";
|
|
30
32
|
import { ResponseHealingPlugin, ResponseHealingPlugin$Outbound } from "./responsehealingplugin.js";
|
|
31
33
|
import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } from "./stopservertoolswhencondition.js";
|
|
32
34
|
import { SwitchyardRouterPlugin, SwitchyardRouterPlugin$Outbound } from "./switchyardrouterplugin.js";
|
|
@@ -60,14 +62,30 @@ export type ChatRequestEffort = OpenEnum<typeof ChatRequestEffort>;
|
|
|
60
62
|
* Configuration options for reasoning models
|
|
61
63
|
*/
|
|
62
64
|
export type ChatRequestReasoning = {
|
|
65
|
+
/**
|
|
66
|
+
* Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.
|
|
67
|
+
*/
|
|
68
|
+
context?: ReasoningContext | null | undefined;
|
|
63
69
|
/**
|
|
64
70
|
* Constrains effort on reasoning for reasoning models
|
|
65
71
|
*/
|
|
66
72
|
effort?: ChatRequestEffort | null | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Enables reasoning with default settings. Defaults to being inferred from `effort` or `max_tokens`.
|
|
75
|
+
*/
|
|
76
|
+
enabled?: boolean | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* When true, the model still reasons but the reasoning is omitted from the response. Defaults to false.
|
|
79
|
+
*/
|
|
80
|
+
exclude?: boolean | undefined;
|
|
67
81
|
/**
|
|
68
82
|
* Maximum number of tokens the model may spend on reasoning, for models that take a reasoning token budget instead of an effort level. Cannot be combined with `reasoning.effort` or the top-level `reasoning_effort`: a request that sets both is rejected with "Only one of "reasoning.effort" and "reasoning.max_tokens" can be specified".
|
|
69
83
|
*/
|
|
70
84
|
maxTokens?: number | null | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Selects the reasoning mode. `standard` is the default; `pro` engages deeper reasoning on models that support it, billed at standard token rates. Only supported by OpenAI GPT-5.6 and newer.
|
|
87
|
+
*/
|
|
88
|
+
mode?: ReasoningMode | null | undefined;
|
|
71
89
|
summary?: ChatReasoningSummaryVerbosityEnum | null | undefined;
|
|
72
90
|
};
|
|
73
91
|
/**
|
|
@@ -297,8 +315,12 @@ export declare function chatRequestPluginToJSON(chatRequestPlugin: ChatRequestPl
|
|
|
297
315
|
export declare const ChatRequestEffort$outboundSchema: z.ZodType<string, ChatRequestEffort>;
|
|
298
316
|
/** @internal */
|
|
299
317
|
export type ChatRequestReasoning$Outbound = {
|
|
318
|
+
context?: string | null | undefined;
|
|
300
319
|
effort?: string | null | undefined;
|
|
320
|
+
enabled?: boolean | undefined;
|
|
321
|
+
exclude?: boolean | undefined;
|
|
301
322
|
max_tokens?: number | null | undefined;
|
|
323
|
+
mode?: string | null | undefined;
|
|
302
324
|
summary?: string | null | undefined;
|
|
303
325
|
};
|
|
304
326
|
/** @internal */
|
|
@@ -32,6 +32,8 @@ import { ParetoRouterPlugin$outboundSchema, } from "./paretorouterplugin.js";
|
|
|
32
32
|
import { Prediction$outboundSchema, } from "./prediction.js";
|
|
33
33
|
import { PromptCacheOptions$outboundSchema, } from "./promptcacheoptions.js";
|
|
34
34
|
import { ProviderPreferences$outboundSchema, } from "./providerpreferences.js";
|
|
35
|
+
import { ReasoningContext$outboundSchema, } from "./reasoningcontext.js";
|
|
36
|
+
import { ReasoningMode$outboundSchema, } from "./reasoningmode.js";
|
|
35
37
|
import { ResponseHealingPlugin$outboundSchema, } from "./responsehealingplugin.js";
|
|
36
38
|
import { StopServerToolsWhenCondition$outboundSchema, } from "./stopservertoolswhencondition.js";
|
|
37
39
|
import { SwitchyardRouterPlugin$outboundSchema, } from "./switchyardrouterplugin.js";
|
|
@@ -106,8 +108,12 @@ export function chatRequestPluginToJSON(chatRequestPlugin) {
|
|
|
106
108
|
export const ChatRequestEffort$outboundSchema = openEnums.outboundSchema(ChatRequestEffort);
|
|
107
109
|
/** @internal */
|
|
108
110
|
export const ChatRequestReasoning$outboundSchema = z.object({
|
|
111
|
+
context: z.nullable(ReasoningContext$outboundSchema).optional(),
|
|
109
112
|
effort: z.nullable(ChatRequestEffort$outboundSchema).optional(),
|
|
113
|
+
enabled: z.boolean().optional(),
|
|
114
|
+
exclude: z.boolean().optional(),
|
|
110
115
|
maxTokens: z.nullable(z.int()).optional(),
|
|
116
|
+
mode: z.nullable(ReasoningMode$outboundSchema).optional(),
|
|
111
117
|
summary: z.nullable(ChatReasoningSummaryVerbosityEnum$outboundSchema)
|
|
112
118
|
.optional(),
|
|
113
119
|
}).transform((v) => {
|
|
@@ -33,9 +33,9 @@ export type CreateBudgetGuardrailPolicyRequest = {
|
|
|
33
33
|
optedOutMemberIds?: Array<string> | undefined;
|
|
34
34
|
policyType: CreateBudgetGuardrailPolicyRequestPolicyType;
|
|
35
35
|
/**
|
|
36
|
-
* Workspace the policy belongs to
|
|
36
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
37
37
|
*/
|
|
38
|
-
workspaceId
|
|
38
|
+
workspaceId?: string | undefined;
|
|
39
39
|
};
|
|
40
40
|
/** @internal */
|
|
41
41
|
export declare const CreateBudgetGuardrailPolicyRequestPolicyType$outboundSchema: z.ZodEnum<typeof CreateBudgetGuardrailPolicyRequestPolicyType>;
|
|
@@ -49,7 +49,7 @@ export type CreateBudgetGuardrailPolicyRequest$Outbound = {
|
|
|
49
49
|
opted_out_api_key_hashes?: Array<string> | undefined;
|
|
50
50
|
opted_out_member_ids?: Array<string> | undefined;
|
|
51
51
|
policy_type: string;
|
|
52
|
-
workspace_id
|
|
52
|
+
workspace_id?: string | undefined;
|
|
53
53
|
};
|
|
54
54
|
/** @internal */
|
|
55
55
|
export declare const CreateBudgetGuardrailPolicyRequest$outboundSchema: z.ZodType<CreateBudgetGuardrailPolicyRequest$Outbound, CreateBudgetGuardrailPolicyRequest>;
|
|
@@ -20,7 +20,7 @@ export const CreateBudgetGuardrailPolicyRequest$outboundSchema = z.object({
|
|
|
20
20
|
optedOutApiKeyHashes: z.array(z.string()).optional(),
|
|
21
21
|
optedOutMemberIds: z.array(z.string()).optional(),
|
|
22
22
|
policyType: CreateBudgetGuardrailPolicyRequestPolicyType$outboundSchema,
|
|
23
|
-
workspaceId: z.string(),
|
|
23
|
+
workspaceId: z.string().optional(),
|
|
24
24
|
}).transform((v) => {
|
|
25
25
|
return remap$(v, {
|
|
26
26
|
apiKeyHashes: "api_key_hashes",
|
|
@@ -33,9 +33,9 @@ export type CreateModelAvailabilityGuardrailPolicyRequest = {
|
|
|
33
33
|
optedOutMemberIds?: Array<string> | undefined;
|
|
34
34
|
policyType: CreateModelAvailabilityGuardrailPolicyRequestPolicyType;
|
|
35
35
|
/**
|
|
36
|
-
* Workspace the policy belongs to
|
|
36
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
37
37
|
*/
|
|
38
|
-
workspaceId
|
|
38
|
+
workspaceId?: string | undefined;
|
|
39
39
|
};
|
|
40
40
|
/** @internal */
|
|
41
41
|
export declare const CreateModelAvailabilityGuardrailPolicyRequestPolicyType$outboundSchema: z.ZodEnum<typeof CreateModelAvailabilityGuardrailPolicyRequestPolicyType>;
|
|
@@ -49,7 +49,7 @@ export type CreateModelAvailabilityGuardrailPolicyRequest$Outbound = {
|
|
|
49
49
|
opted_out_api_key_hashes?: Array<string> | undefined;
|
|
50
50
|
opted_out_member_ids?: Array<string> | undefined;
|
|
51
51
|
policy_type: string;
|
|
52
|
-
workspace_id
|
|
52
|
+
workspace_id?: string | undefined;
|
|
53
53
|
};
|
|
54
54
|
/** @internal */
|
|
55
55
|
export declare const CreateModelAvailabilityGuardrailPolicyRequest$outboundSchema: z.ZodType<CreateModelAvailabilityGuardrailPolicyRequest$Outbound, CreateModelAvailabilityGuardrailPolicyRequest>;
|
|
@@ -21,7 +21,7 @@ export const CreateModelAvailabilityGuardrailPolicyRequest$outboundSchema = z.ob
|
|
|
21
21
|
optedOutApiKeyHashes: z.array(z.string()).optional(),
|
|
22
22
|
optedOutMemberIds: z.array(z.string()).optional(),
|
|
23
23
|
policyType: CreateModelAvailabilityGuardrailPolicyRequestPolicyType$outboundSchema,
|
|
24
|
-
workspaceId: z.string(),
|
|
24
|
+
workspaceId: z.string().optional(),
|
|
25
25
|
}).transform((v) => {
|
|
26
26
|
return remap$(v, {
|
|
27
27
|
apiKeyHashes: "api_key_hashes",
|
|
@@ -33,9 +33,9 @@ export type CreateModerationGuardrailPolicyRequest = {
|
|
|
33
33
|
optedOutMemberIds?: Array<string> | undefined;
|
|
34
34
|
policyType: CreateModerationGuardrailPolicyRequestPolicyType;
|
|
35
35
|
/**
|
|
36
|
-
* Workspace the policy belongs to
|
|
36
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
37
37
|
*/
|
|
38
|
-
workspaceId
|
|
38
|
+
workspaceId?: string | undefined;
|
|
39
39
|
};
|
|
40
40
|
/** @internal */
|
|
41
41
|
export declare const CreateModerationGuardrailPolicyRequestPolicyType$outboundSchema: z.ZodEnum<typeof CreateModerationGuardrailPolicyRequestPolicyType>;
|
|
@@ -49,7 +49,7 @@ export type CreateModerationGuardrailPolicyRequest$Outbound = {
|
|
|
49
49
|
opted_out_api_key_hashes?: Array<string> | undefined;
|
|
50
50
|
opted_out_member_ids?: Array<string> | undefined;
|
|
51
51
|
policy_type: string;
|
|
52
|
-
workspace_id
|
|
52
|
+
workspace_id?: string | undefined;
|
|
53
53
|
};
|
|
54
54
|
/** @internal */
|
|
55
55
|
export declare const CreateModerationGuardrailPolicyRequest$outboundSchema: z.ZodType<CreateModerationGuardrailPolicyRequest$Outbound, CreateModerationGuardrailPolicyRequest>;
|
|
@@ -20,7 +20,7 @@ export const CreateModerationGuardrailPolicyRequest$outboundSchema = z.object({
|
|
|
20
20
|
optedOutApiKeyHashes: z.array(z.string()).optional(),
|
|
21
21
|
optedOutMemberIds: z.array(z.string()).optional(),
|
|
22
22
|
policyType: CreateModerationGuardrailPolicyRequestPolicyType$outboundSchema,
|
|
23
|
-
workspaceId: z.string(),
|
|
23
|
+
workspaceId: z.string().optional(),
|
|
24
24
|
}).transform((v) => {
|
|
25
25
|
return remap$(v, {
|
|
26
26
|
apiKeyHashes: "api_key_hashes",
|
|
@@ -407,6 +407,9 @@ export type ImageGenerationProviderPreferencesOptions = {
|
|
|
407
407
|
sourceful?: {
|
|
408
408
|
[k: string]: any;
|
|
409
409
|
} | undefined;
|
|
410
|
+
speechify?: {
|
|
411
|
+
[k: string]: any;
|
|
412
|
+
} | undefined;
|
|
410
413
|
stealth?: {
|
|
411
414
|
[k: string]: any;
|
|
412
415
|
} | undefined;
|
|
@@ -920,6 +923,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
|
|
|
920
923
|
sourceful?: {
|
|
921
924
|
[k: string]: any;
|
|
922
925
|
} | undefined;
|
|
926
|
+
speechify?: {
|
|
927
|
+
[k: string]: any;
|
|
928
|
+
} | undefined;
|
|
923
929
|
stealth?: {
|
|
924
930
|
[k: string]: any;
|
|
925
931
|
} | undefined;
|
|
@@ -152,6 +152,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
152
152
|
sfCompute: z.record(z.string(), z.any()).optional(),
|
|
153
153
|
siliconflow: z.record(z.string(), z.any()).optional(),
|
|
154
154
|
sourceful: z.record(z.string(), z.any()).optional(),
|
|
155
|
+
speechify: z.record(z.string(), z.any()).optional(),
|
|
155
156
|
stealth: z.record(z.string(), z.any()).optional(),
|
|
156
157
|
stepfun: z.record(z.string(), z.any()).optional(),
|
|
157
158
|
streamlake: z.record(z.string(), z.any()).optional(),
|
|
@@ -45,9 +45,9 @@ export type DeleteBudgetPolicyRequest = {
|
|
|
45
45
|
*/
|
|
46
46
|
id: string;
|
|
47
47
|
/**
|
|
48
|
-
* Workspace the policy belongs to
|
|
48
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
49
49
|
*/
|
|
50
|
-
workspaceId
|
|
50
|
+
workspaceId?: string | undefined;
|
|
51
51
|
};
|
|
52
52
|
/** @internal */
|
|
53
53
|
export type DeleteBudgetPolicyRequest$Outbound = {
|
|
@@ -55,7 +55,7 @@ export type DeleteBudgetPolicyRequest$Outbound = {
|
|
|
55
55
|
appTitle?: string | undefined;
|
|
56
56
|
appCategories?: string | undefined;
|
|
57
57
|
id: string;
|
|
58
|
-
workspace_id
|
|
58
|
+
workspace_id?: string | undefined;
|
|
59
59
|
};
|
|
60
60
|
/** @internal */
|
|
61
61
|
export declare const DeleteBudgetPolicyRequest$outboundSchema: z.ZodType<DeleteBudgetPolicyRequest$Outbound, DeleteBudgetPolicyRequest>;
|
|
@@ -10,7 +10,7 @@ export const DeleteBudgetPolicyRequest$outboundSchema = z.object({
|
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
12
12
|
id: z.string(),
|
|
13
|
-
workspaceId: z.string(),
|
|
13
|
+
workspaceId: z.string().optional(),
|
|
14
14
|
}).transform((v) => {
|
|
15
15
|
return remap$(v, {
|
|
16
16
|
httpReferer: "HTTP-Referer",
|
|
@@ -45,9 +45,9 @@ export type DeleteModelAvailabilityPolicyRequest = {
|
|
|
45
45
|
*/
|
|
46
46
|
id: string;
|
|
47
47
|
/**
|
|
48
|
-
* Workspace the policy belongs to
|
|
48
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
49
49
|
*/
|
|
50
|
-
workspaceId
|
|
50
|
+
workspaceId?: string | undefined;
|
|
51
51
|
};
|
|
52
52
|
/** @internal */
|
|
53
53
|
export type DeleteModelAvailabilityPolicyRequest$Outbound = {
|
|
@@ -55,7 +55,7 @@ export type DeleteModelAvailabilityPolicyRequest$Outbound = {
|
|
|
55
55
|
appTitle?: string | undefined;
|
|
56
56
|
appCategories?: string | undefined;
|
|
57
57
|
id: string;
|
|
58
|
-
workspace_id
|
|
58
|
+
workspace_id?: string | undefined;
|
|
59
59
|
};
|
|
60
60
|
/** @internal */
|
|
61
61
|
export declare const DeleteModelAvailabilityPolicyRequest$outboundSchema: z.ZodType<DeleteModelAvailabilityPolicyRequest$Outbound, DeleteModelAvailabilityPolicyRequest>;
|
|
@@ -10,7 +10,7 @@ export const DeleteModelAvailabilityPolicyRequest$outboundSchema = z.object({
|
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
12
12
|
id: z.string(),
|
|
13
|
-
workspaceId: z.string(),
|
|
13
|
+
workspaceId: z.string().optional(),
|
|
14
14
|
}).transform((v) => {
|
|
15
15
|
return remap$(v, {
|
|
16
16
|
httpReferer: "HTTP-Referer",
|
|
@@ -45,9 +45,9 @@ export type DeleteModerationPolicyRequest = {
|
|
|
45
45
|
*/
|
|
46
46
|
id: string;
|
|
47
47
|
/**
|
|
48
|
-
* Workspace the policy belongs to
|
|
48
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
49
49
|
*/
|
|
50
|
-
workspaceId
|
|
50
|
+
workspaceId?: string | undefined;
|
|
51
51
|
};
|
|
52
52
|
/** @internal */
|
|
53
53
|
export type DeleteModerationPolicyRequest$Outbound = {
|
|
@@ -55,7 +55,7 @@ export type DeleteModerationPolicyRequest$Outbound = {
|
|
|
55
55
|
appTitle?: string | undefined;
|
|
56
56
|
appCategories?: string | undefined;
|
|
57
57
|
id: string;
|
|
58
|
-
workspace_id
|
|
58
|
+
workspace_id?: string | undefined;
|
|
59
59
|
};
|
|
60
60
|
/** @internal */
|
|
61
61
|
export declare const DeleteModerationPolicyRequest$outboundSchema: z.ZodType<DeleteModerationPolicyRequest$Outbound, DeleteModerationPolicyRequest>;
|
|
@@ -10,7 +10,7 @@ export const DeleteModerationPolicyRequest$outboundSchema = z.object({
|
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
12
12
|
id: z.string(),
|
|
13
|
-
workspaceId: z.string(),
|
|
13
|
+
workspaceId: z.string().optional(),
|
|
14
14
|
}).transform((v) => {
|
|
15
15
|
return remap$(v, {
|
|
16
16
|
httpReferer: "HTTP-Referer",
|
|
@@ -59,9 +59,9 @@ export type GetApiKeyPolicyAssignmentRequest = {
|
|
|
59
59
|
*/
|
|
60
60
|
hash: string;
|
|
61
61
|
/**
|
|
62
|
-
* Workspace the policy belongs to
|
|
62
|
+
* Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.
|
|
63
63
|
*/
|
|
64
|
-
workspaceId
|
|
64
|
+
workspaceId?: string | undefined;
|
|
65
65
|
/**
|
|
66
66
|
* Policy type the assignment is read or changed for
|
|
67
67
|
*/
|
|
@@ -75,7 +75,7 @@ export type GetApiKeyPolicyAssignmentRequest$Outbound = {
|
|
|
75
75
|
appTitle?: string | undefined;
|
|
76
76
|
appCategories?: string | undefined;
|
|
77
77
|
hash: string;
|
|
78
|
-
workspace_id
|
|
78
|
+
workspace_id?: string | undefined;
|
|
79
79
|
policy_type: string;
|
|
80
80
|
};
|
|
81
81
|
/** @internal */
|
|
@@ -22,7 +22,7 @@ export const GetApiKeyPolicyAssignmentRequest$outboundSchema = z.object({
|
|
|
22
22
|
appTitle: z.string().optional(),
|
|
23
23
|
appCategories: z.string().optional(),
|
|
24
24
|
hash: z.string(),
|
|
25
|
-
workspaceId: z.string(),
|
|
25
|
+
workspaceId: z.string().optional(),
|
|
26
26
|
policyType: GetApiKeyPolicyAssignmentPolicyType$outboundSchema,
|
|
27
27
|
}).transform((v) => {
|
|
28
28
|
return remap$(v, {
|