"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Search = void 0;
class Search {
    constructor(client) {
        this.client = client;
    }
    async getSearch(parameters, callback) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
        const config = {
            url: '/search',
            method: 'GET',
            params: {
                query: parameters.query,
                idBoards: parameters.idBoards,
                idOrganizations: parameters.idOrganizations,
                idCards: parameters.idCards,
                modelTypes: parameters.modelTypes,
                board_fields: (_a = parameters.boardFields) !== null && _a !== void 0 ? _a : (_b = parameters.board) === null || _b === void 0 ? void 0 : _b.fields,
                boards_limit: (_c = parameters.boardsLimit) !== null && _c !== void 0 ? _c : (_d = parameters.boards) === null || _d === void 0 ? void 0 : _d.limit,
                board_organization: (_e = parameters.board) === null || _e === void 0 ? void 0 : _e.organization,
                card_fields: (_f = parameters.cardFields) !== null && _f !== void 0 ? _f : (_g = parameters.card) === null || _g === void 0 ? void 0 : _g.fields,
                cards_limit: (_h = parameters.cardsLimit) !== null && _h !== void 0 ? _h : (_j = parameters.cards) === null || _j === void 0 ? void 0 : _j.limit,
                cards_page: (_k = parameters.cardsPage) !== null && _k !== void 0 ? _k : (_l = parameters.cards) === null || _l === void 0 ? void 0 : _l.page,
                card_board: (_m = parameters.cardBoard) !== null && _m !== void 0 ? _m : (_o = parameters.card) === null || _o === void 0 ? void 0 : _o.board,
                card_list: (_p = parameters.cardList) !== null && _p !== void 0 ? _p : (_q = parameters.card) === null || _q === void 0 ? void 0 : _q.list,
                card_members: (_r = parameters.cardMembers) !== null && _r !== void 0 ? _r : (_s = parameters.card) === null || _s === void 0 ? void 0 : _s.members,
                card_stickers: (_t = parameters.cardStickers) !== null && _t !== void 0 ? _t : (_u = parameters.card) === null || _u === void 0 ? void 0 : _u.stickers,
                card_attachments: (_v = parameters.cardAttachments) !== null && _v !== void 0 ? _v : (_w = parameters.card) === null || _w === void 0 ? void 0 : _w.attachments,
                organization_fields: (_x = parameters.organizationFields) !== null && _x !== void 0 ? _x : (_y = parameters.organization) === null || _y === void 0 ? void 0 : _y.fields,
                organizations_limit: (_z = parameters.organizationsLimit) !== null && _z !== void 0 ? _z : (_0 = parameters.organizations) === null || _0 === void 0 ? void 0 : _0.limit,
                member_fields: (_1 = parameters.memberFields) !== null && _1 !== void 0 ? _1 : (_2 = parameters.member) === null || _2 === void 0 ? void 0 : _2.fields,
                members_limit: (_3 = parameters.membersLimit) !== null && _3 !== void 0 ? _3 : (_4 = parameters.members) === null || _4 === void 0 ? void 0 : _4.limit,
                partial: parameters.partial,
            },
        };
        return this.client.sendRequest(config, callback);
    }
    async getSearchMembers(parameters, callback) {
        const config = {
            url: '/search/members/',
            method: 'GET',
            params: {
                query: parameters.query,
                limit: parameters.limit,
                idBoard: parameters.idBoard,
                idOrganization: parameters.idOrganization,
                onlyOrgMembers: parameters.onlyOrgMembers,
            },
        };
        return this.client.sendRequest(config, callback);
    }
}
exports.Search = Search;
