@aecworks/bimbox-bimserver-sdk-js
Version:
AECWorks BIMBox 产品线 BIMServer 的 sdk 的 JavaScript 实现,采用Typescript语言
44 lines • 2.33 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 (options) {
var promise = _super.prototype.get.call(_this, ACCOUNT + ("/" + options.accountId + "/applications?pageNumber=" + options.pageNumber + "&pageSize=" + options.pageSize));
return proxy.httpResultProxy(promise, MessagePageProxy);
};
_this.sendApplication = function (options) {
var promise = _super.prototype.post.call(_this, ACCOUNT + ("/" + options.accountId + "/applications"), options.data);
return proxy.httpResultProxy(promise, ApplicationProxy);
};
_this.updateApplication = function (options) {
var promise = _super.prototype.put.call(_this, ACCOUNT + ("/" + options.accountId + "/applications"), options.data);
return proxy.httpResultProxy(promise, ApplicationProxy);
};
_this.getApplicationState = function () {
var promise = _super.prototype.get.call(_this, ACCOUNT + "/applications/me/state");
return proxy.httpResultProxy(promise, ApplicationPageProxy);
};
return _this;
}
return ApplicationService;
}(ServiceBase));
export { ApplicationService, };
//# sourceMappingURL=application.js.map