@contentstack/marketplace-sdk 1.2.4 → 1.2.6

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE +1 -1
  3. package/dist/es-modules/contentstackClient.js +1 -1
  4. package/dist/es-modules/core/concurrency-queue.js +3 -3
  5. package/dist/es-modules/entity.js +5 -5
  6. package/dist/es-modules/marketplace/app/hosting/deployment.js +5 -5
  7. package/dist/es-modules/marketplace/app/hosting/index.js +6 -6
  8. package/dist/es-modules/marketplace/app/index.js +6 -6
  9. package/dist/es-modules/marketplace/app/oauth/index.js +3 -3
  10. package/dist/es-modules/marketplace/apprequest/index.js +3 -3
  11. package/dist/es-modules/marketplace/authorization/index.js +3 -3
  12. package/dist/es-modules/marketplace/index.js +1 -1
  13. package/dist/es-modules/marketplace/installation/index.js +9 -9
  14. package/dist/es-modules/marketplace/installation/webhooks/index.js +3 -3
  15. package/dist/es5/contentstack.js +3 -3
  16. package/dist/es5/contentstackClient.js +1 -1
  17. package/dist/es5/core/concurrency-queue.js +3 -3
  18. package/dist/es5/entity.js +5 -5
  19. package/dist/es5/marketplace/app/hosting/deployment.js +5 -5
  20. package/dist/es5/marketplace/app/hosting/index.js +6 -6
  21. package/dist/es5/marketplace/app/index.js +6 -6
  22. package/dist/es5/marketplace/app/oauth/index.js +3 -3
  23. package/dist/es5/marketplace/apprequest/index.js +3 -3
  24. package/dist/es5/marketplace/authorization/index.js +3 -3
  25. package/dist/es5/marketplace/index.js +1 -1
  26. package/dist/es5/marketplace/installation/index.js +9 -9
  27. package/dist/es5/marketplace/installation/webhooks/index.js +3 -3
  28. package/dist/nativescript/contentstack-marketplace.js +1 -1
  29. package/dist/node/contentstack-marketplace.js +1 -1
  30. package/dist/react-native/contentstack-marketplace.js +1 -1
  31. package/dist/web/contentstack-marketplace.js +1 -1
  32. package/package.json +29 -26
  33. package/sanity-report-dev11.js +74 -0
  34. package/sanity-report.mjs +59 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # Changelog
2
+ ## [v1.2.6](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.2.6) (2024-03-03)
3
+ - Update sanity tests
4
+
5
+ ## [v1.2.5](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.2.5) (2025-01-17)
6
+ - Dependency update
7
+
2
8
  ## [v1.2.4](https://github.com/contentstack/contentstack-marketplace-sdk/tree/v1.2.4) (2024-10-22)
3
9
  - Node version bump in github package publish workflow file
4
10
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2012-2024 Contentstack
3
+ Copyright (c) 2012-2025 Contentstack
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,7 @@ export default function contentstackClient(_ref) {
27
27
  */
28
28
 
29
29
  var region = http.defaults.region;
30
- var baseUrlPath = "https://api.contentstack.io:443/v3/user-session";
30
+ var baseUrlPath = "/user-session";
31
31
  if (region && region !== Region.NA) {
32
32
  baseUrlPath = "https://".concat(region, "-api.contentstack.com:443/v3/user-session");
33
33
  }
@@ -118,7 +118,7 @@ export function ConcurrencyQueue(_ref) {
118
118
  });
119
119
  });
120
120
  };
121
- var delay = function delay(time) {
121
+ var _delay = function delay(time) {
122
122
  var isRefreshToken = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
123
123
  if (!_this.paused) {
124
124
  _this.paused = true;
@@ -127,7 +127,7 @@ export function ConcurrencyQueue(_ref) {
127
127
  // Wait and prosed the Queued request.
128
128
  if (_this.running.length > 0) {
129
129
  setTimeout(function () {
130
- delay(time, isRefreshToken);
130
+ _delay(time, isRefreshToken);
131
131
  }, time);
132
132
  }
133
133
  return new Promise(function (resolve) {
@@ -221,7 +221,7 @@ export function ConcurrencyQueue(_ref) {
221
221
  }
222
222
  _this.running.shift();
223
223
  // Cool down the running requests
224
- delay(wait, response.status === 401);
224
+ _delay(wait, response.status === 401);
225
225
  error.config.retryCount = networkError;
226
226
  // deepcode ignore Ssrf: URL is dynamic
227
227
  return axios(updateRequestConfig(error, retryErrorType, wait));
@@ -10,7 +10,7 @@ export var create = function create(_ref) {
10
10
  var http = _ref.http,
11
11
  params = _ref.params;
12
12
  return /*#__PURE__*/function () {
13
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data, param) {
13
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(data, param) {
14
14
  var headers, response;
15
15
  return _regeneratorRuntime.wrap(function _callee$(_context) {
16
16
  while (1) switch (_context.prev = _context.next) {
@@ -51,7 +51,7 @@ export var create = function create(_ref) {
51
51
  };
52
52
  export var update = function update(http, type) {
53
53
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
54
- return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
54
+ return /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
55
55
  var param,
56
56
  updateData,
57
57
  json,
@@ -111,7 +111,7 @@ export var update = function update(http, type) {
111
111
  export var deleteEntity = function deleteEntity(http) {
112
112
  var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
113
113
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
114
- return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
114
+ return /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
115
115
  var param,
116
116
  headers,
117
117
  response,
@@ -164,7 +164,7 @@ export var deleteEntity = function deleteEntity(http) {
164
164
  };
165
165
  export var fetch = function fetch(http, type) {
166
166
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
167
- return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
167
+ return /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
168
168
  var param,
169
169
  headers,
170
170
  response,
@@ -212,7 +212,7 @@ export var fetch = function fetch(http, type) {
212
212
  };
213
213
  export var fetchAll = function fetchAll(http, wrapperCollection) {
214
214
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
215
- return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
215
+ return /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
216
216
  var param,
217
217
  headers,
218
218
  response,
@@ -44,7 +44,7 @@ export function Deployment(http, data, params) {
44
44
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment('deployment_uid').fetch()
45
45
  * .then((data) => {})
46
46
  */
47
- this.fetch = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
47
+ this.fetch = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
48
48
  var headers, response, content;
49
49
  return _regeneratorRuntime.wrap(function _callee$(_context) {
50
50
  while (1) switch (_context.prev = _context.next) {
@@ -94,7 +94,7 @@ export function Deployment(http, data, params) {
94
94
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment('deployment_uid').logs()
95
95
  * .then((data) => {})
96
96
  */
97
- this.logs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
97
+ this.logs = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
98
98
  var headers, response;
99
99
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
100
100
  while (1) switch (_context2.prev = _context2.next) {
@@ -140,7 +140,7 @@ export function Deployment(http, data, params) {
140
140
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment('deployment_uid').signedDownloadUrl()
141
141
  * .then((data) => {})
142
142
  */
143
- this.signedDownloadUrl = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
143
+ this.signedDownloadUrl = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
144
144
  var headers, response;
145
145
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
146
146
  while (1) switch (_context3.prev = _context3.next) {
@@ -187,7 +187,7 @@ export function Deployment(http, data, params) {
187
187
  * .then((data) => {})
188
188
  */
189
189
  this.create = /*#__PURE__*/function () {
190
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
190
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
191
191
  var uploadUid, fileType, withAdvancedOptions, headers, response, content;
192
192
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
193
193
  while (1) switch (_context4.prev = _context4.next) {
@@ -250,7 +250,7 @@ export function Deployment(http, data, params) {
250
250
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment().create()
251
251
  * .then((data) => {})
252
252
  */
253
- this.findAll = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
253
+ this.findAll = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
254
254
  var param,
255
255
  headers,
256
256
  response,
@@ -34,7 +34,7 @@ export function Hosting(http, data, params) {
34
34
  * client.marketplace('organization_uid').app('manifest_uid').hosting().isEnable()
35
35
  * .then((data) => {})
36
36
  */
37
- this.isEnable = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
37
+ this.isEnable = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
38
38
  var headers, response;
39
39
  return _regeneratorRuntime.wrap(function _callee$(_context) {
40
40
  while (1) switch (_context.prev = _context.next) {
@@ -80,7 +80,7 @@ export function Hosting(http, data, params) {
80
80
  * client.marketplace('organization_uid').app('manifest_uid').hosting().enable()
81
81
  * .then((data) => {})
82
82
  */
83
- this.enable = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
83
+ this.enable = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
84
84
  var headers, response;
85
85
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
86
86
  while (1) switch (_context2.prev = _context2.next) {
@@ -126,7 +126,7 @@ export function Hosting(http, data, params) {
126
126
  * client.marketplace('organization_uid').app('manifest_uid').hosting().disable()
127
127
  * .then((data) => {})
128
128
  */
129
- this.disable = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
129
+ this.disable = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
130
130
  var headers, response;
131
131
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
132
132
  while (1) switch (_context3.prev = _context3.next) {
@@ -172,7 +172,7 @@ export function Hosting(http, data, params) {
172
172
  * client.marketplace('organization_uid').app('manifest_uid').hosting().createUploadUrl()
173
173
  * .then((data) => {})
174
174
  */
175
- this.createUploadUrl = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
175
+ this.createUploadUrl = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
176
176
  var headers, response;
177
177
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
178
178
  while (1) switch (_context4.prev = _context4.next) {
@@ -218,7 +218,7 @@ export function Hosting(http, data, params) {
218
218
  * client.marketplace('organization_uid').app('manifest_uid').hosting().latestLiveDeployment()
219
219
  * .then((data) => {})
220
220
  */
221
- this.latestLiveDeployment = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
221
+ this.latestLiveDeployment = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
222
222
  var headers, response, content;
223
223
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
224
224
  while (1) switch (_context5.prev = _context5.next) {
@@ -294,7 +294,7 @@ export function Hosting(http, data, params) {
294
294
  * client.marketplace('organization_uid').app('manifest_uid').hosting().disconnect({ 'provider': 'launch' })
295
295
  *
296
296
  */
297
- this.disconnect = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
297
+ this.disconnect = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
298
298
  var data,
299
299
  headers,
300
300
  response,
@@ -139,7 +139,7 @@ export function App(http, data) {
139
139
  * .then((installation) => console.log(installation))
140
140
  */
141
141
  this.install = /*#__PURE__*/function () {
142
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
142
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
143
143
  var targetUid, targetType, headers, response;
144
144
  return _regeneratorRuntime.wrap(function _callee$(_context) {
145
145
  while (1) switch (_context.prev = _context.next) {
@@ -196,7 +196,7 @@ export function App(http, data) {
196
196
  * .then((reinstallation) => console.log(installation))
197
197
  */
198
198
  this.reinstall = /*#__PURE__*/function () {
199
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
199
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
200
200
  var targetUid, targetType, headers, response;
201
201
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
202
202
  while (1) switch (_context2.prev = _context2.next) {
@@ -253,7 +253,7 @@ export function App(http, data) {
253
253
  * .then((installation) => console.log(installation))
254
254
  */
255
255
  this.upgrade = /*#__PURE__*/function () {
256
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
256
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
257
257
  var targetUid, targetType, headers, response;
258
258
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
259
259
  while (1) switch (_context3.prev = _context3.next) {
@@ -308,7 +308,7 @@ export function App(http, data) {
308
308
  * .then((response) => console.log(response))
309
309
  *
310
310
  */
311
- this.getRequests = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
311
+ this.getRequests = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
312
312
  var headers, response;
313
313
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
314
314
  while (1) switch (_context4.prev = _context4.next) {
@@ -362,7 +362,7 @@ export function App(http, data) {
362
362
  *
363
363
  */
364
364
  this.authorize = /*#__PURE__*/function () {
365
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref8) {
365
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref8) {
366
366
  var responseType, clientId, redirectUri, scope, state, headers, content, response;
367
367
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
368
368
  while (1) switch (_context5.prev = _context5.next) {
@@ -440,7 +440,7 @@ export function App(http, data) {
440
440
  * .then((collection) => console.log(collection))
441
441
  *
442
442
  */
443
- this.listInstallations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
443
+ this.listInstallations = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
444
444
  var headers, response;
445
445
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
446
446
  while (1) switch (_context6.prev = _context6.next) {
@@ -36,7 +36,7 @@ export function Oauth(http, data, params) {
36
36
  * client.marketplace('organization_uid').app('manifest_uid').oauth().fetch()
37
37
  * .then((oAuthConfig) => console.log(oAuthConfig))
38
38
  */
39
- this.fetch = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
39
+ this.fetch = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
40
40
  var param,
41
41
  headers,
42
42
  response,
@@ -99,7 +99,7 @@ export function Oauth(http, data, params) {
99
99
  * .then((oAuthConfig) => console.log(oAuthConfig))
100
100
  */
101
101
  this.update = /*#__PURE__*/function () {
102
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
102
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
103
103
  var config, _ref2$param, param, headers, response;
104
104
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
105
105
  while (1) switch (_context2.prev = _context2.next) {
@@ -152,7 +152,7 @@ export function Oauth(http, data, params) {
152
152
  * client.marketplace('organization_uid').app('manifest_uid').oauth().getScopes()
153
153
  * .then((scopes) => console.log(scopes))
154
154
  */
155
- this.getScopes = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
155
+ this.getScopes = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
156
156
  var headers, response;
157
157
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
158
158
  while (1) switch (_context3.prev = _context3.next) {
@@ -36,7 +36,7 @@ export function AppRequest(http, data, param) {
36
36
  *
37
37
  */
38
38
  this["delete"] = /*#__PURE__*/function () {
39
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(requestUid) {
39
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(requestUid) {
40
40
  var headers, response;
41
41
  return _regeneratorRuntime.wrap(function _callee$(_context) {
42
42
  while (1) switch (_context.prev = _context.next) {
@@ -90,7 +90,7 @@ export function AppRequest(http, data, param) {
90
90
  *
91
91
  */
92
92
  this.create = /*#__PURE__*/function () {
93
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
93
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
94
94
  var appUid, targetUid, headers, response;
95
95
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
96
96
  while (1) switch (_context2.prev = _context2.next) {
@@ -146,7 +146,7 @@ export function AppRequest(http, data, param) {
146
146
  * .then((response) => console.log(response))
147
147
  *
148
148
  */
149
- this.findAll = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
149
+ this.findAll = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
150
150
  var param,
151
151
  headers,
152
152
  response,
@@ -35,7 +35,7 @@ export function Authorization(http, data, params) {
35
35
  * client.marketplace('organization_uid').app('manifest_uid').authorization().findAll()
36
36
  * .then((response) => console.log(response))
37
37
  */
38
- this.findAll = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
38
+ this.findAll = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
39
39
  var param,
40
40
  headers,
41
41
  response,
@@ -86,7 +86,7 @@ export function Authorization(http, data, params) {
86
86
  * client.marketplace('organization_uid').app('manifest_uid').authorization().revokeAll()
87
87
  * .then((response) => console.log(response))
88
88
  */
89
- this.revokeAll = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
89
+ this.revokeAll = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
90
90
  var headers, response;
91
91
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
92
92
  while (1) switch (_context2.prev = _context2.next) {
@@ -133,7 +133,7 @@ export function Authorization(http, data, params) {
133
133
  * .then((response) => console.log(response))
134
134
  */
135
135
  this.revoke = /*#__PURE__*/function () {
136
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(authorizationUid) {
136
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(authorizationUid) {
137
137
  var headers, response;
138
138
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
139
139
  while (1) switch (_context3.prev = _context3.next) {
@@ -126,7 +126,7 @@ export function Marketplace(http, data) {
126
126
  * .then((roles) => console.log(roles))
127
127
  *
128
128
  */
129
- this.findAllAuthorizedApps = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
129
+ this.findAllAuthorizedApps = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
130
130
  var param,
131
131
  headers,
132
132
  response,
@@ -95,7 +95,7 @@ export function Installation(http, data) {
95
95
  * client.marketplace('organization_uid').installation('installation_uid').configuration()
96
96
  * .then((response) => console.log(response))
97
97
  */
98
- this.configuration = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
98
+ this.configuration = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
99
99
  var param,
100
100
  headers,
101
101
  response,
@@ -149,7 +149,7 @@ export function Installation(http, data) {
149
149
  * .then((response) => console.log(response))
150
150
  */
151
151
  this.setConfiguration = /*#__PURE__*/function () {
152
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(config) {
152
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(config) {
153
153
  var headers, response;
154
154
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
155
155
  while (1) switch (_context2.prev = _context2.next) {
@@ -201,7 +201,7 @@ export function Installation(http, data) {
201
201
  * client.marketplace('organization_uid').installation('installation_uid').getConfigLocation()
202
202
  * .then((response) => console.log(response))
203
203
  */
204
- this.getConfigLocation = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
204
+ this.getConfigLocation = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
205
205
  var headers, response;
206
206
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
207
207
  while (1) switch (_context3.prev = _context3.next) {
@@ -249,7 +249,7 @@ export function Installation(http, data) {
249
249
  * client.marketplace('organization_uid').installation('installation_uid').serverConfig()
250
250
  * .then((response) => console.log(response))
251
251
  */
252
- this.serverConfig = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
252
+ this.serverConfig = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
253
253
  var param,
254
254
  headers,
255
255
  response,
@@ -303,7 +303,7 @@ export function Installation(http, data) {
303
303
  * .then((response) => console.log(response))
304
304
  */
305
305
  this.setServerConfig = /*#__PURE__*/function () {
306
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(config) {
306
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(config) {
307
307
  var headers, response;
308
308
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
309
309
  while (1) switch (_context5.prev = _context5.next) {
@@ -354,7 +354,7 @@ export function Installation(http, data) {
354
354
  * client.marketplace('organization_uid').installation('installation_uid').installationData()
355
355
  * .then((response) => console.log(response))
356
356
  */
357
- this.installationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
357
+ this.installationData = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
358
358
  var headers, response;
359
359
  return _regeneratorRuntime.wrap(function _callee6$(_context6) {
360
360
  while (1) switch (_context6.prev = _context6.next) {
@@ -438,7 +438,7 @@ export function Installation(http, data) {
438
438
  * .then((collection) => console.log(collection))
439
439
  *
440
440
  */
441
- this.getInstalledApps = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
441
+ this.getInstalledApps = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
442
442
  var headers, response;
443
443
  return _regeneratorRuntime.wrap(function _callee7$(_context7) {
444
444
  while (1) switch (_context7.prev = _context7.next) {
@@ -486,7 +486,7 @@ export function Installation(http, data) {
486
486
  * .then((collection) => console.log(collection))
487
487
  *
488
488
  */
489
- this.getInstalledUsers = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
489
+ this.getInstalledUsers = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
490
490
  var headers, response;
491
491
  return _regeneratorRuntime.wrap(function _callee8$(_context8) {
492
492
  while (1) switch (_context8.prev = _context8.next) {
@@ -534,7 +534,7 @@ export function Installation(http, data) {
534
534
  * .then((collection) => console.log(collection))
535
535
  *
536
536
  */
537
- this.getInstalledStacks = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
537
+ this.getInstalledStacks = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
538
538
  var headers, response;
539
539
  return _regeneratorRuntime.wrap(function _callee9$(_context9) {
540
540
  while (1) switch (_context9.prev = _context9.next) {
@@ -38,7 +38,7 @@ export function WebHooks(http, data) {
38
38
  * .then((installation) => console.log(installation))
39
39
  *
40
40
  */
41
- this.listExecutionLogs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
41
+ this.listExecutionLogs = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
42
42
  var headers, response;
43
43
  return _regeneratorRuntime.wrap(function _callee$(_context) {
44
44
  while (1) switch (_context.prev = _context.next) {
@@ -88,7 +88,7 @@ export function WebHooks(http, data) {
88
88
  *
89
89
  */
90
90
  this.getExecutionLog = /*#__PURE__*/function () {
91
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(executionUid) {
91
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(executionUid) {
92
92
  var headers, response;
93
93
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
94
94
  while (1) switch (_context2.prev = _context2.next) {
@@ -142,7 +142,7 @@ export function WebHooks(http, data) {
142
142
  *
143
143
  */
144
144
  this.retryExecution = /*#__PURE__*/function () {
145
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(executionUid) {
145
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(executionUid) {
146
146
  var headers, response;
147
147
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
148
148
  while (1) switch (_context3.prev = _context3.next) {
@@ -22,9 +22,9 @@ var _region = require("./core/region.js");
22
22
  var _region2 = (0, _interopRequireDefault2["default"])(_region);
23
23
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
24
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty3["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
25
- * The Content Management API (CMA) is used to manage the content of your Contentstack account. This includes creating, updating, deleting, and fetching content of your account.
26
- * @namespace Contentstack
27
- */
25
+ * The Content Management API (CMA) is used to manage the content of your Contentstack account. This includes creating, updating, deleting, and fetching content of your account.
26
+ * @namespace Contentstack
27
+ */
28
28
  /**
29
29
  * Create client instance
30
30
  * @name client
@@ -36,7 +36,7 @@ function contentstackClient(_ref) {
36
36
  */
37
37
 
38
38
  var region = http.defaults.region;
39
- var baseUrlPath = "https://api.contentstack.io:443/v3/user-session";
39
+ var baseUrlPath = "/user-session";
40
40
  if (region && region !== _contentstack.Region.NA) {
41
41
  baseUrlPath = "https://".concat(region, "-api.contentstack.com:443/v3/user-session");
42
42
  }
@@ -128,7 +128,7 @@ function ConcurrencyQueue(_ref) {
128
128
  });
129
129
  });
130
130
  };
131
- var delay = function delay(time) {
131
+ var _delay = function delay(time) {
132
132
  var isRefreshToken = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
133
133
  if (!_this.paused) {
134
134
  _this.paused = true;
@@ -137,7 +137,7 @@ function ConcurrencyQueue(_ref) {
137
137
  // Wait and prosed the Queued request.
138
138
  if (_this.running.length > 0) {
139
139
  setTimeout(function () {
140
- delay(time, isRefreshToken);
140
+ _delay(time, isRefreshToken);
141
141
  }, time);
142
142
  }
143
143
  return new Promise(function (resolve) {
@@ -231,7 +231,7 @@ function ConcurrencyQueue(_ref) {
231
231
  }
232
232
  _this.running.shift();
233
233
  // Cool down the running requests
234
- delay(wait, response.status === 401);
234
+ _delay(wait, response.status === 401);
235
235
  error.config.retryCount = networkError;
236
236
  // deepcode ignore Ssrf: URL is dynamic
237
237
  return axios(updateRequestConfig(error, retryErrorType, wait));
@@ -25,7 +25,7 @@ var create = exports.create = function create(_ref) {
25
25
  var http = _ref.http,
26
26
  params = _ref.params;
27
27
  return /*#__PURE__*/function () {
28
- var _ref2 = (0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee(data, param) {
28
+ var _ref2 = (0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee(data, param) {
29
29
  var headers, response;
30
30
  return _regenerator2["default"].wrap(function _callee$(_context) {
31
31
  while (1) switch (_context.prev = _context.next) {
@@ -66,7 +66,7 @@ var create = exports.create = function create(_ref) {
66
66
  };
67
67
  var update = exports.update = function update(http, type) {
68
68
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
69
- return /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee2() {
69
+ return /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee2() {
70
70
  var param,
71
71
  updateData,
72
72
  json,
@@ -126,7 +126,7 @@ var update = exports.update = function update(http, type) {
126
126
  var deleteEntity = exports.deleteEntity = function deleteEntity(http) {
127
127
  var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
128
128
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
129
- return /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee3() {
129
+ return /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee3() {
130
130
  var param,
131
131
  headers,
132
132
  response,
@@ -179,7 +179,7 @@ var deleteEntity = exports.deleteEntity = function deleteEntity(http) {
179
179
  };
180
180
  var fetch = exports.fetch = function fetch(http, type) {
181
181
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
182
- return /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee4() {
182
+ return /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee4() {
183
183
  var param,
184
184
  headers,
185
185
  response,
@@ -227,7 +227,7 @@ var fetch = exports.fetch = function fetch(http, type) {
227
227
  };
228
228
  var fetchAll = exports.fetchAll = function fetchAll(http, wrapperCollection) {
229
229
  var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
230
- return /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee5() {
230
+ return /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee5() {
231
231
  var param,
232
232
  headers,
233
233
  response,
@@ -58,7 +58,7 @@ function Deployment(http, data, params) {
58
58
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment('deployment_uid').fetch()
59
59
  * .then((data) => {})
60
60
  */
61
- this.fetch = /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee() {
61
+ this.fetch = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee() {
62
62
  var headers, response, content;
63
63
  return _regenerator2["default"].wrap(function _callee$(_context) {
64
64
  while (1) switch (_context.prev = _context.next) {
@@ -108,7 +108,7 @@ function Deployment(http, data, params) {
108
108
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment('deployment_uid').logs()
109
109
  * .then((data) => {})
110
110
  */
111
- this.logs = /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee2() {
111
+ this.logs = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee2() {
112
112
  var headers, response;
113
113
  return _regenerator2["default"].wrap(function _callee2$(_context2) {
114
114
  while (1) switch (_context2.prev = _context2.next) {
@@ -154,7 +154,7 @@ function Deployment(http, data, params) {
154
154
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment('deployment_uid').signedDownloadUrl()
155
155
  * .then((data) => {})
156
156
  */
157
- this.signedDownloadUrl = /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee3() {
157
+ this.signedDownloadUrl = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee3() {
158
158
  var headers, response;
159
159
  return _regenerator2["default"].wrap(function _callee3$(_context3) {
160
160
  while (1) switch (_context3.prev = _context3.next) {
@@ -201,7 +201,7 @@ function Deployment(http, data, params) {
201
201
  * .then((data) => {})
202
202
  */
203
203
  this.create = /*#__PURE__*/function () {
204
- var _ref5 = (0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee4(_ref4) {
204
+ var _ref5 = (0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee4(_ref4) {
205
205
  var uploadUid, fileType, withAdvancedOptions, headers, response, content;
206
206
  return _regenerator2["default"].wrap(function _callee4$(_context4) {
207
207
  while (1) switch (_context4.prev = _context4.next) {
@@ -264,7 +264,7 @@ function Deployment(http, data, params) {
264
264
  * client.marketplace('organization_uid').app('manifest_uid').hosting().deployment().create()
265
265
  * .then((data) => {})
266
266
  */
267
- this.findAll = /*#__PURE__*/(0, _asyncToGenerator3["default"])( /*#__PURE__*/_regenerator2["default"].mark(function _callee5() {
267
+ this.findAll = /*#__PURE__*/(0, _asyncToGenerator3["default"])(/*#__PURE__*/_regenerator2["default"].mark(function _callee5() {
268
268
  var param,
269
269
  headers,
270
270
  response,