@aecworks/bimbox-bimserver-sdk-js
Version:
AECWorks BIMBox 产品线 BIMServer 的 sdk 的 JavaScript 实现,采用Typescript语言
54 lines • 2.5 kB
JavaScript
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 { ApplicationPageProxy, ApplicationProxy } from '../proxies/application-status-page-proxy';
import { MessagePageProxy } from '../proxies/message--page-proxy';
import * as proxy from '../proxy';
var ACCOUNT = '/accounts';
var ApplicationService = /** @class */ (function (_super) {
__extends(ApplicationService, _super);
function ApplicationService() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.getApplication = function (data) {
var promise = _super.prototype.get.call(_this, {
url: ACCOUNT + ("/" + data.accountId + "/applications?pageNumber=" + data.pageNumber + "&pageSize=" + data.pageSize),
});
return proxy.httpResultProxy(promise, MessagePageProxy);
};
_this.sendApplication = function (data) {
var promise = _super.prototype.post.call(_this, {
url: ACCOUNT + ("/" + data.accountId + "/applications"),
data: data.data,
});
return proxy.httpResultProxy(promise, ApplicationProxy);
};
_this.updateApplication = function (data) {
var promise = _super.prototype.put.call(_this, {
url: ACCOUNT + ("/" + data.accountId + "/applications"),
data: data.data,
});
return proxy.httpResultProxy(promise, ApplicationProxy);
};
_this.getApplicationState = function () {
var promise = _super.prototype.get.call(_this, {
url: ACCOUNT + "/applications/me/state",
});
return proxy.httpResultProxy(promise, ApplicationPageProxy);
};
return _this;
}
return ApplicationService;
}(ServiceBase));
export { ApplicationService };
//# sourceMappingURL=application.js.map