@aecworks/bimbox-bimserver-sdk-js
Version:
AECWorks BIMBox 产品线 BIMServer 的 sdk 的 JavaScript 实现,采用Typescript语言
58 lines • 2.92 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 * as proxy from '../proxy';
import ServiceBase from '../base';
import { SubscriptionPageProxy, SubscriptionProxy } from '../proxies/file-proxy';
var GET_FILES = '/accounts';
var SubscriptionsService = /** @class */ (function (_super) {
__extends(SubscriptionsService, _super);
function SubscriptionsService() {
var _this = _super !== null && _super.apply(this, arguments) || this;
// POST /accounts/{accountId}/projects/{projectId}/subscriptions 订阅
_this.postSubscription = function (data) {
var promise = _super.prototype.post.call(_this, {
url: GET_FILES + "/" + data.accountId + "/projects/" + data.projectId + "/subscriptions",
data: data.data,
});
return proxy.httpResultProxy(promise, SubscriptionProxy);
};
// GET /accounts/{accountId}/projects/{projectId}/subscriptions get订阅信息
_this.getSubscriptions = function (data) {
var promise = _super.prototype.get.call(_this, {
url: GET_FILES + "/" + data.accountId + "/projects/" + data.projectId + "/subscriptions",
});
return proxy.httpResultProxy(promise, SubscriptionPageProxy);
};
// GET /accounts/{accountId}/projects/{projectId}/subscriptions/search 查询订阅信息
_this.getSubscriptionsSearch = function (data) {
var promise = _super.prototype.get.call(_this, {
url: GET_FILES + "/" + data.accountId + "/projects/" + data.projectId + "/subscriptions/search",
params: data.query,
});
return proxy.httpResultProxy(promise, SubscriptionPageProxy);
};
// DELETE /accounts/{accountId}/projects/{projectId}/subscriptions delete
_this.deleteSubscriptions = function (data) {
var promise = _super.prototype.delete.call(_this, {
url: GET_FILES + "/" + data.accountId + "/projects/" + data.projectId + "/subscriptions",
data: data.data,
});
return proxy.httpResultProxy(promise);
};
return _this;
}
return SubscriptionsService;
}(ServiceBase));
export { SubscriptionsService };
//# sourceMappingURL=subscription.js.map