@openrouter/sdk 1.5.59 → 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/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/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/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/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/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 +8 -8
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { GuardrailBudgetPolicyConfig } from "./guardrailbudgetpolicyconfig.js";
|
|
6
|
+
export declare const BudgetGuardrailPolicyDetailPolicyType: {
|
|
7
|
+
readonly Budget: "budget";
|
|
8
|
+
};
|
|
9
|
+
export type BudgetGuardrailPolicyDetailPolicyType = ClosedEnum<typeof BudgetGuardrailPolicyDetailPolicyType>;
|
|
10
|
+
/**
|
|
11
|
+
* `legacy_mapping` when the policy is synced from a v1 guardrail, `account_default` when it is an account-wide default, otherwise `null`
|
|
12
|
+
*/
|
|
13
|
+
export declare const BudgetGuardrailPolicyDetailReference: {
|
|
14
|
+
readonly LegacyMapping: "legacy_mapping";
|
|
15
|
+
readonly AccountDefault: "account_default";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* `legacy_mapping` when the policy is synced from a v1 guardrail, `account_default` when it is an account-wide default, otherwise `null`
|
|
19
|
+
*/
|
|
20
|
+
export type BudgetGuardrailPolicyDetailReference = OpenEnum<typeof BudgetGuardrailPolicyDetailReference>;
|
|
21
|
+
export type BudgetGuardrailPolicyDetail = {
|
|
22
|
+
/**
|
|
23
|
+
* API key hashes
|
|
24
|
+
*/
|
|
25
|
+
apiKeyHashes: Array<string>;
|
|
26
|
+
config: GuardrailBudgetPolicyConfig;
|
|
27
|
+
/**
|
|
28
|
+
* Policy ID
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
isWorkspaceDefault?: boolean | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Organization member user IDs
|
|
34
|
+
*/
|
|
35
|
+
memberIds: Array<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Policy name
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* API key hashes
|
|
42
|
+
*/
|
|
43
|
+
optedOutApiKeyHashes: Array<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Organization member user IDs
|
|
46
|
+
*/
|
|
47
|
+
optedOutMemberIds?: Array<string> | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* API keys that have a different policy of this type assigned directly
|
|
50
|
+
*/
|
|
51
|
+
overriddenApiKeyHashes: Array<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Members that have a different policy of this type assigned directly
|
|
54
|
+
*/
|
|
55
|
+
overriddenMemberIds?: Array<string> | undefined;
|
|
56
|
+
policyType: BudgetGuardrailPolicyDetailPolicyType;
|
|
57
|
+
/**
|
|
58
|
+
* `legacy_mapping` when the policy is synced from a v1 guardrail, `account_default` when it is an account-wide default, otherwise `null`
|
|
59
|
+
*/
|
|
60
|
+
reference: BudgetGuardrailPolicyDetailReference | null;
|
|
61
|
+
/**
|
|
62
|
+
* Whether this workspace copy replaced a v1 workspace default guardrail that still exists; it cannot be deleted
|
|
63
|
+
*/
|
|
64
|
+
replacesLegacyDefault?: boolean | undefined;
|
|
65
|
+
updatedAt: string | null;
|
|
66
|
+
};
|
|
67
|
+
/** @internal */
|
|
68
|
+
export declare const BudgetGuardrailPolicyDetailPolicyType$inboundSchema: z.ZodEnum<typeof BudgetGuardrailPolicyDetailPolicyType>;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export declare const BudgetGuardrailPolicyDetailReference$inboundSchema: z.ZodType<BudgetGuardrailPolicyDetailReference, unknown>;
|
|
71
|
+
/** @internal */
|
|
72
|
+
export declare const BudgetGuardrailPolicyDetail$inboundSchema: z.ZodType<BudgetGuardrailPolicyDetail, unknown>;
|
|
73
|
+
export declare function budgetGuardrailPolicyDetailFromJSON(jsonString: string): SafeParseResult<BudgetGuardrailPolicyDetail, SDKValidationError>;
|
|
74
|
+
//# sourceMappingURL=budgetguardrailpolicydetail.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: c502cd7d4298
|
|
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 * as openEnums from "../types/enums.js";
|
|
9
|
+
import { GuardrailBudgetPolicyConfig$inboundSchema, } from "./guardrailbudgetpolicyconfig.js";
|
|
10
|
+
export const BudgetGuardrailPolicyDetailPolicyType = {
|
|
11
|
+
Budget: "budget",
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* `legacy_mapping` when the policy is synced from a v1 guardrail, `account_default` when it is an account-wide default, otherwise `null`
|
|
15
|
+
*/
|
|
16
|
+
export const BudgetGuardrailPolicyDetailReference = {
|
|
17
|
+
LegacyMapping: "legacy_mapping",
|
|
18
|
+
AccountDefault: "account_default",
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const BudgetGuardrailPolicyDetailPolicyType$inboundSchema = z.enum(BudgetGuardrailPolicyDetailPolicyType);
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const BudgetGuardrailPolicyDetailReference$inboundSchema = openEnums.inboundSchema(BudgetGuardrailPolicyDetailReference);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const BudgetGuardrailPolicyDetail$inboundSchema = z.object({
|
|
26
|
+
api_key_hashes: z.array(z.string()),
|
|
27
|
+
config: GuardrailBudgetPolicyConfig$inboundSchema,
|
|
28
|
+
id: z.string(),
|
|
29
|
+
is_workspace_default: z.boolean().optional(),
|
|
30
|
+
member_ids: z.array(z.string()),
|
|
31
|
+
name: z.string(),
|
|
32
|
+
opted_out_api_key_hashes: z.array(z.string()),
|
|
33
|
+
opted_out_member_ids: z.array(z.string()).optional(),
|
|
34
|
+
overridden_api_key_hashes: z.array(z.string()),
|
|
35
|
+
overridden_member_ids: z.array(z.string()).optional(),
|
|
36
|
+
policy_type: BudgetGuardrailPolicyDetailPolicyType$inboundSchema,
|
|
37
|
+
reference: z.nullable(BudgetGuardrailPolicyDetailReference$inboundSchema)
|
|
38
|
+
.default(null),
|
|
39
|
+
replaces_legacy_default: z.boolean().optional(),
|
|
40
|
+
updated_at: z.nullable(z.string()),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"api_key_hashes": "apiKeyHashes",
|
|
44
|
+
"is_workspace_default": "isWorkspaceDefault",
|
|
45
|
+
"member_ids": "memberIds",
|
|
46
|
+
"opted_out_api_key_hashes": "optedOutApiKeyHashes",
|
|
47
|
+
"opted_out_member_ids": "optedOutMemberIds",
|
|
48
|
+
"overridden_api_key_hashes": "overriddenApiKeyHashes",
|
|
49
|
+
"overridden_member_ids": "overriddenMemberIds",
|
|
50
|
+
"policy_type": "policyType",
|
|
51
|
+
"replaces_legacy_default": "replacesLegacyDefault",
|
|
52
|
+
"updated_at": "updatedAt",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
export function budgetGuardrailPolicyDetailFromJSON(jsonString) {
|
|
56
|
+
return safeParse(jsonString, (x) => BudgetGuardrailPolicyDetail$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BudgetGuardrailPolicyDetail' from JSON`);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=budgetguardrailpolicydetail.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { BudgetGuardrailPolicyDetail } from "./budgetguardrailpolicydetail.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type BudgetGuardrailPolicyDetailResponse = {
|
|
6
|
+
data: BudgetGuardrailPolicyDetail;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const BudgetGuardrailPolicyDetailResponse$inboundSchema: z.ZodType<BudgetGuardrailPolicyDetailResponse, unknown>;
|
|
10
|
+
export declare function budgetGuardrailPolicyDetailResponseFromJSON(jsonString: string): SafeParseResult<BudgetGuardrailPolicyDetailResponse, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=budgetguardrailpolicydetailresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d3656f3b8472
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { BudgetGuardrailPolicyDetail$inboundSchema, } from "./budgetguardrailpolicydetail.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const BudgetGuardrailPolicyDetailResponse$inboundSchema = z.object({
|
|
10
|
+
data: BudgetGuardrailPolicyDetail$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function budgetGuardrailPolicyDetailResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => BudgetGuardrailPolicyDetailResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BudgetGuardrailPolicyDetailResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=budgetguardrailpolicydetailresponse.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { BudgetGuardrailPolicy } from "./budgetguardrailpolicy.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type BudgetGuardrailPolicyResponse = {
|
|
6
|
+
data: BudgetGuardrailPolicy;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const BudgetGuardrailPolicyResponse$inboundSchema: z.ZodType<BudgetGuardrailPolicyResponse, unknown>;
|
|
10
|
+
export declare function budgetGuardrailPolicyResponseFromJSON(jsonString: string): SafeParseResult<BudgetGuardrailPolicyResponse, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=budgetguardrailpolicyresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 256c887dda72
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { BudgetGuardrailPolicy$inboundSchema, } from "./budgetguardrailpolicy.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const BudgetGuardrailPolicyResponse$inboundSchema = z.object({
|
|
10
|
+
data: BudgetGuardrailPolicy$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function budgetGuardrailPolicyResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => BudgetGuardrailPolicyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BudgetGuardrailPolicyResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=budgetguardrailpolicyresponse.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { GuardrailBudgetPolicyConfig } from "./guardrailbudgetpolicyconfig.js";
|
|
6
|
+
export declare const BudgetGuardrailPolicySummaryPolicyType: {
|
|
7
|
+
readonly Budget: "budget";
|
|
8
|
+
};
|
|
9
|
+
export type BudgetGuardrailPolicySummaryPolicyType = ClosedEnum<typeof BudgetGuardrailPolicySummaryPolicyType>;
|
|
10
|
+
export type BudgetGuardrailPolicySummary = {
|
|
11
|
+
apiKeyCount: number;
|
|
12
|
+
config: GuardrailBudgetPolicyConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Policy ID
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the policy is kept in sync with a v1 guardrail
|
|
19
|
+
*/
|
|
20
|
+
isLegacyMapped?: boolean | undefined;
|
|
21
|
+
isWorkspaceDefault?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* IDs of the v1 guardrails this policy was migrated from
|
|
24
|
+
*/
|
|
25
|
+
legacyGuardrailIds?: Array<string> | undefined;
|
|
26
|
+
memberCount: number;
|
|
27
|
+
/**
|
|
28
|
+
* Policy name
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
policyType: BudgetGuardrailPolicySummaryPolicyType;
|
|
32
|
+
/**
|
|
33
|
+
* IDs of the v1 guardrails this policy replaced
|
|
34
|
+
*/
|
|
35
|
+
replacedLegacyGuardrailIds?: Array<string> | undefined;
|
|
36
|
+
updatedAt: string | null;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const BudgetGuardrailPolicySummaryPolicyType$inboundSchema: z.ZodEnum<typeof BudgetGuardrailPolicySummaryPolicyType>;
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const BudgetGuardrailPolicySummary$inboundSchema: z.ZodType<BudgetGuardrailPolicySummary, unknown>;
|
|
42
|
+
export declare function budgetGuardrailPolicySummaryFromJSON(jsonString: string): SafeParseResult<BudgetGuardrailPolicySummary, SDKValidationError>;
|
|
43
|
+
//# sourceMappingURL=budgetguardrailpolicysummary.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 9e536f9d900b
|
|
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 { GuardrailBudgetPolicyConfig$inboundSchema, } from "./guardrailbudgetpolicyconfig.js";
|
|
9
|
+
export const BudgetGuardrailPolicySummaryPolicyType = {
|
|
10
|
+
Budget: "budget",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const BudgetGuardrailPolicySummaryPolicyType$inboundSchema = z.enum(BudgetGuardrailPolicySummaryPolicyType);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const BudgetGuardrailPolicySummary$inboundSchema = z.object({
|
|
16
|
+
api_key_count: z.int(),
|
|
17
|
+
config: GuardrailBudgetPolicyConfig$inboundSchema,
|
|
18
|
+
id: z.string(),
|
|
19
|
+
is_legacy_mapped: z.boolean().optional(),
|
|
20
|
+
is_workspace_default: z.boolean().optional(),
|
|
21
|
+
legacy_guardrail_ids: z.array(z.string()).optional(),
|
|
22
|
+
member_count: z.int(),
|
|
23
|
+
name: z.string(),
|
|
24
|
+
policy_type: BudgetGuardrailPolicySummaryPolicyType$inboundSchema,
|
|
25
|
+
replaced_legacy_guardrail_ids: z.array(z.string()).optional(),
|
|
26
|
+
updated_at: z.nullable(z.string()),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"api_key_count": "apiKeyCount",
|
|
30
|
+
"is_legacy_mapped": "isLegacyMapped",
|
|
31
|
+
"is_workspace_default": "isWorkspaceDefault",
|
|
32
|
+
"legacy_guardrail_ids": "legacyGuardrailIds",
|
|
33
|
+
"member_count": "memberCount",
|
|
34
|
+
"policy_type": "policyType",
|
|
35
|
+
"replaced_legacy_guardrail_ids": "replacedLegacyGuardrailIds",
|
|
36
|
+
"updated_at": "updatedAt",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
export function budgetGuardrailPolicySummaryFromJSON(jsonString) {
|
|
40
|
+
return safeParse(jsonString, (x) => BudgetGuardrailPolicySummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BudgetGuardrailPolicySummary' from JSON`);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=budgetguardrailpolicysummary.js.map
|
|
@@ -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
|
|
@@ -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
|