"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Members = void 0;
class Members {
    constructor(client) {
        this.client = client;
    }
    async getMember(parameters, callback) {
        var _a, _b, _c, _d;
        const config = {
            url: `/members/${parameters.id}`,
            method: 'GET',
            params: {
                actions: parameters.actions,
                boards: parameters.boards,
                boardBackgrounds: parameters.boardBackgrounds,
                boardsInvited: parameters.boardsInvited,
                boardsInvited_fields: parameters.boardsInvitedFields,
                boardStars: parameters.boardStars,
                cards: parameters.cards,
                customBoardBackgrounds: parameters.customBoardBackgrounds,
                customEmoji: parameters.customEmoji,
                customStickers: parameters.customStickers,
                fields: parameters.fields,
                notifications: parameters.notifications,
                organizations: parameters.organizations,
                organization_fields: (_a = parameters.organizationFields) !== null && _a !== void 0 ? _a : (_b = parameters.organization) === null || _b === void 0 ? void 0 : _b.fields,
                organization_paid_account: (_c = parameters.organizationPaidAccount) !== null && _c !== void 0 ? _c : (_d = parameters.organization) === null || _d === void 0 ? void 0 : _d.paidAccount,
                organizationsInvited: parameters.organizationsInvited,
                organizationsInvited_fields: parameters.organizationsInvitedFields,
                paid_account: parameters.paidAccount,
                savedSearches: parameters.savedSearches,
                tokens: parameters.tokens,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async updateMember(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}`,
            method: 'PUT',
            params: {
                fullName: parameters.fullName,
                initials: parameters.initials,
                username: parameters.username,
                bio: parameters.bio,
                avatarSource: parameters.avatarSource,
                'prefs/colorBlind': parameters.colorBlind,
                'prefs/locale': parameters.locale,
                'prefs/minutesBetweenSummaries': parameters.minutesBetweenSummaries,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberField(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/${parameters.field}`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberActions(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/actions`,
            method: 'GET',
            params: {
                before: parameters.before,
                since: parameters.since,
                filter: parameters.filter,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberBoardBackgrounds(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardBackgrounds`,
            method: 'GET',
            params: {
                filter: parameters.filter,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async uploadMemberBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardBackgrounds`,
            method: 'POST',
            params: {
                file: parameters.file,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardBackgrounds/${parameters.idBackground}`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async updateBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardBackgrounds/${parameters.idBackground}`,
            method: 'PUT',
            params: {
                brightness: parameters.brightness,
                tile: parameters.tile,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async deleteMemberBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardBackgrounds/${parameters.idBackground}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberBoardStars(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardStars`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async starMemberBoard(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardStars`,
            method: 'POST',
            params: {
                idBoard: parameters.idBoard,
                pos: parameters.pos,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberBoardStar(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardStars/${parameters.idStar}`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async updateMemberBoardStar(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardStars/${parameters.idStar}`,
            method: 'PUT',
            params: {
                pos: parameters.pos,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async unstarMemberBoard(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardStars/${parameters.idStar}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberBoards(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boards`,
            method: 'GET',
            params: {
                filter: parameters.filter,
                fields: parameters.fields,
                lists: parameters.lists,
                organization: parameters.organization,
                organization_fields: parameters.organizationFields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberBoardsInvited(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/boardsInvited`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberCards(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/cards`,
            method: 'GET',
            params: {
                filter: parameters.filter,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberCustomBoardBackgrounds(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customBoardBackgrounds`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async uploadMemberCustomBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customBoardBackgrounds`,
            method: 'POST',
            params: {
                file: parameters.file,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberCustomBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customBoardBackgrounds/${parameters.idBackground}`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async updateMemberCustomBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customBoardBackgrounds/${parameters.idBackground}`,
            method: 'PUT',
            params: {
                brightness: parameters.brightness,
                tile: parameters.tile,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async deleteMemberCustomBoardBackground(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customBoardBackgrounds/${parameters.idBackground}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberCustomEmojis(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customEmoji`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async createMemberCustomEmoji(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customEmoji`,
            method: 'POST',
            params: {
                file: parameters.file,
                name: parameters.name,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberCustomEmoji(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customEmoji/${parameters.idEmoji}`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberCustomStickers(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customStickers`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async uploadMemberCustomSticker(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customStickers`,
            method: 'POST',
            params: {
                file: parameters.file,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberCustomSticker(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customStickers/${parameters.idSticker}`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async deleteMemberCustomSticker(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/customStickers/${parameters.idSticker}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberNotifications(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/notifications`,
            method: 'GET',
            params: {
                entities: parameters.entities,
                display: parameters.display,
                filter: parameters.filter,
                read_filter: parameters.readFilter,
                fields: parameters.fields,
                limit: parameters.limit,
                page: parameters.page,
                before: parameters.before,
                since: parameters.since,
                memberCreator: parameters.memberCreator,
                memberCreator_fields: parameters.memberCreatorFields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberOrganizations(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/organizations`,
            method: 'GET',
            params: {
                filter: parameters.filter,
                fields: parameters.fields,
                paid_account: parameters.paidAccount,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberOrganizationsInvited(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/organizationsInvited`,
            method: 'GET',
            params: {
                fields: parameters.fields,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberSavedSearches(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/savedSearches`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async createMemberSavedSearch(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/savedSearches`,
            method: 'POST',
            params: {
                name: parameters.name,
                query: parameters.query,
                pos: parameters.pos,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberSavedSearch(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/savedSearches/${parameters.idSearch}`,
            method: 'GET',
        };
        return this.client.sendRequest(config, callback);
    }
    async updateMemberSavedSearch(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/savedSearches/${parameters.idSearch}`,
            method: 'PUT',
            params: {
                name: parameters.name,
                query: parameters.query,
                pos: parameters.pos,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async deleteMemberSavedSearch(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/savedSearches/${parameters.idSearch}`,
            method: 'DELETE',
        };
        return this.client.sendRequest(config, callback);
    }
    async getMemberTokens(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/tokens`,
            method: 'GET',
            params: {
                webhooks: parameters.webhooks,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async createMemberAvatar(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/avatar`,
            method: 'POST',
            params: {
                file: parameters.file,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async dismissMemberMessage(parameters, callback) {
        const config = {
            url: `/members/${parameters.id}/oneTimeMessagesDismissed`,
            method: 'POST',
            params: {
                value: parameters.value,
            },
        };
        return this.client.sendRequest(config, callback);
    }
}
exports.Members = Members;
