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