"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Plugins = void 0;
class Plugins {
    constructor(client) {
        this.client = client;
    }
    async getPlugin(parameters, callback) {
        const config = {
            url: `/plugins/${parameters.id}/`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async updatePlugin(parameters, callback) {
        const config = {
            url: `/plugins/${parameters.id}/`,
            method: 'PUT',
        };
        return this.client.sendRequest(config, callback);
    }
    async createPluginListing(parameters, callback) {
        const config = {
            url: `/plugins/${parameters.idPlugin}/listing`,
            method: 'POST',
            data: {
                description: parameters.description,
                locale: parameters.locale,
                overview: parameters.overview,
                name: parameters.name,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getPluginComplianceMemberPrivacy(parameters, callback) {
        const config = {
            url: `/plugins/${parameters.id}/compliance/memberPrivacy`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async updatePluginListing(parameters, callback) {
        const config = {
            url: `/plugins/${parameters.idPlugin}/listings/${parameters.idListing}`,
            method: 'PUT',
            data: {
                description: parameters.description,
                locale: parameters.locale,
                overview: parameters.overview,
                name: parameters.name,
            },
        };
        return this.client.sendRequest(config, callback);
    }
}
exports.Plugins = Plugins;
