roboto-js 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,7 +108,7 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
108
108
  _createClass(Roboto, [{
109
109
  key: "getVersion",
110
110
  value: function getVersion() {
111
- return '1.6.17';
111
+ return '1.7.0';
112
112
  }
113
113
  }, {
114
114
  key: "setSiteEnv",
package/dist/esm/index.js CHANGED
@@ -8,7 +8,7 @@ export { RbtApi, RbtObject, RbtFile
8
8
  };
9
9
  export default class Roboto {
10
10
  getVersion() {
11
- return '1.6.17';
11
+ return '1.7.0';
12
12
  }
13
13
  constructor({
14
14
  host,
package/dist/index.js ADDED
@@ -0,0 +1,547 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "RbtApi", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _rbt_api["default"];
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "RbtFile", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _rbt_file["default"];
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "RbtObject", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _rbt_object["default"];
22
+ }
23
+ });
24
+ exports["default"] = void 0;
25
+ var _rbt_api = _interopRequireDefault(require("./rbt_api.js"));
26
+ var _rbt_object = _interopRequireDefault(require("./rbt_object.js"));
27
+ var _rbt_file = _interopRequireDefault(require("./rbt_file.js"));
28
+ var _rbt_metrics_api = _interopRequireDefault(require("./rbt_metrics_api.js"));
29
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
30
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
31
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
32
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
33
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
34
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
35
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
36
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
37
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
38
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
39
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
40
+ var Roboto = exports["default"] = /*#__PURE__*/function () {
41
+ function Roboto(_ref) {
42
+ var host = _ref.host,
43
+ accessKey = _ref.accessKey,
44
+ localStorageAdaptor = _ref.localStorageAdaptor,
45
+ _ref$disableWebSocket = _ref.disableWebSocket,
46
+ disableWebSocket = _ref$disableWebSocket === void 0 ? false : _ref$disableWebSocket,
47
+ metricsHost = _ref.metricsHost;
48
+ var proxyReq = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
49
+ _classCallCheck(this, Roboto);
50
+ if (Roboto.instance && !proxyReq) {
51
+ // if on client, there can only be one instance
52
+ // on server, with proxyReq, each request has its own instance
53
+ return Roboto.instance;
54
+ }
55
+ var isBrowser = typeof window !== "undefined";
56
+ this.data = {};
57
+ this.config = {
58
+ accessKey: accessKey,
59
+ // Use passed accessKey
60
+ baseUrl: "https://".concat(host),
61
+ // Use passed host
62
+ localStorageAdaptor: localStorageAdaptor
63
+ };
64
+
65
+ // DEVELOPMENT
66
+ this.config.baseUrl = this._stripHttpsForDomains(this.config.baseUrl, ['localhost']);
67
+
68
+ // Check if a request object is provided
69
+ if (proxyReq && proxyReq.headers) {
70
+ var authtoken = proxyReq.headers.authtoken;
71
+ var accesskey = proxyReq.headers.accesskey;
72
+ var apikey = proxyReq.headers.apikey;
73
+ // Optionally add more headers as needed
74
+ if (authtoken) {
75
+ this.config.authtoken = authtoken; // Set the authtoken in the config
76
+ }
77
+ if (apikey) {
78
+ this.config.apikey = apikey; // Set the authtoken in the config
79
+ }
80
+ if (accesskey) {
81
+ this.config.accesskey = accesskey; // Set the accesskey in the config
82
+ }
83
+ }
84
+ this.api = new _rbt_api["default"](this.config);
85
+ if (isBrowser) {
86
+ this.api.initLocalDb();
87
+ }
88
+
89
+ // METRICS API instance (separate host or same)
90
+ if (metricsHost && metricsHost !== host) {
91
+ var metricsUrl = metricsHost.startsWith('http') ? metricsHost : "https://".concat(metricsHost);
92
+ // You can customize headers if needed
93
+ this.metrics = new _rbt_metrics_api["default"]({
94
+ config: {
95
+ baseURL: this._stripHttpsForDomains(metricsUrl, ['localhost']),
96
+ headers: {
97
+ accesskey: accessKey
98
+ }
99
+ }
100
+ });
101
+ } else {
102
+ // Use the same axios instance as main API
103
+ this.metrics = new _rbt_metrics_api["default"]({
104
+ axiosInstance: this.api.axios
105
+ });
106
+ }
107
+ Roboto.instance = this;
108
+ }
109
+ return _createClass(Roboto, [{
110
+ key: "getVersion",
111
+ value: function getVersion() {
112
+ return '1.6.17';
113
+ }
114
+ }, {
115
+ key: "setSiteEnv",
116
+ value: function setSiteEnv(siteEnv) {
117
+ this.api.setSiteEnv(siteEnv);
118
+ }
119
+ }, {
120
+ key: "getSiteEnv",
121
+ value: function getSiteEnv() {
122
+ var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
123
+ return this.api.getSiteEnv(key);
124
+ }
125
+ }, {
126
+ key: "setItem",
127
+ value: function setItem(key, value) {
128
+ this.data[key] = value;
129
+ }
130
+ }, {
131
+ key: "getItem",
132
+ value: function getItem(key) {
133
+ return this.data[key];
134
+ }
135
+ }, {
136
+ key: "setAppServiceHost",
137
+ value: function setAppServiceHost(host) {
138
+ // DEVELOPMENT
139
+ host = this._stripHttpsForDomains(host, ['localhost']);
140
+ this.api.setAppServiceHost(host);
141
+ }
142
+ }, {
143
+ key: "setMetricsHost",
144
+ value: function setMetricsHost(host) {
145
+ this.metricsHost = host;
146
+ var metricsUrl = host.startsWith('http') ? host : "https://".concat(host);
147
+ this.metrics = new _rbt_metrics_api["default"]({
148
+ config: {
149
+ baseURL: this._stripHttpsForDomains(metricsUrl, ['localhost']),
150
+ headers: {
151
+ accesskey: this.config.accessKey
152
+ }
153
+ }
154
+ });
155
+ }
156
+ }, {
157
+ key: "registerTypedefs",
158
+ value: function registerTypedefs(typedefs) {
159
+ this.api.registerTypedefs(typedefs);
160
+ }
161
+ }, {
162
+ key: "setErrorHandler",
163
+ value: function setErrorHandler(customErrorHandler) {
164
+ if (this.api) {
165
+ this.api.setErrorHandler(customErrorHandler);
166
+ }
167
+ }
168
+ }, {
169
+ key: "recordToInstance",
170
+ value: function recordToInstance(recordHash) {
171
+ return new _rbt_object["default"](recordHash, this.api.axios);
172
+ }
173
+ }, {
174
+ key: "_stripHttpsForDomains",
175
+ value: function _stripHttpsForDomains(baseUrl, domains) {
176
+ return baseUrl.replace(new RegExp("^https://(".concat(domains.map(function (domain) {
177
+ return domain.replace(/\./g, '\\.');
178
+ }).join('|'), ")")), 'http://$1');
179
+ }
180
+
181
+ //
182
+ // User register, login, and refresh token
183
+ //
184
+ }, {
185
+ key: "login",
186
+ value: function () {
187
+ var _login = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(params) {
188
+ return _regenerator().w(function (_context) {
189
+ while (1) switch (_context.n) {
190
+ case 0:
191
+ return _context.a(2, this.api.login(params));
192
+ }
193
+ }, _callee, this);
194
+ }));
195
+ function login(_x) {
196
+ return _login.apply(this, arguments);
197
+ }
198
+ return login;
199
+ }()
200
+ }, {
201
+ key: "loginWithOauth",
202
+ value: function () {
203
+ var _loginWithOauth = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(params) {
204
+ return _regenerator().w(function (_context2) {
205
+ while (1) switch (_context2.n) {
206
+ case 0:
207
+ return _context2.a(2, this.api.loginWithOauth(params));
208
+ }
209
+ }, _callee2, this);
210
+ }));
211
+ function loginWithOauth(_x2) {
212
+ return _loginWithOauth.apply(this, arguments);
213
+ }
214
+ return loginWithOauth;
215
+ }()
216
+ }, {
217
+ key: "logout",
218
+ value: function () {
219
+ var _logout = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
220
+ return _regenerator().w(function (_context3) {
221
+ while (1) switch (_context3.n) {
222
+ case 0:
223
+ return _context3.a(2, this.api.logout());
224
+ }
225
+ }, _callee3, this);
226
+ }));
227
+ function logout() {
228
+ return _logout.apply(this, arguments);
229
+ }
230
+ return logout;
231
+ }()
232
+ }, {
233
+ key: "refreshAuthToken",
234
+ value: function () {
235
+ var _refreshAuthToken = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
236
+ return _regenerator().w(function (_context4) {
237
+ while (1) switch (_context4.n) {
238
+ case 0:
239
+ return _context4.a(2, this.api.refreshAuthToken(this.config.authtoken));
240
+ }
241
+ }, _callee4, this);
242
+ }));
243
+ function refreshAuthToken() {
244
+ return _refreshAuthToken.apply(this, arguments);
245
+ }
246
+ return refreshAuthToken;
247
+ }()
248
+ }, {
249
+ key: "registerUser",
250
+ value: function () {
251
+ var _registerUser = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(params) {
252
+ return _regenerator().w(function (_context5) {
253
+ while (1) switch (_context5.n) {
254
+ case 0:
255
+ return _context5.a(2, this.api.registerUser(params));
256
+ }
257
+ }, _callee5, this);
258
+ }));
259
+ function registerUser(_x3) {
260
+ return _registerUser.apply(this, arguments);
261
+ }
262
+ return registerUser;
263
+ }()
264
+ }, {
265
+ key: "loadUser",
266
+ value: function () {
267
+ var _loadUser = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(params) {
268
+ return _regenerator().w(function (_context6) {
269
+ while (1) switch (_context6.n) {
270
+ case 0:
271
+ return _context6.a(2, this.api.loadUser(params));
272
+ }
273
+ }, _callee6, this);
274
+ }));
275
+ function loadUser(_x4) {
276
+ return _loadUser.apply(this, arguments);
277
+ }
278
+ return loadUser;
279
+ }()
280
+ }, {
281
+ key: "loadCurrentUser",
282
+ value: function () {
283
+ var _loadCurrentUser = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
284
+ return _regenerator().w(function (_context7) {
285
+ while (1) switch (_context7.n) {
286
+ case 0:
287
+ return _context7.a(2, this.api.loadCurrentUser());
288
+ }
289
+ }, _callee7, this);
290
+ }));
291
+ function loadCurrentUser() {
292
+ return _loadCurrentUser.apply(this, arguments);
293
+ }
294
+ return loadCurrentUser;
295
+ }()
296
+ }, {
297
+ key: "loadCurrentUserExtended",
298
+ value: function () {
299
+ var _loadCurrentUserExtended = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
300
+ return _regenerator().w(function (_context8) {
301
+ while (1) switch (_context8.n) {
302
+ case 0:
303
+ return _context8.a(2, this.api.loadCurrentUserExtended());
304
+ }
305
+ }, _callee8, this);
306
+ }));
307
+ function loadCurrentUserExtended() {
308
+ return _loadCurrentUserExtended.apply(this, arguments);
309
+ }
310
+ return loadCurrentUserExtended;
311
+ }()
312
+ }, {
313
+ key: "getCurrentUser",
314
+ value: function () {
315
+ var _getCurrentUser = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
316
+ return _regenerator().w(function (_context9) {
317
+ while (1) switch (_context9.n) {
318
+ case 0:
319
+ return _context9.a(2, this.api.getCurrentUser());
320
+ }
321
+ }, _callee9, this);
322
+ }));
323
+ function getCurrentUser() {
324
+ return _getCurrentUser.apply(this, arguments);
325
+ }
326
+ return getCurrentUser;
327
+ }()
328
+ }, {
329
+ key: "confirmUserEmail",
330
+ value: function () {
331
+ var _confirmUserEmail = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(params) {
332
+ return _regenerator().w(function (_context0) {
333
+ while (1) switch (_context0.n) {
334
+ case 0:
335
+ return _context0.a(2, this.api.confirmUserEmail(params));
336
+ }
337
+ }, _callee0, this);
338
+ }));
339
+ function confirmUserEmail(_x5) {
340
+ return _confirmUserEmail.apply(this, arguments);
341
+ }
342
+ return confirmUserEmail;
343
+ }() //
344
+ // create and upload files
345
+ //
346
+ }, {
347
+ key: "createFile",
348
+ value: function () {
349
+ var _createFile = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
350
+ var data,
351
+ _args1 = arguments;
352
+ return _regenerator().w(function (_context1) {
353
+ while (1) switch (_context1.n) {
354
+ case 0:
355
+ data = _args1.length > 0 && _args1[0] !== undefined ? _args1[0] : {};
356
+ return _context1.a(2, this.api.createFile(data));
357
+ }
358
+ }, _callee1, this);
359
+ }));
360
+ function createFile() {
361
+ return _createFile.apply(this, arguments);
362
+ }
363
+ return createFile;
364
+ }()
365
+ }, {
366
+ key: "loadFile",
367
+ value: function () {
368
+ var _loadFile = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10(id) {
369
+ return _regenerator().w(function (_context10) {
370
+ while (1) switch (_context10.n) {
371
+ case 0:
372
+ return _context10.a(2, this.api.loadFile(id));
373
+ }
374
+ }, _callee10, this);
375
+ }));
376
+ function loadFile(_x6) {
377
+ return _loadFile.apply(this, arguments);
378
+ }
379
+ return loadFile;
380
+ }()
381
+ }, {
382
+ key: "loadFiles",
383
+ value: function () {
384
+ var _loadFiles = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11(ids) {
385
+ return _regenerator().w(function (_context11) {
386
+ while (1) switch (_context11.n) {
387
+ case 0:
388
+ return _context11.a(2, this.api.loadFiles(ids));
389
+ }
390
+ }, _callee11, this);
391
+ }));
392
+ function loadFiles(_x7) {
393
+ return _loadFiles.apply(this, arguments);
394
+ }
395
+ return loadFiles;
396
+ }() //
397
+ //
398
+ //
399
+ }, {
400
+ key: "create",
401
+ value: function () {
402
+ var _create = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12(params) {
403
+ var data,
404
+ _args12 = arguments;
405
+ return _regenerator().w(function (_context12) {
406
+ while (1) switch (_context12.n) {
407
+ case 0:
408
+ data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
409
+ return _context12.a(2, this.api.create(params, data));
410
+ }
411
+ }, _callee12, this);
412
+ }));
413
+ function create(_x8) {
414
+ return _create.apply(this, arguments);
415
+ }
416
+ return create;
417
+ }()
418
+ }, {
419
+ key: "load",
420
+ value: function () {
421
+ var _load = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13(type, ids, options) {
422
+ return _regenerator().w(function (_context13) {
423
+ while (1) switch (_context13.n) {
424
+ case 0:
425
+ return _context13.a(2, this.api.load(type, ids, options));
426
+ }
427
+ }, _callee13, this);
428
+ }));
429
+ function load(_x9, _x0, _x1) {
430
+ return _load.apply(this, arguments);
431
+ }
432
+ return load;
433
+ }()
434
+ }, {
435
+ key: "query",
436
+ value: function () {
437
+ var _query = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee14(type, params) {
438
+ return _regenerator().w(function (_context14) {
439
+ while (1) switch (_context14.n) {
440
+ case 0:
441
+ return _context14.a(2, this.api.query(type, params));
442
+ }
443
+ }, _callee14, this);
444
+ }));
445
+ function query(_x10, _x11) {
446
+ return _query.apply(this, arguments);
447
+ }
448
+ return query;
449
+ }() // WebSocket methods
450
+ }, {
451
+ key: "getWebSocketClient",
452
+ value: function getWebSocketClient() {
453
+ return this.api.getWebSocketClient();
454
+ }
455
+ }, {
456
+ key: "closeWebSocket",
457
+ value: function closeWebSocket() {
458
+ return this.api.closeWebSocket();
459
+ }
460
+
461
+ //
462
+ //
463
+ //
464
+ }, {
465
+ key: "runTask",
466
+ value: function () {
467
+ var _runTask = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(params, callbacks) {
468
+ return _regenerator().w(function (_context15) {
469
+ while (1) switch (_context15.n) {
470
+ case 0:
471
+ return _context15.a(2, this.api.runTask(params, callbacks));
472
+ }
473
+ }, _callee15, this);
474
+ }));
475
+ function runTask(_x12, _x13) {
476
+ return _runTask.apply(this, arguments);
477
+ }
478
+ return runTask;
479
+ }()
480
+ }, {
481
+ key: "stopJob",
482
+ value: function () {
483
+ var _stopJob = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(params, callbacks) {
484
+ return _regenerator().w(function (_context16) {
485
+ while (1) switch (_context16.n) {
486
+ case 0:
487
+ return _context16.a(2, this.api.stopJob(params, callbacks));
488
+ }
489
+ }, _callee16, this);
490
+ }));
491
+ function stopJob(_x14, _x15) {
492
+ return _stopJob.apply(this, arguments);
493
+ }
494
+ return stopJob;
495
+ }()
496
+ }, {
497
+ key: "pollTaskProgress",
498
+ value: function () {
499
+ var _pollTaskProgress = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee17(params) {
500
+ return _regenerator().w(function (_context17) {
501
+ while (1) switch (_context17.n) {
502
+ case 0:
503
+ return _context17.a(2, this.api.pollTaskProgress(params));
504
+ }
505
+ }, _callee17, this);
506
+ }));
507
+ function pollTaskProgress(_x16) {
508
+ return _pollTaskProgress.apply(this, arguments);
509
+ }
510
+ return pollTaskProgress;
511
+ }() //
512
+ // Get/Post to endpoint with Roboto authtoken
513
+ //
514
+ }, {
515
+ key: "get",
516
+ value: function () {
517
+ var _get = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee18(endpoint, params) {
518
+ return _regenerator().w(function (_context18) {
519
+ while (1) switch (_context18.n) {
520
+ case 0:
521
+ return _context18.a(2, this.api.get(endpoint, params));
522
+ }
523
+ }, _callee18, this);
524
+ }));
525
+ function get(_x17, _x18) {
526
+ return _get.apply(this, arguments);
527
+ }
528
+ return get;
529
+ }()
530
+ }, {
531
+ key: "post",
532
+ value: function () {
533
+ var _post = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee19(endpoint, data) {
534
+ return _regenerator().w(function (_context19) {
535
+ while (1) switch (_context19.n) {
536
+ case 0:
537
+ return _context19.a(2, this.api.post(endpoint, data));
538
+ }
539
+ }, _callee19, this);
540
+ }));
541
+ function post(_x19, _x20) {
542
+ return _post.apply(this, arguments);
543
+ }
544
+ return post;
545
+ }()
546
+ }]);
547
+ }();