"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventPayloadSchema = void 0;
const zod_1 = __importDefault(require("zod"));
const EventType_1 = require("./EventType");
const emailValidation_1 = require("../../../src/utils/emailValidation");
const UserSchema = zod_1.default.object({
    id: zod_1.default.string(),
    email: emailValidation_1.optionalEmailSchema,
    firstName: zod_1.default.string(),
    lastName: zod_1.default.string(),
    customAttributes: zod_1.default.record(zod_1.default.string(), zod_1.default.any()),
});
exports.EventPayloadSchema = zod_1.default.object({
    eventType: zod_1.default.nativeEnum(EventType_1.EventType),
    id: zod_1.default.string().optional(), // Optional since it's content events only
    timestamp: zod_1.default.number().int().positive(),
    user: UserSchema,
});
//# sourceMappingURL=EventPayload.js.map