"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const shared_1 = require("../shared");
const properties_1 = require("../properties");
const action = {
    title: 'Add to Audience',
    description: 'Add a user to a Display & Video 360 audience.',
    defaultSubscription: 'event = "Audience Entered"',
    fields: {
        enable_batching: { ...properties_1.enable_batching },
        external_audience_id: { ...properties_1.external_audience_id },
        mobile_advertising_id: { ...properties_1.mobile_advertising_id },
        google_gid: { ...properties_1.google_gid },
        partner_provided_id: { ...properties_1.partner_provided_id }
    },
    perform: async (request, { payload, statsContext }) => {
        statsContext?.tags.push('slug:actions-display-video-360');
        statsContext?.statsClient?.incr('addToAudience', 1, statsContext?.tags);
        await (0, shared_1.handleUpdate)(request, [payload], 'add', statsContext);
        return { success: true };
    },
    performBatch: async (request, { payload, statsContext }) => {
        statsContext?.tags.push('slug:actions-display-video-360');
        statsContext?.statsClient?.incr('addToAudience.batch', 1, statsContext?.tags);
        await (0, shared_1.handleUpdate)(request, payload, 'add', statsContext);
        return { success: true };
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map