"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Actions = void 0;
class Actions {
    constructor(client) {
        this.client = client;
    }
    async getAction(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}`,
            method: 'GET',
            params: {
                display: parameters.display,
                entities: parameters.entities,
                fields: parameters.fields,
                member: parameters.member,
                member_fields: parameters.memberFields,
                memberCreator: parameters.memberCreator,
                memberCreator_fields: parameters.memberCreatorFields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async updateAction(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}`,
            method: 'PUT',
            params: {
                text: parameters.text,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async deleteAction(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionField(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/${parameters.field}`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionBoard(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/board`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionCard(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/card`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionList(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/list`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionMember(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/member`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionMemberCreator(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/memberCreator`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionOrganization(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/organization`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async updateActionText(parameters, callback) {
        const config = {
            url: `/actions/${parameters.id}/text`,
            method: 'PUT',
            params: {
                value: parameters.value,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionReactions(parameters, callback) {
        const config = {
            url: `/actions/${parameters.idAction}/reactions`,
            method: 'GET',
            params: {
                member: parameters.member,
                emoji: parameters.emoji,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async addActionReaction(parameters, callback) {
        const config = {
            url: `/actions/${parameters.idAction}/reactions`,
            method: 'POST',
            data: {
                shortName: parameters.shortName,
                skinVariation: parameters.skinVariation,
                native: parameters.native,
                unified: parameters.unified,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionReaction(parameters, callback) {
        const config = {
            url: `/actions/${parameters.idAction}/reactions/${parameters.id}`,
            method: 'GET',
            params: {
                member: parameters.member,
                emoji: parameters.emoji,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async deleteActionReaction(parameters, callback) {
        const config = {
            url: `/actions/${parameters.idAction}/reactions/${parameters.id}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async getActionReactionSummary(parameters, callback) {
        const config = {
            url: `/actions/${parameters.idAction}/reactionsSummary`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
}
exports.Actions = Actions;
