@contentstack/marketplace-sdk 1.2.7 → 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.
- package/.husky/pre-commit +69 -0
- package/CHANGELOG.md +8 -1
- package/dist/es-modules/entity.js +78 -74
- package/dist/es-modules/marketplace/app/hosting/deployment.js +71 -70
- package/dist/es-modules/marketplace/app/hosting/index.js +85 -84
- package/dist/es-modules/marketplace/app/index.js +84 -84
- package/dist/es-modules/marketplace/app/oauth/index.js +43 -42
- package/dist/es-modules/marketplace/apprequest/index.js +43 -42
- package/dist/es-modules/marketplace/authorization/index.js +43 -42
- package/dist/es-modules/marketplace/index.js +16 -15
- package/dist/es-modules/marketplace/installation/index.js +137 -129
- package/dist/es-modules/marketplace/installation/webhooks/index.js +42 -42
- package/dist/es5/entity.js +78 -74
- package/dist/es5/marketplace/app/hosting/deployment.js +71 -70
- package/dist/es5/marketplace/app/hosting/index.js +85 -84
- package/dist/es5/marketplace/app/index.js +84 -84
- package/dist/es5/marketplace/app/oauth/index.js +43 -42
- package/dist/es5/marketplace/apprequest/index.js +43 -42
- package/dist/es5/marketplace/authorization/index.js +43 -42
- package/dist/es5/marketplace/index.js +16 -15
- package/dist/es5/marketplace/installation/index.js +137 -129
- package/dist/es5/marketplace/installation/webhooks/index.js +42 -42
- package/dist/nativescript/contentstack-marketplace.js +1 -1
- package/dist/node/contentstack-marketplace.js +1 -1
- package/dist/react-native/contentstack-marketplace.js +1 -1
- package/dist/web/contentstack-marketplace.js +1 -1
- package/package.json +14 -13
|
@@ -99,8 +99,9 @@ export function Installation(http, data) {
|
|
|
99
99
|
var param,
|
|
100
100
|
headers,
|
|
101
101
|
response,
|
|
102
|
-
_args = arguments
|
|
103
|
-
|
|
102
|
+
_args = arguments,
|
|
103
|
+
_t;
|
|
104
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
104
105
|
while (1) switch (_context.prev = _context.next) {
|
|
105
106
|
case 0:
|
|
106
107
|
param = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
@@ -109,29 +110,29 @@ export function Installation(http, data) {
|
|
|
109
110
|
headers: _objectSpread({}, cloneDeep(params)),
|
|
110
111
|
params: _objectSpread({}, cloneDeep(param))
|
|
111
112
|
} || {};
|
|
112
|
-
_context.next =
|
|
113
|
+
_context.next = 2;
|
|
113
114
|
return http.get("".concat(_this.urlPath, "/configuration"), headers);
|
|
114
|
-
case
|
|
115
|
+
case 2:
|
|
115
116
|
response = _context.sent;
|
|
116
117
|
if (!response.data) {
|
|
117
|
-
_context.next =
|
|
118
|
+
_context.next = 3;
|
|
118
119
|
break;
|
|
119
120
|
}
|
|
120
121
|
return _context.abrupt("return", response.data);
|
|
121
|
-
case
|
|
122
|
+
case 3:
|
|
122
123
|
throw error(response);
|
|
123
|
-
case
|
|
124
|
-
_context.next =
|
|
124
|
+
case 4:
|
|
125
|
+
_context.next = 6;
|
|
125
126
|
break;
|
|
126
|
-
case
|
|
127
|
-
_context.prev =
|
|
128
|
-
|
|
129
|
-
throw error(
|
|
130
|
-
case
|
|
127
|
+
case 5:
|
|
128
|
+
_context.prev = 5;
|
|
129
|
+
_t = _context["catch"](1);
|
|
130
|
+
throw error(_t);
|
|
131
|
+
case 6:
|
|
131
132
|
case "end":
|
|
132
133
|
return _context.stop();
|
|
133
134
|
}
|
|
134
|
-
}, _callee, null, [[1,
|
|
135
|
+
}, _callee, null, [[1, 5]]);
|
|
135
136
|
}));
|
|
136
137
|
|
|
137
138
|
/**
|
|
@@ -150,37 +151,37 @@ export function Installation(http, data) {
|
|
|
150
151
|
*/
|
|
151
152
|
this.setConfiguration = /*#__PURE__*/function () {
|
|
152
153
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(config) {
|
|
153
|
-
var headers, response;
|
|
154
|
-
return _regeneratorRuntime.wrap(function
|
|
154
|
+
var headers, response, _t2;
|
|
155
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
155
156
|
while (1) switch (_context2.prev = _context2.next) {
|
|
156
157
|
case 0:
|
|
157
158
|
_context2.prev = 0;
|
|
158
159
|
headers = {
|
|
159
160
|
headers: _objectSpread({}, cloneDeep(params))
|
|
160
161
|
} || {};
|
|
161
|
-
_context2.next =
|
|
162
|
+
_context2.next = 1;
|
|
162
163
|
return http.put("".concat(_this.urlPath, "/configuration"), config, headers);
|
|
163
|
-
case
|
|
164
|
+
case 1:
|
|
164
165
|
response = _context2.sent;
|
|
165
166
|
if (!response.data) {
|
|
166
|
-
_context2.next =
|
|
167
|
+
_context2.next = 2;
|
|
167
168
|
break;
|
|
168
169
|
}
|
|
169
170
|
return _context2.abrupt("return", response.data);
|
|
170
|
-
case
|
|
171
|
+
case 2:
|
|
171
172
|
throw error(response);
|
|
172
|
-
case
|
|
173
|
-
_context2.next =
|
|
173
|
+
case 3:
|
|
174
|
+
_context2.next = 5;
|
|
174
175
|
break;
|
|
175
|
-
case
|
|
176
|
-
_context2.prev =
|
|
177
|
-
|
|
178
|
-
throw error(
|
|
179
|
-
case
|
|
176
|
+
case 4:
|
|
177
|
+
_context2.prev = 4;
|
|
178
|
+
_t2 = _context2["catch"](0);
|
|
179
|
+
throw error(_t2);
|
|
180
|
+
case 5:
|
|
180
181
|
case "end":
|
|
181
182
|
return _context2.stop();
|
|
182
183
|
}
|
|
183
|
-
}, _callee2, null, [[0,
|
|
184
|
+
}, _callee2, null, [[0, 4]]);
|
|
184
185
|
}));
|
|
185
186
|
return function (_x) {
|
|
186
187
|
return _ref2.apply(this, arguments);
|
|
@@ -202,37 +203,37 @@ export function Installation(http, data) {
|
|
|
202
203
|
* .then((response) => console.log(response))
|
|
203
204
|
*/
|
|
204
205
|
this.getConfigLocation = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
205
|
-
var headers, response;
|
|
206
|
-
return _regeneratorRuntime.wrap(function
|
|
206
|
+
var headers, response, _t3;
|
|
207
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
207
208
|
while (1) switch (_context3.prev = _context3.next) {
|
|
208
209
|
case 0:
|
|
209
210
|
_context3.prev = 0;
|
|
210
211
|
headers = {
|
|
211
212
|
headers: _objectSpread({}, cloneDeep(params))
|
|
212
213
|
} || {};
|
|
213
|
-
_context3.next =
|
|
214
|
+
_context3.next = 1;
|
|
214
215
|
return http.get("".concat(_this.urlPath, "/locations/configuration"), headers);
|
|
215
|
-
case
|
|
216
|
+
case 1:
|
|
216
217
|
response = _context3.sent;
|
|
217
218
|
if (!response.data) {
|
|
218
|
-
_context3.next =
|
|
219
|
+
_context3.next = 2;
|
|
219
220
|
break;
|
|
220
221
|
}
|
|
221
222
|
return _context3.abrupt("return", response.data);
|
|
222
|
-
case
|
|
223
|
+
case 2:
|
|
223
224
|
throw error(response);
|
|
224
|
-
case
|
|
225
|
-
_context3.next =
|
|
225
|
+
case 3:
|
|
226
|
+
_context3.next = 5;
|
|
226
227
|
break;
|
|
227
|
-
case
|
|
228
|
-
_context3.prev =
|
|
229
|
-
|
|
230
|
-
throw error(
|
|
231
|
-
case
|
|
228
|
+
case 4:
|
|
229
|
+
_context3.prev = 4;
|
|
230
|
+
_t3 = _context3["catch"](0);
|
|
231
|
+
throw error(_t3);
|
|
232
|
+
case 5:
|
|
232
233
|
case "end":
|
|
233
234
|
return _context3.stop();
|
|
234
235
|
}
|
|
235
|
-
}, _callee3, null, [[0,
|
|
236
|
+
}, _callee3, null, [[0, 4]]);
|
|
236
237
|
}));
|
|
237
238
|
|
|
238
239
|
/**
|
|
@@ -253,8 +254,9 @@ export function Installation(http, data) {
|
|
|
253
254
|
var param,
|
|
254
255
|
headers,
|
|
255
256
|
response,
|
|
256
|
-
_args4 = arguments
|
|
257
|
-
|
|
257
|
+
_args4 = arguments,
|
|
258
|
+
_t4;
|
|
259
|
+
return _regeneratorRuntime.wrap(function (_context4) {
|
|
258
260
|
while (1) switch (_context4.prev = _context4.next) {
|
|
259
261
|
case 0:
|
|
260
262
|
param = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
@@ -263,29 +265,29 @@ export function Installation(http, data) {
|
|
|
263
265
|
headers: _objectSpread({}, cloneDeep(params)),
|
|
264
266
|
params: _objectSpread({}, cloneDeep(param))
|
|
265
267
|
} || {};
|
|
266
|
-
_context4.next =
|
|
268
|
+
_context4.next = 2;
|
|
267
269
|
return http.get("".concat(_this.urlPath, "/server-configuration"), headers);
|
|
268
|
-
case
|
|
270
|
+
case 2:
|
|
269
271
|
response = _context4.sent;
|
|
270
272
|
if (!response.data) {
|
|
271
|
-
_context4.next =
|
|
273
|
+
_context4.next = 3;
|
|
272
274
|
break;
|
|
273
275
|
}
|
|
274
276
|
return _context4.abrupt("return", response.data);
|
|
275
|
-
case
|
|
277
|
+
case 3:
|
|
276
278
|
throw error(response);
|
|
277
|
-
case
|
|
278
|
-
_context4.next =
|
|
279
|
+
case 4:
|
|
280
|
+
_context4.next = 6;
|
|
279
281
|
break;
|
|
280
|
-
case
|
|
281
|
-
_context4.prev =
|
|
282
|
-
|
|
283
|
-
throw error(
|
|
284
|
-
case
|
|
282
|
+
case 5:
|
|
283
|
+
_context4.prev = 5;
|
|
284
|
+
_t4 = _context4["catch"](1);
|
|
285
|
+
throw error(_t4);
|
|
286
|
+
case 6:
|
|
285
287
|
case "end":
|
|
286
288
|
return _context4.stop();
|
|
287
289
|
}
|
|
288
|
-
}, _callee4, null, [[1,
|
|
290
|
+
}, _callee4, null, [[1, 5]]);
|
|
289
291
|
}));
|
|
290
292
|
|
|
291
293
|
/**
|
|
@@ -304,37 +306,37 @@ export function Installation(http, data) {
|
|
|
304
306
|
*/
|
|
305
307
|
this.setServerConfig = /*#__PURE__*/function () {
|
|
306
308
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(config) {
|
|
307
|
-
var headers, response;
|
|
308
|
-
return _regeneratorRuntime.wrap(function
|
|
309
|
+
var headers, response, _t5;
|
|
310
|
+
return _regeneratorRuntime.wrap(function (_context5) {
|
|
309
311
|
while (1) switch (_context5.prev = _context5.next) {
|
|
310
312
|
case 0:
|
|
311
313
|
_context5.prev = 0;
|
|
312
314
|
headers = {
|
|
313
315
|
headers: _objectSpread({}, cloneDeep(params))
|
|
314
316
|
} || {};
|
|
315
|
-
_context5.next =
|
|
317
|
+
_context5.next = 1;
|
|
316
318
|
return http.put("".concat(_this.urlPath, "/server-configuration"), config, headers);
|
|
317
|
-
case
|
|
319
|
+
case 1:
|
|
318
320
|
response = _context5.sent;
|
|
319
321
|
if (!response.data) {
|
|
320
|
-
_context5.next =
|
|
322
|
+
_context5.next = 2;
|
|
321
323
|
break;
|
|
322
324
|
}
|
|
323
325
|
return _context5.abrupt("return", response.data);
|
|
324
|
-
case
|
|
326
|
+
case 2:
|
|
325
327
|
throw error(response);
|
|
326
|
-
case
|
|
327
|
-
_context5.next =
|
|
328
|
+
case 3:
|
|
329
|
+
_context5.next = 5;
|
|
328
330
|
break;
|
|
329
|
-
case
|
|
330
|
-
_context5.prev =
|
|
331
|
-
|
|
332
|
-
throw error(
|
|
333
|
-
case
|
|
331
|
+
case 4:
|
|
332
|
+
_context5.prev = 4;
|
|
333
|
+
_t5 = _context5["catch"](0);
|
|
334
|
+
throw error(_t5);
|
|
335
|
+
case 5:
|
|
334
336
|
case "end":
|
|
335
337
|
return _context5.stop();
|
|
336
338
|
}
|
|
337
|
-
}, _callee5, null, [[0,
|
|
339
|
+
}, _callee5, null, [[0, 4]]);
|
|
338
340
|
}));
|
|
339
341
|
return function (_x2) {
|
|
340
342
|
return _ref5.apply(this, arguments);
|
|
@@ -355,37 +357,37 @@ export function Installation(http, data) {
|
|
|
355
357
|
* .then((response) => console.log(response))
|
|
356
358
|
*/
|
|
357
359
|
this.installationData = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
358
|
-
var headers, response;
|
|
359
|
-
return _regeneratorRuntime.wrap(function
|
|
360
|
+
var headers, response, _t6;
|
|
361
|
+
return _regeneratorRuntime.wrap(function (_context6) {
|
|
360
362
|
while (1) switch (_context6.prev = _context6.next) {
|
|
361
363
|
case 0:
|
|
362
364
|
_context6.prev = 0;
|
|
363
365
|
headers = {
|
|
364
366
|
headers: _objectSpread({}, cloneDeep(params))
|
|
365
367
|
} || {};
|
|
366
|
-
_context6.next =
|
|
368
|
+
_context6.next = 1;
|
|
367
369
|
return http.get("".concat(_this.urlPath, "/installationData"), headers);
|
|
368
|
-
case
|
|
370
|
+
case 1:
|
|
369
371
|
response = _context6.sent;
|
|
370
372
|
if (!response.data) {
|
|
371
|
-
_context6.next =
|
|
373
|
+
_context6.next = 2;
|
|
372
374
|
break;
|
|
373
375
|
}
|
|
374
376
|
return _context6.abrupt("return", response.data);
|
|
375
|
-
case
|
|
377
|
+
case 2:
|
|
376
378
|
throw error(response);
|
|
377
|
-
case
|
|
378
|
-
_context6.next =
|
|
379
|
+
case 3:
|
|
380
|
+
_context6.next = 5;
|
|
379
381
|
break;
|
|
380
|
-
case
|
|
381
|
-
_context6.prev =
|
|
382
|
-
|
|
383
|
-
throw error(
|
|
384
|
-
case
|
|
382
|
+
case 4:
|
|
383
|
+
_context6.prev = 4;
|
|
384
|
+
_t6 = _context6["catch"](0);
|
|
385
|
+
throw error(_t6);
|
|
386
|
+
case 5:
|
|
385
387
|
case "end":
|
|
386
388
|
return _context6.stop();
|
|
387
389
|
}
|
|
388
|
-
}, _callee6, null, [[0,
|
|
390
|
+
}, _callee6, null, [[0, 4]]);
|
|
389
391
|
}));
|
|
390
392
|
|
|
391
393
|
/**
|
|
@@ -439,37 +441,43 @@ export function Installation(http, data) {
|
|
|
439
441
|
*
|
|
440
442
|
*/
|
|
441
443
|
this.getInstalledApps = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
|
|
442
|
-
var
|
|
443
|
-
|
|
444
|
+
var param,
|
|
445
|
+
headers,
|
|
446
|
+
response,
|
|
447
|
+
_args7 = arguments,
|
|
448
|
+
_t7;
|
|
449
|
+
return _regeneratorRuntime.wrap(function (_context7) {
|
|
444
450
|
while (1) switch (_context7.prev = _context7.next) {
|
|
445
451
|
case 0:
|
|
446
|
-
|
|
452
|
+
param = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
453
|
+
_context7.prev = 1;
|
|
447
454
|
headers = {
|
|
448
|
-
headers: _objectSpread({}, cloneDeep(params))
|
|
449
|
-
|
|
450
|
-
|
|
455
|
+
headers: _objectSpread({}, cloneDeep(params)),
|
|
456
|
+
params: _objectSpread({}, cloneDeep(param))
|
|
457
|
+
};
|
|
458
|
+
_context7.next = 2;
|
|
451
459
|
return http.get("".concat(_this.urlPath, "/view/apps"), headers);
|
|
452
|
-
case
|
|
460
|
+
case 2:
|
|
453
461
|
response = _context7.sent;
|
|
454
462
|
if (!response.data) {
|
|
455
|
-
_context7.next =
|
|
463
|
+
_context7.next = 3;
|
|
456
464
|
break;
|
|
457
465
|
}
|
|
458
466
|
return _context7.abrupt("return", response.data);
|
|
459
|
-
case
|
|
467
|
+
case 3:
|
|
460
468
|
throw error(response);
|
|
461
|
-
case
|
|
462
|
-
_context7.next =
|
|
469
|
+
case 4:
|
|
470
|
+
_context7.next = 6;
|
|
463
471
|
break;
|
|
464
|
-
case
|
|
465
|
-
_context7.prev =
|
|
466
|
-
|
|
467
|
-
throw error(
|
|
468
|
-
case
|
|
472
|
+
case 5:
|
|
473
|
+
_context7.prev = 5;
|
|
474
|
+
_t7 = _context7["catch"](1);
|
|
475
|
+
throw error(_t7);
|
|
476
|
+
case 6:
|
|
469
477
|
case "end":
|
|
470
478
|
return _context7.stop();
|
|
471
479
|
}
|
|
472
|
-
}, _callee7, null, [[
|
|
480
|
+
}, _callee7, null, [[1, 5]]);
|
|
473
481
|
}));
|
|
474
482
|
|
|
475
483
|
/**
|
|
@@ -487,37 +495,37 @@ export function Installation(http, data) {
|
|
|
487
495
|
*
|
|
488
496
|
*/
|
|
489
497
|
this.getInstalledUsers = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
490
|
-
var headers, response;
|
|
491
|
-
return _regeneratorRuntime.wrap(function
|
|
498
|
+
var headers, response, _t8;
|
|
499
|
+
return _regeneratorRuntime.wrap(function (_context8) {
|
|
492
500
|
while (1) switch (_context8.prev = _context8.next) {
|
|
493
501
|
case 0:
|
|
494
502
|
_context8.prev = 0;
|
|
495
503
|
headers = {
|
|
496
504
|
headers: _objectSpread({}, cloneDeep(params))
|
|
497
505
|
} || {};
|
|
498
|
-
_context8.next =
|
|
506
|
+
_context8.next = 1;
|
|
499
507
|
return http.get("".concat(_this.urlPath, "/view/users"), headers);
|
|
500
|
-
case
|
|
508
|
+
case 1:
|
|
501
509
|
response = _context8.sent;
|
|
502
510
|
if (!response.data) {
|
|
503
|
-
_context8.next =
|
|
511
|
+
_context8.next = 2;
|
|
504
512
|
break;
|
|
505
513
|
}
|
|
506
514
|
return _context8.abrupt("return", response.data);
|
|
507
|
-
case
|
|
515
|
+
case 2:
|
|
508
516
|
throw error(response);
|
|
509
|
-
case
|
|
510
|
-
_context8.next =
|
|
517
|
+
case 3:
|
|
518
|
+
_context8.next = 5;
|
|
511
519
|
break;
|
|
512
|
-
case
|
|
513
|
-
_context8.prev =
|
|
514
|
-
|
|
515
|
-
throw error(
|
|
516
|
-
case
|
|
520
|
+
case 4:
|
|
521
|
+
_context8.prev = 4;
|
|
522
|
+
_t8 = _context8["catch"](0);
|
|
523
|
+
throw error(_t8);
|
|
524
|
+
case 5:
|
|
517
525
|
case "end":
|
|
518
526
|
return _context8.stop();
|
|
519
527
|
}
|
|
520
|
-
}, _callee8, null, [[0,
|
|
528
|
+
}, _callee8, null, [[0, 4]]);
|
|
521
529
|
}));
|
|
522
530
|
|
|
523
531
|
/**
|
|
@@ -535,37 +543,37 @@ export function Installation(http, data) {
|
|
|
535
543
|
*
|
|
536
544
|
*/
|
|
537
545
|
this.getInstalledStacks = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
|
538
|
-
var headers, response;
|
|
539
|
-
return _regeneratorRuntime.wrap(function
|
|
546
|
+
var headers, response, _t9;
|
|
547
|
+
return _regeneratorRuntime.wrap(function (_context9) {
|
|
540
548
|
while (1) switch (_context9.prev = _context9.next) {
|
|
541
549
|
case 0:
|
|
542
550
|
_context9.prev = 0;
|
|
543
551
|
headers = {
|
|
544
552
|
headers: _objectSpread({}, cloneDeep(params))
|
|
545
553
|
} || {};
|
|
546
|
-
_context9.next =
|
|
554
|
+
_context9.next = 1;
|
|
547
555
|
return http.get("".concat(_this.urlPath, "/view/stacks"), headers);
|
|
548
|
-
case
|
|
556
|
+
case 1:
|
|
549
557
|
response = _context9.sent;
|
|
550
558
|
if (!response.data) {
|
|
551
|
-
_context9.next =
|
|
559
|
+
_context9.next = 2;
|
|
552
560
|
break;
|
|
553
561
|
}
|
|
554
562
|
return _context9.abrupt("return", response.data);
|
|
555
|
-
case
|
|
563
|
+
case 2:
|
|
556
564
|
throw error(response);
|
|
557
|
-
case
|
|
558
|
-
_context9.next =
|
|
565
|
+
case 3:
|
|
566
|
+
_context9.next = 5;
|
|
559
567
|
break;
|
|
560
|
-
case
|
|
561
|
-
_context9.prev =
|
|
562
|
-
|
|
563
|
-
throw error(
|
|
564
|
-
case
|
|
568
|
+
case 4:
|
|
569
|
+
_context9.prev = 4;
|
|
570
|
+
_t9 = _context9["catch"](0);
|
|
571
|
+
throw error(_t9);
|
|
572
|
+
case 5:
|
|
565
573
|
case "end":
|
|
566
574
|
return _context9.stop();
|
|
567
575
|
}
|
|
568
|
-
}, _callee9, null, [[0,
|
|
576
|
+
}, _callee9, null, [[0, 4]]);
|
|
569
577
|
}));
|
|
570
578
|
}
|
|
571
579
|
}
|
|
@@ -39,37 +39,37 @@ export function WebHooks(http, data) {
|
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
41
|
this.listExecutionLogs = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
42
|
-
var headers, response;
|
|
43
|
-
return _regeneratorRuntime.wrap(function
|
|
42
|
+
var headers, response, _t;
|
|
43
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
44
44
|
while (1) switch (_context.prev = _context.next) {
|
|
45
45
|
case 0:
|
|
46
46
|
_context.prev = 0;
|
|
47
47
|
headers = {
|
|
48
48
|
headers: _objectSpread({}, cloneDeep(params))
|
|
49
49
|
} || {};
|
|
50
|
-
_context.next =
|
|
50
|
+
_context.next = 1;
|
|
51
51
|
return http.get("".concat(_this.urlPath, "/executions"), headers);
|
|
52
|
-
case
|
|
52
|
+
case 1:
|
|
53
53
|
response = _context.sent;
|
|
54
54
|
if (!response.data) {
|
|
55
|
-
_context.next =
|
|
55
|
+
_context.next = 2;
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
return _context.abrupt("return", response.data);
|
|
59
|
-
case
|
|
59
|
+
case 2:
|
|
60
60
|
throw error(response);
|
|
61
|
-
case
|
|
62
|
-
_context.next =
|
|
61
|
+
case 3:
|
|
62
|
+
_context.next = 5;
|
|
63
63
|
break;
|
|
64
|
-
case
|
|
65
|
-
_context.prev =
|
|
66
|
-
|
|
67
|
-
throw error(
|
|
68
|
-
case
|
|
64
|
+
case 4:
|
|
65
|
+
_context.prev = 4;
|
|
66
|
+
_t = _context["catch"](0);
|
|
67
|
+
throw error(_t);
|
|
68
|
+
case 5:
|
|
69
69
|
case "end":
|
|
70
70
|
return _context.stop();
|
|
71
71
|
}
|
|
72
|
-
}, _callee, null, [[0,
|
|
72
|
+
}, _callee, null, [[0, 4]]);
|
|
73
73
|
}));
|
|
74
74
|
|
|
75
75
|
/**
|
|
@@ -89,37 +89,37 @@ export function WebHooks(http, data) {
|
|
|
89
89
|
*/
|
|
90
90
|
this.getExecutionLog = /*#__PURE__*/function () {
|
|
91
91
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(executionUid) {
|
|
92
|
-
var headers, response;
|
|
93
|
-
return _regeneratorRuntime.wrap(function
|
|
92
|
+
var headers, response, _t2;
|
|
93
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
94
94
|
while (1) switch (_context2.prev = _context2.next) {
|
|
95
95
|
case 0:
|
|
96
96
|
_context2.prev = 0;
|
|
97
97
|
headers = {
|
|
98
98
|
headers: _objectSpread({}, cloneDeep(params))
|
|
99
99
|
} || {};
|
|
100
|
-
_context2.next =
|
|
100
|
+
_context2.next = 1;
|
|
101
101
|
return http.get("".concat(_this.urlPath, "/executions/").concat(executionUid), headers);
|
|
102
|
-
case
|
|
102
|
+
case 1:
|
|
103
103
|
response = _context2.sent;
|
|
104
104
|
if (!response.data) {
|
|
105
|
-
_context2.next =
|
|
105
|
+
_context2.next = 2;
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
return _context2.abrupt("return", response.data);
|
|
109
|
-
case
|
|
109
|
+
case 2:
|
|
110
110
|
throw error(response);
|
|
111
|
-
case
|
|
112
|
-
_context2.next =
|
|
111
|
+
case 3:
|
|
112
|
+
_context2.next = 5;
|
|
113
113
|
break;
|
|
114
|
-
case
|
|
115
|
-
_context2.prev =
|
|
116
|
-
|
|
117
|
-
throw error(
|
|
118
|
-
case
|
|
114
|
+
case 4:
|
|
115
|
+
_context2.prev = 4;
|
|
116
|
+
_t2 = _context2["catch"](0);
|
|
117
|
+
throw error(_t2);
|
|
118
|
+
case 5:
|
|
119
119
|
case "end":
|
|
120
120
|
return _context2.stop();
|
|
121
121
|
}
|
|
122
|
-
}, _callee2, null, [[0,
|
|
122
|
+
}, _callee2, null, [[0, 4]]);
|
|
123
123
|
}));
|
|
124
124
|
return function (_x) {
|
|
125
125
|
return _ref2.apply(this, arguments);
|
|
@@ -143,37 +143,37 @@ export function WebHooks(http, data) {
|
|
|
143
143
|
*/
|
|
144
144
|
this.retryExecution = /*#__PURE__*/function () {
|
|
145
145
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(executionUid) {
|
|
146
|
-
var headers, response;
|
|
147
|
-
return _regeneratorRuntime.wrap(function
|
|
146
|
+
var headers, response, _t3;
|
|
147
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
148
148
|
while (1) switch (_context3.prev = _context3.next) {
|
|
149
149
|
case 0:
|
|
150
150
|
_context3.prev = 0;
|
|
151
151
|
headers = {
|
|
152
152
|
headers: _objectSpread({}, cloneDeep(params))
|
|
153
153
|
} || {};
|
|
154
|
-
_context3.next =
|
|
154
|
+
_context3.next = 1;
|
|
155
155
|
return http.post("".concat(_this.urlPath, "/executions/").concat(executionUid, "/retry"), headers);
|
|
156
|
-
case
|
|
156
|
+
case 1:
|
|
157
157
|
response = _context3.sent;
|
|
158
158
|
if (!response.data) {
|
|
159
|
-
_context3.next =
|
|
159
|
+
_context3.next = 2;
|
|
160
160
|
break;
|
|
161
161
|
}
|
|
162
162
|
return _context3.abrupt("return", response.data);
|
|
163
|
-
case
|
|
163
|
+
case 2:
|
|
164
164
|
throw error(response);
|
|
165
|
-
case
|
|
166
|
-
_context3.next =
|
|
165
|
+
case 3:
|
|
166
|
+
_context3.next = 5;
|
|
167
167
|
break;
|
|
168
|
-
case
|
|
169
|
-
_context3.prev =
|
|
170
|
-
|
|
171
|
-
throw error(
|
|
172
|
-
case
|
|
168
|
+
case 4:
|
|
169
|
+
_context3.prev = 4;
|
|
170
|
+
_t3 = _context3["catch"](0);
|
|
171
|
+
throw error(_t3);
|
|
172
|
+
case 5:
|
|
173
173
|
case "end":
|
|
174
174
|
return _context3.stop();
|
|
175
175
|
}
|
|
176
|
-
}, _callee3, null, [[0,
|
|
176
|
+
}, _callee3, null, [[0, 4]]);
|
|
177
177
|
}));
|
|
178
178
|
return function (_x2) {
|
|
179
179
|
return _ref3.apply(this, arguments);
|