roboto-js 1.8.2 → 1.8.4

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