mnubo-sdk
Version:
mnubo SmartObjects JavaScript client
42 lines • 2.01 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var decorators_1 = require("../decorators");
var basePath = '/api/v3/bigdata';
var mergeStreamResponse = function (oldResponse, newResponse) {
return Object.assign({}, newResponse, { rows: oldResponse.rows.concat(newResponse.rows) });
};
var Bigdata = /** @class */ (function () {
function Bigdata(client) {
this.client = client;
}
Bigdata.prototype.startExport = function (query) {
return this.client.post(basePath + '/startexport', query);
};
Bigdata.prototype.streamPage = function (pageId) {
return this.client.get(basePath + '/streampage/' + pageId);
};
__decorate([
decorators_1.authenticate,
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", Promise)
], Bigdata.prototype, "startExport", null);
__decorate([
decorators_1.authenticate,
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", Promise)
], Bigdata.prototype, "streamPage", null);
return Bigdata;
}());
exports.Bigdata = Bigdata;
//# sourceMappingURL=bigdata.js.map