Skip to main content

Variable: GatewayApiKeyCreateRequestSchema

const GatewayApiKeyCreateRequestSchema: ZodUnion<[ZodObject<{
name: ZodString;
description: ZodOptional<ZodString>;
scopes: ZodArray<ZodType<GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">, ZodTypeDef, GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">>, "many">;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<{
type: ZodType<GatewayOpenValue<...>, ZodTypeDef, GatewayOpenValue<...>>;
unit: ZodType<GatewayOpenValue<...>, ZodTypeDef, GatewayOpenValue<...>>;
value: ZodNumber;
}, "strict", ZodTypeAny, {
type: GatewayOpenValue<... | ...>;
unit: GatewayOpenValue<... | ... | ... | ... | ...>;
value: number;
}, {
type: GatewayOpenValue<... | ...>;
unit: GatewayOpenValue<... | ... | ... | ... | ...>;
value: number;
}>, "many">>>;
usage_limits: ZodOptional<ZodNullable<ZodEffects<ZodEffects<ZodObject<{
credit_limit: ZodOptional<...>;
type: ZodOptional<...>;
alert_threshold: ZodOptional<...>;
periodic_reset: ZodOptional<...>;
periodic_reset_days: ZodOptional<...>;
next_usage_reset_at: ZodOptional<...>;
}, "strict", ZodTypeAny, {
credit_limit?: ... | ...;
type?: ... | ... | ...;
alert_threshold?: ... | ...;
periodic_reset?: ... | ... | ... | ...;
periodic_reset_days?: ... | ... | ...;
next_usage_reset_at?: ... | ... | ...;
}, {
credit_limit?: ... | ...;
type?: ... | ... | ...;
alert_threshold?: ... | ...;
periodic_reset?: ... | ... | ... | ...;
periodic_reset_days?: ... | ... | ...;
next_usage_reset_at?: ... | ... | ...;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>>>;
defaults: ZodOptional<ZodNullable<ZodObject<{
metadata: ZodOptional<ZodRecord<ZodString, ZodType<..., ..., ...>>>;
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;
}>>>;
alert_emails: ZodOptional<ZodArray<ZodString, "many">>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
rotation_policy: ZodOptional<ZodNullable<ZodEffects<ZodEffects<ZodObject<{
rotation_period: ZodOptional<...>;
next_rotation_at: ZodOptional<...>;
key_transition_period_ms: ZodOptional<...>;
}, "strict", ZodTypeAny, {
rotation_period?: ... | ... | ... | ...;
next_rotation_at?: ... | ... | ...;
key_transition_period_ms?: ... | ...;
}, {
rotation_period?: ... | ... | ... | ...;
next_rotation_at?: ... | ... | ...;
key_transition_period_ms?: ... | ...;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>>>;
organisation_id: ZodString;
workspace_id: ZodString;
type: ZodString;
user_id: ZodString;
}, "strict", ZodTypeAny, {
name: string;
description?: string;
scopes: GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">[];
rate_limits?: | {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}[]
| null;
usage_limits?: | {
[key: string]: any;
}
| null;
defaults?: | {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
}
| null;
alert_emails?: string[];
expires_at?: string | null;
rotation_policy?: | {
[key: string]: any;
}
| null;
organisation_id: string;
workspace_id: string;
type: string;
user_id: string;
}, {
name: string;
description?: string;
scopes: GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">[];
rate_limits?: | {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}[]
| null;
usage_limits?: | {
[key: string]: any;
}
| null;
defaults?: | {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
}
| null;
alert_emails?: string[];
expires_at?: string | null;
rotation_policy?: | {
[key: string]: any;
}
| null;
organisation_id: string;
workspace_id: string;
type: string;
user_id: string;
}>, ZodObject<{
name: ZodString;
description: ZodOptional<ZodString>;
scopes: ZodArray<ZodType<GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">, ZodTypeDef, GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">>, "many">;
rate_limits: ZodOptional<ZodNullable<ZodArray<ZodObject<{
type: ZodType<GatewayOpenValue<...>, ZodTypeDef, GatewayOpenValue<...>>;
unit: ZodType<GatewayOpenValue<...>, ZodTypeDef, GatewayOpenValue<...>>;
value: ZodNumber;
}, "strict", ZodTypeAny, {
type: GatewayOpenValue<... | ...>;
unit: GatewayOpenValue<... | ... | ... | ... | ...>;
value: number;
}, {
type: GatewayOpenValue<... | ...>;
unit: GatewayOpenValue<... | ... | ... | ... | ...>;
value: number;
}>, "many">>>;
usage_limits: ZodOptional<ZodNullable<ZodEffects<ZodEffects<ZodObject<{
credit_limit: ZodOptional<...>;
type: ZodOptional<...>;
alert_threshold: ZodOptional<...>;
periodic_reset: ZodOptional<...>;
periodic_reset_days: ZodOptional<...>;
next_usage_reset_at: ZodOptional<...>;
}, "strict", ZodTypeAny, {
credit_limit?: ... | ...;
type?: ... | ... | ...;
alert_threshold?: ... | ...;
periodic_reset?: ... | ... | ... | ...;
periodic_reset_days?: ... | ... | ...;
next_usage_reset_at?: ... | ... | ...;
}, {
credit_limit?: ... | ...;
type?: ... | ... | ...;
alert_threshold?: ... | ...;
periodic_reset?: ... | ... | ... | ...;
periodic_reset_days?: ... | ... | ...;
next_usage_reset_at?: ... | ... | ...;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>>>;
defaults: ZodOptional<ZodNullable<ZodObject<{
metadata: ZodOptional<ZodRecord<ZodString, ZodType<..., ..., ...>>>;
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;
}>>>;
alert_emails: ZodOptional<ZodArray<ZodString, "many">>;
expires_at: ZodOptional<ZodNullable<ZodString>>;
rotation_policy: ZodOptional<ZodNullable<ZodEffects<ZodEffects<ZodObject<{
rotation_period: ZodOptional<...>;
next_rotation_at: ZodOptional<...>;
key_transition_period_ms: ZodOptional<...>;
}, "strict", ZodTypeAny, {
rotation_period?: ... | ... | ... | ...;
next_rotation_at?: ... | ... | ...;
key_transition_period_ms?: ... | ...;
}, {
rotation_period?: ... | ... | ... | ...;
next_rotation_at?: ... | ... | ...;
key_transition_period_ms?: ... | ...;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>, {
[key: string]: any;
}, {
[key: string]: any;
}>>>;
organisation_id: ZodString;
workspace_id: ZodString;
type: ZodString;
}, "strict", ZodTypeAny, {
name: string;
description?: string;
scopes: GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">[];
rate_limits?: | {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}[]
| null;
usage_limits?: | {
[key: string]: any;
}
| null;
defaults?: | {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
}
| null;
alert_emails?: string[];
expires_at?: string | null;
rotation_policy?: | {
[key: string]: any;
}
| null;
organisation_id: string;
workspace_id: string;
type: string;
}, {
name: string;
description?: string;
scopes: GatewayOpenValue<
| "agents.invoke"
| "completions.write"
| "logs.write"
| "mcp.invoke"
| "prompts.render">[];
rate_limits?: | {
type: GatewayOpenValue<"requests" | "tokens">;
unit: GatewayOpenValue<"rpd" | "rph" | "rpm" | "rps" | "rpw">;
value: number;
}[]
| null;
usage_limits?: | {
[key: string]: any;
}
| null;
defaults?: | {
metadata?: Record<string, GatewayJsonValue>;
config_id?: string;
allow_config_override?: boolean;
}
| null;
alert_emails?: string[];
expires_at?: string | null;
rotation_policy?: | {
[key: string]: any;
}
| null;
organisation_id: string;
workspace_id: string;
type: string;
}>]>;

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

Compatibility union for callers that construct create bodies outside a specific method.