roboto-js 1.1.1 → 1.1.2

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.
@@ -101,57 +101,76 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
101
101
  return login;
102
102
  }()
103
103
  }, {
104
- key: "refreshAuthToken",
104
+ key: "logout",
105
105
  value: function () {
106
- var _refreshAuthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
106
+ var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
107
107
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
108
108
  while (1) switch (_context2.prev = _context2.next) {
109
109
  case 0:
110
- return _context2.abrupt("return", this.api.refreshAuthToken(this.config.authtoken));
110
+ return _context2.abrupt("return", this.api.logout());
111
111
  case 1:
112
112
  case "end":
113
113
  return _context2.stop();
114
114
  }
115
115
  }, _callee2, this);
116
116
  }));
117
- function refreshAuthToken() {
118
- return _refreshAuthToken.apply(this, arguments);
117
+ function logout() {
118
+ return _logout.apply(this, arguments);
119
119
  }
120
- return refreshAuthToken;
120
+ return logout;
121
121
  }()
122
122
  }, {
123
- key: "registerUser",
123
+ key: "refreshAuthToken",
124
124
  value: function () {
125
- var _registerUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
125
+ var _refreshAuthToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
126
126
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
127
127
  while (1) switch (_context3.prev = _context3.next) {
128
128
  case 0:
129
- return _context3.abrupt("return", this.api.registerUser(params));
129
+ return _context3.abrupt("return", this.api.refreshAuthToken(this.config.authtoken));
130
130
  case 1:
131
131
  case "end":
132
132
  return _context3.stop();
133
133
  }
134
134
  }, _callee3, this);
135
135
  }));
136
- function registerUser(_x2) {
137
- return _registerUser.apply(this, arguments);
136
+ function refreshAuthToken() {
137
+ return _refreshAuthToken.apply(this, arguments);
138
138
  }
139
- return registerUser;
139
+ return refreshAuthToken;
140
140
  }()
141
141
  }, {
142
- key: "loadCurrentUser",
142
+ key: "registerUser",
143
143
  value: function () {
144
- var _loadCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
144
+ var _registerUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
145
145
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
146
146
  while (1) switch (_context4.prev = _context4.next) {
147
147
  case 0:
148
- return _context4.abrupt("return", this.api.loadCurrentUser());
148
+ return _context4.abrupt("return", this.api.registerUser(params));
149
149
  case 1:
150
150
  case "end":
151
151
  return _context4.stop();
152
152
  }
153
153
  }, _callee4, this);
154
154
  }));
155
+ function registerUser(_x2) {
156
+ return _registerUser.apply(this, arguments);
157
+ }
158
+ return registerUser;
159
+ }()
160
+ }, {
161
+ key: "loadCurrentUser",
162
+ value: function () {
163
+ var _loadCurrentUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
164
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
165
+ while (1) switch (_context5.prev = _context5.next) {
166
+ case 0:
167
+ return _context5.abrupt("return", this.api.loadCurrentUser());
168
+ case 1:
169
+ case "end":
170
+ return _context5.stop();
171
+ }
172
+ }, _callee5, this);
173
+ }));
155
174
  function loadCurrentUser() {
156
175
  return _loadCurrentUser.apply(this, arguments);
157
176
  }
@@ -162,19 +181,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
162
181
  }, {
163
182
  key: "createFile",
164
183
  value: function () {
165
- var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
184
+ var _createFile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
166
185
  var data,
167
- _args5 = arguments;
168
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
169
- while (1) switch (_context5.prev = _context5.next) {
186
+ _args6 = arguments;
187
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
188
+ while (1) switch (_context6.prev = _context6.next) {
170
189
  case 0:
171
- data = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
172
- return _context5.abrupt("return", this.api.createFile(data));
190
+ data = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
191
+ return _context6.abrupt("return", this.api.createFile(data));
173
192
  case 2:
174
193
  case "end":
175
- return _context5.stop();
194
+ return _context6.stop();
176
195
  }
177
- }, _callee5, this);
196
+ }, _callee6, this);
178
197
  }));
179
198
  function createFile() {
180
199
  return _createFile.apply(this, arguments);
@@ -186,19 +205,19 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
186
205
  }, {
187
206
  key: "create",
188
207
  value: function () {
189
- var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
208
+ var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
190
209
  var data,
191
- _args6 = arguments;
192
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
193
- while (1) switch (_context6.prev = _context6.next) {
210
+ _args7 = arguments;
211
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
212
+ while (1) switch (_context7.prev = _context7.next) {
194
213
  case 0:
195
- data = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
196
- return _context6.abrupt("return", this.api.create(params, data));
214
+ data = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
215
+ return _context7.abrupt("return", this.api.create(params, data));
197
216
  case 2:
198
217
  case "end":
199
- return _context6.stop();
218
+ return _context7.stop();
200
219
  }
201
- }, _callee6, this);
220
+ }, _callee7, this);
202
221
  }));
203
222
  function create(_x3) {
204
223
  return _create.apply(this, arguments);
@@ -208,16 +227,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
208
227
  }, {
209
228
  key: "load",
210
229
  value: function () {
211
- var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(type, ids, options) {
212
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
213
- while (1) switch (_context7.prev = _context7.next) {
230
+ var _load = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(type, ids, options) {
231
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
232
+ while (1) switch (_context8.prev = _context8.next) {
214
233
  case 0:
215
- return _context7.abrupt("return", this.api.load(type, ids, options));
234
+ return _context8.abrupt("return", this.api.load(type, ids, options));
216
235
  case 1:
217
236
  case "end":
218
- return _context7.stop();
237
+ return _context8.stop();
219
238
  }
220
- }, _callee7, this);
239
+ }, _callee8, this);
221
240
  }));
222
241
  function load(_x4, _x5, _x6) {
223
242
  return _load.apply(this, arguments);
@@ -227,16 +246,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
227
246
  }, {
228
247
  key: "query",
229
248
  value: function () {
230
- var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(type, params) {
231
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
232
- while (1) switch (_context8.prev = _context8.next) {
249
+ var _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(type, params) {
250
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
251
+ while (1) switch (_context9.prev = _context9.next) {
233
252
  case 0:
234
- return _context8.abrupt("return", this.api.query(type, params));
253
+ return _context9.abrupt("return", this.api.query(type, params));
235
254
  case 1:
236
255
  case "end":
237
- return _context8.stop();
256
+ return _context9.stop();
238
257
  }
239
- }, _callee8, this);
258
+ }, _callee9, this);
240
259
  }));
241
260
  function query(_x7, _x8) {
242
261
  return _query.apply(this, arguments);
@@ -248,16 +267,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
248
267
  }, {
249
268
  key: "runTask",
250
269
  value: function () {
251
- var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params, callbacks) {
252
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
253
- while (1) switch (_context9.prev = _context9.next) {
270
+ var _runTask = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params, callbacks) {
271
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
272
+ while (1) switch (_context10.prev = _context10.next) {
254
273
  case 0:
255
- return _context9.abrupt("return", this.api.runTask(params, callbacks));
274
+ return _context10.abrupt("return", this.api.runTask(params, callbacks));
256
275
  case 1:
257
276
  case "end":
258
- return _context9.stop();
277
+ return _context10.stop();
259
278
  }
260
- }, _callee9, this);
279
+ }, _callee10, this);
261
280
  }));
262
281
  function runTask(_x9, _x10) {
263
282
  return _runTask.apply(this, arguments);
@@ -267,16 +286,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
267
286
  }, {
268
287
  key: "pollTaskProgress",
269
288
  value: function () {
270
- var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
271
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
272
- while (1) switch (_context10.prev = _context10.next) {
289
+ var _pollTaskProgress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
290
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
291
+ while (1) switch (_context11.prev = _context11.next) {
273
292
  case 0:
274
- return _context10.abrupt("return", this.api.pollTaskProgress(params));
293
+ return _context11.abrupt("return", this.api.pollTaskProgress(params));
275
294
  case 1:
276
295
  case "end":
277
- return _context10.stop();
296
+ return _context11.stop();
278
297
  }
279
- }, _callee10, this);
298
+ }, _callee11, this);
280
299
  }));
281
300
  function pollTaskProgress(_x11) {
282
301
  return _pollTaskProgress.apply(this, arguments);
@@ -288,16 +307,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
288
307
  }, {
289
308
  key: "get",
290
309
  value: function () {
291
- var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(endpoint, params) {
292
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
293
- while (1) switch (_context11.prev = _context11.next) {
310
+ var _get = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(endpoint, params) {
311
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
312
+ while (1) switch (_context12.prev = _context12.next) {
294
313
  case 0:
295
- return _context11.abrupt("return", this.api.get(endpoint, params));
314
+ return _context12.abrupt("return", this.api.get(endpoint, params));
296
315
  case 1:
297
316
  case "end":
298
- return _context11.stop();
317
+ return _context12.stop();
299
318
  }
300
- }, _callee11, this);
319
+ }, _callee12, this);
301
320
  }));
302
321
  function get(_x12, _x13) {
303
322
  return _get.apply(this, arguments);
@@ -307,16 +326,16 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
307
326
  }, {
308
327
  key: "post",
309
328
  value: function () {
310
- var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(endpoint, data) {
311
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
312
- while (1) switch (_context12.prev = _context12.next) {
329
+ var _post = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(endpoint, data) {
330
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
331
+ while (1) switch (_context13.prev = _context13.next) {
313
332
  case 0:
314
- return _context12.abrupt("return", this.api.post(endpoint, data));
333
+ return _context13.abrupt("return", this.api.post(endpoint, data));
315
334
  case 1:
316
335
  case "end":
317
- return _context12.stop();
336
+ return _context13.stop();
318
337
  }
319
- }, _callee12, this);
338
+ }, _callee13, this);
320
339
  }));
321
340
  function post(_x14, _x15) {
322
341
  return _post.apply(this, arguments);