roboto-js 1.4.3 → 1.4.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.
@@ -222,38 +222,57 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
222
222
  return loadCurrentUser;
223
223
  }()
224
224
  }, {
225
- key: "getCurrentUser",
225
+ key: "loadCurrentUserExtended",
226
226
  value: function () {
227
- var _getCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
227
+ var _loadCurrentUserExtended = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
228
228
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
229
229
  while (1) switch (_context7.prev = _context7.next) {
230
230
  case 0:
231
- return _context7.abrupt("return", this.api.getCurrentUser());
231
+ return _context7.abrupt("return", this.api.loadCurrentUserExtended());
232
232
  case 1:
233
233
  case "end":
234
234
  return _context7.stop();
235
235
  }
236
236
  }, _callee7, this);
237
237
  }));
238
- function getCurrentUser() {
239
- return _getCurrentUser.apply(this, arguments);
238
+ function loadCurrentUserExtended() {
239
+ return _loadCurrentUserExtended.apply(this, arguments);
240
240
  }
241
- return getCurrentUser;
241
+ return loadCurrentUserExtended;
242
242
  }()
243
243
  }, {
244
- key: "confirmUserEmail",
244
+ key: "getCurrentUser",
245
245
  value: function () {
246
- var _confirmUserEmail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
246
+ var _getCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
247
247
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
248
248
  while (1) switch (_context8.prev = _context8.next) {
249
249
  case 0:
250
- return _context8.abrupt("return", this.api.confirmUserEmail(params));
250
+ return _context8.abrupt("return", this.api.getCurrentUser());
251
251
  case 1:
252
252
  case "end":
253
253
  return _context8.stop();
254
254
  }
255
255
  }, _callee8, this);
256
256
  }));
257
+ function getCurrentUser() {
258
+ return _getCurrentUser.apply(this, arguments);
259
+ }
260
+ return getCurrentUser;
261
+ }()
262
+ }, {
263
+ key: "confirmUserEmail",
264
+ value: function () {
265
+ var _confirmUserEmail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
266
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
267
+ while (1) switch (_context9.prev = _context9.next) {
268
+ case 0:
269
+ return _context9.abrupt("return", this.api.confirmUserEmail(params));
270
+ case 1:
271
+ case "end":
272
+ return _context9.stop();
273
+ }
274
+ }, _callee9, this);
275
+ }));
257
276
  function confirmUserEmail(_x4) {
258
277
  return _confirmUserEmail.apply(this, arguments);
259
278
  }
@@ -264,19 +283,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
264
283
  }, {
265
284
  key: "createFile",
266
285
  value: function () {
267
- var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
286
+ var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
268
287
  var data,
269
- _args9 = arguments;
270
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
271
- while (1) switch (_context9.prev = _context9.next) {
288
+ _args10 = arguments;
289
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
290
+ while (1) switch (_context10.prev = _context10.next) {
272
291
  case 0:
273
- data = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
274
- return _context9.abrupt("return", this.api.createFile(data));
292
+ data = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
293
+ return _context10.abrupt("return", this.api.createFile(data));
275
294
  case 2:
276
295
  case "end":
277
- return _context9.stop();
296
+ return _context10.stop();
278
297
  }
279
- }, _callee9, this);
298
+ }, _callee10, this);
280
299
  }));
281
300
  function createFile() {
282
301
  return _createFile.apply(this, arguments);
@@ -286,16 +305,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
286
305
  }, {
287
306
  key: "loadFile",
288
307
  value: function () {
289
- var _loadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(id) {
290
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
291
- while (1) switch (_context10.prev = _context10.next) {
308
+ var _loadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(id) {
309
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
310
+ while (1) switch (_context11.prev = _context11.next) {
292
311
  case 0:
293
- return _context10.abrupt("return", this.api.loadFile(id));
312
+ return _context11.abrupt("return", this.api.loadFile(id));
294
313
  case 1:
295
314
  case "end":
296
- return _context10.stop();
315
+ return _context11.stop();
297
316
  }
298
- }, _callee10, this);
317
+ }, _callee11, this);
299
318
  }));
300
319
  function loadFile(_x5) {
301
320
  return _loadFile.apply(this, arguments);
@@ -307,19 +326,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
307
326
  }, {
308
327
  key: "create",
309
328
  value: function () {
310
- var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
329
+ var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
311
330
  var data,
312
- _args11 = arguments;
313
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
314
- while (1) switch (_context11.prev = _context11.next) {
331
+ _args12 = arguments;
332
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
333
+ while (1) switch (_context12.prev = _context12.next) {
315
334
  case 0:
316
- data = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
317
- return _context11.abrupt("return", this.api.create(params, data));
335
+ data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
336
+ return _context12.abrupt("return", this.api.create(params, data));
318
337
  case 2:
319
338
  case "end":
320
- return _context11.stop();
339
+ return _context12.stop();
321
340
  }
322
- }, _callee11, this);
341
+ }, _callee12, this);
323
342
  }));
324
343
  function create(_x6) {
325
344
  return _create.apply(this, arguments);
@@ -329,16 +348,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
329
348
  }, {
330
349
  key: "load",
331
350
  value: function () {
332
- var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(type, ids, options) {
333
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
334
- while (1) switch (_context12.prev = _context12.next) {
351
+ var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(type, ids, options) {
352
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
353
+ while (1) switch (_context13.prev = _context13.next) {
335
354
  case 0:
336
- return _context12.abrupt("return", this.api.load(type, ids, options));
355
+ return _context13.abrupt("return", this.api.load(type, ids, options));
337
356
  case 1:
338
357
  case "end":
339
- return _context12.stop();
358
+ return _context13.stop();
340
359
  }
341
- }, _callee12, this);
360
+ }, _callee13, this);
342
361
  }));
343
362
  function load(_x7, _x8, _x9) {
344
363
  return _load.apply(this, arguments);
@@ -348,16 +367,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
348
367
  }, {
349
368
  key: "query",
350
369
  value: function () {
351
- var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(type, params) {
352
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
353
- while (1) switch (_context13.prev = _context13.next) {
370
+ var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(type, params) {
371
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
372
+ while (1) switch (_context14.prev = _context14.next) {
354
373
  case 0:
355
- return _context13.abrupt("return", this.api.query(type, params));
374
+ return _context14.abrupt("return", this.api.query(type, params));
356
375
  case 1:
357
376
  case "end":
358
- return _context13.stop();
377
+ return _context14.stop();
359
378
  }
360
- }, _callee13, this);
379
+ }, _callee14, this);
361
380
  }));
362
381
  function query(_x10, _x11) {
363
382
  return _query.apply(this, arguments);
@@ -369,16 +388,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
369
388
  }, {
370
389
  key: "runTask",
371
390
  value: function () {
372
- var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params, callbacks) {
373
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
374
- while (1) switch (_context14.prev = _context14.next) {
391
+ var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params, callbacks) {
392
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
393
+ while (1) switch (_context15.prev = _context15.next) {
375
394
  case 0:
376
- return _context14.abrupt("return", this.api.runTask(params, callbacks));
395
+ return _context15.abrupt("return", this.api.runTask(params, callbacks));
377
396
  case 1:
378
397
  case "end":
379
- return _context14.stop();
398
+ return _context15.stop();
380
399
  }
381
- }, _callee14, this);
400
+ }, _callee15, this);
382
401
  }));
383
402
  function runTask(_x12, _x13) {
384
403
  return _runTask.apply(this, arguments);
@@ -388,16 +407,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
388
407
  }, {
389
408
  key: "pollTaskProgress",
390
409
  value: function () {
391
- var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
392
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
393
- while (1) switch (_context15.prev = _context15.next) {
410
+ var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
411
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
412
+ while (1) switch (_context16.prev = _context16.next) {
394
413
  case 0:
395
- return _context15.abrupt("return", this.api.pollTaskProgress(params));
414
+ return _context16.abrupt("return", this.api.pollTaskProgress(params));
396
415
  case 1:
397
416
  case "end":
398
- return _context15.stop();
417
+ return _context16.stop();
399
418
  }
400
- }, _callee15, this);
419
+ }, _callee16, this);
401
420
  }));
402
421
  function pollTaskProgress(_x14) {
403
422
  return _pollTaskProgress.apply(this, arguments);
@@ -409,16 +428,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
409
428
  }, {
410
429
  key: "get",
411
430
  value: function () {
412
- var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(endpoint, params) {
413
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
414
- while (1) switch (_context16.prev = _context16.next) {
431
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(endpoint, params) {
432
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
433
+ while (1) switch (_context17.prev = _context17.next) {
415
434
  case 0:
416
- return _context16.abrupt("return", this.api.get(endpoint, params));
435
+ return _context17.abrupt("return", this.api.get(endpoint, params));
417
436
  case 1:
418
437
  case "end":
419
- return _context16.stop();
438
+ return _context17.stop();
420
439
  }
421
- }, _callee16, this);
440
+ }, _callee17, this);
422
441
  }));
423
442
  function get(_x15, _x16) {
424
443
  return _get.apply(this, arguments);
@@ -428,16 +447,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
428
447
  }, {
429
448
  key: "post",
430
449
  value: function () {
431
- var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(endpoint, data) {
432
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
433
- while (1) switch (_context17.prev = _context17.next) {
450
+ var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(endpoint, data) {
451
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
452
+ while (1) switch (_context18.prev = _context18.next) {
434
453
  case 0:
435
- return _context17.abrupt("return", this.api.post(endpoint, data));
454
+ return _context18.abrupt("return", this.api.post(endpoint, data));
436
455
  case 1:
437
456
  case "end":
438
- return _context17.stop();
457
+ return _context18.stop();
439
458
  }
440
- }, _callee17, this);
459
+ }, _callee18, this);
441
460
  }));
442
461
  function post(_x17, _x18) {
443
462
  return _post.apply(this, arguments);
@@ -335,36 +335,60 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
335
335
  return confirmUserEmail;
336
336
  }()
337
337
  }, {
338
- key: "loadUser",
338
+ key: "loadCurrentUserExtended",
339
339
  value: function () {
340
- var _loadUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(userId) {
341
- var params, _response$data, response, userData, User;
340
+ var _loadCurrentUserExtended = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
341
+ var currentUser;
342
342
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
343
343
  while (1) switch (_context7.prev = _context7.next) {
344
+ case 0:
345
+ _context7.next = 2;
346
+ return this.loadCurrentUser();
347
+ case 2:
348
+ currentUser = _context7.sent;
349
+ return _context7.abrupt("return", this.loadUser(currentUser.id));
350
+ case 4:
351
+ case "end":
352
+ return _context7.stop();
353
+ }
354
+ }, _callee7, this);
355
+ }));
356
+ function loadCurrentUserExtended() {
357
+ return _loadCurrentUserExtended.apply(this, arguments);
358
+ }
359
+ return loadCurrentUserExtended;
360
+ }()
361
+ }, {
362
+ key: "loadUser",
363
+ value: function () {
364
+ var _loadUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(userId) {
365
+ var params, _response$data, response, userData, User;
366
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
367
+ while (1) switch (_context8.prev = _context8.next) {
344
368
  case 0:
345
369
  params = {
346
370
  id: userId
347
371
  };
348
- _context7.prev = 1;
349
- _context7.next = 4;
372
+ _context8.prev = 1;
373
+ _context8.next = 4;
350
374
  return this.axios.post('/user_service/loadUser', [params]);
351
375
  case 4:
352
- response = _context7.sent;
376
+ response = _context8.sent;
353
377
  userData = response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.user;
354
378
  User = new _rbt_user["default"]({
355
379
  id: userData.id
356
380
  }, this.axios);
357
381
  User.setData(userData);
358
- return _context7.abrupt("return", User);
382
+ return _context8.abrupt("return", User);
359
383
  case 11:
360
- _context7.prev = 11;
361
- _context7.t0 = _context7["catch"](1);
362
- return _context7.abrupt("return", this._handleError(_context7.t0));
384
+ _context8.prev = 11;
385
+ _context8.t0 = _context8["catch"](1);
386
+ return _context8.abrupt("return", this._handleError(_context8.t0));
363
387
  case 14:
364
388
  case "end":
365
- return _context7.stop();
389
+ return _context8.stop();
366
390
  }
367
- }, _callee7, this, [[1, 11]]);
391
+ }, _callee8, this, [[1, 11]]);
368
392
  }));
369
393
  function loadUser(_x4) {
370
394
  return _loadUser.apply(this, arguments);
@@ -374,27 +398,27 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
374
398
  }, {
375
399
  key: "refreshAuthToken",
376
400
  value: function () {
377
- var _refreshAuthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(authtoken) {
401
+ var _refreshAuthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(authtoken) {
378
402
  var response;
379
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
380
- while (1) switch (_context8.prev = _context8.next) {
403
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
404
+ while (1) switch (_context9.prev = _context9.next) {
381
405
  case 0:
382
- _context8.prev = 0;
383
- _context8.next = 3;
406
+ _context9.prev = 0;
407
+ _context9.next = 3;
384
408
  return this.axios.post('/user_service/refreshAuthToken', [authtoken]);
385
409
  case 3:
386
- response = _context8.sent;
410
+ response = _context9.sent;
387
411
  debugger;
388
- return _context8.abrupt("return", response.data);
412
+ return _context9.abrupt("return", response.data);
389
413
  case 8:
390
- _context8.prev = 8;
391
- _context8.t0 = _context8["catch"](0);
392
- this._handleError(_context8.t0);
414
+ _context9.prev = 8;
415
+ _context9.t0 = _context9["catch"](0);
416
+ this._handleError(_context9.t0);
393
417
  case 11:
394
418
  case "end":
395
- return _context8.stop();
419
+ return _context9.stop();
396
420
  }
397
- }, _callee8, this, [[0, 8]]);
421
+ }, _callee9, this, [[0, 8]]);
398
422
  }));
399
423
  function refreshAuthToken(_x5) {
400
424
  return _refreshAuthToken.apply(this, arguments);
@@ -411,32 +435,32 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
411
435
  }, {
412
436
  key: "registerUser",
413
437
  value: (function () {
414
- var _registerUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
438
+ var _registerUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
415
439
  var dataHash,
416
440
  response,
417
441
  record,
418
- _args9 = arguments;
419
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
420
- while (1) switch (_context9.prev = _context9.next) {
442
+ _args10 = arguments;
443
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
444
+ while (1) switch (_context10.prev = _context10.next) {
421
445
  case 0:
422
- dataHash = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
423
- _context9.prev = 1;
424
- _context9.next = 4;
446
+ dataHash = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
447
+ _context10.prev = 1;
448
+ _context10.next = 4;
425
449
  return this.axios.post('/user_service/registerUser', [dataHash]);
426
450
  case 4:
427
- response = _context9.sent;
451
+ response = _context10.sent;
428
452
  record = response.data;
429
- return _context9.abrupt("return", new _rbt_user["default"](record, this.axios));
453
+ return _context10.abrupt("return", new _rbt_user["default"](record, this.axios));
430
454
  case 9:
431
- _context9.prev = 9;
432
- _context9.t0 = _context9["catch"](1);
455
+ _context10.prev = 9;
456
+ _context10.t0 = _context10["catch"](1);
433
457
  debugger;
434
- return _context9.abrupt("return", this._handleError(_context9.t0));
458
+ return _context10.abrupt("return", this._handleError(_context10.t0));
435
459
  case 13:
436
460
  case "end":
437
- return _context9.stop();
461
+ return _context10.stop();
438
462
  }
439
- }, _callee9, this, [[1, 9]]);
463
+ }, _callee10, this, [[1, 9]]);
440
464
  }));
441
465
  function registerUser() {
442
466
  return _registerUser.apply(this, arguments);
@@ -454,30 +478,30 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
454
478
  }, {
455
479
  key: "createFile",
456
480
  value: (function () {
457
- var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(dataHash) {
481
+ var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(dataHash) {
458
482
  var response, record;
459
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
460
- while (1) switch (_context10.prev = _context10.next) {
483
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
484
+ while (1) switch (_context11.prev = _context11.next) {
461
485
  case 0:
462
- _context10.prev = 0;
463
- _context10.next = 3;
486
+ _context11.prev = 0;
487
+ _context11.next = 3;
464
488
  return this.axios.post('/object_service/createObject', ['<@filekit.file>', dataHash]);
465
489
  case 3:
466
- response = _context10.sent;
490
+ response = _context11.sent;
467
491
  record = response.data;
468
492
  if (dataHash) {
469
493
  record.data = dataHash;
470
494
  }
471
- return _context10.abrupt("return", new _rbt_file["default"](record, this.axios, this.localDb));
495
+ return _context11.abrupt("return", new _rbt_file["default"](record, this.axios, this.localDb));
472
496
  case 9:
473
- _context10.prev = 9;
474
- _context10.t0 = _context10["catch"](0);
475
- return _context10.abrupt("return", this._handleError(_context10.t0));
497
+ _context11.prev = 9;
498
+ _context11.t0 = _context11["catch"](0);
499
+ return _context11.abrupt("return", this._handleError(_context11.t0));
476
500
  case 12:
477
501
  case "end":
478
- return _context10.stop();
502
+ return _context11.stop();
479
503
  }
480
- }, _callee10, this, [[0, 9]]);
504
+ }, _callee11, this, [[0, 9]]);
481
505
  }));
482
506
  function createFile(_x6) {
483
507
  return _createFile.apply(this, arguments);
@@ -487,33 +511,33 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
487
511
  }, {
488
512
  key: "loadFile",
489
513
  value: function () {
490
- var _loadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(id) {
514
+ var _loadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(id) {
491
515
  var response, record;
492
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
493
- while (1) switch (_context11.prev = _context11.next) {
516
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
517
+ while (1) switch (_context12.prev = _context12.next) {
494
518
  case 0:
495
- _context11.prev = 0;
496
- _context11.next = 3;
519
+ _context12.prev = 0;
520
+ _context12.next = 3;
497
521
  return this.load('<@filekit.file>', id);
498
522
  case 3:
499
- response = _context11.sent;
523
+ response = _context12.sent;
500
524
  if (response) {
501
- _context11.next = 6;
525
+ _context12.next = 6;
502
526
  break;
503
527
  }
504
- return _context11.abrupt("return", null);
528
+ return _context12.abrupt("return", null);
505
529
  case 6:
506
530
  record = response.toRecord();
507
- return _context11.abrupt("return", new _rbt_file["default"](record, this.axios, this.localDb));
531
+ return _context12.abrupt("return", new _rbt_file["default"](record, this.axios, this.localDb));
508
532
  case 10:
509
- _context11.prev = 10;
510
- _context11.t0 = _context11["catch"](0);
511
- return _context11.abrupt("return", this._handleError(_context11.t0));
533
+ _context12.prev = 10;
534
+ _context12.t0 = _context12["catch"](0);
535
+ return _context12.abrupt("return", this._handleError(_context12.t0));
512
536
  case 13:
513
537
  case "end":
514
- return _context11.stop();
538
+ return _context12.stop();
515
539
  }
516
- }, _callee11, this, [[0, 10]]);
540
+ }, _callee12, this, [[0, 10]]);
517
541
  }));
518
542
  function loadFile(_x7) {
519
543
  return _loadFile.apply(this, arguments);
@@ -530,36 +554,36 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
530
554
  }, {
531
555
  key: "create",
532
556
  value: (function () {
533
- var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(type) {
557
+ var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(type) {
534
558
  var dataHash,
535
559
  response,
536
560
  record,
537
- _args12 = arguments;
538
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
539
- while (1) switch (_context12.prev = _context12.next) {
561
+ _args13 = arguments;
562
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
563
+ while (1) switch (_context13.prev = _context13.next) {
540
564
  case 0:
541
- dataHash = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
542
- _context12.prev = 1;
543
- _context12.next = 4;
565
+ dataHash = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : {};
566
+ _context13.prev = 1;
567
+ _context13.next = 4;
544
568
  return this.axios.post('/object_service/createObject', [type, dataHash]);
545
569
  case 4:
546
- response = _context12.sent;
570
+ response = _context13.sent;
547
571
  record = response.data;
548
572
  if (dataHash) {
549
573
  record.data = dataHash;
550
574
  }
551
- return _context12.abrupt("return", new _rbt_object["default"](record, this.axios, {
575
+ return _context13.abrupt("return", new _rbt_object["default"](record, this.axios, {
552
576
  isNew: true
553
577
  }));
554
578
  case 10:
555
- _context12.prev = 10;
556
- _context12.t0 = _context12["catch"](1);
557
- return _context12.abrupt("return", this._handleError(_context12.t0));
579
+ _context13.prev = 10;
580
+ _context13.t0 = _context13["catch"](1);
581
+ return _context13.abrupt("return", this._handleError(_context13.t0));
558
582
  case 13:
559
583
  case "end":
560
- return _context12.stop();
584
+ return _context13.stop();
561
585
  }
562
- }, _callee12, this, [[1, 10]]);
586
+ }, _callee13, this, [[1, 10]]);
563
587
  }));
564
588
  function create(_x8) {
565
589
  return _create.apply(this, arguments);
@@ -598,19 +622,19 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
598
622
  }, {
599
623
  key: "query",
600
624
  value: (function () {
601
- var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(type) {
625
+ var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(type) {
602
626
  var _this = this;
603
627
  var params,
604
628
  defaultOrderBy,
605
629
  defaultLimit,
606
630
  mergedParams,
607
631
  response,
608
- _args13 = arguments;
609
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
610
- while (1) switch (_context13.prev = _context13.next) {
632
+ _args14 = arguments;
633
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
634
+ while (1) switch (_context14.prev = _context14.next) {
611
635
  case 0:
612
- params = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : {};
613
- _context13.prev = 1;
636
+ params = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : {};
637
+ _context14.prev = 1;
614
638
  params.type = type;
615
639
 
616
640
  // Default ordering and pagination
@@ -627,15 +651,15 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
627
651
  }
628
652
  }; // Merge defaults with provided params
629
653
  mergedParams = _objectSpread(_objectSpread(_objectSpread({}, defaultOrderBy), defaultLimit), params);
630
- _context13.next = 8;
654
+ _context14.next = 8;
631
655
  return this.axios.post('/object_service/queryObjects', [mergedParams]);
632
656
  case 8:
633
- response = _context13.sent;
657
+ response = _context14.sent;
634
658
  if (!(response.data.ok === false)) {
635
- _context13.next = 11;
659
+ _context14.next = 11;
636
660
  break;
637
661
  }
638
- return _context13.abrupt("return", this._handleError(response));
662
+ return _context14.abrupt("return", this._handleError(response));
639
663
  case 11:
640
664
  // Process items into RbtObject instances
641
665
  if (Array.isArray(response.data.items)) {
@@ -645,16 +669,16 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
645
669
  });
646
670
  });
647
671
  }
648
- return _context13.abrupt("return", response.data.items);
672
+ return _context14.abrupt("return", response.data.items);
649
673
  case 15:
650
- _context13.prev = 15;
651
- _context13.t0 = _context13["catch"](1);
652
- return _context13.abrupt("return", this._handleError(_context13.t0));
674
+ _context14.prev = 15;
675
+ _context14.t0 = _context14["catch"](1);
676
+ return _context14.abrupt("return", this._handleError(_context14.t0));
653
677
  case 18:
654
678
  case "end":
655
- return _context13.stop();
679
+ return _context14.stop();
656
680
  }
657
- }, _callee13, this, [[1, 15]]);
681
+ }, _callee14, this, [[1, 15]]);
658
682
  }));
659
683
  function query(_x9) {
660
684
  return _query.apply(this, arguments);
@@ -673,45 +697,45 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
673
697
  }, {
674
698
  key: "load",
675
699
  value: (function () {
676
- var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(type, ids) {
700
+ var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(type, ids) {
677
701
  var params,
678
702
  mergedParams,
679
703
  res,
680
- _args14 = arguments;
681
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
682
- while (1) switch (_context14.prev = _context14.next) {
704
+ _args15 = arguments;
705
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
706
+ while (1) switch (_context15.prev = _context15.next) {
683
707
  case 0:
684
- params = _args14.length > 2 && _args14[2] !== undefined ? _args14[2] : {};
685
- _context14.prev = 1;
708
+ params = _args15.length > 2 && _args15[2] !== undefined ? _args15[2] : {};
709
+ _context15.prev = 1;
686
710
  if (!Array.isArray(ids)) {
687
- _context14.next = 7;
711
+ _context15.next = 7;
688
712
  break;
689
713
  }
690
714
  mergedParams = _objectSpread(_objectSpread({}, params), {}, {
691
715
  where: "id IN (" + ids.join(',') + ")"
692
716
  });
693
- return _context14.abrupt("return", this.query(type, mergedParams));
717
+ return _context15.abrupt("return", this.query(type, mergedParams));
694
718
  case 7:
695
719
  mergedParams = _objectSpread(_objectSpread({}, params), {}, {
696
720
  where: "id=" + ids
697
721
  });
698
- _context14.next = 10;
722
+ _context15.next = 10;
699
723
  return this.query(type, mergedParams);
700
724
  case 10:
701
- res = _context14.sent;
702
- return _context14.abrupt("return", res[0]);
725
+ res = _context15.sent;
726
+ return _context15.abrupt("return", res[0]);
703
727
  case 12:
704
- _context14.next = 17;
728
+ _context15.next = 17;
705
729
  break;
706
730
  case 14:
707
- _context14.prev = 14;
708
- _context14.t0 = _context14["catch"](1);
709
- return _context14.abrupt("return", this._handleError(_context14.t0));
731
+ _context15.prev = 14;
732
+ _context15.t0 = _context15["catch"](1);
733
+ return _context15.abrupt("return", this._handleError(_context15.t0));
710
734
  case 17:
711
735
  case "end":
712
- return _context14.stop();
736
+ return _context15.stop();
713
737
  }
714
- }, _callee14, this, [[1, 14]]);
738
+ }, _callee15, this, [[1, 14]]);
715
739
  }));
716
740
  function load(_x10, _x11) {
717
741
  return _load.apply(this, arguments);
@@ -735,7 +759,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
735
759
  }, {
736
760
  key: "runTask",
737
761
  value: (function () {
738
- var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
762
+ var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
739
763
  var params,
740
764
  callbacks,
741
765
  onProgress,
@@ -747,20 +771,20 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
747
771
  status,
748
772
  message,
749
773
  output,
750
- _args15 = arguments;
751
- return _regeneratorRuntime().wrap(function _callee15$(_context15) {
752
- while (1) switch (_context15.prev = _context15.next) {
774
+ _args16 = arguments;
775
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
776
+ while (1) switch (_context16.prev = _context16.next) {
753
777
  case 0:
754
- params = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
755
- callbacks = _args15.length > 1 && _args15[1] !== undefined ? _args15[1] : {};
778
+ params = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
779
+ callbacks = _args16.length > 1 && _args16[1] !== undefined ? _args16[1] : {};
756
780
  onProgress = callbacks.onProgress, onError = callbacks.onError, onFinish = callbacks.onFinish;
757
- _context15.prev = 3;
758
- _context15.next = 6;
781
+ _context16.prev = 3;
782
+ _context16.next = 6;
759
783
  return this.post('/task_service/runChain', params);
760
784
  case 6:
761
- response = _context15.sent;
785
+ response = _context16.sent;
762
786
  if (response) {
763
- _context15.next = 9;
787
+ _context16.next = 9;
764
788
  break;
765
789
  }
766
790
  throw new Error('Invalid server response');
@@ -768,7 +792,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
768
792
  // Validate response structure
769
793
  ok = response.ok, jobId = response.jobId, status = response.status, message = response.message, output = response.output;
770
794
  if (!(!ok || typeof jobId !== 'string' || typeof status !== 'string')) {
771
- _context15.next = 12;
795
+ _context16.next = 12;
772
796
  break;
773
797
  }
774
798
  throw new Error('Invalid response structure');
@@ -786,7 +810,7 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
786
810
  console.log('Finish (request) ', response);
787
811
  onFinish(response);
788
812
  }
789
- return _context15.abrupt("return", {
813
+ return _context16.abrupt("return", {
790
814
  ok: ok,
791
815
  jobId: jobId,
792
816
  status: status,
@@ -794,24 +818,24 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
794
818
  output: output
795
819
  });
796
820
  case 18:
797
- _context15.prev = 18;
798
- _context15.t0 = _context15["catch"](3);
821
+ _context16.prev = 18;
822
+ _context16.t0 = _context16["catch"](3);
799
823
  if (typeof onError === 'function') {
800
- onError(_context15.t0);
824
+ onError(_context16.t0);
801
825
  } else {
802
- console.error('Error in runTask:', _context15.t0);
826
+ console.error('Error in runTask:', _context16.t0);
803
827
  }
804
- return _context15.abrupt("return", {
828
+ return _context16.abrupt("return", {
805
829
  ok: false,
806
830
  jobId: null,
807
831
  status: 'ERROR',
808
- error: _context15.t0.message
832
+ error: _context16.t0.message
809
833
  });
810
834
  case 22:
811
835
  case "end":
812
- return _context15.stop();
836
+ return _context16.stop();
813
837
  }
814
- }, _callee15, this, [[3, 18]]);
838
+ }, _callee16, this, [[3, 18]]);
815
839
  }));
816
840
  function runTask() {
817
841
  return _runTask.apply(this, arguments);
@@ -832,26 +856,26 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
832
856
  }, {
833
857
  key: "pollTaskProgress",
834
858
  value: (function () {
835
- var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(jobId, callbacks) {
859
+ var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(jobId, callbacks) {
836
860
  var _this2 = this;
837
861
  var onProgress, onError, onFinish, checkProgress;
838
- return _regeneratorRuntime().wrap(function _callee17$(_context17) {
839
- while (1) switch (_context17.prev = _context17.next) {
862
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
863
+ while (1) switch (_context18.prev = _context18.next) {
840
864
  case 0:
841
865
  onProgress = callbacks.onProgress, onError = callbacks.onError, onFinish = callbacks.onFinish;
842
- _context17.prev = 1;
866
+ _context18.prev = 1;
843
867
  checkProgress = /*#__PURE__*/function () {
844
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
868
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
845
869
  var response;
846
- return _regeneratorRuntime().wrap(function _callee16$(_context16) {
847
- while (1) switch (_context16.prev = _context16.next) {
870
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
871
+ while (1) switch (_context17.prev = _context17.next) {
848
872
  case 0:
849
- _context16.next = 2;
873
+ _context17.next = 2;
850
874
  return _this2.get("/task_service/pollChainProgress", {
851
875
  jobId: jobId
852
876
  });
853
877
  case 2:
854
- response = _context16.sent;
878
+ response = _context17.sent;
855
879
  // If the task is still in progress, start polling for updates
856
880
  if (response.status === 'DONE' && onFinish) {
857
881
  // Provide the current progress to the callback function
@@ -874,26 +898,26 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
874
898
  }
875
899
  case 7:
876
900
  case "end":
877
- return _context16.stop();
901
+ return _context17.stop();
878
902
  }
879
- }, _callee16);
903
+ }, _callee17);
880
904
  }));
881
905
  return function checkProgress() {
882
906
  return _ref2.apply(this, arguments);
883
907
  };
884
908
  }();
885
909
  checkProgress();
886
- _context17.next = 9;
910
+ _context18.next = 9;
887
911
  break;
888
912
  case 6:
889
- _context17.prev = 6;
890
- _context17.t0 = _context17["catch"](1);
891
- return _context17.abrupt("return", this._handleError(_context17.t0));
913
+ _context18.prev = 6;
914
+ _context18.t0 = _context18["catch"](1);
915
+ return _context18.abrupt("return", this._handleError(_context18.t0));
892
916
  case 9:
893
917
  case "end":
894
- return _context17.stop();
918
+ return _context18.stop();
895
919
  }
896
- }, _callee17, this, [[1, 6]]);
920
+ }, _callee18, this, [[1, 6]]);
897
921
  }));
898
922
  function pollTaskProgress(_x12, _x13) {
899
923
  return _pollTaskProgress.apply(this, arguments);
@@ -915,44 +939,44 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
915
939
  }, {
916
940
  key: "get",
917
941
  value: (function () {
918
- var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(endpoint) {
942
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(endpoint) {
919
943
  var params,
920
944
  headers,
921
945
  response,
922
- _args18 = arguments;
923
- return _regeneratorRuntime().wrap(function _callee18$(_context18) {
924
- while (1) switch (_context18.prev = _context18.next) {
946
+ _args19 = arguments;
947
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
948
+ while (1) switch (_context19.prev = _context19.next) {
925
949
  case 0:
926
- params = _args18.length > 1 && _args18[1] !== undefined ? _args18[1] : {};
950
+ params = _args19.length > 1 && _args19[1] !== undefined ? _args19[1] : {};
927
951
  debugger;
928
- _context18.prev = 2;
952
+ _context19.prev = 2;
929
953
  // Add the authToken to the headers
930
954
  headers = {
931
955
  authtoken: this.authtoken
932
956
  }; // Make the GET request using Axios
933
- _context18.next = 6;
957
+ _context19.next = 6;
934
958
  return this.axios.get(endpoint, {
935
959
  params: params,
936
960
  headers: headers
937
961
  });
938
962
  case 6:
939
- response = _context18.sent;
963
+ response = _context19.sent;
940
964
  if (!(response.data.ok === false)) {
941
- _context18.next = 9;
965
+ _context19.next = 9;
942
966
  break;
943
967
  }
944
- return _context18.abrupt("return", this._handleError(response));
968
+ return _context19.abrupt("return", this._handleError(response));
945
969
  case 9:
946
- return _context18.abrupt("return", response.data);
970
+ return _context19.abrupt("return", response.data);
947
971
  case 12:
948
- _context18.prev = 12;
949
- _context18.t0 = _context18["catch"](2);
950
- return _context18.abrupt("return", this._handleError(_context18.t0));
972
+ _context19.prev = 12;
973
+ _context19.t0 = _context19["catch"](2);
974
+ return _context19.abrupt("return", this._handleError(_context19.t0));
951
975
  case 15:
952
976
  case "end":
953
- return _context18.stop();
977
+ return _context19.stop();
954
978
  }
955
- }, _callee18, this, [[2, 12]]);
979
+ }, _callee19, this, [[2, 12]]);
956
980
  }));
957
981
  function get(_x14) {
958
982
  return _get.apply(this, arguments);
@@ -975,42 +999,42 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
975
999
  }, {
976
1000
  key: "post",
977
1001
  value: (function () {
978
- var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(endpoint) {
1002
+ var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(endpoint) {
979
1003
  var data,
980
1004
  headers,
981
1005
  response,
982
- _args19 = arguments;
983
- return _regeneratorRuntime().wrap(function _callee19$(_context19) {
984
- while (1) switch (_context19.prev = _context19.next) {
1006
+ _args20 = arguments;
1007
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
1008
+ while (1) switch (_context20.prev = _context20.next) {
985
1009
  case 0:
986
- data = _args19.length > 1 && _args19[1] !== undefined ? _args19[1] : {};
987
- _context19.prev = 1;
1010
+ data = _args20.length > 1 && _args20[1] !== undefined ? _args20[1] : {};
1011
+ _context20.prev = 1;
988
1012
  // Add the authToken to the headers
989
1013
  headers = {
990
1014
  authtoken: this.authtoken
991
1015
  }; // Make the POST request using Axios
992
- _context19.next = 5;
1016
+ _context20.next = 5;
993
1017
  return this.axios.post(endpoint, data, {
994
1018
  headers: headers
995
1019
  });
996
1020
  case 5:
997
- response = _context19.sent;
1021
+ response = _context20.sent;
998
1022
  if (!(response.data.ok === false)) {
999
- _context19.next = 8;
1023
+ _context20.next = 8;
1000
1024
  break;
1001
1025
  }
1002
- return _context19.abrupt("return", this._handleError(response));
1026
+ return _context20.abrupt("return", this._handleError(response));
1003
1027
  case 8:
1004
- return _context19.abrupt("return", response.data);
1028
+ return _context20.abrupt("return", response.data);
1005
1029
  case 11:
1006
- _context19.prev = 11;
1007
- _context19.t0 = _context19["catch"](1);
1008
- return _context19.abrupt("return", this._handleError(_context19.t0));
1030
+ _context20.prev = 11;
1031
+ _context20.t0 = _context20["catch"](1);
1032
+ return _context20.abrupt("return", this._handleError(_context20.t0));
1009
1033
  case 14:
1010
1034
  case "end":
1011
- return _context19.stop();
1035
+ return _context20.stop();
1012
1036
  }
1013
- }, _callee19, this, [[1, 11]]);
1037
+ }, _callee20, this, [[1, 11]]);
1014
1038
  }));
1015
1039
  function post(_x15) {
1016
1040
  return _post.apply(this, arguments);
package/dist/esm/index.js CHANGED
@@ -86,6 +86,9 @@ export default class Roboto {
86
86
  async loadCurrentUser() {
87
87
  return this.api.loadCurrentUser();
88
88
  }
89
+ async loadCurrentUserExtended() {
90
+ return this.api.loadCurrentUserExtended();
91
+ }
89
92
  async getCurrentUser() {
90
93
  return this.api.getCurrentUser();
91
94
  }
@@ -162,6 +162,10 @@ export default class RbtApi {
162
162
  return this._handleError(e);
163
163
  }
164
164
  }
165
+ async loadCurrentUserExtended() {
166
+ let currentUser = await this.loadCurrentUser();
167
+ return this.loadUser(currentUser.id);
168
+ }
165
169
  async loadUser(userId) {
166
170
  let params = {
167
171
  id: userId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roboto-js",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/cjs/index.cjs",
package/src/index.js CHANGED
@@ -51,6 +51,7 @@ export default class Roboto{
51
51
  }
52
52
 
53
53
  Roboto.instance = this;
54
+
54
55
  }
55
56
 
56
57
  setAppServiceHost(host){
@@ -103,6 +104,9 @@ export default class Roboto{
103
104
  async loadCurrentUser(){
104
105
  return this.api.loadCurrentUser();
105
106
  }
107
+ async loadCurrentUserExtended(){
108
+ return this.api.loadCurrentUserExtended();
109
+ }
106
110
  async getCurrentUser(){
107
111
  return this.api.getCurrentUser();
108
112
  }
package/src/rbt_api.js CHANGED
@@ -199,6 +199,13 @@ export default class RbtApi {
199
199
 
200
200
  }
201
201
 
202
+ async loadCurrentUserExtended(){
203
+
204
+ let currentUser = await this.loadCurrentUser();
205
+ return this.loadUser(currentUser.id);
206
+
207
+ }
208
+
202
209
 
203
210
  async loadUser(userId){
204
211