Skip to main content

Variable: GatewayWorkspaceCreateRequestSchema

const GatewayWorkspaceCreateRequestSchema: ZodObject<{
name: ZodString;
scope_name: ZodString;
description: ZodOptional<ZodString>;
icon: ZodOptional<ZodString>;
defaults: ZodOptional<ZodObject<{
metadata: ZodOptional<ZodRecord<ZodString, ZodType<GatewayJsonValue, ZodTypeDef, GatewayJsonValue>>>;
config_id: ZodOptional<ZodString>;
allow_config_override: ZodOptional<ZodBoolean>;
}, "strip", ZodType<GatewayJsonValue, ZodTypeDef, GatewayJsonValue>, {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
}, {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
}>>;
users: ZodOptional<ZodArray<ZodString, "many">>;
usage_limits: ZodOptional<ZodArray<ZodEffects<ZodEffects<ZodObject<{
credit_limit: ZodOptional<ZodNumber>;
type: ZodOptional<ZodEnum<[..., ...]>>;
alert_threshold: ZodOptional<ZodNumber>;
periodic_reset: ZodOptional<ZodNullable<ZodEnum<...>>>;
periodic_reset_days: ZodOptional<ZodNullable<ZodNumber>>;
next_usage_reset_at: ZodOptional<ZodNullable<ZodString>>;
}, "strict", ZodTypeAny, {
credit_limit?: number;
type?: "cost" | "tokens";
alert_threshold?: number;
periodic_reset?: "monthly" | "weekly" | null;
periodic_reset_days?: number | null;
next_usage_reset_at?: string | null;
}, {
credit_limit?: number;
type?: "cost" | "tokens";
alert_threshold?: number;
periodic_reset?: "monthly" | "weekly" | null;
periodic_reset_days?: number | null;
next_usage_reset_at?: string | null;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>, "many">>;
rate_limits: ZodOptional<ZodArray<ZodObject<{
type: ZodType<GatewayOpenValue<"requests" | "tokens">, ZodTypeDef, GatewayOpenValue<"requests" | "tokens">>;
unit: ZodType<GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">, ZodTypeDef, GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">>;
value: ZodNumber;
}, "strict", ZodTypeAny, {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}, {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}>, "many">>;
}, "strict", ZodTypeAny, {
name: string;
scope_name: string;
description?: string;
icon?: string;
defaults?: {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
};
users?: string[];
usage_limits?: {
[key: string]: any;
}[];
rate_limits?: {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}[];
}, {
name: string;
scope_name: string;
description?: string;
icon?: string;
defaults?: {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
};
users?: string[];
usage_limits?: {
[key: string]: any;
}[];
rate_limits?: {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}[];
}>;

Defined in: src/models/ai-gateway-requests.ts:104