"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpGatewaySchema = exports.HttpGatewayTargetSchema = exports.HttpGatewayNameSchema = void 0;
const zod_1 = require("zod");
// ============================================================================
// HTTP Gateway Types
// ============================================================================
exports.HttpGatewayNameSchema = zod_1.z
    .string()
    .min(1, 'Name is required')
    .regex(/^[a-zA-Z][a-zA-Z0-9-]*$/, 'Gateway name must start with a letter and contain only alphanumeric characters or hyphens (combined with project name must fit 48-char AWS limit)');
exports.HttpGatewayTargetSchema = zod_1.z.object({
    /** Gateway target name (referenced by AB test variants) */
    name: zod_1.z.string().min(1).max(100),
    /** Reference to a runtime name from spec.runtimes */
    runtimeRef: zod_1.z.string().min(1),
    /** Endpoint qualifier on the runtime (e.g., 'prod', 'staging'). Defaults to 'DEFAULT'. */
    qualifier: zod_1.z.string().min(1).default('DEFAULT'),
});
exports.HttpGatewaySchema = zod_1.z
    .object({
    /** Unique name for the HTTP gateway */
    name: exports.HttpGatewayNameSchema,
    /** Optional description */
    description: zod_1.z.string().min(1).max(200).optional(),
    /** Reference to a runtime name from spec.runtimes. One target is created per gateway pointing to this runtime. */
    runtimeRef: zod_1.z.string().min(1),
    /** IAM role ARN for gateway execution. Auto-created if omitted. */
    roleArn: zod_1.z.string().min(1).optional(),
    /** Additional targets for the gateway (for target-based AB testing). */
    targets: zod_1.z.array(exports.HttpGatewayTargetSchema).optional(),
})
    .strict();
//# sourceMappingURL=http-gateway.js.map