const action = {
    title: 'Identify',
    description: 'Identify user in Ripe',
    defaultSubscription: 'type = "identify"',
    platform: 'web',
    fields: {
        anonymousId: {
            type: 'string',
            required: true,
            description: 'The anonymous id',
            label: 'Anonymous ID',
            default: { '@path': '$.anonymousId' }
        },
        userId: {
            type: 'string',
            required: false,
            allowNull: true,
            description: 'The ID associated with the user',
            label: 'User ID',
            default: { '@path': '$.userId' }
        },
        groupId: {
            type: 'string',
            required: false,
            allowNull: true,
            description: 'The ID associated groupId',
            label: 'Group ID',
            default: { '@path': '$.context.groupId' }
        },
        traits: {
            type: 'object',
            label: 'Traits',
            description: 'Traits to associate with the user',
            required: false,
            default: { '@path': '$.traits' }
        },
        messageId: {
            type: 'string',
            required: false,
            description: 'The Segment messageId',
            label: 'MessageId',
            default: { '@path': '$.messageId' }
        }
    },
    perform: async (ripe, { payload }) => {
        return ripe.identify({
            messageId: payload.messageId,
            anonymousId: payload.anonymousId,
            userId: payload.userId,
            groupId: payload.groupId,
            traits: payload.traits
        });
    }
};
export default action;
//# sourceMappingURL=index.js.map