@contentstack/marketplace-sdk 1.2.8 → 1.2.9

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.
@@ -112,8 +112,9 @@ function Installation(http, data) {
112
112
  var param,
113
113
  headers,
114
114
  response,
115
- _args = arguments;
116
- return _regenerator2["default"].wrap(function _callee$(_context) {
115
+ _args = arguments,
116
+ _t;
117
+ return _regenerator2["default"].wrap(function (_context) {
117
118
  while (1) switch (_context.prev = _context.next) {
118
119
  case 0:
119
120
  param = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
@@ -122,29 +123,29 @@ function Installation(http, data) {
122
123
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params)),
123
124
  params: _objectSpread({}, (0, _cloneDeep2["default"])(param))
124
125
  } || {};
125
- _context.next = 5;
126
+ _context.next = 2;
126
127
  return http.get("".concat(_this.urlPath, "/configuration"), headers);
127
- case 5:
128
+ case 2:
128
129
  response = _context.sent;
129
130
  if (!response.data) {
130
- _context.next = 10;
131
+ _context.next = 3;
131
132
  break;
132
133
  }
133
134
  return _context.abrupt("return", response.data);
134
- case 10:
135
+ case 3:
135
136
  throw (0, _contentstackError2["default"])(response);
136
- case 11:
137
- _context.next = 16;
137
+ case 4:
138
+ _context.next = 6;
138
139
  break;
139
- case 13:
140
- _context.prev = 13;
141
- _context.t0 = _context["catch"](1);
142
- throw (0, _contentstackError2["default"])(_context.t0);
143
- case 16:
140
+ case 5:
141
+ _context.prev = 5;
142
+ _t = _context["catch"](1);
143
+ throw (0, _contentstackError2["default"])(_t);
144
+ case 6:
144
145
  case "end":
145
146
  return _context.stop();
146
147
  }
147
- }, _callee, null, [[1, 13]]);
148
+ }, _callee, null, [[1, 5]]);
148
149
  }));
149
150
 
150
151
  /**
@@ -163,37 +164,37 @@ function Installation(http, data) {
163
164
  */
164
165
  this.setConfiguration = /*#__PURE__*/function () {
165
166
  var _ref2 = (0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee2(config) {
166
- var headers, response;
167
- return _regenerator2["default"].wrap(function _callee2$(_context2) {
167
+ var headers, response, _t2;
168
+ return _regenerator2["default"].wrap(function (_context2) {
168
169
  while (1) switch (_context2.prev = _context2.next) {
169
170
  case 0:
170
171
  _context2.prev = 0;
171
172
  headers = {
172
173
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
173
174
  } || {};
174
- _context2.next = 4;
175
+ _context2.next = 1;
175
176
  return http.put("".concat(_this.urlPath, "/configuration"), config, headers);
176
- case 4:
177
+ case 1:
177
178
  response = _context2.sent;
178
179
  if (!response.data) {
179
- _context2.next = 9;
180
+ _context2.next = 2;
180
181
  break;
181
182
  }
182
183
  return _context2.abrupt("return", response.data);
183
- case 9:
184
+ case 2:
184
185
  throw (0, _contentstackError2["default"])(response);
185
- case 10:
186
- _context2.next = 15;
186
+ case 3:
187
+ _context2.next = 5;
187
188
  break;
188
- case 12:
189
- _context2.prev = 12;
190
- _context2.t0 = _context2["catch"](0);
191
- throw (0, _contentstackError2["default"])(_context2.t0);
192
- case 15:
189
+ case 4:
190
+ _context2.prev = 4;
191
+ _t2 = _context2["catch"](0);
192
+ throw (0, _contentstackError2["default"])(_t2);
193
+ case 5:
193
194
  case "end":
194
195
  return _context2.stop();
195
196
  }
196
- }, _callee2, null, [[0, 12]]);
197
+ }, _callee2, null, [[0, 4]]);
197
198
  }));
198
199
  return function (_x) {
199
200
  return _ref2.apply(this, arguments);
@@ -215,37 +216,37 @@ function Installation(http, data) {
215
216
  * .then((response) => console.log(response))
216
217
  */
217
218
  this.getConfigLocation = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee3() {
218
- var headers, response;
219
- return _regenerator2["default"].wrap(function _callee3$(_context3) {
219
+ var headers, response, _t3;
220
+ return _regenerator2["default"].wrap(function (_context3) {
220
221
  while (1) switch (_context3.prev = _context3.next) {
221
222
  case 0:
222
223
  _context3.prev = 0;
223
224
  headers = {
224
225
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
225
226
  } || {};
226
- _context3.next = 4;
227
+ _context3.next = 1;
227
228
  return http.get("".concat(_this.urlPath, "/locations/configuration"), headers);
228
- case 4:
229
+ case 1:
229
230
  response = _context3.sent;
230
231
  if (!response.data) {
231
- _context3.next = 9;
232
+ _context3.next = 2;
232
233
  break;
233
234
  }
234
235
  return _context3.abrupt("return", response.data);
235
- case 9:
236
+ case 2:
236
237
  throw (0, _contentstackError2["default"])(response);
237
- case 10:
238
- _context3.next = 15;
238
+ case 3:
239
+ _context3.next = 5;
239
240
  break;
240
- case 12:
241
- _context3.prev = 12;
242
- _context3.t0 = _context3["catch"](0);
243
- throw (0, _contentstackError2["default"])(_context3.t0);
244
- case 15:
241
+ case 4:
242
+ _context3.prev = 4;
243
+ _t3 = _context3["catch"](0);
244
+ throw (0, _contentstackError2["default"])(_t3);
245
+ case 5:
245
246
  case "end":
246
247
  return _context3.stop();
247
248
  }
248
- }, _callee3, null, [[0, 12]]);
249
+ }, _callee3, null, [[0, 4]]);
249
250
  }));
250
251
 
251
252
  /**
@@ -266,8 +267,9 @@ function Installation(http, data) {
266
267
  var param,
267
268
  headers,
268
269
  response,
269
- _args4 = arguments;
270
- return _regenerator2["default"].wrap(function _callee4$(_context4) {
270
+ _args4 = arguments,
271
+ _t4;
272
+ return _regenerator2["default"].wrap(function (_context4) {
271
273
  while (1) switch (_context4.prev = _context4.next) {
272
274
  case 0:
273
275
  param = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
@@ -276,29 +278,29 @@ function Installation(http, data) {
276
278
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params)),
277
279
  params: _objectSpread({}, (0, _cloneDeep2["default"])(param))
278
280
  } || {};
279
- _context4.next = 5;
281
+ _context4.next = 2;
280
282
  return http.get("".concat(_this.urlPath, "/server-configuration"), headers);
281
- case 5:
283
+ case 2:
282
284
  response = _context4.sent;
283
285
  if (!response.data) {
284
- _context4.next = 10;
286
+ _context4.next = 3;
285
287
  break;
286
288
  }
287
289
  return _context4.abrupt("return", response.data);
288
- case 10:
290
+ case 3:
289
291
  throw (0, _contentstackError2["default"])(response);
290
- case 11:
291
- _context4.next = 16;
292
+ case 4:
293
+ _context4.next = 6;
292
294
  break;
293
- case 13:
294
- _context4.prev = 13;
295
- _context4.t0 = _context4["catch"](1);
296
- throw (0, _contentstackError2["default"])(_context4.t0);
297
- case 16:
295
+ case 5:
296
+ _context4.prev = 5;
297
+ _t4 = _context4["catch"](1);
298
+ throw (0, _contentstackError2["default"])(_t4);
299
+ case 6:
298
300
  case "end":
299
301
  return _context4.stop();
300
302
  }
301
- }, _callee4, null, [[1, 13]]);
303
+ }, _callee4, null, [[1, 5]]);
302
304
  }));
303
305
 
304
306
  /**
@@ -317,37 +319,37 @@ function Installation(http, data) {
317
319
  */
318
320
  this.setServerConfig = /*#__PURE__*/function () {
319
321
  var _ref5 = (0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee5(config) {
320
- var headers, response;
321
- return _regenerator2["default"].wrap(function _callee5$(_context5) {
322
+ var headers, response, _t5;
323
+ return _regenerator2["default"].wrap(function (_context5) {
322
324
  while (1) switch (_context5.prev = _context5.next) {
323
325
  case 0:
324
326
  _context5.prev = 0;
325
327
  headers = {
326
328
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
327
329
  } || {};
328
- _context5.next = 4;
330
+ _context5.next = 1;
329
331
  return http.put("".concat(_this.urlPath, "/server-configuration"), config, headers);
330
- case 4:
332
+ case 1:
331
333
  response = _context5.sent;
332
334
  if (!response.data) {
333
- _context5.next = 9;
335
+ _context5.next = 2;
334
336
  break;
335
337
  }
336
338
  return _context5.abrupt("return", response.data);
337
- case 9:
339
+ case 2:
338
340
  throw (0, _contentstackError2["default"])(response);
339
- case 10:
340
- _context5.next = 15;
341
+ case 3:
342
+ _context5.next = 5;
341
343
  break;
342
- case 12:
343
- _context5.prev = 12;
344
- _context5.t0 = _context5["catch"](0);
345
- throw (0, _contentstackError2["default"])(_context5.t0);
346
- case 15:
344
+ case 4:
345
+ _context5.prev = 4;
346
+ _t5 = _context5["catch"](0);
347
+ throw (0, _contentstackError2["default"])(_t5);
348
+ case 5:
347
349
  case "end":
348
350
  return _context5.stop();
349
351
  }
350
- }, _callee5, null, [[0, 12]]);
352
+ }, _callee5, null, [[0, 4]]);
351
353
  }));
352
354
  return function (_x2) {
353
355
  return _ref5.apply(this, arguments);
@@ -368,37 +370,37 @@ function Installation(http, data) {
368
370
  * .then((response) => console.log(response))
369
371
  */
370
372
  this.installationData = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee6() {
371
- var headers, response;
372
- return _regenerator2["default"].wrap(function _callee6$(_context6) {
373
+ var headers, response, _t6;
374
+ return _regenerator2["default"].wrap(function (_context6) {
373
375
  while (1) switch (_context6.prev = _context6.next) {
374
376
  case 0:
375
377
  _context6.prev = 0;
376
378
  headers = {
377
379
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
378
380
  } || {};
379
- _context6.next = 4;
381
+ _context6.next = 1;
380
382
  return http.get("".concat(_this.urlPath, "/installationData"), headers);
381
- case 4:
383
+ case 1:
382
384
  response = _context6.sent;
383
385
  if (!response.data) {
384
- _context6.next = 9;
386
+ _context6.next = 2;
385
387
  break;
386
388
  }
387
389
  return _context6.abrupt("return", response.data);
388
- case 9:
390
+ case 2:
389
391
  throw (0, _contentstackError2["default"])(response);
390
- case 10:
391
- _context6.next = 15;
392
+ case 3:
393
+ _context6.next = 5;
392
394
  break;
393
- case 12:
394
- _context6.prev = 12;
395
- _context6.t0 = _context6["catch"](0);
396
- throw (0, _contentstackError2["default"])(_context6.t0);
397
- case 15:
395
+ case 4:
396
+ _context6.prev = 4;
397
+ _t6 = _context6["catch"](0);
398
+ throw (0, _contentstackError2["default"])(_t6);
399
+ case 5:
398
400
  case "end":
399
401
  return _context6.stop();
400
402
  }
401
- }, _callee6, null, [[0, 12]]);
403
+ }, _callee6, null, [[0, 4]]);
402
404
  }));
403
405
 
404
406
  /**
@@ -455,8 +457,9 @@ function Installation(http, data) {
455
457
  var param,
456
458
  headers,
457
459
  response,
458
- _args7 = arguments;
459
- return _regenerator2["default"].wrap(function _callee7$(_context7) {
460
+ _args7 = arguments,
461
+ _t7;
462
+ return _regenerator2["default"].wrap(function (_context7) {
460
463
  while (1) switch (_context7.prev = _context7.next) {
461
464
  case 0:
462
465
  param = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
@@ -465,29 +468,29 @@ function Installation(http, data) {
465
468
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params)),
466
469
  params: _objectSpread({}, (0, _cloneDeep2["default"])(param))
467
470
  };
468
- _context7.next = 5;
471
+ _context7.next = 2;
469
472
  return http.get("".concat(_this.urlPath, "/view/apps"), headers);
470
- case 5:
473
+ case 2:
471
474
  response = _context7.sent;
472
475
  if (!response.data) {
473
- _context7.next = 10;
476
+ _context7.next = 3;
474
477
  break;
475
478
  }
476
479
  return _context7.abrupt("return", response.data);
477
- case 10:
480
+ case 3:
478
481
  throw (0, _contentstackError2["default"])(response);
479
- case 11:
480
- _context7.next = 16;
482
+ case 4:
483
+ _context7.next = 6;
481
484
  break;
482
- case 13:
483
- _context7.prev = 13;
484
- _context7.t0 = _context7["catch"](1);
485
- throw (0, _contentstackError2["default"])(_context7.t0);
486
- case 16:
485
+ case 5:
486
+ _context7.prev = 5;
487
+ _t7 = _context7["catch"](1);
488
+ throw (0, _contentstackError2["default"])(_t7);
489
+ case 6:
487
490
  case "end":
488
491
  return _context7.stop();
489
492
  }
490
- }, _callee7, null, [[1, 13]]);
493
+ }, _callee7, null, [[1, 5]]);
491
494
  }));
492
495
 
493
496
  /**
@@ -505,37 +508,37 @@ function Installation(http, data) {
505
508
  *
506
509
  */
507
510
  this.getInstalledUsers = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee8() {
508
- var headers, response;
509
- return _regenerator2["default"].wrap(function _callee8$(_context8) {
511
+ var headers, response, _t8;
512
+ return _regenerator2["default"].wrap(function (_context8) {
510
513
  while (1) switch (_context8.prev = _context8.next) {
511
514
  case 0:
512
515
  _context8.prev = 0;
513
516
  headers = {
514
517
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
515
518
  } || {};
516
- _context8.next = 4;
519
+ _context8.next = 1;
517
520
  return http.get("".concat(_this.urlPath, "/view/users"), headers);
518
- case 4:
521
+ case 1:
519
522
  response = _context8.sent;
520
523
  if (!response.data) {
521
- _context8.next = 9;
524
+ _context8.next = 2;
522
525
  break;
523
526
  }
524
527
  return _context8.abrupt("return", response.data);
525
- case 9:
528
+ case 2:
526
529
  throw (0, _contentstackError2["default"])(response);
527
- case 10:
528
- _context8.next = 15;
530
+ case 3:
531
+ _context8.next = 5;
529
532
  break;
530
- case 12:
531
- _context8.prev = 12;
532
- _context8.t0 = _context8["catch"](0);
533
- throw (0, _contentstackError2["default"])(_context8.t0);
534
- case 15:
533
+ case 4:
534
+ _context8.prev = 4;
535
+ _t8 = _context8["catch"](0);
536
+ throw (0, _contentstackError2["default"])(_t8);
537
+ case 5:
535
538
  case "end":
536
539
  return _context8.stop();
537
540
  }
538
- }, _callee8, null, [[0, 12]]);
541
+ }, _callee8, null, [[0, 4]]);
539
542
  }));
540
543
 
541
544
  /**
@@ -553,37 +556,37 @@ function Installation(http, data) {
553
556
  *
554
557
  */
555
558
  this.getInstalledStacks = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee9() {
556
- var headers, response;
557
- return _regenerator2["default"].wrap(function _callee9$(_context9) {
559
+ var headers, response, _t9;
560
+ return _regenerator2["default"].wrap(function (_context9) {
558
561
  while (1) switch (_context9.prev = _context9.next) {
559
562
  case 0:
560
563
  _context9.prev = 0;
561
564
  headers = {
562
565
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
563
566
  } || {};
564
- _context9.next = 4;
567
+ _context9.next = 1;
565
568
  return http.get("".concat(_this.urlPath, "/view/stacks"), headers);
566
- case 4:
569
+ case 1:
567
570
  response = _context9.sent;
568
571
  if (!response.data) {
569
- _context9.next = 9;
572
+ _context9.next = 2;
570
573
  break;
571
574
  }
572
575
  return _context9.abrupt("return", response.data);
573
- case 9:
576
+ case 2:
574
577
  throw (0, _contentstackError2["default"])(response);
575
- case 10:
576
- _context9.next = 15;
578
+ case 3:
579
+ _context9.next = 5;
577
580
  break;
578
- case 12:
579
- _context9.prev = 12;
580
- _context9.t0 = _context9["catch"](0);
581
- throw (0, _contentstackError2["default"])(_context9.t0);
582
- case 15:
581
+ case 4:
582
+ _context9.prev = 4;
583
+ _t9 = _context9["catch"](0);
584
+ throw (0, _contentstackError2["default"])(_t9);
585
+ case 5:
583
586
  case "end":
584
587
  return _context9.stop();
585
588
  }
586
- }, _callee9, null, [[0, 12]]);
589
+ }, _callee9, null, [[0, 4]]);
587
590
  }));
588
591
  }
589
592
  }
@@ -51,37 +51,37 @@ function WebHooks(http, data) {
51
51
  *
52
52
  */
53
53
  this.listExecutionLogs = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee() {
54
- var headers, response;
55
- return _regenerator2["default"].wrap(function _callee$(_context) {
54
+ var headers, response, _t;
55
+ return _regenerator2["default"].wrap(function (_context) {
56
56
  while (1) switch (_context.prev = _context.next) {
57
57
  case 0:
58
58
  _context.prev = 0;
59
59
  headers = {
60
60
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
61
61
  } || {};
62
- _context.next = 4;
62
+ _context.next = 1;
63
63
  return http.get("".concat(_this.urlPath, "/executions"), headers);
64
- case 4:
64
+ case 1:
65
65
  response = _context.sent;
66
66
  if (!response.data) {
67
- _context.next = 9;
67
+ _context.next = 2;
68
68
  break;
69
69
  }
70
70
  return _context.abrupt("return", response.data);
71
- case 9:
71
+ case 2:
72
72
  throw (0, _contentstackError2["default"])(response);
73
- case 10:
74
- _context.next = 15;
73
+ case 3:
74
+ _context.next = 5;
75
75
  break;
76
- case 12:
77
- _context.prev = 12;
78
- _context.t0 = _context["catch"](0);
79
- throw (0, _contentstackError2["default"])(_context.t0);
80
- case 15:
76
+ case 4:
77
+ _context.prev = 4;
78
+ _t = _context["catch"](0);
79
+ throw (0, _contentstackError2["default"])(_t);
80
+ case 5:
81
81
  case "end":
82
82
  return _context.stop();
83
83
  }
84
- }, _callee, null, [[0, 12]]);
84
+ }, _callee, null, [[0, 4]]);
85
85
  }));
86
86
 
87
87
  /**
@@ -101,37 +101,37 @@ function WebHooks(http, data) {
101
101
  */
102
102
  this.getExecutionLog = /*#__PURE__*/function () {
103
103
  var _ref2 = (0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee2(executionUid) {
104
- var headers, response;
105
- return _regenerator2["default"].wrap(function _callee2$(_context2) {
104
+ var headers, response, _t2;
105
+ return _regenerator2["default"].wrap(function (_context2) {
106
106
  while (1) switch (_context2.prev = _context2.next) {
107
107
  case 0:
108
108
  _context2.prev = 0;
109
109
  headers = {
110
110
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
111
111
  } || {};
112
- _context2.next = 4;
112
+ _context2.next = 1;
113
113
  return http.get("".concat(_this.urlPath, "/executions/").concat(executionUid), headers);
114
- case 4:
114
+ case 1:
115
115
  response = _context2.sent;
116
116
  if (!response.data) {
117
- _context2.next = 9;
117
+ _context2.next = 2;
118
118
  break;
119
119
  }
120
120
  return _context2.abrupt("return", response.data);
121
- case 9:
121
+ case 2:
122
122
  throw (0, _contentstackError2["default"])(response);
123
- case 10:
124
- _context2.next = 15;
123
+ case 3:
124
+ _context2.next = 5;
125
125
  break;
126
- case 12:
127
- _context2.prev = 12;
128
- _context2.t0 = _context2["catch"](0);
129
- throw (0, _contentstackError2["default"])(_context2.t0);
130
- case 15:
126
+ case 4:
127
+ _context2.prev = 4;
128
+ _t2 = _context2["catch"](0);
129
+ throw (0, _contentstackError2["default"])(_t2);
130
+ case 5:
131
131
  case "end":
132
132
  return _context2.stop();
133
133
  }
134
- }, _callee2, null, [[0, 12]]);
134
+ }, _callee2, null, [[0, 4]]);
135
135
  }));
136
136
  return function (_x) {
137
137
  return _ref2.apply(this, arguments);
@@ -155,37 +155,37 @@ function WebHooks(http, data) {
155
155
  */
156
156
  this.retryExecution = /*#__PURE__*/function () {
157
157
  var _ref3 = (0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee3(executionUid) {
158
- var headers, response;
159
- return _regenerator2["default"].wrap(function _callee3$(_context3) {
158
+ var headers, response, _t3;
159
+ return _regenerator2["default"].wrap(function (_context3) {
160
160
  while (1) switch (_context3.prev = _context3.next) {
161
161
  case 0:
162
162
  _context3.prev = 0;
163
163
  headers = {
164
164
  headers: _objectSpread({}, (0, _cloneDeep2["default"])(params))
165
165
  } || {};
166
- _context3.next = 4;
166
+ _context3.next = 1;
167
167
  return http.post("".concat(_this.urlPath, "/executions/").concat(executionUid, "/retry"), headers);
168
- case 4:
168
+ case 1:
169
169
  response = _context3.sent;
170
170
  if (!response.data) {
171
- _context3.next = 9;
171
+ _context3.next = 2;
172
172
  break;
173
173
  }
174
174
  return _context3.abrupt("return", response.data);
175
- case 9:
175
+ case 2:
176
176
  throw (0, _contentstackError2["default"])(response);
177
- case 10:
178
- _context3.next = 15;
177
+ case 3:
178
+ _context3.next = 5;
179
179
  break;
180
- case 12:
181
- _context3.prev = 12;
182
- _context3.t0 = _context3["catch"](0);
183
- throw (0, _contentstackError2["default"])(_context3.t0);
184
- case 15:
180
+ case 4:
181
+ _context3.prev = 4;
182
+ _t3 = _context3["catch"](0);
183
+ throw (0, _contentstackError2["default"])(_t3);
184
+ case 5:
185
185
  case "end":
186
186
  return _context3.stop();
187
187
  }
188
- }, _callee3, null, [[0, 12]]);
188
+ }, _callee3, null, [[0, 4]]);
189
189
  }));
190
190
  return function (_x2) {
191
191
  return _ref3.apply(this, arguments);