"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AwsDeploymentTargetsSchema = exports.AwsDeploymentTargetSchema = exports.AwsAccountIdSchema = exports.DeploymentTargetNameSchema = exports.AgentCoreRegionSchema = void 0;
const zod_util_1 = require("./zod-util");
const zod_1 = require("zod");
// ============================================================================
// AgentCore Regions
// Keep in sync with: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-regions.html
// ============================================================================
exports.AgentCoreRegionSchema = zod_1.z.enum([
    'ap-northeast-1',
    'ap-northeast-2',
    'ap-south-1',
    'ap-southeast-1',
    'ap-southeast-2',
    'ca-central-1',
    'eu-central-1',
    'eu-north-1',
    'eu-west-1',
    'eu-west-2',
    'eu-west-3',
    'sa-east-1',
    'us-east-1',
    'us-east-2',
    'us-west-2',
    'us-gov-west-1',
]);
// ============================================================================
// Deployment Target Name
// ============================================================================
exports.DeploymentTargetNameSchema = zod_1.z
    .string()
    .min(1)
    .max(64)
    .regex(/^[a-zA-Z][a-zA-Z0-9-]*$/, 'Name must start with a letter and contain only alphanumeric characters and hyphens')
    .describe('Unique identifier for the deployment target');
// ============================================================================
// AWS Account ID
// ============================================================================
exports.AwsAccountIdSchema = zod_1.z
    .string()
    .regex(/^[0-9]{12}$/, 'AWS account ID must be exactly 12 digits')
    .describe('AWS account ID');
// ============================================================================
// AWS Deployment Target
// ============================================================================
exports.AwsDeploymentTargetSchema = zod_1.z.object({
    name: exports.DeploymentTargetNameSchema,
    description: zod_1.z.string().max(256).optional(),
    account: exports.AwsAccountIdSchema,
    region: exports.AgentCoreRegionSchema,
});
// ============================================================================
// AWS Deployment Targets Array
// ============================================================================
exports.AwsDeploymentTargetsSchema = zod_1.z.array(exports.AwsDeploymentTargetSchema).superRefine((0, zod_util_1.uniqueBy)(target => target.name, name => `Duplicate deployment target name: ${name}`));
//# sourceMappingURL=aws-targets.js.map