UNPKG

@aecworks/bimbox-bimserver-sdk-js

Version:

AECWorks BIMBox 产品线 BIMServer 的 sdk 的 JavaScript 实现,采用Typescript语言

207 lines 10 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import ServiceBase from '../base'; import { MemberPageProxy } from '../proxies/member-model-list-proxy'; import { MemberModelProxy } from '../proxies/member-model-proxy'; import * as proxy from '../proxy'; var ACCOUNTS = '/accounts'; var GROUPS = '/groups'; var MemberService = /** @class */ (function (_super) { __extends(MemberService, _super); function MemberService() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.getAllAccountMembers = function (accountId) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + accountId + "/members"), }); return proxy.httpResultProxy(promise, MemberPageProxy); }; // accounts _this.getMembersPaging = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/members"), params: data.data, }); return proxy.httpResultProxy(promise, MemberPageProxy); }; _this.getMembersUnGroupPaging = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + "/" + data.accountId + GROUPS + "/members/ungrouped", params: data.data, }); return proxy.httpResultProxy(promise, MemberPageProxy); }; _this.getMembersGroupPaging = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + GROUPS + "/" + data.groupId + "/members"), params: data.data, }); return proxy.httpResultProxy(promise, MemberPageProxy); }; _this.getMeAccountMemberAction = function (accountId) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + accountId + "/members/me/info"), }); return proxy.httpResultProxy(promise, MemberModelProxy); }; _this.shiftAccountMemberActive = function (data) { var promise = _super.prototype.put.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/members/" + data.memberId + "/state"), data: data.data, }); return proxy.httpResultProxy(promise, MemberModelProxy); }; // changeMemberRoles = (data) => { // let promise = super.put(ACCOUNTS + `/${data.accountId}/members/${data.memberId}/roles`, data.data); // return proxy.httpResultProxy(promise, MemberModelProxy); // }; _this.updateAccountMemberRole = function (data) { var promise = _super.prototype.post.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/userRoles/batch"), data: data.data, }); return proxy.httpResultProxy(promise, MemberModelProxy); }; _this.addMemberToAccount = function (data) { var promise = _super.prototype.post.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/members"), data: data.data, }); return proxy.httpResultProxy(promise, MemberPageProxy); }; _this.getAccountMemberByMemberId = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/members/" + data.memberId), }); return proxy.httpResultProxy(promise, MemberModelProxy); }; _this.searchAccountMember = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/members/search"), params: data.data, }); return proxy.httpResultProxy(promise, MemberModelProxy); }; _this.deleteAccountMember = function (data) { var promise = _super.prototype.delete.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/members/" + data.memberId), }); return proxy.httpResultProxy(promise, MemberModelProxy); }; // POST /accounts/{accountId}/emails/check/batch批量检查邮箱在系统中的类型 _this.checkMembersEmail = function (data) { var promise = _super.prototype.post.call(_this, { url: ACCOUNTS + "/" + data.accountId + "/emails/check/batch", data: data.data, }); return proxy.httpResultProxy(promise); }; // POST /accounts/{accountId}/members/batch批量创建组织成员 _this.addMultiplyUserByExcel = function (data) { var promise = _super.prototype.post.call(_this, { url: ACCOUNTS + "/" + data.accountId + "/members/batch", data: data.data, }); return proxy.httpResultProxy(promise); }; // PUT /accounts/{accountId}/members/batch批量修改组织成员 _this.updateAccountMembers = function (data) { var promise = _super.prototype.put.call(_this, { url: ACCOUNTS + "/" + data.accountId + "/members/batch", data: data.data, }); return proxy.httpResultProxy(promise); }; // projects _this.getProjectMember = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members"), }); return proxy.httpResultProxy(promise, MemberPageProxy); }; _this.getProjectMemberOfMe = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members/me/info"), }); return proxy.httpResultProxy(promise, MemberModelProxy); }; _this.isMeJoinedProject = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members/me"), }); return proxy.httpResultProxy(promise); }; _this.postMember = function (data) { var promise = _super.prototype.post.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members"), data: data.memberNames, }); return proxy.httpResultProxy(promise, MemberPageProxy); }; _this.addMultiplyProjectUserByExcel = function (data) { var promise = _super.prototype.post.call(_this, { url: "/accounts/" + data.accountId + "/projects/" + data.projectId + "/members/batch", data: data.data, }); return proxy.httpResultProxy(promise, MemberPageProxy); }; _this.updateProjectMemberRole = function (data) { var promise = _super.prototype.post.call(_this, { url: "/accounts/" + data.accountId + "/projects/" + data.projectId + "/userRoles/batch", data: data.data, }); return proxy.httpResultProxy(promise); }; _this.deleteMember = function (data) { var promise = _super.prototype.delete.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members/" + data.memberId), }); return proxy.httpResultProxy(promise); }; // DELETE /accounts/{accountId}/projects/{projectId}/members/batch 批量删除项目成员 _this.deleteMemberBatch = function (data) { var promise = _super.prototype.delete.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members/batch"), data: data.data, }); return proxy.httpResultProxy(promise); }; _this.postMemberAdmin = function (data) { var promise = _super.prototype.put.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members/" + data.id + "/roles"), data: { roleNames: data.roleNames, }, }); return proxy.httpResultProxy(promise, MemberModelProxy); }; _this.getMemberInfo = function (data) { var promise = _super.prototype.get.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/projects/" + data.projectId + "/members/" + data.id), }); return proxy.httpResultProxy(promise); }; _this.resetUserPassword = function (data) { var promise = _super.prototype.put.call(_this, { url: ACCOUNTS + ("/" + data.accountId + "/members/" + data.memberId), data: data.data, }); return proxy.httpResultProxy(promise); }; return _this; } return MemberService; }(ServiceBase)); export { MemberService }; //# sourceMappingURL=member.js.map