@openrouter/sdk 1.5.58 → 1.5.60
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/README.md +13 -11
- package/esm/funcs/apiKeysList.d.ts +4 -1
- package/esm/funcs/apiKeysList.js +32 -6
- package/esm/funcs/guardrailPoliciesChangeApiKeyPolicyAssignment.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesChangeApiKeyPolicyAssignment.js +104 -0
- package/esm/funcs/guardrailPoliciesChangeMemberPolicyAssignment.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesChangeMemberPolicyAssignment.js +104 -0
- package/esm/funcs/guardrailPoliciesCreateAccountPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesCreateAccountPolicy.js +100 -0
- package/esm/funcs/guardrailPoliciesCreateBudgetPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesCreateBudgetPolicy.js +100 -0
- package/esm/funcs/guardrailPoliciesCreateModelAvailabilityPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesCreateModelAvailabilityPolicy.js +98 -0
- package/esm/funcs/guardrailPoliciesCreateModerationPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesCreateModerationPolicy.js +98 -0
- package/esm/funcs/guardrailPoliciesDeleteAccountPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesDeleteAccountPolicy.js +103 -0
- package/esm/funcs/guardrailPoliciesDeleteBudgetPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesDeleteBudgetPolicy.js +107 -0
- package/esm/funcs/guardrailPoliciesDeleteModelAvailabilityPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesDeleteModelAvailabilityPolicy.js +107 -0
- package/esm/funcs/guardrailPoliciesDeleteModerationPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesDeleteModerationPolicy.js +107 -0
- package/esm/funcs/guardrailPoliciesGetApiKeyPolicyAssignment.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesGetApiKeyPolicyAssignment.js +108 -0
- package/esm/funcs/guardrailPoliciesGetBudgetPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesGetBudgetPolicy.js +107 -0
- package/esm/funcs/guardrailPoliciesGetMemberPolicyAssignment.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesGetMemberPolicyAssignment.js +108 -0
- package/esm/funcs/guardrailPoliciesGetModelAvailabilityPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesGetModelAvailabilityPolicy.js +107 -0
- package/esm/funcs/guardrailPoliciesGetModerationPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesGetModerationPolicy.js +107 -0
- package/esm/funcs/guardrailPoliciesListAccountPolicies.d.ts +21 -0
- package/esm/funcs/guardrailPoliciesListAccountPolicies.js +133 -0
- package/esm/funcs/guardrailPoliciesListBudgetPolicies.d.ts +21 -0
- package/esm/funcs/guardrailPoliciesListBudgetPolicies.js +134 -0
- package/esm/funcs/guardrailPoliciesListModelAvailabilityPolicies.d.ts +21 -0
- package/esm/funcs/guardrailPoliciesListModelAvailabilityPolicies.js +132 -0
- package/esm/funcs/guardrailPoliciesListModerationPolicies.d.ts +21 -0
- package/esm/funcs/guardrailPoliciesListModerationPolicies.js +134 -0
- package/esm/funcs/guardrailPoliciesUpdateAccountPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesUpdateAccountPolicy.js +106 -0
- package/esm/funcs/guardrailPoliciesUpdateBudgetPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesUpdateBudgetPolicy.js +106 -0
- package/esm/funcs/guardrailPoliciesUpdateModelAvailabilityPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesUpdateModelAvailabilityPolicy.js +104 -0
- package/esm/funcs/guardrailPoliciesUpdateModerationPolicy.d.ts +19 -0
- package/esm/funcs/guardrailPoliciesUpdateModerationPolicy.js +104 -0
- package/esm/hooks/registration.d.ts +1 -1
- package/esm/hooks/registration.js +8 -1
- package/esm/hooks/signal-hooks.d.ts +42 -0
- package/esm/hooks/signal-hooks.js +236 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/accountguardrailpolicy.d.ts +12 -0
- package/esm/models/accountguardrailpolicy.js +19 -0
- package/esm/models/accountguardrailpolicyrequest.d.ts +11 -0
- package/esm/models/accountguardrailpolicyrequest.js +18 -0
- package/esm/models/accountguardrailpolicyresponse.d.ts +11 -0
- package/esm/models/accountguardrailpolicyresponse.js +15 -0
- package/esm/models/armorautomode.d.ts +17 -0
- package/esm/models/armorautomode.js +51 -2
- package/esm/models/armorcontext.d.ts +5 -0
- package/esm/models/armorcontext.js +14 -1
- package/esm/models/armorenvironmententry.d.ts +5 -0
- package/esm/models/armorenvironmententry.js +9 -0
- package/esm/models/armorplugin.d.ts +4 -4
- package/esm/models/armorplugin.js +3 -4
- package/esm/models/armorrule.d.ts +5 -0
- package/esm/models/armorrule.js +11 -0
- package/esm/models/budgetaccountguardrailpolicy.d.ts +34 -0
- package/esm/models/budgetaccountguardrailpolicy.js +39 -0
- package/esm/models/budgetaccountguardrailpolicyrequest.d.ts +68 -0
- package/esm/models/budgetaccountguardrailpolicyrequest.js +46 -0
- package/esm/models/budgetguardrailpolicy.d.ts +27 -0
- package/esm/models/budgetguardrailpolicy.js +28 -0
- package/esm/models/budgetguardrailpolicydetail.d.ts +74 -0
- package/esm/models/budgetguardrailpolicydetail.js +58 -0
- package/esm/models/budgetguardrailpolicydetailresponse.d.ts +11 -0
- package/esm/models/budgetguardrailpolicydetailresponse.js +15 -0
- package/esm/models/budgetguardrailpolicyresponse.d.ts +11 -0
- package/esm/models/budgetguardrailpolicyresponse.js +15 -0
- package/esm/models/budgetguardrailpolicysummary.d.ts +43 -0
- package/esm/models/budgetguardrailpolicysummary.js +42 -0
- package/esm/models/changeguardrailpolicyassignmentrequest.d.ts +49 -0
- package/esm/models/changeguardrailpolicyassignmentrequest.js +38 -0
- package/esm/models/changeguardrailpolicyassignmentresponse.d.ts +13 -0
- package/esm/models/changeguardrailpolicyassignmentresponse.js +14 -0
- package/esm/models/chatrequest.d.ts +5 -0
- package/esm/models/chatrequest.js +5 -0
- package/esm/models/createbudgetguardrailpolicyrequest.d.ts +57 -0
- package/esm/models/createbudgetguardrailpolicyrequest.js +38 -0
- package/esm/models/createmodelavailabilityguardrailpolicyrequest.d.ts +57 -0
- package/esm/models/createmodelavailabilityguardrailpolicyrequest.js +39 -0
- package/esm/models/createmoderationguardrailpolicyrequest.d.ts +57 -0
- package/esm/models/createmoderationguardrailpolicyrequest.js +38 -0
- package/esm/models/deleteguardrailpolicyresponse.d.ts +13 -0
- package/esm/models/deleteguardrailpolicyresponse.js +14 -0
- package/esm/models/guardrailbudgetpolicyauthoringconfig.d.ts +25 -0
- package/esm/models/guardrailbudgetpolicyauthoringconfig.js +30 -0
- package/esm/models/guardrailbudgetpolicyconfig.d.ts +22 -0
- package/esm/models/guardrailbudgetpolicyconfig.js +24 -0
- package/esm/models/guardrailmodelavailabilitypolicyauthoringconfig.d.ts +52 -0
- package/esm/models/guardrailmodelavailabilitypolicyauthoringconfig.js +58 -0
- package/esm/models/guardrailmodelavailabilitypolicyconfig.d.ts +30 -0
- package/esm/models/guardrailmodelavailabilitypolicyconfig.js +59 -0
- package/esm/models/guardrailmoderationpolicyconfig.d.ts +240 -0
- package/esm/models/guardrailmoderationpolicyconfig.js +289 -0
- package/esm/models/guardrailpolicyassignmentresponse.d.ts +11 -0
- package/esm/models/guardrailpolicyassignmentresponse.js +15 -0
- package/esm/models/guardrailpolicyassignmentstate.d.ts +30 -0
- package/esm/models/guardrailpolicyassignmentstate.js +38 -0
- package/esm/models/index.d.ts +44 -0
- package/esm/models/index.js +44 -0
- package/esm/models/listaccountguardrailpoliciesresponse.d.ts +15 -0
- package/esm/models/listaccountguardrailpoliciesresponse.js +21 -0
- package/esm/models/listbudgetguardrailpoliciesresponse.d.ts +15 -0
- package/esm/models/listbudgetguardrailpoliciesresponse.js +21 -0
- package/esm/models/listmodelavailabilityguardrailpoliciesresponse.d.ts +15 -0
- package/esm/models/listmodelavailabilityguardrailpoliciesresponse.js +21 -0
- package/esm/models/listmoderationguardrailpoliciesresponse.d.ts +15 -0
- package/esm/models/listmoderationguardrailpoliciesresponse.js +21 -0
- package/esm/models/modelavailabilityaccountguardrailpolicy.d.ts +34 -0
- package/esm/models/modelavailabilityaccountguardrailpolicy.js +39 -0
- package/esm/models/modelavailabilityaccountguardrailpolicyrequest.d.ts +68 -0
- package/esm/models/modelavailabilityaccountguardrailpolicyrequest.js +47 -0
- package/esm/models/modelavailabilityguardrailpolicy.d.ts +27 -0
- package/esm/models/modelavailabilityguardrailpolicy.js +28 -0
- package/esm/models/modelavailabilityguardrailpolicydetail.d.ts +74 -0
- package/esm/models/modelavailabilityguardrailpolicydetail.js +57 -0
- package/esm/models/modelavailabilityguardrailpolicydetailresponse.d.ts +11 -0
- package/esm/models/modelavailabilityguardrailpolicydetailresponse.js +15 -0
- package/esm/models/modelavailabilityguardrailpolicyresponse.d.ts +11 -0
- package/esm/models/modelavailabilityguardrailpolicyresponse.js +15 -0
- package/esm/models/modelavailabilityguardrailpolicysummary.d.ts +43 -0
- package/esm/models/modelavailabilityguardrailpolicysummary.js +42 -0
- package/esm/models/moderationaccountguardrailpolicy.d.ts +34 -0
- package/esm/models/moderationaccountguardrailpolicy.js +39 -0
- package/esm/models/moderationaccountguardrailpolicyrequest.d.ts +68 -0
- package/esm/models/moderationaccountguardrailpolicyrequest.js +47 -0
- package/esm/models/moderationguardrailpolicy.d.ts +27 -0
- package/esm/models/moderationguardrailpolicy.js +28 -0
- package/esm/models/moderationguardrailpolicydetail.d.ts +78 -0
- package/esm/models/moderationguardrailpolicydetail.js +60 -0
- package/esm/models/moderationguardrailpolicydetailresponse.d.ts +11 -0
- package/esm/models/moderationguardrailpolicydetailresponse.js +15 -0
- package/esm/models/moderationguardrailpolicyresponse.d.ts +11 -0
- package/esm/models/moderationguardrailpolicyresponse.js +15 -0
- package/esm/models/moderationguardrailpolicysummary.d.ts +43 -0
- package/esm/models/moderationguardrailpolicysummary.js +42 -0
- package/esm/models/operations/changeapikeypolicyassignment.d.ts +61 -0
- package/esm/models/operations/changeapikeypolicyassignment.js +24 -0
- package/esm/models/operations/changememberpolicyassignment.d.ts +61 -0
- package/esm/models/operations/changememberpolicyassignment.js +25 -0
- package/esm/models/operations/createaccountpolicy.d.ts +56 -0
- package/esm/models/operations/createaccountpolicy.js +23 -0
- package/esm/models/operations/createbudgetpolicy.d.ts +56 -0
- package/esm/models/operations/createbudgetpolicy.js +23 -0
- package/esm/models/operations/createmodelavailabilitypolicy.d.ts +56 -0
- package/esm/models/operations/createmodelavailabilitypolicy.js +23 -0
- package/esm/models/operations/createmoderationpolicy.d.ts +56 -0
- package/esm/models/operations/createmoderationpolicy.js +23 -0
- package/esm/models/operations/deleteaccountpolicy.d.ts +58 -0
- package/esm/models/operations/deleteaccountpolicy.js +21 -0
- package/esm/models/operations/deletebudgetpolicy.d.ts +63 -0
- package/esm/models/operations/deletebudgetpolicy.js +23 -0
- package/esm/models/operations/deletemodelavailabilitypolicy.d.ts +63 -0
- package/esm/models/operations/deletemodelavailabilitypolicy.js +23 -0
- package/esm/models/operations/deletemoderationpolicy.d.ts +63 -0
- package/esm/models/operations/deletemoderationpolicy.js +23 -0
- package/esm/models/operations/getapikeypolicyassignment.d.ts +84 -0
- package/esm/models/operations/getapikeypolicyassignment.js +37 -0
- package/esm/models/operations/getbudgetpolicy.d.ts +63 -0
- package/esm/models/operations/getbudgetpolicy.js +23 -0
- package/esm/models/operations/getmemberpolicyassignment.d.ts +84 -0
- package/esm/models/operations/getmemberpolicyassignment.js +38 -0
- package/esm/models/operations/getmodelavailabilitypolicy.d.ts +63 -0
- package/esm/models/operations/getmodelavailabilitypolicy.js +23 -0
- package/esm/models/operations/getmoderationpolicy.d.ts +63 -0
- package/esm/models/operations/getmoderationpolicy.js +23 -0
- package/esm/models/operations/index.d.ts +23 -0
- package/esm/models/operations/index.js +23 -0
- package/esm/models/operations/list.d.ts +7 -1
- package/esm/models/operations/list.js +12 -1
- package/esm/models/operations/listaccountpolicies.d.ts +72 -0
- package/esm/models/operations/listaccountpolicies.js +35 -0
- package/esm/models/operations/listbudgetpolicies.d.ts +77 -0
- package/esm/models/operations/listbudgetpolicies.js +37 -0
- package/esm/models/operations/listmodelavailabilitypolicies.d.ts +77 -0
- package/esm/models/operations/listmodelavailabilitypolicies.js +37 -0
- package/esm/models/operations/listmoderationpolicies.d.ts +77 -0
- package/esm/models/operations/listmoderationpolicies.js +37 -0
- package/esm/models/operations/updateaccountpolicy.d.ts +61 -0
- package/esm/models/operations/updateaccountpolicy.js +24 -0
- package/esm/models/operations/updatebudgetpolicy.d.ts +61 -0
- package/esm/models/operations/updatebudgetpolicy.js +24 -0
- package/esm/models/operations/updatemodelavailabilitypolicy.d.ts +61 -0
- package/esm/models/operations/updatemodelavailabilitypolicy.js +24 -0
- package/esm/models/operations/updatemoderationpolicy.d.ts +61 -0
- package/esm/models/operations/updatemoderationpolicy.js +24 -0
- package/esm/models/outputmemoryservertoolitem.d.ts +5 -5
- package/esm/models/outputmemoryservertoolitem.js +5 -5
- package/esm/models/updatebudgetguardrailpolicyrequest.d.ts +48 -0
- package/esm/models/updatebudgetguardrailpolicyrequest.js +31 -0
- package/esm/models/updatemodelavailabilityguardrailpolicyrequest.d.ts +48 -0
- package/esm/models/updatemodelavailabilityguardrailpolicyrequest.js +31 -0
- package/esm/models/updatemoderationguardrailpolicyrequest.d.ts +48 -0
- package/esm/models/updatemoderationguardrailpolicyrequest.js +31 -0
- package/esm/sdk/apikeys.d.ts +4 -1
- package/esm/sdk/apikeys.js +2 -1
- package/esm/sdk/guardrailpolicies.d.ts +176 -0
- package/esm/sdk/guardrailpolicies.js +240 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +9 -9
- package/scripts/check-types.js +113 -40
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { GuardrailPolicyAssignmentState, GuardrailPolicyAssignmentState$Outbound } from "./guardrailpolicyassignmentstate.js";
|
|
4
|
+
/**
|
|
5
|
+
* Policy type the assignment is read or changed for
|
|
6
|
+
*/
|
|
7
|
+
export declare const ChangeGuardrailPolicyAssignmentRequestPolicyType: {
|
|
8
|
+
readonly Budget: "budget";
|
|
9
|
+
readonly ModelAvailability: "model_availability";
|
|
10
|
+
readonly Moderation: "moderation";
|
|
11
|
+
readonly RateLimit: "rate_limit";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Policy type the assignment is read or changed for
|
|
15
|
+
*/
|
|
16
|
+
export type ChangeGuardrailPolicyAssignmentRequestPolicyType = OpenEnum<typeof ChangeGuardrailPolicyAssignmentRequestPolicyType>;
|
|
17
|
+
export type ChangeGuardrailPolicyAssignmentRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* `true` assigns the policy to the subject, `false` removes it
|
|
20
|
+
*/
|
|
21
|
+
assigned: boolean;
|
|
22
|
+
expectedAssignment: GuardrailPolicyAssignmentState;
|
|
23
|
+
/**
|
|
24
|
+
* Policy ID
|
|
25
|
+
*/
|
|
26
|
+
policyId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Policy type the assignment is read or changed for
|
|
29
|
+
*/
|
|
30
|
+
policyType: ChangeGuardrailPolicyAssignmentRequestPolicyType;
|
|
31
|
+
/**
|
|
32
|
+
* Workspace the policy belongs to
|
|
33
|
+
*/
|
|
34
|
+
workspaceId: string;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const ChangeGuardrailPolicyAssignmentRequestPolicyType$outboundSchema: z.ZodType<string, ChangeGuardrailPolicyAssignmentRequestPolicyType>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ChangeGuardrailPolicyAssignmentRequest$Outbound = {
|
|
40
|
+
assigned: boolean;
|
|
41
|
+
expected_assignment: GuardrailPolicyAssignmentState$Outbound;
|
|
42
|
+
policy_id: string;
|
|
43
|
+
policy_type: string;
|
|
44
|
+
workspace_id: string;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const ChangeGuardrailPolicyAssignmentRequest$outboundSchema: z.ZodType<ChangeGuardrailPolicyAssignmentRequest$Outbound, ChangeGuardrailPolicyAssignmentRequest>;
|
|
48
|
+
export declare function changeGuardrailPolicyAssignmentRequestToJSON(changeGuardrailPolicyAssignmentRequest: ChangeGuardrailPolicyAssignmentRequest): string;
|
|
49
|
+
//# sourceMappingURL=changeguardrailpolicyassignmentrequest.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4b85db36d2ce
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { GuardrailPolicyAssignmentState$outboundSchema, } from "./guardrailpolicyassignmentstate.js";
|
|
9
|
+
/**
|
|
10
|
+
* Policy type the assignment is read or changed for
|
|
11
|
+
*/
|
|
12
|
+
export const ChangeGuardrailPolicyAssignmentRequestPolicyType = {
|
|
13
|
+
Budget: "budget",
|
|
14
|
+
ModelAvailability: "model_availability",
|
|
15
|
+
Moderation: "moderation",
|
|
16
|
+
RateLimit: "rate_limit",
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ChangeGuardrailPolicyAssignmentRequestPolicyType$outboundSchema = openEnums.outboundSchema(ChangeGuardrailPolicyAssignmentRequestPolicyType);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ChangeGuardrailPolicyAssignmentRequest$outboundSchema = z.object({
|
|
22
|
+
assigned: z.boolean(),
|
|
23
|
+
expectedAssignment: GuardrailPolicyAssignmentState$outboundSchema,
|
|
24
|
+
policyId: z.string(),
|
|
25
|
+
policyType: ChangeGuardrailPolicyAssignmentRequestPolicyType$outboundSchema,
|
|
26
|
+
workspaceId: z.string(),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
expectedAssignment: "expected_assignment",
|
|
30
|
+
policyId: "policy_id",
|
|
31
|
+
policyType: "policy_type",
|
|
32
|
+
workspaceId: "workspace_id",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
export function changeGuardrailPolicyAssignmentRequestToJSON(changeGuardrailPolicyAssignmentRequest) {
|
|
36
|
+
return JSON.stringify(ChangeGuardrailPolicyAssignmentRequest$outboundSchema.parse(changeGuardrailPolicyAssignmentRequest));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=changeguardrailpolicyassignmentrequest.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type ChangeGuardrailPolicyAssignmentResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the assignment changed
|
|
7
|
+
*/
|
|
8
|
+
data: boolean;
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const ChangeGuardrailPolicyAssignmentResponse$inboundSchema: z.ZodType<ChangeGuardrailPolicyAssignmentResponse, unknown>;
|
|
12
|
+
export declare function changeGuardrailPolicyAssignmentResponseFromJSON(jsonString: string): SafeParseResult<ChangeGuardrailPolicyAssignmentResponse, SDKValidationError>;
|
|
13
|
+
//# sourceMappingURL=changeguardrailpolicyassignmentresponse.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a5309ae0c3c4
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ChangeGuardrailPolicyAssignmentResponse$inboundSchema = z.object({
|
|
9
|
+
data: z.boolean(),
|
|
10
|
+
});
|
|
11
|
+
export function changeGuardrailPolicyAssignmentResponseFromJSON(jsonString) {
|
|
12
|
+
return safeParse(jsonString, (x) => ChangeGuardrailPolicyAssignmentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChangeGuardrailPolicyAssignmentResponse' from JSON`);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=changeguardrailpolicyassignmentresponse.js.map
|
|
@@ -64,6 +64,10 @@ export type ChatRequestReasoning = {
|
|
|
64
64
|
* Constrains effort on reasoning for reasoning models
|
|
65
65
|
*/
|
|
66
66
|
effort?: ChatRequestEffort | null | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* 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
|
+
*/
|
|
70
|
+
maxTokens?: number | null | undefined;
|
|
67
71
|
summary?: ChatReasoningSummaryVerbosityEnum | null | undefined;
|
|
68
72
|
};
|
|
69
73
|
/**
|
|
@@ -294,6 +298,7 @@ export declare const ChatRequestEffort$outboundSchema: z.ZodType<string, ChatReq
|
|
|
294
298
|
/** @internal */
|
|
295
299
|
export type ChatRequestReasoning$Outbound = {
|
|
296
300
|
effort?: string | null | undefined;
|
|
301
|
+
max_tokens?: number | null | undefined;
|
|
297
302
|
summary?: string | null | undefined;
|
|
298
303
|
};
|
|
299
304
|
/** @internal */
|
|
@@ -107,8 +107,13 @@ export const ChatRequestEffort$outboundSchema = openEnums.outboundSchema(ChatReq
|
|
|
107
107
|
/** @internal */
|
|
108
108
|
export const ChatRequestReasoning$outboundSchema = z.object({
|
|
109
109
|
effort: z.nullable(ChatRequestEffort$outboundSchema).optional(),
|
|
110
|
+
maxTokens: z.nullable(z.int()).optional(),
|
|
110
111
|
summary: z.nullable(ChatReasoningSummaryVerbosityEnum$outboundSchema)
|
|
111
112
|
.optional(),
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return remap$(v, {
|
|
115
|
+
maxTokens: "max_tokens",
|
|
116
|
+
});
|
|
112
117
|
});
|
|
113
118
|
export function chatRequestReasoningToJSON(chatRequestReasoning) {
|
|
114
119
|
return JSON.stringify(ChatRequestReasoning$outboundSchema.parse(chatRequestReasoning));
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { GuardrailBudgetPolicyAuthoringConfig, GuardrailBudgetPolicyAuthoringConfig$Outbound } from "./guardrailbudgetpolicyauthoringconfig.js";
|
|
4
|
+
export declare const CreateBudgetGuardrailPolicyRequestPolicyType: {
|
|
5
|
+
readonly Budget: "budget";
|
|
6
|
+
};
|
|
7
|
+
export type CreateBudgetGuardrailPolicyRequestPolicyType = ClosedEnum<typeof CreateBudgetGuardrailPolicyRequestPolicyType>;
|
|
8
|
+
export type CreateBudgetGuardrailPolicyRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* API key hashes
|
|
11
|
+
*/
|
|
12
|
+
apiKeyHashes?: Array<string> | undefined;
|
|
13
|
+
config: GuardrailBudgetPolicyAuthoringConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Make this the workspace default for its policy type. Defaults to `false`.
|
|
16
|
+
*/
|
|
17
|
+
isWorkspaceDefault?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Organization member user IDs
|
|
20
|
+
*/
|
|
21
|
+
memberIds?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Policy name
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* API keys that should not inherit the policy when it is the workspace default
|
|
28
|
+
*/
|
|
29
|
+
optedOutApiKeyHashes?: Array<string> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Members that should not inherit the policy when it is the workspace default
|
|
32
|
+
*/
|
|
33
|
+
optedOutMemberIds?: Array<string> | undefined;
|
|
34
|
+
policyType: CreateBudgetGuardrailPolicyRequestPolicyType;
|
|
35
|
+
/**
|
|
36
|
+
* Workspace the policy belongs to
|
|
37
|
+
*/
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const CreateBudgetGuardrailPolicyRequestPolicyType$outboundSchema: z.ZodEnum<typeof CreateBudgetGuardrailPolicyRequestPolicyType>;
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type CreateBudgetGuardrailPolicyRequest$Outbound = {
|
|
44
|
+
api_key_hashes?: Array<string> | undefined;
|
|
45
|
+
config: GuardrailBudgetPolicyAuthoringConfig$Outbound;
|
|
46
|
+
is_workspace_default?: boolean | undefined;
|
|
47
|
+
member_ids?: Array<string> | undefined;
|
|
48
|
+
name: string;
|
|
49
|
+
opted_out_api_key_hashes?: Array<string> | undefined;
|
|
50
|
+
opted_out_member_ids?: Array<string> | undefined;
|
|
51
|
+
policy_type: string;
|
|
52
|
+
workspace_id: string;
|
|
53
|
+
};
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const CreateBudgetGuardrailPolicyRequest$outboundSchema: z.ZodType<CreateBudgetGuardrailPolicyRequest$Outbound, CreateBudgetGuardrailPolicyRequest>;
|
|
56
|
+
export declare function createBudgetGuardrailPolicyRequestToJSON(createBudgetGuardrailPolicyRequest: CreateBudgetGuardrailPolicyRequest): string;
|
|
57
|
+
//# sourceMappingURL=createbudgetguardrailpolicyrequest.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7d0dde3c5959
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { GuardrailBudgetPolicyAuthoringConfig$outboundSchema, } from "./guardrailbudgetpolicyauthoringconfig.js";
|
|
8
|
+
export const CreateBudgetGuardrailPolicyRequestPolicyType = {
|
|
9
|
+
Budget: "budget",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const CreateBudgetGuardrailPolicyRequestPolicyType$outboundSchema = z.enum(CreateBudgetGuardrailPolicyRequestPolicyType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const CreateBudgetGuardrailPolicyRequest$outboundSchema = z.object({
|
|
15
|
+
apiKeyHashes: z.array(z.string()).optional(),
|
|
16
|
+
config: GuardrailBudgetPolicyAuthoringConfig$outboundSchema,
|
|
17
|
+
isWorkspaceDefault: z.boolean().optional(),
|
|
18
|
+
memberIds: z.array(z.string()).optional(),
|
|
19
|
+
name: z.string(),
|
|
20
|
+
optedOutApiKeyHashes: z.array(z.string()).optional(),
|
|
21
|
+
optedOutMemberIds: z.array(z.string()).optional(),
|
|
22
|
+
policyType: CreateBudgetGuardrailPolicyRequestPolicyType$outboundSchema,
|
|
23
|
+
workspaceId: z.string(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
apiKeyHashes: "api_key_hashes",
|
|
27
|
+
isWorkspaceDefault: "is_workspace_default",
|
|
28
|
+
memberIds: "member_ids",
|
|
29
|
+
optedOutApiKeyHashes: "opted_out_api_key_hashes",
|
|
30
|
+
optedOutMemberIds: "opted_out_member_ids",
|
|
31
|
+
policyType: "policy_type",
|
|
32
|
+
workspaceId: "workspace_id",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
export function createBudgetGuardrailPolicyRequestToJSON(createBudgetGuardrailPolicyRequest) {
|
|
36
|
+
return JSON.stringify(CreateBudgetGuardrailPolicyRequest$outboundSchema.parse(createBudgetGuardrailPolicyRequest));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=createbudgetguardrailpolicyrequest.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { GuardrailModelAvailabilityPolicyAuthoringConfig, GuardrailModelAvailabilityPolicyAuthoringConfig$Outbound } from "./guardrailmodelavailabilitypolicyauthoringconfig.js";
|
|
4
|
+
export declare const CreateModelAvailabilityGuardrailPolicyRequestPolicyType: {
|
|
5
|
+
readonly ModelAvailability: "model_availability";
|
|
6
|
+
};
|
|
7
|
+
export type CreateModelAvailabilityGuardrailPolicyRequestPolicyType = ClosedEnum<typeof CreateModelAvailabilityGuardrailPolicyRequestPolicyType>;
|
|
8
|
+
export type CreateModelAvailabilityGuardrailPolicyRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* API key hashes
|
|
11
|
+
*/
|
|
12
|
+
apiKeyHashes?: Array<string> | undefined;
|
|
13
|
+
config: GuardrailModelAvailabilityPolicyAuthoringConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Make this the workspace default for its policy type. Defaults to `false`.
|
|
16
|
+
*/
|
|
17
|
+
isWorkspaceDefault?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Organization member user IDs
|
|
20
|
+
*/
|
|
21
|
+
memberIds?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Policy name
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* API keys that should not inherit the policy when it is the workspace default
|
|
28
|
+
*/
|
|
29
|
+
optedOutApiKeyHashes?: Array<string> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Members that should not inherit the policy when it is the workspace default
|
|
32
|
+
*/
|
|
33
|
+
optedOutMemberIds?: Array<string> | undefined;
|
|
34
|
+
policyType: CreateModelAvailabilityGuardrailPolicyRequestPolicyType;
|
|
35
|
+
/**
|
|
36
|
+
* Workspace the policy belongs to
|
|
37
|
+
*/
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const CreateModelAvailabilityGuardrailPolicyRequestPolicyType$outboundSchema: z.ZodEnum<typeof CreateModelAvailabilityGuardrailPolicyRequestPolicyType>;
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type CreateModelAvailabilityGuardrailPolicyRequest$Outbound = {
|
|
44
|
+
api_key_hashes?: Array<string> | undefined;
|
|
45
|
+
config: GuardrailModelAvailabilityPolicyAuthoringConfig$Outbound;
|
|
46
|
+
is_workspace_default?: boolean | undefined;
|
|
47
|
+
member_ids?: Array<string> | undefined;
|
|
48
|
+
name: string;
|
|
49
|
+
opted_out_api_key_hashes?: Array<string> | undefined;
|
|
50
|
+
opted_out_member_ids?: Array<string> | undefined;
|
|
51
|
+
policy_type: string;
|
|
52
|
+
workspace_id: string;
|
|
53
|
+
};
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const CreateModelAvailabilityGuardrailPolicyRequest$outboundSchema: z.ZodType<CreateModelAvailabilityGuardrailPolicyRequest$Outbound, CreateModelAvailabilityGuardrailPolicyRequest>;
|
|
56
|
+
export declare function createModelAvailabilityGuardrailPolicyRequestToJSON(createModelAvailabilityGuardrailPolicyRequest: CreateModelAvailabilityGuardrailPolicyRequest): string;
|
|
57
|
+
//# sourceMappingURL=createmodelavailabilityguardrailpolicyrequest.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 6d5052f6a640
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { GuardrailModelAvailabilityPolicyAuthoringConfig$outboundSchema, } from "./guardrailmodelavailabilitypolicyauthoringconfig.js";
|
|
8
|
+
export const CreateModelAvailabilityGuardrailPolicyRequestPolicyType = {
|
|
9
|
+
ModelAvailability: "model_availability",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const CreateModelAvailabilityGuardrailPolicyRequestPolicyType$outboundSchema = z
|
|
13
|
+
.enum(CreateModelAvailabilityGuardrailPolicyRequestPolicyType);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const CreateModelAvailabilityGuardrailPolicyRequest$outboundSchema = z.object({
|
|
16
|
+
apiKeyHashes: z.array(z.string()).optional(),
|
|
17
|
+
config: GuardrailModelAvailabilityPolicyAuthoringConfig$outboundSchema,
|
|
18
|
+
isWorkspaceDefault: z.boolean().optional(),
|
|
19
|
+
memberIds: z.array(z.string()).optional(),
|
|
20
|
+
name: z.string(),
|
|
21
|
+
optedOutApiKeyHashes: z.array(z.string()).optional(),
|
|
22
|
+
optedOutMemberIds: z.array(z.string()).optional(),
|
|
23
|
+
policyType: CreateModelAvailabilityGuardrailPolicyRequestPolicyType$outboundSchema,
|
|
24
|
+
workspaceId: z.string(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
apiKeyHashes: "api_key_hashes",
|
|
28
|
+
isWorkspaceDefault: "is_workspace_default",
|
|
29
|
+
memberIds: "member_ids",
|
|
30
|
+
optedOutApiKeyHashes: "opted_out_api_key_hashes",
|
|
31
|
+
optedOutMemberIds: "opted_out_member_ids",
|
|
32
|
+
policyType: "policy_type",
|
|
33
|
+
workspaceId: "workspace_id",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
export function createModelAvailabilityGuardrailPolicyRequestToJSON(createModelAvailabilityGuardrailPolicyRequest) {
|
|
37
|
+
return JSON.stringify(CreateModelAvailabilityGuardrailPolicyRequest$outboundSchema.parse(createModelAvailabilityGuardrailPolicyRequest));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=createmodelavailabilityguardrailpolicyrequest.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { GuardrailModerationPolicyConfig, GuardrailModerationPolicyConfig$Outbound } from "./guardrailmoderationpolicyconfig.js";
|
|
4
|
+
export declare const CreateModerationGuardrailPolicyRequestPolicyType: {
|
|
5
|
+
readonly Moderation: "moderation";
|
|
6
|
+
};
|
|
7
|
+
export type CreateModerationGuardrailPolicyRequestPolicyType = ClosedEnum<typeof CreateModerationGuardrailPolicyRequestPolicyType>;
|
|
8
|
+
export type CreateModerationGuardrailPolicyRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* API key hashes
|
|
11
|
+
*/
|
|
12
|
+
apiKeyHashes?: Array<string> | undefined;
|
|
13
|
+
config: GuardrailModerationPolicyConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Make this the workspace default for its policy type. Defaults to `false`.
|
|
16
|
+
*/
|
|
17
|
+
isWorkspaceDefault?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Organization member user IDs
|
|
20
|
+
*/
|
|
21
|
+
memberIds?: Array<string> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Policy name
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* API keys that should not inherit the policy when it is the workspace default
|
|
28
|
+
*/
|
|
29
|
+
optedOutApiKeyHashes?: Array<string> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Members that should not inherit the policy when it is the workspace default
|
|
32
|
+
*/
|
|
33
|
+
optedOutMemberIds?: Array<string> | undefined;
|
|
34
|
+
policyType: CreateModerationGuardrailPolicyRequestPolicyType;
|
|
35
|
+
/**
|
|
36
|
+
* Workspace the policy belongs to
|
|
37
|
+
*/
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const CreateModerationGuardrailPolicyRequestPolicyType$outboundSchema: z.ZodEnum<typeof CreateModerationGuardrailPolicyRequestPolicyType>;
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type CreateModerationGuardrailPolicyRequest$Outbound = {
|
|
44
|
+
api_key_hashes?: Array<string> | undefined;
|
|
45
|
+
config: GuardrailModerationPolicyConfig$Outbound;
|
|
46
|
+
is_workspace_default?: boolean | undefined;
|
|
47
|
+
member_ids?: Array<string> | undefined;
|
|
48
|
+
name: string;
|
|
49
|
+
opted_out_api_key_hashes?: Array<string> | undefined;
|
|
50
|
+
opted_out_member_ids?: Array<string> | undefined;
|
|
51
|
+
policy_type: string;
|
|
52
|
+
workspace_id: string;
|
|
53
|
+
};
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const CreateModerationGuardrailPolicyRequest$outboundSchema: z.ZodType<CreateModerationGuardrailPolicyRequest$Outbound, CreateModerationGuardrailPolicyRequest>;
|
|
56
|
+
export declare function createModerationGuardrailPolicyRequestToJSON(createModerationGuardrailPolicyRequest: CreateModerationGuardrailPolicyRequest): string;
|
|
57
|
+
//# sourceMappingURL=createmoderationguardrailpolicyrequest.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4ae95f449b3d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { GuardrailModerationPolicyConfig$outboundSchema, } from "./guardrailmoderationpolicyconfig.js";
|
|
8
|
+
export const CreateModerationGuardrailPolicyRequestPolicyType = {
|
|
9
|
+
Moderation: "moderation",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const CreateModerationGuardrailPolicyRequestPolicyType$outboundSchema = z.enum(CreateModerationGuardrailPolicyRequestPolicyType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const CreateModerationGuardrailPolicyRequest$outboundSchema = z.object({
|
|
15
|
+
apiKeyHashes: z.array(z.string()).optional(),
|
|
16
|
+
config: GuardrailModerationPolicyConfig$outboundSchema,
|
|
17
|
+
isWorkspaceDefault: z.boolean().optional(),
|
|
18
|
+
memberIds: z.array(z.string()).optional(),
|
|
19
|
+
name: z.string(),
|
|
20
|
+
optedOutApiKeyHashes: z.array(z.string()).optional(),
|
|
21
|
+
optedOutMemberIds: z.array(z.string()).optional(),
|
|
22
|
+
policyType: CreateModerationGuardrailPolicyRequestPolicyType$outboundSchema,
|
|
23
|
+
workspaceId: z.string(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
apiKeyHashes: "api_key_hashes",
|
|
27
|
+
isWorkspaceDefault: "is_workspace_default",
|
|
28
|
+
memberIds: "member_ids",
|
|
29
|
+
optedOutApiKeyHashes: "opted_out_api_key_hashes",
|
|
30
|
+
optedOutMemberIds: "opted_out_member_ids",
|
|
31
|
+
policyType: "policy_type",
|
|
32
|
+
workspaceId: "workspace_id",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
export function createModerationGuardrailPolicyRequestToJSON(createModerationGuardrailPolicyRequest) {
|
|
36
|
+
return JSON.stringify(CreateModerationGuardrailPolicyRequest$outboundSchema.parse(createModerationGuardrailPolicyRequest));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=createmoderationguardrailpolicyrequest.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type DeleteGuardrailPolicyResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the policy was deleted
|
|
7
|
+
*/
|
|
8
|
+
data: boolean;
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const DeleteGuardrailPolicyResponse$inboundSchema: z.ZodType<DeleteGuardrailPolicyResponse, unknown>;
|
|
12
|
+
export declare function deleteGuardrailPolicyResponseFromJSON(jsonString: string): SafeParseResult<DeleteGuardrailPolicyResponse, SDKValidationError>;
|
|
13
|
+
//# sourceMappingURL=deleteguardrailpolicyresponse.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7b1496ec091c
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const DeleteGuardrailPolicyResponse$inboundSchema = z.object({
|
|
9
|
+
data: z.boolean(),
|
|
10
|
+
});
|
|
11
|
+
export function deleteGuardrailPolicyResponseFromJSON(jsonString) {
|
|
12
|
+
return safeParse(jsonString, (x) => DeleteGuardrailPolicyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteGuardrailPolicyResponse' from JSON`);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=deleteguardrailpolicyresponse.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const GuardrailBudgetPolicyAuthoringConfigResetInterval: {
|
|
4
|
+
readonly Daily: "daily";
|
|
5
|
+
readonly Weekly: "weekly";
|
|
6
|
+
readonly Monthly: "monthly";
|
|
7
|
+
};
|
|
8
|
+
export type GuardrailBudgetPolicyAuthoringConfigResetInterval = OpenEnum<typeof GuardrailBudgetPolicyAuthoringConfigResetInterval>;
|
|
9
|
+
export type GuardrailBudgetPolicyAuthoringConfig = {
|
|
10
|
+
includeByokInBudgets: boolean;
|
|
11
|
+
limitUsd: number | null;
|
|
12
|
+
resetInterval: GuardrailBudgetPolicyAuthoringConfigResetInterval | null;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const GuardrailBudgetPolicyAuthoringConfigResetInterval$outboundSchema: z.ZodType<string, GuardrailBudgetPolicyAuthoringConfigResetInterval>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type GuardrailBudgetPolicyAuthoringConfig$Outbound = {
|
|
18
|
+
include_byok_in_budgets: boolean;
|
|
19
|
+
limit_usd: number | null;
|
|
20
|
+
reset_interval: string | null;
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
export declare const GuardrailBudgetPolicyAuthoringConfig$outboundSchema: z.ZodType<GuardrailBudgetPolicyAuthoringConfig$Outbound, GuardrailBudgetPolicyAuthoringConfig>;
|
|
24
|
+
export declare function guardrailBudgetPolicyAuthoringConfigToJSON(guardrailBudgetPolicyAuthoringConfig: GuardrailBudgetPolicyAuthoringConfig): string;
|
|
25
|
+
//# sourceMappingURL=guardrailbudgetpolicyauthoringconfig.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0ca705390b15
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
export const GuardrailBudgetPolicyAuthoringConfigResetInterval = {
|
|
9
|
+
Daily: "daily",
|
|
10
|
+
Weekly: "weekly",
|
|
11
|
+
Monthly: "monthly",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const GuardrailBudgetPolicyAuthoringConfigResetInterval$outboundSchema = openEnums.outboundSchema(GuardrailBudgetPolicyAuthoringConfigResetInterval);
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GuardrailBudgetPolicyAuthoringConfig$outboundSchema = z.object({
|
|
17
|
+
includeByokInBudgets: z.boolean(),
|
|
18
|
+
limitUsd: z.nullable(z.number()),
|
|
19
|
+
resetInterval: z.nullable(GuardrailBudgetPolicyAuthoringConfigResetInterval$outboundSchema),
|
|
20
|
+
}).transform((v) => {
|
|
21
|
+
return remap$(v, {
|
|
22
|
+
includeByokInBudgets: "include_byok_in_budgets",
|
|
23
|
+
limitUsd: "limit_usd",
|
|
24
|
+
resetInterval: "reset_interval",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
export function guardrailBudgetPolicyAuthoringConfigToJSON(guardrailBudgetPolicyAuthoringConfig) {
|
|
28
|
+
return JSON.stringify(GuardrailBudgetPolicyAuthoringConfig$outboundSchema.parse(guardrailBudgetPolicyAuthoringConfig));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=guardrailbudgetpolicyauthoringconfig.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { GuardrailInterval } from "./guardrailinterval.js";
|
|
5
|
+
export type GuardrailBudgetPolicyConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* Whether BYOK (bring-your-own-key) inference spend counts toward this guardrail's limit_usd, in addition to OpenRouter credit spend. Defaults to false.
|
|
8
|
+
*/
|
|
9
|
+
includeByokInBudgets?: boolean | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Spending limit in USD. Must be provided together with `reset_interval`: a request that sets only one of the two is rejected with a 400.
|
|
12
|
+
*/
|
|
13
|
+
limitUsd?: number | null | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Interval at which the limit resets (daily, weekly, monthly)
|
|
16
|
+
*/
|
|
17
|
+
resetInterval?: GuardrailInterval | null | undefined;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const GuardrailBudgetPolicyConfig$inboundSchema: z.ZodType<GuardrailBudgetPolicyConfig, unknown>;
|
|
21
|
+
export declare function guardrailBudgetPolicyConfigFromJSON(jsonString: string): SafeParseResult<GuardrailBudgetPolicyConfig, SDKValidationError>;
|
|
22
|
+
//# sourceMappingURL=guardrailbudgetpolicyconfig.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a7c9ca00225f
|
|
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 { GuardrailInterval$inboundSchema, } from "./guardrailinterval.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const GuardrailBudgetPolicyConfig$inboundSchema = z.object({
|
|
11
|
+
include_byok_in_budgets: z.boolean().optional(),
|
|
12
|
+
limit_usd: z.nullable(z.number()).optional(),
|
|
13
|
+
reset_interval: z.nullable(GuardrailInterval$inboundSchema).optional(),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"include_byok_in_budgets": "includeByokInBudgets",
|
|
17
|
+
"limit_usd": "limitUsd",
|
|
18
|
+
"reset_interval": "resetInterval",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function guardrailBudgetPolicyConfigFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => GuardrailBudgetPolicyConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GuardrailBudgetPolicyConfig' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=guardrailbudgetpolicyconfig.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type GuardrailModelAvailabilityPolicyAuthoringConfig = {
|
|
3
|
+
allowSafetyRetentionGoogle?: boolean | null | undefined;
|
|
4
|
+
allowSafetyRetentionOther?: boolean | null | undefined;
|
|
5
|
+
allowedDataRegions?: Array<string> | null | undefined;
|
|
6
|
+
allowedModels?: Array<string> | null | undefined;
|
|
7
|
+
allowedProviders?: Array<string> | null | undefined;
|
|
8
|
+
enableFreeModelPublication?: boolean | null | undefined;
|
|
9
|
+
enableFreeModelTraining?: boolean | null | undefined;
|
|
10
|
+
enablePaidModelTraining?: boolean | null | undefined;
|
|
11
|
+
enforceFirstPartyHarnessModels?: boolean | null | undefined;
|
|
12
|
+
enforceZdr?: boolean | null | undefined;
|
|
13
|
+
enforceZdrAnthropic?: boolean | null | undefined;
|
|
14
|
+
enforceZdrGoogle?: boolean | null | undefined;
|
|
15
|
+
enforceZdrOpenai?: boolean | null | undefined;
|
|
16
|
+
enforceZdrOther?: boolean | null | undefined;
|
|
17
|
+
enforceZdrXai?: boolean | null | undefined;
|
|
18
|
+
ignoredModels?: Array<string> | null | undefined;
|
|
19
|
+
ignoredProviders?: Array<string> | null | undefined;
|
|
20
|
+
platformBannedAuthors?: Array<string> | null | undefined;
|
|
21
|
+
platformBannedModels?: Array<string> | null | undefined;
|
|
22
|
+
platformBannedProviders?: Array<string> | null | undefined;
|
|
23
|
+
requireEuDataRegion?: boolean | null | undefined;
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type GuardrailModelAvailabilityPolicyAuthoringConfig$Outbound = {
|
|
27
|
+
allow_safety_retention_google?: boolean | null | undefined;
|
|
28
|
+
allow_safety_retention_other?: boolean | null | undefined;
|
|
29
|
+
allowed_data_regions?: Array<string> | null | undefined;
|
|
30
|
+
allowed_models?: Array<string> | null | undefined;
|
|
31
|
+
allowed_providers?: Array<string> | null | undefined;
|
|
32
|
+
enable_free_model_publication?: boolean | null | undefined;
|
|
33
|
+
enable_free_model_training?: boolean | null | undefined;
|
|
34
|
+
enable_paid_model_training?: boolean | null | undefined;
|
|
35
|
+
enforce_first_party_harness_models?: boolean | null | undefined;
|
|
36
|
+
enforce_zdr?: boolean | null | undefined;
|
|
37
|
+
enforce_zdr_anthropic?: boolean | null | undefined;
|
|
38
|
+
enforce_zdr_google?: boolean | null | undefined;
|
|
39
|
+
enforce_zdr_openai?: boolean | null | undefined;
|
|
40
|
+
enforce_zdr_other?: boolean | null | undefined;
|
|
41
|
+
enforce_zdr_xai?: boolean | null | undefined;
|
|
42
|
+
ignored_models?: Array<string> | null | undefined;
|
|
43
|
+
ignored_providers?: Array<string> | null | undefined;
|
|
44
|
+
platform_banned_authors?: Array<string> | null | undefined;
|
|
45
|
+
platform_banned_models?: Array<string> | null | undefined;
|
|
46
|
+
platform_banned_providers?: Array<string> | null | undefined;
|
|
47
|
+
require_eu_data_region?: boolean | null | undefined;
|
|
48
|
+
};
|
|
49
|
+
/** @internal */
|
|
50
|
+
export declare const GuardrailModelAvailabilityPolicyAuthoringConfig$outboundSchema: z.ZodType<GuardrailModelAvailabilityPolicyAuthoringConfig$Outbound, GuardrailModelAvailabilityPolicyAuthoringConfig>;
|
|
51
|
+
export declare function guardrailModelAvailabilityPolicyAuthoringConfigToJSON(guardrailModelAvailabilityPolicyAuthoringConfig: GuardrailModelAvailabilityPolicyAuthoringConfig): string;
|
|
52
|
+
//# sourceMappingURL=guardrailmodelavailabilitypolicyauthoringconfig.d.ts.map
|