/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; export type OverrideEntitlementRequest = { /** * ConfigValue is the config value for config features */ configValue?: { [k: string]: any } | undefined; /** * EntitlementID references the plan/addon entitlement to override */ entitlementId: string; /** * IsEnabled determines if the entitlement is enabled or disabled */ isEnabled?: boolean | undefined; /** * StaticValue is the static value for static features */ staticValue?: string | undefined; /** * UsageLimit is the new usage limit (only these 3 fields can be overridden) * * @remarks * For metered features, nil means unlimited usage */ usageLimit?: number | undefined; }; /** @internal */ export type OverrideEntitlementRequest$Outbound = { config_value?: { [k: string]: any } | undefined; entitlement_id: string; is_enabled?: boolean | undefined; static_value?: string | undefined; usage_limit?: number | undefined; }; /** @internal */ export const OverrideEntitlementRequest$outboundSchema: z.ZodMiniType< OverrideEntitlementRequest$Outbound, OverrideEntitlementRequest > = z.pipe( z.object({ configValue: z.optional(z.record(z.string(), z.any())), entitlementId: z.string(), isEnabled: z.optional(z.boolean()), staticValue: z.optional(z.string()), usageLimit: z.optional(z.int()), }), z.transform((v) => { return remap$(v, { configValue: "config_value", entitlementId: "entitlement_id", isEnabled: "is_enabled", staticValue: "static_value", usageLimit: "usage_limit", }); }), ); export function overrideEntitlementRequestToJSON( overrideEntitlementRequest: OverrideEntitlementRequest, ): string { return JSON.stringify( OverrideEntitlementRequest$outboundSchema.parse(overrideEntitlementRequest), ); }