Variable: GatewayUsageLimitSchema
const GatewayUsageLimitSchema: ZodObject<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<ZodString>>;
periodic_reset_days: ZodOptional<ZodNullable<ZodNumber>>;
next_usage_reset_at: ZodOptional<ZodNullable<ZodString>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<ZodString>>;
periodic_reset_days: ZodOptional<ZodNullable<ZodNumber>>;
next_usage_reset_at: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodString>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<ZodString>>;
periodic_reset_days: ZodOptional<ZodNullable<ZodNumber>>;
next_usage_reset_at: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">>;
Defined in: src/models/ai-gateway.ts:47
One usage-limit policy. Attached to workspaces and to integration/workspace bindings.
Every field is optional: the upstream contract defines credit_limit, type,
alert_threshold, periodic_reset, periodic_reset_days and next_usage_reset_at, but a live
tenant also returns server-side bookkeeping the spec omits (id, status, current_usage,
is_exhausted_alerts_sent, is_threshold_alerts_sent). Passthrough keeps those rather than
stripping them, and optionality means a partial policy from either side still parses.