"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Lists = void 0;
class Lists {
    constructor(client) {
        this.client = client;
    }
    async getList(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async updateList(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}`,
            method: 'PUT',
            params: {
                name: parameters.name,
                closed: parameters.closed,
                idBoard: parameters.idBoard,
                pos: parameters.pos,
                subscribed: parameters.subscribed,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async createList(parameters, callback) {
        const config = {
            url: '/lists',
            method: 'POST',
            params: {
                name: parameters.name,
                idBoard: parameters.idBoard,
                idListSource: parameters.idListSource,
                pos: parameters.pos,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async archiveAllCardsInList(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/archiveAllCards`,
            method: 'POST',
        };
        return this.client.sendRequest(config, callback);
    }
    async moveAllCardsInList(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/moveAllCards`,
            method: 'POST',
            params: {
                idBoard: parameters.idBoard,
                idList: parameters.idList,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async setListCloseState(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/closed`,
            method: 'PUT',
            params: {
                value: parameters.value,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async moveListToDifferentBoard(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/idBoard`,
            method: 'PUT',
            params: {
                value: parameters.value,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async renameList(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/${parameters.field}`,
            method: 'PUT',
            params: {
                value: parameters.value,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getListActions(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/actions`,
            method: 'GET',
            params: {
                filter: parameters.filter,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getListBoard(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/board`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getListCards(parameters, callback) {
        const config = {
            url: `/lists/${parameters.id}/cards`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
}
exports.Lists = Lists;
