"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.user_properties = exports.event_id = exports.metadata = exports.timezone = exports.timestamp = exports.event_name = exports.contact_id = void 0;
exports.contact_id = {
    label: 'Contact ID',
    description: 'Identifier for user. Use `userId` or `anonymousId` from the Segment event.',
    type: 'string',
    default: {
        '@if': {
            exists: { '@path': '$.userId' },
            then: { '@path': '$.userId' },
            else: { '@path': '$.anonymousId' }
        }
    },
    required: true
};
exports.event_name = {
    label: 'Event Name',
    description: 'Name of the event. Use `event` from the Segment event.',
    type: 'string',
    default: {
        '@if': {
            exists: { '@path': '$.event' },
            then: { '@path': '$.event' },
            else: { '@path': '$.type' }
        }
    },
    required: true
};
exports.timestamp = {
    label: 'Timestamp',
    description: 'Timestamp for when the event happened.',
    type: 'string',
    format: 'date-time',
    default: { '@path': '$.timestamp' },
    required: true
};
exports.timezone = {
    label: 'Timezone',
    description: 'User’s local timezone.',
    type: 'string',
    default: { '@path': '$.context.timezone' }
};
exports.metadata = {
    label: 'Metadata',
    description: 'Event properties.',
    type: 'object',
    defaultObjectUI: 'keyvalue',
    default: { '@path': '$.properties' }
};
exports.event_id = {
    label: 'Event ID',
    description: 'Unique identifier for the event.',
    type: 'string',
    default: { '@path': '$.messageId' }
};
exports.user_properties = {
    label: 'User Properties',
    description: 'User properties. Make sure to update the default mapping if you are sending user proferties via properties object in a track, page or screen event.',
    type: 'object',
    defaultObjectUI: 'keyvalue',
    default: {
        '@if': {
            exists: { '@path': '$.traits' },
            then: { '@path': '$.traits' },
            else: { '@path': '$.context.traits' }
        }
    },
    required: true
};
//# sourceMappingURL=fields.js.map