roboto-js 1.4.6 → 1.4.8

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.
@@ -127,153 +127,172 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
127
127
  return login;
128
128
  }()
129
129
  }, {
130
- key: "logout",
130
+ key: "loginWithOauth",
131
131
  value: function () {
132
- var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
132
+ var _loginWithOauth = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
133
133
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
134
134
  while (1) switch (_context2.prev = _context2.next) {
135
135
  case 0:
136
- return _context2.abrupt("return", this.api.logout());
136
+ return _context2.abrupt("return", this.api.loginWithOauth(params));
137
137
  case 1:
138
138
  case "end":
139
139
  return _context2.stop();
140
140
  }
141
141
  }, _callee2, this);
142
142
  }));
143
- function logout() {
144
- return _logout.apply(this, arguments);
143
+ function loginWithOauth(_x2) {
144
+ return _loginWithOauth.apply(this, arguments);
145
145
  }
146
- return logout;
146
+ return loginWithOauth;
147
147
  }()
148
148
  }, {
149
- key: "refreshAuthToken",
149
+ key: "logout",
150
150
  value: function () {
151
- var _refreshAuthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
151
+ var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
152
152
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
153
153
  while (1) switch (_context3.prev = _context3.next) {
154
154
  case 0:
155
- return _context3.abrupt("return", this.api.refreshAuthToken(this.config.authtoken));
155
+ return _context3.abrupt("return", this.api.logout());
156
156
  case 1:
157
157
  case "end":
158
158
  return _context3.stop();
159
159
  }
160
160
  }, _callee3, this);
161
161
  }));
162
- function refreshAuthToken() {
163
- return _refreshAuthToken.apply(this, arguments);
162
+ function logout() {
163
+ return _logout.apply(this, arguments);
164
164
  }
165
- return refreshAuthToken;
165
+ return logout;
166
166
  }()
167
167
  }, {
168
- key: "registerUser",
168
+ key: "refreshAuthToken",
169
169
  value: function () {
170
- var _registerUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
170
+ var _refreshAuthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
171
171
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
172
172
  while (1) switch (_context4.prev = _context4.next) {
173
173
  case 0:
174
- return _context4.abrupt("return", this.api.registerUser(params));
174
+ return _context4.abrupt("return", this.api.refreshAuthToken(this.config.authtoken));
175
175
  case 1:
176
176
  case "end":
177
177
  return _context4.stop();
178
178
  }
179
179
  }, _callee4, this);
180
180
  }));
181
- function registerUser(_x2) {
182
- return _registerUser.apply(this, arguments);
181
+ function refreshAuthToken() {
182
+ return _refreshAuthToken.apply(this, arguments);
183
183
  }
184
- return registerUser;
184
+ return refreshAuthToken;
185
185
  }()
186
186
  }, {
187
- key: "loadUser",
187
+ key: "registerUser",
188
188
  value: function () {
189
- var _loadUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
189
+ var _registerUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
190
190
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
191
191
  while (1) switch (_context5.prev = _context5.next) {
192
192
  case 0:
193
- return _context5.abrupt("return", this.api.loadUser(params));
193
+ return _context5.abrupt("return", this.api.registerUser(params));
194
194
  case 1:
195
195
  case "end":
196
196
  return _context5.stop();
197
197
  }
198
198
  }, _callee5, this);
199
199
  }));
200
- function loadUser(_x3) {
201
- return _loadUser.apply(this, arguments);
200
+ function registerUser(_x3) {
201
+ return _registerUser.apply(this, arguments);
202
202
  }
203
- return loadUser;
203
+ return registerUser;
204
204
  }()
205
205
  }, {
206
- key: "loadCurrentUser",
206
+ key: "loadUser",
207
207
  value: function () {
208
- var _loadCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
208
+ var _loadUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
209
209
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
210
210
  while (1) switch (_context6.prev = _context6.next) {
211
211
  case 0:
212
- return _context6.abrupt("return", this.api.loadCurrentUser());
212
+ return _context6.abrupt("return", this.api.loadUser(params));
213
213
  case 1:
214
214
  case "end":
215
215
  return _context6.stop();
216
216
  }
217
217
  }, _callee6, this);
218
218
  }));
219
- function loadCurrentUser() {
220
- return _loadCurrentUser.apply(this, arguments);
219
+ function loadUser(_x4) {
220
+ return _loadUser.apply(this, arguments);
221
221
  }
222
- return loadCurrentUser;
222
+ return loadUser;
223
223
  }()
224
224
  }, {
225
- key: "loadCurrentUserExtended",
225
+ key: "loadCurrentUser",
226
226
  value: function () {
227
- var _loadCurrentUserExtended = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
227
+ var _loadCurrentUser = _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.loadCurrentUserExtended());
231
+ return _context7.abrupt("return", this.api.loadCurrentUser());
232
232
  case 1:
233
233
  case "end":
234
234
  return _context7.stop();
235
235
  }
236
236
  }, _callee7, this);
237
237
  }));
238
- function loadCurrentUserExtended() {
239
- return _loadCurrentUserExtended.apply(this, arguments);
238
+ function loadCurrentUser() {
239
+ return _loadCurrentUser.apply(this, arguments);
240
240
  }
241
- return loadCurrentUserExtended;
241
+ return loadCurrentUser;
242
242
  }()
243
243
  }, {
244
- key: "getCurrentUser",
244
+ key: "loadCurrentUserExtended",
245
245
  value: function () {
246
- var _getCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
246
+ var _loadCurrentUserExtended = _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.getCurrentUser());
250
+ return _context8.abrupt("return", this.api.loadCurrentUserExtended());
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);
257
+ function loadCurrentUserExtended() {
258
+ return _loadCurrentUserExtended.apply(this, arguments);
259
259
  }
260
- return getCurrentUser;
260
+ return loadCurrentUserExtended;
261
261
  }()
262
262
  }, {
263
- key: "confirmUserEmail",
263
+ key: "getCurrentUser",
264
264
  value: function () {
265
- var _confirmUserEmail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
265
+ var _getCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
266
266
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
267
267
  while (1) switch (_context9.prev = _context9.next) {
268
268
  case 0:
269
- return _context9.abrupt("return", this.api.confirmUserEmail(params));
269
+ return _context9.abrupt("return", this.api.getCurrentUser());
270
270
  case 1:
271
271
  case "end":
272
272
  return _context9.stop();
273
273
  }
274
274
  }, _callee9, this);
275
275
  }));
276
- function confirmUserEmail(_x4) {
276
+ function getCurrentUser() {
277
+ return _getCurrentUser.apply(this, arguments);
278
+ }
279
+ return getCurrentUser;
280
+ }()
281
+ }, {
282
+ key: "confirmUserEmail",
283
+ value: function () {
284
+ var _confirmUserEmail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
285
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
286
+ while (1) switch (_context10.prev = _context10.next) {
287
+ case 0:
288
+ return _context10.abrupt("return", this.api.confirmUserEmail(params));
289
+ case 1:
290
+ case "end":
291
+ return _context10.stop();
292
+ }
293
+ }, _callee10, this);
294
+ }));
295
+ function confirmUserEmail(_x5) {
277
296
  return _confirmUserEmail.apply(this, arguments);
278
297
  }
279
298
  return confirmUserEmail;
@@ -283,19 +302,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
283
302
  }, {
284
303
  key: "createFile",
285
304
  value: function () {
286
- var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
305
+ var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
287
306
  var data,
288
- _args10 = arguments;
289
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
290
- while (1) switch (_context10.prev = _context10.next) {
307
+ _args11 = arguments;
308
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
309
+ while (1) switch (_context11.prev = _context11.next) {
291
310
  case 0:
292
- data = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
293
- return _context10.abrupt("return", this.api.createFile(data));
311
+ data = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
312
+ return _context11.abrupt("return", this.api.createFile(data));
294
313
  case 2:
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 createFile() {
301
320
  return _createFile.apply(this, arguments);
@@ -305,18 +324,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
305
324
  }, {
306
325
  key: "loadFile",
307
326
  value: function () {
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) {
327
+ var _loadFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(id) {
328
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
329
+ while (1) switch (_context12.prev = _context12.next) {
311
330
  case 0:
312
- return _context11.abrupt("return", this.api.loadFile(id));
331
+ return _context12.abrupt("return", this.api.loadFile(id));
313
332
  case 1:
314
333
  case "end":
315
- return _context11.stop();
334
+ return _context12.stop();
316
335
  }
317
- }, _callee11, this);
336
+ }, _callee12, this);
318
337
  }));
319
- function loadFile(_x5) {
338
+ function loadFile(_x6) {
320
339
  return _loadFile.apply(this, arguments);
321
340
  }
322
341
  return loadFile;
@@ -326,21 +345,21 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
326
345
  }, {
327
346
  key: "create",
328
347
  value: function () {
329
- var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
348
+ var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
330
349
  var data,
331
- _args12 = arguments;
332
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
333
- while (1) switch (_context12.prev = _context12.next) {
350
+ _args13 = arguments;
351
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
352
+ while (1) switch (_context13.prev = _context13.next) {
334
353
  case 0:
335
- data = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};
336
- return _context12.abrupt("return", this.api.create(params, data));
354
+ data = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : {};
355
+ return _context13.abrupt("return", this.api.create(params, data));
337
356
  case 2:
338
357
  case "end":
339
- return _context12.stop();
358
+ return _context13.stop();
340
359
  }
341
- }, _callee12, this);
360
+ }, _callee13, this);
342
361
  }));
343
- function create(_x6) {
362
+ function create(_x7) {
344
363
  return _create.apply(this, arguments);
345
364
  }
346
365
  return create;
@@ -348,18 +367,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
348
367
  }, {
349
368
  key: "load",
350
369
  value: function () {
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) {
370
+ var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(type, ids, options) {
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.load(type, ids, options));
374
+ return _context14.abrupt("return", this.api.load(type, ids, options));
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
- function load(_x7, _x8, _x9) {
381
+ function load(_x8, _x9, _x10) {
363
382
  return _load.apply(this, arguments);
364
383
  }
365
384
  return load;
@@ -367,18 +386,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
367
386
  }, {
368
387
  key: "query",
369
388
  value: function () {
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) {
389
+ var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(type, params) {
390
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
391
+ while (1) switch (_context15.prev = _context15.next) {
373
392
  case 0:
374
- return _context14.abrupt("return", this.api.query(type, params));
393
+ return _context15.abrupt("return", this.api.query(type, params));
375
394
  case 1:
376
395
  case "end":
377
- return _context14.stop();
396
+ return _context15.stop();
378
397
  }
379
- }, _callee14, this);
398
+ }, _callee15, this);
380
399
  }));
381
- function query(_x10, _x11) {
400
+ function query(_x11, _x12) {
382
401
  return _query.apply(this, arguments);
383
402
  }
384
403
  return query;
@@ -388,18 +407,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
388
407
  }, {
389
408
  key: "runTask",
390
409
  value: function () {
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) {
410
+ var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params, callbacks) {
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.runTask(params, callbacks));
414
+ return _context16.abrupt("return", this.api.runTask(params, callbacks));
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
- function runTask(_x12, _x13) {
421
+ function runTask(_x13, _x14) {
403
422
  return _runTask.apply(this, arguments);
404
423
  }
405
424
  return runTask;
@@ -407,18 +426,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
407
426
  }, {
408
427
  key: "pollTaskProgress",
409
428
  value: function () {
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) {
429
+ var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
430
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
431
+ while (1) switch (_context17.prev = _context17.next) {
413
432
  case 0:
414
- return _context16.abrupt("return", this.api.pollTaskProgress(params));
433
+ return _context17.abrupt("return", this.api.pollTaskProgress(params));
415
434
  case 1:
416
435
  case "end":
417
- return _context16.stop();
436
+ return _context17.stop();
418
437
  }
419
- }, _callee16, this);
438
+ }, _callee17, this);
420
439
  }));
421
- function pollTaskProgress(_x14) {
440
+ function pollTaskProgress(_x15) {
422
441
  return _pollTaskProgress.apply(this, arguments);
423
442
  }
424
443
  return pollTaskProgress;
@@ -428,18 +447,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
428
447
  }, {
429
448
  key: "get",
430
449
  value: function () {
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) {
450
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(endpoint, params) {
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.get(endpoint, params));
454
+ return _context18.abrupt("return", this.api.get(endpoint, params));
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
- function get(_x15, _x16) {
461
+ function get(_x16, _x17) {
443
462
  return _get.apply(this, arguments);
444
463
  }
445
464
  return get;
@@ -447,18 +466,18 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
447
466
  }, {
448
467
  key: "post",
449
468
  value: function () {
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) {
469
+ var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(endpoint, data) {
470
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
471
+ while (1) switch (_context19.prev = _context19.next) {
453
472
  case 0:
454
- return _context18.abrupt("return", this.api.post(endpoint, data));
473
+ return _context19.abrupt("return", this.api.post(endpoint, data));
455
474
  case 1:
456
475
  case "end":
457
- return _context18.stop();
476
+ return _context19.stop();
458
477
  }
459
- }, _callee18, this);
478
+ }, _callee19, this);
460
479
  }));
461
- function post(_x17, _x18) {
480
+ function post(_x18, _x19) {
462
481
  return _post.apply(this, arguments);
463
482
  }
464
483
  return post;