"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DatasetSchema = exports.DatasetConfigSchema = exports.DatasetManagedConfigSchema = exports.DatasetSchemaTypeSchema = exports.DatasetNameSchema = void 0;
const zod_1 = require("zod");
// ============================================================================
// Dataset Types
// ============================================================================
/**
 * Dataset name validation.
 * Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,47}$
 */
exports.DatasetNameSchema = zod_1.z
    .string()
    .min(1, 'Dataset name is required')
    .max(48)
    .regex(/^[a-zA-Z][a-zA-Z0-9_]{0,47}$/, 'Must begin with a letter and contain only alphanumeric characters and underscores (max 48 chars)');
/**
 * Versioned schema type governing the structure of dataset examples.
 * Immutable after creation (createOnly CFN property).
 */
exports.DatasetSchemaTypeSchema = zod_1.z.enum([
    'AGENTCORE_EVALUATION_PREDEFINED_V1',
    'AGENTCORE_EVALUATION_SIMULATED_V1',
]);
/**
 * Managed dataset config — CLI manages the local file and syncs to service.
 */
exports.DatasetManagedConfigSchema = zod_1.z.object({
    location: zod_1.z.string().min(1),
});
/**
 * Dataset configuration.
 */
exports.DatasetConfigSchema = zod_1.z.object({
    managed: exports.DatasetManagedConfigSchema,
});
/**
 * Dataset specification in agentcore.json.
 */
exports.DatasetSchema = zod_1.z.object({
    /** Dataset name */
    name: exports.DatasetNameSchema,
    /**
     * Versioned schema type governing dataset structure.
     * Immutable after creation.
     */
    schemaType: exports.DatasetSchemaTypeSchema,
    /** Optional description (max 200 characters) */
    description: zod_1.z.string().max(200).optional(),
    /** Dataset content management config */
    config: exports.DatasetConfigSchema,
    /** Optional KMS key ARN for SSE-KMS encryption. Immutable after creation. */
    kmsKeyArn: zod_1.z
        .string()
        .regex(/^arn:aws(-[a-z]+)*:kms:[a-zA-Z0-9-]*:[0-9]{12}:key\/[a-zA-Z0-9-]{36}$/, 'Must be a valid KMS key ARN')
        .optional(),
});
//# sourceMappingURL=dataset.js.map