"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.values = exports.data = exports.kind = exports.timestamp = exports.userAgent = exports.referrerUrl = exports.url = exports.email = exports.anonymousID = exports.userID = void 0;
exports.userID = {
    label: 'Segment User ID',
    description: 'Permanent identifier of a Segment user the event is attributed to.',
    type: 'string',
    dynamic: true,
    default: {
        '@path': '$.userId'
    }
};
exports.anonymousID = {
    label: 'Segment Anonymous User ID',
    description: 'A pseudo-unique substitute for a Segment user ID the event is attributed to.',
    type: 'string',
    default: {
        '@path': '$.anonymousId'
    }
};
exports.email = {
    label: 'Email',
    description: 'Identified email of the Segment User.',
    type: 'string',
    default: {
        '@if': {
            exists: { '@path': '$.traits.email' },
            then: { '@path': '$.traits.email' },
            else: { '@path': '$.properties.email' }
        }
    }
};
exports.url = {
    label: 'URL',
    description: 'URL associated with the event.',
    type: 'string',
    default: {
        '@if': {
            exists: { '@path': '$.properties.url' },
            then: { '@path': '$.properties.url' },
            else: { '@path': '$.context.page.url' }
        }
    }
};
exports.referrerUrl = {
    label: 'Referrer URL',
    description: 'Referrer URL associated with the event.',
    type: 'string',
    default: {
        '@if': {
            exists: { '@path': '$.properties.referrer' },
            then: { '@path': '$.properties.referrer' },
            else: { '@path': '$.context.page.referrer' }
        }
    }
};
exports.userAgent = {
    label: 'User Agent',
    description: 'User Agent associated with the event.',
    type: 'string',
    default: {
        '@path': '$.context.userAgent'
    }
};
exports.timestamp = {
    label: 'Event Timestamp',
    description: 'When the event was sent.',
    type: 'datetime',
    default: {
        '@path': '$.timestamp'
    }
};
const kind = (defaultValue) => {
    return {
        label: 'Custom Event Kind',
        description: 'Type of the SalesWings custom event (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").',
        type: 'string',
        default: defaultValue,
        required: true
    };
};
exports.kind = kind;
const data = (defaultValue) => {
    return {
        label: 'Custom Event Data',
        description: 'String description of the SalesWings custom event payload (a custom event is visualized in SalesWings cockpit and SalesForce Lead Intent View as "[[Kind]] Data").',
        type: 'string',
        default: defaultValue,
        required: true
    };
};
exports.data = data;
const values = (defaultValue) => {
    return {
        label: 'Custom Attribute Values',
        description: 'Custom attribute values associated with the SalesWings custom event.',
        type: 'object',
        default: defaultValue
    };
};
exports.values = values;
//# sourceMappingURL=fields.js.map