roboto-js 1.3.9 → 1.3.10
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/cjs/index.cjs +74 -55
- package/dist/cjs/rbt_api.cjs +7 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/rbt_api.js +5 -0
- package/package.json +1 -1
- package/src/index.js +3 -0
- package/src/rbt_api.js +8 -0
package/dist/cjs/index.cjs
CHANGED
|
@@ -217,19 +217,38 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
217
217
|
return loadCurrentUser;
|
|
218
218
|
}()
|
|
219
219
|
}, {
|
|
220
|
-
key: "
|
|
220
|
+
key: "getCurrentUser",
|
|
221
221
|
value: function () {
|
|
222
|
-
var
|
|
222
|
+
var _getCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
223
223
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
224
224
|
while (1) switch (_context7.prev = _context7.next) {
|
|
225
225
|
case 0:
|
|
226
|
-
return _context7.abrupt("return", this.api.
|
|
226
|
+
return _context7.abrupt("return", this.api.getCurrentUser());
|
|
227
227
|
case 1:
|
|
228
228
|
case "end":
|
|
229
229
|
return _context7.stop();
|
|
230
230
|
}
|
|
231
231
|
}, _callee7, this);
|
|
232
232
|
}));
|
|
233
|
+
function getCurrentUser() {
|
|
234
|
+
return _getCurrentUser.apply(this, arguments);
|
|
235
|
+
}
|
|
236
|
+
return getCurrentUser;
|
|
237
|
+
}()
|
|
238
|
+
}, {
|
|
239
|
+
key: "confirmUserEmail",
|
|
240
|
+
value: function () {
|
|
241
|
+
var _confirmUserEmail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
|
|
242
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
243
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
244
|
+
case 0:
|
|
245
|
+
return _context8.abrupt("return", this.api.confirmUserEmail(params));
|
|
246
|
+
case 1:
|
|
247
|
+
case "end":
|
|
248
|
+
return _context8.stop();
|
|
249
|
+
}
|
|
250
|
+
}, _callee8, this);
|
|
251
|
+
}));
|
|
233
252
|
function confirmUserEmail(_x4) {
|
|
234
253
|
return _confirmUserEmail.apply(this, arguments);
|
|
235
254
|
}
|
|
@@ -240,19 +259,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
240
259
|
}, {
|
|
241
260
|
key: "createFile",
|
|
242
261
|
value: function () {
|
|
243
|
-
var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
262
|
+
var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
244
263
|
var data,
|
|
245
|
-
|
|
246
|
-
return _regeneratorRuntime().wrap(function
|
|
247
|
-
while (1) switch (
|
|
264
|
+
_args9 = arguments;
|
|
265
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
266
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
248
267
|
case 0:
|
|
249
|
-
data =
|
|
250
|
-
return
|
|
268
|
+
data = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
269
|
+
return _context9.abrupt("return", this.api.createFile(data));
|
|
251
270
|
case 2:
|
|
252
271
|
case "end":
|
|
253
|
-
return
|
|
272
|
+
return _context9.stop();
|
|
254
273
|
}
|
|
255
|
-
},
|
|
274
|
+
}, _callee9, this);
|
|
256
275
|
}));
|
|
257
276
|
function createFile() {
|
|
258
277
|
return _createFile.apply(this, arguments);
|
|
@@ -264,19 +283,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
264
283
|
}, {
|
|
265
284
|
key: "create",
|
|
266
285
|
value: function () {
|
|
267
|
-
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
286
|
+
var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
|
|
268
287
|
var data,
|
|
269
|
-
|
|
270
|
-
return _regeneratorRuntime().wrap(function
|
|
271
|
-
while (1) switch (
|
|
288
|
+
_args10 = arguments;
|
|
289
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
290
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
272
291
|
case 0:
|
|
273
|
-
data =
|
|
274
|
-
return
|
|
292
|
+
data = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {};
|
|
293
|
+
return _context10.abrupt("return", this.api.create(params, data));
|
|
275
294
|
case 2:
|
|
276
295
|
case "end":
|
|
277
|
-
return
|
|
296
|
+
return _context10.stop();
|
|
278
297
|
}
|
|
279
|
-
},
|
|
298
|
+
}, _callee10, this);
|
|
280
299
|
}));
|
|
281
300
|
function create(_x5) {
|
|
282
301
|
return _create.apply(this, arguments);
|
|
@@ -286,16 +305,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
286
305
|
}, {
|
|
287
306
|
key: "load",
|
|
288
307
|
value: function () {
|
|
289
|
-
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
290
|
-
return _regeneratorRuntime().wrap(function
|
|
291
|
-
while (1) switch (
|
|
308
|
+
var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type, ids, options) {
|
|
309
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
310
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
292
311
|
case 0:
|
|
293
|
-
return
|
|
312
|
+
return _context11.abrupt("return", this.api.load(type, ids, options));
|
|
294
313
|
case 1:
|
|
295
314
|
case "end":
|
|
296
|
-
return
|
|
315
|
+
return _context11.stop();
|
|
297
316
|
}
|
|
298
|
-
},
|
|
317
|
+
}, _callee11, this);
|
|
299
318
|
}));
|
|
300
319
|
function load(_x6, _x7, _x8) {
|
|
301
320
|
return _load.apply(this, arguments);
|
|
@@ -305,16 +324,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
305
324
|
}, {
|
|
306
325
|
key: "query",
|
|
307
326
|
value: function () {
|
|
308
|
-
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
309
|
-
return _regeneratorRuntime().wrap(function
|
|
310
|
-
while (1) switch (
|
|
327
|
+
var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(type, params) {
|
|
328
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
329
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
311
330
|
case 0:
|
|
312
|
-
return
|
|
331
|
+
return _context12.abrupt("return", this.api.query(type, params));
|
|
313
332
|
case 1:
|
|
314
333
|
case "end":
|
|
315
|
-
return
|
|
334
|
+
return _context12.stop();
|
|
316
335
|
}
|
|
317
|
-
},
|
|
336
|
+
}, _callee12, this);
|
|
318
337
|
}));
|
|
319
338
|
function query(_x9, _x10) {
|
|
320
339
|
return _query.apply(this, arguments);
|
|
@@ -326,16 +345,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
326
345
|
}, {
|
|
327
346
|
key: "runTask",
|
|
328
347
|
value: function () {
|
|
329
|
-
var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
330
|
-
return _regeneratorRuntime().wrap(function
|
|
331
|
-
while (1) switch (
|
|
348
|
+
var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params, callbacks) {
|
|
349
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
350
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
332
351
|
case 0:
|
|
333
|
-
return
|
|
352
|
+
return _context13.abrupt("return", this.api.runTask(params, callbacks));
|
|
334
353
|
case 1:
|
|
335
354
|
case "end":
|
|
336
|
-
return
|
|
355
|
+
return _context13.stop();
|
|
337
356
|
}
|
|
338
|
-
},
|
|
357
|
+
}, _callee13, this);
|
|
339
358
|
}));
|
|
340
359
|
function runTask(_x11, _x12) {
|
|
341
360
|
return _runTask.apply(this, arguments);
|
|
@@ -345,16 +364,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
345
364
|
}, {
|
|
346
365
|
key: "pollTaskProgress",
|
|
347
366
|
value: function () {
|
|
348
|
-
var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
349
|
-
return _regeneratorRuntime().wrap(function
|
|
350
|
-
while (1) switch (
|
|
367
|
+
var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
|
|
368
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
369
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
351
370
|
case 0:
|
|
352
|
-
return
|
|
371
|
+
return _context14.abrupt("return", this.api.pollTaskProgress(params));
|
|
353
372
|
case 1:
|
|
354
373
|
case "end":
|
|
355
|
-
return
|
|
374
|
+
return _context14.stop();
|
|
356
375
|
}
|
|
357
|
-
},
|
|
376
|
+
}, _callee14, this);
|
|
358
377
|
}));
|
|
359
378
|
function pollTaskProgress(_x13) {
|
|
360
379
|
return _pollTaskProgress.apply(this, arguments);
|
|
@@ -366,16 +385,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
366
385
|
}, {
|
|
367
386
|
key: "get",
|
|
368
387
|
value: function () {
|
|
369
|
-
var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
370
|
-
return _regeneratorRuntime().wrap(function
|
|
371
|
-
while (1) switch (
|
|
388
|
+
var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(endpoint, params) {
|
|
389
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
390
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
372
391
|
case 0:
|
|
373
|
-
return
|
|
392
|
+
return _context15.abrupt("return", this.api.get(endpoint, params));
|
|
374
393
|
case 1:
|
|
375
394
|
case "end":
|
|
376
|
-
return
|
|
395
|
+
return _context15.stop();
|
|
377
396
|
}
|
|
378
|
-
},
|
|
397
|
+
}, _callee15, this);
|
|
379
398
|
}));
|
|
380
399
|
function get(_x14, _x15) {
|
|
381
400
|
return _get.apply(this, arguments);
|
|
@@ -385,16 +404,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
385
404
|
}, {
|
|
386
405
|
key: "post",
|
|
387
406
|
value: function () {
|
|
388
|
-
var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
389
|
-
return _regeneratorRuntime().wrap(function
|
|
390
|
-
while (1) switch (
|
|
407
|
+
var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(endpoint, data) {
|
|
408
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
409
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
391
410
|
case 0:
|
|
392
|
-
return
|
|
411
|
+
return _context16.abrupt("return", this.api.post(endpoint, data));
|
|
393
412
|
case 1:
|
|
394
413
|
case "end":
|
|
395
|
-
return
|
|
414
|
+
return _context16.stop();
|
|
396
415
|
}
|
|
397
|
-
},
|
|
416
|
+
}, _callee16, this);
|
|
398
417
|
}));
|
|
399
418
|
function post(_x16, _x17) {
|
|
400
419
|
return _post.apply(this, arguments);
|
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -240,6 +240,13 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
240
240
|
}
|
|
241
241
|
return logout;
|
|
242
242
|
}()
|
|
243
|
+
}, {
|
|
244
|
+
key: "getCurrentUser",
|
|
245
|
+
value: function getCurrentUser() {
|
|
246
|
+
if (this.currentUser) {
|
|
247
|
+
return this.currentUser;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
243
250
|
}, {
|
|
244
251
|
key: "loadCurrentUser",
|
|
245
252
|
value: function () {
|
package/dist/esm/index.js
CHANGED
package/dist/esm/rbt_api.js
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -97,6 +97,9 @@ export default class Roboto{
|
|
|
97
97
|
async loadCurrentUser(){
|
|
98
98
|
return this.api.loadCurrentUser();
|
|
99
99
|
}
|
|
100
|
+
async getCurrentUser(){
|
|
101
|
+
return this.api.getCurrentUser();
|
|
102
|
+
}
|
|
100
103
|
async confirmUserEmail(params){
|
|
101
104
|
return this.api.confirmUserEmail(params);
|
|
102
105
|
}
|