"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteOrganizationUser = exports.addOrganizationUser = exports.fetchOrganizationUsers = exports.fetchOrganizationList = void 0;
const api_agent_1 = __importDefault(require("@/utils/api-agent"));
const fetchOrganizationList = () => new Promise((resolve) => {
    api_agent_1.default.get('/organizations/by-user', {}, (rs) => {
        resolve(rs);
    });
});
exports.fetchOrganizationList = fetchOrganizationList;
const fetchOrganizationUsers = (params) => new Promise((resolve) => {
    api_agent_1.default.get('/organizations/member-searchs', params, (rs) => {
        resolve(rs);
    });
});
exports.fetchOrganizationUsers = fetchOrganizationUsers;
const addOrganizationUser = (params) => new Promise((resolve) => {
    api_agent_1.default.post('/organizations/members', params, (rs) => {
        resolve(rs);
    });
});
exports.addOrganizationUser = addOrganizationUser;
const deleteOrganizationUser = (params) => new Promise((resolve) => {
    api_agent_1.default.put('/organizations/members-status', params, (rs) => {
        resolve(rs);
    });
});
exports.deleteOrganizationUser = deleteOrganizationUser;
