"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Labels = void 0;
class Labels {
    constructor(client) {
        this.client = client;
    }
    async getLabel(parameters, callback) {
        const config = {
            url: `/labels/${parameters.id}`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async updateLabel(parameters, callback) {
        const config = {
            url: `/labels/${parameters.id}`,
            method: 'PUT',
            params: {
                name: parameters.name,
                color: parameters.color,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async deleteLabel(parameters, callback) {
        const config = {
            url: `/labels/${parameters.id}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async updateLabelField(parameters, callback) {
        const config = {
            url: `/labels/${parameters.id}/${parameters.field}`,
            method: 'PUT',
            params: {
                value: parameters.value,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async createLabel(parameters, callback) {
        const config = {
            url: '/labels',
            method: 'POST',
            params: {
                name: parameters.name,
                color: parameters.color,
                idBoard: parameters.idBoard,
            },
        };
        return this.client.sendRequest(config, callback);
    }
}
exports.Labels = Labels;
