"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const actions_core_1 = require("@segment/actions-core");
const updateSegment_1 = __importDefault(require("./updateSegment"));
const destination = {
    name: 'Delivr AI Audiences',
    slug: 'actions-delivrai-audiences',
    mode: 'cloud',
    description: 'Sync users to Delivr AI Audience Segmentation.',
    authentication: {
        scheme: 'custom',
        fields: {
            client_identifier_id: {
                label: 'Client Identifier',
                description: 'Client Identifier is the Hashed Key that provided by Delivr AI.',
                type: 'string',
                required: true
            }
        }
    },
    audienceFields: {
        placeholder: {
            type: 'boolean',
            label: 'Placeholder Setting',
            description: 'Placeholder field to allow the audience to be created. Do not change this.',
            default: true
        }
    },
    audienceConfig: {
        mode: {
            type: 'synced',
            full_audience_sync: false
        }
    },
    actions: {
        updateSegment: updateSegment_1.default
    },
    presets: [
        {
            name: 'Entities Audience Membership Changed',
            partnerAction: 'updateSegment',
            mapping: {
                ...(0, actions_core_1.defaultValues)(updateSegment_1.default.fields)
            },
            type: 'specificEvent',
            eventSlug: 'warehouse_audience_membership_changed_identify'
        },
        {
            name: 'Associated Entity Added',
            partnerAction: 'updateSegment',
            mapping: (0, actions_core_1.defaultValues)(updateSegment_1.default.fields),
            type: 'specificEvent',
            eventSlug: 'warehouse_entity_added_track'
        },
        {
            name: 'Associated Entity Removed',
            partnerAction: 'updateSegment',
            mapping: (0, actions_core_1.defaultValues)(updateSegment_1.default.fields),
            type: 'specificEvent',
            eventSlug: 'warehouse_entity_removed_track'
        },
        {
            name: 'Journeys Step Entered',
            partnerAction: 'updateSegment',
            mapping: {
                ...(0, actions_core_1.defaultValues)(updateSegment_1.default.fields)
            },
            type: 'specificEvent',
            eventSlug: 'journeys_step_entered_track'
        }
    ]
};
exports.default = destination;
//# sourceMappingURL=index.js.map