@pixwel/pixwel-sdk 2.1.37 → 2.1.39

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.
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var cov_2ok78nkmbc = function () {
4
- var path = "/home/ec2-user/platform/pixwel-sdk/src/IngestFile.js",
5
- hash = "4c09fe7cad4e2c75bb1c3bdf8dae61889fd7be55",
3
+ var cov_2lyn2z7ts1 = function () {
4
+ var path = "/Users/jeff/www/pixwel/platform2/pixwel-sdk/src/IngestFile.js",
5
+ hash = "3c76775b8bb4695f9d781a5947a65ae307a9b39a",
6
6
  Function = function () {}.constructor,
7
7
  global = new Function('return this')(),
8
8
  gcv = "__coverage__",
9
9
  coverageData = {
10
- path: "/home/ec2-user/platform/pixwel-sdk/src/IngestFile.js",
10
+ path: "/Users/jeff/www/pixwel/platform2/pixwel-sdk/src/IngestFile.js",
11
11
  statementMap: {
12
12
  "0": {
13
13
  start: {
@@ -78,8 +78,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
78
78
 
79
79
  var IngestFile = function IngestFile(file, order) {
80
80
  (0, _classCallCheck3.default)(this, IngestFile);
81
- cov_2ok78nkmbc.f[0]++;
82
- cov_2ok78nkmbc.s[0]++;
81
+ cov_2lyn2z7ts1.f[0]++;
82
+ cov_2lyn2z7ts1.s[0]++;
83
83
 
84
84
  this.file = file;
85
85
  }
package/dist/src/Model.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var cov_1q48vzeiba = function () {
4
- var path = "/home/ec2-user/platform/pixwel-sdk/src/Model.js",
5
- hash = "2c4f68ed8e3bc1f164fc5eaeec77afd73ee0fab8",
3
+ var cov_15fxtei2g7 = function () {
4
+ var path = "/Users/jeff/www/pixwel/platform2/pixwel-sdk/src/Model.js",
5
+ hash = "73adf537a33fb17f44379d47920829f13622818b",
6
6
  Function = function () {}.constructor,
7
7
  global = new Function('return this')(),
8
8
  gcv = "__coverage__",
9
9
  coverageData = {
10
- path: "/home/ec2-user/platform/pixwel-sdk/src/Model.js",
10
+ path: "/Users/jeff/www/pixwel/platform2/pixwel-sdk/src/Model.js",
11
11
  statementMap: {
12
12
  "0": {
13
13
  start: {
@@ -2174,7 +2174,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
2174
2174
  *
2175
2175
  */
2176
2176
 
2177
- var _bindings = (cov_1q48vzeiba.s[0]++, {
2177
+ var _bindings = (cov_15fxtei2g7.s[0]++, {
2178
2178
  find: [],
2179
2179
  save: []
2180
2180
  });
@@ -2185,8 +2185,8 @@ var _bindings = (cov_1q48vzeiba.s[0]++, {
2185
2185
  * and also from a static function.
2186
2186
  */
2187
2187
  function connection() {
2188
- cov_1q48vzeiba.f[0]++;
2189
- cov_1q48vzeiba.s[1]++;
2188
+ cov_15fxtei2g7.f[0]++;
2189
+ cov_15fxtei2g7.s[1]++;
2190
2190
 
2191
2191
  return _axios2.default.create({
2192
2192
  baseURL: _index.Pixwel.endpoint,
@@ -2201,19 +2201,19 @@ function connection() {
2201
2201
  var Model = function () {
2202
2202
  function Model(data) {
2203
2203
  (0, _classCallCheck3.default)(this, Model);
2204
- cov_1q48vzeiba.f[1]++;
2205
- cov_1q48vzeiba.s[2]++;
2204
+ cov_15fxtei2g7.f[1]++;
2205
+ cov_15fxtei2g7.s[2]++;
2206
2206
 
2207
2207
  (0, _assign2.default)(this, data);
2208
- cov_1q48vzeiba.s[3]++;
2208
+ cov_15fxtei2g7.s[3]++;
2209
2209
  this._endpoint = _index.Pixwel.endpoint;
2210
- cov_1q48vzeiba.s[4]++;
2210
+ cov_15fxtei2g7.s[4]++;
2211
2211
  this._api = connection();
2212
- cov_1q48vzeiba.s[5]++;
2212
+ cov_15fxtei2g7.s[5]++;
2213
2213
  this._lastState = {};
2214
- cov_1q48vzeiba.s[6]++;
2214
+ cov_15fxtei2g7.s[6]++;
2215
2215
  this._validationErrors = [];
2216
- cov_1q48vzeiba.s[7]++;
2216
+ cov_15fxtei2g7.s[7]++;
2217
2217
  this._constraints = {};
2218
2218
  }
2219
2219
  /**
@@ -2227,8 +2227,8 @@ var Model = function () {
2227
2227
  (0, _createClass3.default)(Model, [{
2228
2228
  key: "addConstraint",
2229
2229
  value: function addConstraint(name, data) {
2230
- cov_1q48vzeiba.f[2]++;
2231
- cov_1q48vzeiba.s[8]++;
2230
+ cov_15fxtei2g7.f[2]++;
2231
+ cov_15fxtei2g7.s[8]++;
2232
2232
 
2233
2233
  this._constraints[name] = data;
2234
2234
  }
@@ -2239,29 +2239,29 @@ var Model = function () {
2239
2239
  }, {
2240
2240
  key: "validates",
2241
2241
  value: function validates() {
2242
- cov_1q48vzeiba.f[3]++;
2242
+ cov_15fxtei2g7.f[3]++;
2243
2243
 
2244
- var res = (cov_1q48vzeiba.s[9]++, (0, _validate2.default)(this.data(), this._constraints));
2245
- cov_1q48vzeiba.s[10]++;
2244
+ var res = (cov_15fxtei2g7.s[9]++, (0, _validate2.default)(this.data(), this._constraints));
2245
+ cov_15fxtei2g7.s[10]++;
2246
2246
  if (res == undefined) {
2247
- cov_1q48vzeiba.b[0][0]++;
2248
- cov_1q48vzeiba.s[11]++;
2247
+ cov_15fxtei2g7.b[0][0]++;
2248
+ cov_15fxtei2g7.s[11]++;
2249
2249
 
2250
2250
  this._validationErrors = [];
2251
2251
  } else {
2252
- cov_1q48vzeiba.b[0][1]++;
2253
- cov_1q48vzeiba.s[12]++;
2252
+ cov_15fxtei2g7.b[0][1]++;
2253
+ cov_15fxtei2g7.s[12]++;
2254
2254
 
2255
2255
  this._validationErrors = res;
2256
2256
  }
2257
- cov_1q48vzeiba.s[13]++;
2258
- return res == undefined ? (cov_1q48vzeiba.b[1][0]++, true) : (cov_1q48vzeiba.b[1][1]++, false);
2257
+ cov_15fxtei2g7.s[13]++;
2258
+ return res == undefined ? (cov_15fxtei2g7.b[1][0]++, true) : (cov_15fxtei2g7.b[1][1]++, false);
2259
2259
  }
2260
2260
  }, {
2261
2261
  key: "errors",
2262
2262
  value: function errors() {
2263
- cov_1q48vzeiba.f[4]++;
2264
- cov_1q48vzeiba.s[14]++;
2263
+ cov_15fxtei2g7.f[4]++;
2264
+ cov_15fxtei2g7.s[14]++;
2265
2265
 
2266
2266
  return this._validationErrors;
2267
2267
  }
@@ -2279,8 +2279,8 @@ var Model = function () {
2279
2279
  while (1) {
2280
2280
  switch (_context.prev = _context.next) {
2281
2281
  case 0:
2282
- cov_1q48vzeiba.f[5]++;
2283
- cov_1q48vzeiba.s[15]++;
2282
+ cov_15fxtei2g7.f[5]++;
2283
+ cov_15fxtei2g7.s[15]++;
2284
2284
  return _context.abrupt("return", this._api.request(config));
2285
2285
 
2286
2286
  case 3:
@@ -2306,27 +2306,27 @@ var Model = function () {
2306
2306
  value: function data() {
2307
2307
  var _this = this;
2308
2308
 
2309
- cov_1q48vzeiba.f[6]++;
2309
+ cov_15fxtei2g7.f[6]++;
2310
2310
 
2311
- var keys = (cov_1q48vzeiba.s[16]++, (0, _keys2.default)(this).filter(function (key) {
2312
- cov_1q48vzeiba.f[7]++;
2313
- cov_1q48vzeiba.s[17]++;
2311
+ var keys = (cov_15fxtei2g7.s[16]++, (0, _keys2.default)(this).filter(function (key) {
2312
+ cov_15fxtei2g7.f[7]++;
2313
+ cov_15fxtei2g7.s[17]++;
2314
2314
 
2315
2315
  // using underscore convention to not include private data
2316
2316
  return key[0] != '_';
2317
2317
  }));
2318
2318
  // deliberately adding _id back in even though it's "private"
2319
- cov_1q48vzeiba.s[18]++;
2319
+ cov_15fxtei2g7.s[18]++;
2320
2320
  keys.push('_id');
2321
- var data = (cov_1q48vzeiba.s[19]++, {});
2322
- cov_1q48vzeiba.s[20]++;
2321
+ var data = (cov_15fxtei2g7.s[19]++, {});
2322
+ cov_15fxtei2g7.s[20]++;
2323
2323
  keys.forEach(function (key) {
2324
- cov_1q48vzeiba.f[8]++;
2325
- cov_1q48vzeiba.s[21]++;
2324
+ cov_15fxtei2g7.f[8]++;
2325
+ cov_15fxtei2g7.s[21]++;
2326
2326
 
2327
2327
  data[key] = _this[key];
2328
2328
  });
2329
- cov_1q48vzeiba.s[22]++;
2329
+ cov_15fxtei2g7.s[22]++;
2330
2330
  return data;
2331
2331
  }
2332
2332
  /**
@@ -2349,24 +2349,24 @@ var Model = function () {
2349
2349
  var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
2350
2350
  var _this2 = this;
2351
2351
 
2352
- var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_1q48vzeiba.b[2][0]++, {});
2352
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_15fxtei2g7.b[2][0]++, {});
2353
2353
  var input, inputDiff;
2354
2354
  return _regenerator2.default.wrap(function _callee2$(_context2) {
2355
2355
  while (1) {
2356
2356
  switch (_context2.prev = _context2.next) {
2357
2357
  case 0:
2358
- cov_1q48vzeiba.f[10]++;
2359
- input = (cov_1q48vzeiba.s[24]++, data.length ? (cov_1q48vzeiba.b[3][0]++, data) : (cov_1q48vzeiba.b[3][1]++, this.data()));
2360
- cov_1q48vzeiba.s[25]++;
2358
+ cov_15fxtei2g7.f[10]++;
2359
+ input = (cov_15fxtei2g7.s[24]++, data.length ? (cov_15fxtei2g7.b[3][0]++, data) : (cov_15fxtei2g7.b[3][1]++, this.data()));
2360
+ cov_15fxtei2g7.s[25]++;
2361
2361
 
2362
2362
  if (!input._id) {
2363
2363
  _context2.next = 12;
2364
2364
  break;
2365
2365
  }
2366
2366
 
2367
- cov_1q48vzeiba.b[4][0]++;
2368
- inputDiff = (cov_1q48vzeiba.s[26]++, (0, _deepObjectDiff.diff)(this._lastState, input));
2369
- cov_1q48vzeiba.s[27]++;
2367
+ cov_15fxtei2g7.b[4][0]++;
2368
+ inputDiff = (cov_15fxtei2g7.s[26]++, (0, _deepObjectDiff.diff)(this._lastState, input));
2369
+ cov_15fxtei2g7.s[27]++;
2370
2370
  _context2.next = 9;
2371
2371
  return this.update(input._id, inputDiff);
2372
2372
 
@@ -2376,8 +2376,8 @@ var Model = function () {
2376
2376
  break;
2377
2377
 
2378
2378
  case 12:
2379
- cov_1q48vzeiba.b[4][1]++;
2380
- cov_1q48vzeiba.s[28]++;
2379
+ cov_15fxtei2g7.b[4][1]++;
2380
+ cov_15fxtei2g7.s[28]++;
2381
2381
  _context2.next = 16;
2382
2382
  return this.create(input);
2383
2383
 
@@ -2385,18 +2385,18 @@ var Model = function () {
2385
2385
  this._lastState = _context2.sent;
2386
2386
 
2387
2387
  case 17:
2388
- cov_1q48vzeiba.s[29]++;
2388
+ cov_15fxtei2g7.s[29]++;
2389
2389
 
2390
2390
 
2391
2391
  // fires events with the result
2392
2392
  _bindings.save.forEach(function (callback) {
2393
- cov_1q48vzeiba.f[11]++;
2394
- cov_1q48vzeiba.s[30]++;
2393
+ cov_15fxtei2g7.f[11]++;
2394
+ cov_15fxtei2g7.s[30]++;
2395
2395
 
2396
2396
  callback(_this2._lastState);
2397
2397
  });
2398
2398
 
2399
- cov_1q48vzeiba.s[31]++;
2399
+ cov_15fxtei2g7.s[31]++;
2400
2400
  return _context2.abrupt("return", this._lastState);
2401
2401
 
2402
2402
  case 21:
@@ -2422,8 +2422,8 @@ var Model = function () {
2422
2422
  }, {
2423
2423
  key: "set",
2424
2424
  value: function set(data) {
2425
- cov_1q48vzeiba.f[12]++;
2426
- cov_1q48vzeiba.s[32]++;
2425
+ cov_15fxtei2g7.f[12]++;
2426
+ cov_15fxtei2g7.s[32]++;
2427
2427
 
2428
2428
  return _lodash2.default.merge(this, data);
2429
2429
  }
@@ -2434,8 +2434,8 @@ var Model = function () {
2434
2434
  }, {
2435
2435
  key: "clone",
2436
2436
  value: function clone() {
2437
- cov_1q48vzeiba.f[13]++;
2438
- cov_1q48vzeiba.s[33]++;
2437
+ cov_15fxtei2g7.f[13]++;
2438
+ cov_15fxtei2g7.s[33]++;
2439
2439
 
2440
2440
  return (0, _lodash.cloneDeep)(this);
2441
2441
  }
@@ -2461,35 +2461,35 @@ var Model = function () {
2461
2461
  while (1) {
2462
2462
  switch (_context3.prev = _context3.next) {
2463
2463
  case 0:
2464
- cov_1q48vzeiba.f[17]++;
2465
- url = (cov_1q48vzeiba.s[47]++, this._endpoint + "/" + this._resource);
2466
- cov_1q48vzeiba.s[48]++;
2464
+ cov_15fxtei2g7.f[17]++;
2465
+ url = (cov_15fxtei2g7.s[47]++, this._endpoint + "/" + this._resource);
2466
+ cov_15fxtei2g7.s[48]++;
2467
2467
  _context3.next = 5;
2468
2468
  return this._api.post(url, data, {
2469
2469
  validateStatus: function validateStatus(status) {
2470
- cov_1q48vzeiba.f[18]++;
2471
- cov_1q48vzeiba.s[49]++;
2470
+ cov_15fxtei2g7.f[18]++;
2471
+ cov_15fxtei2g7.s[49]++;
2472
2472
  return true;
2473
2473
  }
2474
2474
  });
2475
2475
 
2476
2476
  case 5:
2477
2477
  res = _context3.sent;
2478
- cov_1q48vzeiba.s[50]++;
2478
+ cov_15fxtei2g7.s[50]++;
2479
2479
  _context3.t0 = res.status;
2480
2480
  _context3.next = _context3.t0 === 500 ? 10 : 13;
2481
2481
  break;
2482
2482
 
2483
2483
  case 10:
2484
- cov_1q48vzeiba.b[8][0]++;
2485
- cov_1q48vzeiba.s[51]++;
2484
+ cov_15fxtei2g7.b[8][0]++;
2485
+ cov_15fxtei2g7.s[51]++;
2486
2486
  throw new Error("HTTP 500: POST " + url + ": " + res.data.type + " - " + res.data.message);
2487
2487
 
2488
2488
  case 13:
2489
- cov_1q48vzeiba.s[52]++;
2489
+ cov_15fxtei2g7.s[52]++;
2490
2490
 
2491
2491
  (0, _assign2.default)(this, res.data);
2492
- cov_1q48vzeiba.s[53]++;
2492
+ cov_15fxtei2g7.s[53]++;
2493
2493
  return _context3.abrupt("return", res.data);
2494
2494
 
2495
2495
  case 17:
@@ -2517,63 +2517,63 @@ var Model = function () {
2517
2517
  key: "update",
2518
2518
  value: function () {
2519
2519
  var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
2520
- var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_1q48vzeiba.b[9][0]++, '');
2520
+ var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_15fxtei2g7.b[9][0]++, '');
2521
2521
  var data = arguments[1];
2522
2522
  var currentId, url, res;
2523
2523
  return _regenerator2.default.wrap(function _callee4$(_context4) {
2524
2524
  while (1) {
2525
2525
  switch (_context4.prev = _context4.next) {
2526
2526
  case 0:
2527
- cov_1q48vzeiba.f[19]++;
2528
- currentId = (cov_1q48vzeiba.s[54]++, (cov_1q48vzeiba.b[10][0]++, id) || (cov_1q48vzeiba.b[10][1]++, this._id));
2529
- cov_1q48vzeiba.s[55]++;
2527
+ cov_15fxtei2g7.f[19]++;
2528
+ currentId = (cov_15fxtei2g7.s[54]++, (cov_15fxtei2g7.b[10][0]++, id) || (cov_15fxtei2g7.b[10][1]++, this._id));
2529
+ cov_15fxtei2g7.s[55]++;
2530
2530
 
2531
2531
  if (currentId) {
2532
2532
  _context4.next = 9;
2533
2533
  break;
2534
2534
  }
2535
2535
 
2536
- cov_1q48vzeiba.b[11][0]++;
2537
- cov_1q48vzeiba.s[56]++;
2536
+ cov_15fxtei2g7.b[11][0]++;
2537
+ cov_15fxtei2g7.s[56]++;
2538
2538
  throw new Error("unable to update record without an _id");
2539
2539
 
2540
2540
  case 9:
2541
- cov_1q48vzeiba.b[11][1]++;
2541
+ cov_15fxtei2g7.b[11][1]++;
2542
2542
 
2543
2543
  case 10:
2544
- url = (cov_1q48vzeiba.s[57]++, this._endpoint + "/" + this._resource + "/" + currentId);
2545
- cov_1q48vzeiba.s[58]++;
2544
+ url = (cov_15fxtei2g7.s[57]++, this._endpoint + "/" + this._resource + "/" + currentId);
2545
+ cov_15fxtei2g7.s[58]++;
2546
2546
  _context4.next = 14;
2547
2547
  return this._api.patch(url, data, {
2548
2548
  validateStatus: function validateStatus(status) {
2549
- cov_1q48vzeiba.f[20]++;
2550
- cov_1q48vzeiba.s[59]++;
2549
+ cov_15fxtei2g7.f[20]++;
2550
+ cov_15fxtei2g7.s[59]++;
2551
2551
  return true;
2552
2552
  }
2553
2553
  });
2554
2554
 
2555
2555
  case 14:
2556
2556
  res = _context4.sent;
2557
- cov_1q48vzeiba.s[60]++;
2557
+ cov_15fxtei2g7.s[60]++;
2558
2558
  _context4.t0 = res.status;
2559
2559
  _context4.next = _context4.t0 === 500 ? 19 : _context4.t0 === 400 ? 22 : 25;
2560
2560
  break;
2561
2561
 
2562
2562
  case 19:
2563
- cov_1q48vzeiba.b[12][0]++;
2564
- cov_1q48vzeiba.s[61]++;
2563
+ cov_15fxtei2g7.b[12][0]++;
2564
+ cov_15fxtei2g7.s[61]++;
2565
2565
  throw new Error("HTTP 500: PATCH " + url + ": " + res.data.type + " - " + res.data.message);
2566
2566
 
2567
2567
  case 22:
2568
- cov_1q48vzeiba.b[12][1]++;
2569
- cov_1q48vzeiba.s[62]++;
2568
+ cov_15fxtei2g7.b[12][1]++;
2569
+ cov_15fxtei2g7.s[62]++;
2570
2570
  throw new Error("HTTP 400: PATCH " + url + ": " + res.data.info.message + " - " + (0, _stringify2.default)(data));
2571
2571
 
2572
2572
  case 25:
2573
- cov_1q48vzeiba.s[63]++;
2573
+ cov_15fxtei2g7.s[63]++;
2574
2574
 
2575
2575
  (0, _assign2.default)(this, res.data);
2576
- cov_1q48vzeiba.s[64]++;
2576
+ cov_15fxtei2g7.s[64]++;
2577
2577
  return _context4.abrupt("return", res.data);
2578
2578
 
2579
2579
  case 29:
@@ -2601,35 +2601,35 @@ var Model = function () {
2601
2601
  key: "read",
2602
2602
  value: function () {
2603
2603
  var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
2604
- var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_1q48vzeiba.b[13][0]++, '');
2605
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (cov_1q48vzeiba.b[14][0]++, {});
2604
+ var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_15fxtei2g7.b[13][0]++, '');
2605
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (cov_15fxtei2g7.b[14][0]++, {});
2606
2606
  var currentId, url;
2607
2607
  return _regenerator2.default.wrap(function _callee5$(_context5) {
2608
2608
  while (1) {
2609
2609
  switch (_context5.prev = _context5.next) {
2610
2610
  case 0:
2611
- cov_1q48vzeiba.f[21]++;
2612
- currentId = (cov_1q48vzeiba.s[65]++, (cov_1q48vzeiba.b[15][0]++, id) || (cov_1q48vzeiba.b[15][1]++, this._id));
2613
- cov_1q48vzeiba.s[66]++;
2611
+ cov_15fxtei2g7.f[21]++;
2612
+ currentId = (cov_15fxtei2g7.s[65]++, (cov_15fxtei2g7.b[15][0]++, id) || (cov_15fxtei2g7.b[15][1]++, this._id));
2613
+ cov_15fxtei2g7.s[66]++;
2614
2614
 
2615
2615
  if (currentId) {
2616
2616
  _context5.next = 9;
2617
2617
  break;
2618
2618
  }
2619
2619
 
2620
- cov_1q48vzeiba.b[16][0]++;
2621
- cov_1q48vzeiba.s[67]++;
2620
+ cov_15fxtei2g7.b[16][0]++;
2621
+ cov_15fxtei2g7.s[67]++;
2622
2622
  throw new Error("unable to read record without an _id");
2623
2623
 
2624
2624
  case 9:
2625
- cov_1q48vzeiba.b[16][1]++;
2625
+ cov_15fxtei2g7.b[16][1]++;
2626
2626
 
2627
2627
  case 10:
2628
- url = (cov_1q48vzeiba.s[68]++, this._endpoint + "/" + this._resource + "/" + currentId);
2629
- cov_1q48vzeiba.s[69]++;
2628
+ url = (cov_15fxtei2g7.s[68]++, this._endpoint + "/" + this._resource + "/" + currentId);
2629
+ cov_15fxtei2g7.s[69]++;
2630
2630
  return _context5.abrupt("return", this._api.get(url, opts).then(function (res) {
2631
- cov_1q48vzeiba.f[22]++;
2632
- cov_1q48vzeiba.s[70]++;
2631
+ cov_15fxtei2g7.f[22]++;
2632
+ cov_15fxtei2g7.s[70]++;
2633
2633
  return res.data;
2634
2634
  }));
2635
2635
 
@@ -2658,34 +2658,34 @@ var Model = function () {
2658
2658
  key: "delete",
2659
2659
  value: function () {
2660
2660
  var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
2661
- var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_1q48vzeiba.b[17][0]++, '');
2661
+ var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_15fxtei2g7.b[17][0]++, '');
2662
2662
  var currentId, url;
2663
2663
  return _regenerator2.default.wrap(function _callee6$(_context6) {
2664
2664
  while (1) {
2665
2665
  switch (_context6.prev = _context6.next) {
2666
2666
  case 0:
2667
- cov_1q48vzeiba.f[23]++;
2668
- currentId = (cov_1q48vzeiba.s[71]++, (cov_1q48vzeiba.b[18][0]++, id) || (cov_1q48vzeiba.b[18][1]++, this._id));
2669
- cov_1q48vzeiba.s[72]++;
2667
+ cov_15fxtei2g7.f[23]++;
2668
+ currentId = (cov_15fxtei2g7.s[71]++, (cov_15fxtei2g7.b[18][0]++, id) || (cov_15fxtei2g7.b[18][1]++, this._id));
2669
+ cov_15fxtei2g7.s[72]++;
2670
2670
 
2671
2671
  if (currentId) {
2672
2672
  _context6.next = 9;
2673
2673
  break;
2674
2674
  }
2675
2675
 
2676
- cov_1q48vzeiba.b[19][0]++;
2677
- cov_1q48vzeiba.s[73]++;
2676
+ cov_15fxtei2g7.b[19][0]++;
2677
+ cov_15fxtei2g7.s[73]++;
2678
2678
  throw new Error("unable to delete record without an _id");
2679
2679
 
2680
2680
  case 9:
2681
- cov_1q48vzeiba.b[19][1]++;
2681
+ cov_15fxtei2g7.b[19][1]++;
2682
2682
 
2683
2683
  case 10:
2684
- url = (cov_1q48vzeiba.s[74]++, this._endpoint + "/" + this._resource + "/" + id);
2685
- cov_1q48vzeiba.s[75]++;
2684
+ url = (cov_15fxtei2g7.s[74]++, this._endpoint + "/" + this._resource + "/" + id);
2685
+ cov_15fxtei2g7.s[75]++;
2686
2686
  return _context6.abrupt("return", this._api.delete(url).then(function (res) {
2687
- cov_1q48vzeiba.f[24]++;
2688
- cov_1q48vzeiba.s[76]++;
2687
+ cov_15fxtei2g7.f[24]++;
2688
+ cov_15fxtei2g7.s[76]++;
2689
2689
  return res.data;
2690
2690
  }));
2691
2691
 
@@ -2706,17 +2706,17 @@ var Model = function () {
2706
2706
  }], [{
2707
2707
  key: "registerCallback",
2708
2708
  value: function registerCallback(method, callback) {
2709
- cov_1q48vzeiba.f[9]++;
2710
- cov_1q48vzeiba.s[23]++;
2709
+ cov_15fxtei2g7.f[9]++;
2710
+ cov_15fxtei2g7.s[23]++;
2711
2711
 
2712
2712
  _bindings[method].push(callback);
2713
2713
  }
2714
2714
  }, {
2715
2715
  key: "all",
2716
2716
  value: function all() {
2717
- var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_1q48vzeiba.b[5][0]++, {});
2718
- cov_1q48vzeiba.f[14]++;
2719
- cov_1q48vzeiba.s[34]++;
2717
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_15fxtei2g7.b[5][0]++, {});
2718
+ cov_15fxtei2g7.f[14]++;
2719
+ cov_15fxtei2g7.s[34]++;
2720
2720
 
2721
2721
  return this.find(params);
2722
2722
  }
@@ -2730,35 +2730,35 @@ var Model = function () {
2730
2730
  key: "find",
2731
2731
  value: function () {
2732
2732
  var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
2733
- var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_1q48vzeiba.b[6][0]++, {});
2733
+ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (cov_15fxtei2g7.b[6][0]++, {});
2734
2734
  var api, url, id, res;
2735
2735
  return _regenerator2.default.wrap(function _callee7$(_context7) {
2736
2736
  while (1) {
2737
2737
  switch (_context7.prev = _context7.next) {
2738
2738
  case 0:
2739
- cov_1q48vzeiba.f[15]++;
2740
- api = (cov_1q48vzeiba.s[35]++, connection());
2739
+ cov_15fxtei2g7.f[15]++;
2740
+ api = (cov_15fxtei2g7.s[35]++, connection());
2741
2741
  url = void 0;
2742
- cov_1q48vzeiba.s[36]++;
2742
+ cov_15fxtei2g7.s[36]++;
2743
2743
 
2744
2744
  if (typeof params === 'string') {
2745
- cov_1q48vzeiba.b[7][0]++;
2746
- id = (cov_1q48vzeiba.s[37]++, params);
2747
- cov_1q48vzeiba.s[38]++;
2745
+ cov_15fxtei2g7.b[7][0]++;
2746
+ id = (cov_15fxtei2g7.s[37]++, params);
2747
+ cov_15fxtei2g7.s[38]++;
2748
2748
 
2749
2749
  url = this._resource + "/" + id;
2750
- cov_1q48vzeiba.s[39]++;
2750
+ cov_15fxtei2g7.s[39]++;
2751
2751
  params = {};
2752
2752
  } else {
2753
- cov_1q48vzeiba.b[7][1]++;
2754
- cov_1q48vzeiba.s[40]++;
2753
+ cov_15fxtei2g7.b[7][1]++;
2754
+ cov_15fxtei2g7.s[40]++;
2755
2755
 
2756
2756
  url = this._resource;
2757
2757
  }
2758
2758
 
2759
- cov_1q48vzeiba.s[41]++;
2759
+ cov_15fxtei2g7.s[41]++;
2760
2760
  _context7.prev = 6;
2761
- cov_1q48vzeiba.s[42]++;
2761
+ cov_15fxtei2g7.s[42]++;
2762
2762
  _context7.next = 10;
2763
2763
  return api.get(url, { params: params });
2764
2764
 
@@ -2770,22 +2770,22 @@ var Model = function () {
2770
2770
  case 13:
2771
2771
  _context7.prev = 13;
2772
2772
  _context7.t0 = _context7["catch"](6);
2773
- cov_1q48vzeiba.s[43]++;
2773
+ cov_15fxtei2g7.s[43]++;
2774
2774
  throw new Error(_context7.t0.message + ": GET /" + url + " " + (0, _stringify2.default)(params));
2775
2775
 
2776
2776
  case 17:
2777
- cov_1q48vzeiba.s[44]++;
2777
+ cov_15fxtei2g7.s[44]++;
2778
2778
 
2779
2779
 
2780
2780
  // fires events with the result
2781
2781
  _bindings.find.forEach(function (callback) {
2782
- cov_1q48vzeiba.f[16]++;
2783
- cov_1q48vzeiba.s[45]++;
2782
+ cov_15fxtei2g7.f[16]++;
2783
+ cov_15fxtei2g7.s[45]++;
2784
2784
 
2785
2785
  callback(res.data);
2786
2786
  });
2787
2787
 
2788
- cov_1q48vzeiba.s[46]++;
2788
+ cov_15fxtei2g7.s[46]++;
2789
2789
  return _context7.abrupt("return", res.data);
2790
2790
 
2791
2791
  case 21: