contentful-management 7.45.0 → 7.45.4

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 (60) hide show
  1. package/dist/contentful-management.browser.js +64 -74
  2. package/dist/contentful-management.browser.js.map +1 -1
  3. package/dist/contentful-management.browser.min.js +1 -1
  4. package/dist/contentful-management.legacy.js +64 -74
  5. package/dist/contentful-management.legacy.js.map +1 -1
  6. package/dist/contentful-management.legacy.min.js +1 -1
  7. package/dist/contentful-management.node.js +59 -69
  8. package/dist/contentful-management.node.js.map +1 -1
  9. package/dist/contentful-management.node.min.js +1 -1
  10. package/dist/es-modules/adapters/REST/endpoints/api-key.js +1 -1
  11. package/dist/es-modules/adapters/REST/endpoints/entry.js +4 -3
  12. package/dist/es-modules/adapters/REST/endpoints/organization.js +2 -2
  13. package/dist/es-modules/adapters/REST/endpoints/space.js +4 -4
  14. package/dist/es-modules/adapters/REST/rest-adapter.js +1 -1
  15. package/dist/es-modules/common-utils.js +1 -1
  16. package/dist/es-modules/constants/editor-interface-defaults/sidebar-defaults.js +1 -8
  17. package/dist/es-modules/contentful-management.js +1 -1
  18. package/dist/es-modules/create-entry-api.js +1 -1
  19. package/dist/es-modules/create-environment-api.js +9 -4
  20. package/dist/es-modules/entities/locale.js +1 -1
  21. package/dist/es-modules/plain/as-iterator.js +12 -8
  22. package/dist/typings/common-types.d.ts +4 -0
  23. package/dist/typings/create-entry-api.d.ts +3 -3
  24. package/dist/typings/create-environment-api.d.ts +8 -6
  25. package/dist/typings/entities/api-key.d.ts +1 -1578
  26. package/dist/typings/entities/app-bundle.d.ts +1 -1578
  27. package/dist/typings/entities/app-definition.d.ts +1 -1578
  28. package/dist/typings/entities/app-installation.d.ts +1 -1578
  29. package/dist/typings/entities/app-upload.d.ts +1 -1578
  30. package/dist/typings/entities/asset.d.ts +1 -1577
  31. package/dist/typings/entities/comment.d.ts +1 -1578
  32. package/dist/typings/entities/content-type.d.ts +1 -1578
  33. package/dist/typings/entities/editor-interface.d.ts +1 -1578
  34. package/dist/typings/entities/entry.d.ts +7 -1580
  35. package/dist/typings/entities/environment-alias.d.ts +1 -1578
  36. package/dist/typings/entities/environment.d.ts +1 -1578
  37. package/dist/typings/entities/extension.d.ts +1 -1578
  38. package/dist/typings/entities/locale.d.ts +1 -1578
  39. package/dist/typings/entities/organization-membership.d.ts +1 -1578
  40. package/dist/typings/entities/organization.d.ts +1 -1578
  41. package/dist/typings/entities/personal-access-token.d.ts +1 -1578
  42. package/dist/typings/entities/preview-api-key.d.ts +1 -1578
  43. package/dist/typings/entities/release-action.d.ts +1 -1578
  44. package/dist/typings/entities/role.d.ts +1 -1578
  45. package/dist/typings/entities/scheduled-action.d.ts +1 -1578
  46. package/dist/typings/entities/snapshot.d.ts +1 -1578
  47. package/dist/typings/entities/space-member.d.ts +1 -1578
  48. package/dist/typings/entities/space-membership.d.ts +1 -1578
  49. package/dist/typings/entities/space.d.ts +1 -1578
  50. package/dist/typings/entities/tag.d.ts +1 -1578
  51. package/dist/typings/entities/task.d.ts +1 -1578
  52. package/dist/typings/entities/team-membership.d.ts +1 -1578
  53. package/dist/typings/entities/team-space-membership.d.ts +1 -1578
  54. package/dist/typings/entities/team.d.ts +1 -1578
  55. package/dist/typings/entities/usage.d.ts +1 -1578
  56. package/dist/typings/entities/user.d.ts +1 -1578
  57. package/dist/typings/entities/webhook.d.ts +1 -1578
  58. package/dist/typings/plain/common-types.d.ts +4 -0
  59. package/dist/typings/plain/wrappers/wrap.d.ts +4 -4
  60. package/package.json +13 -12
@@ -2683,15 +2683,16 @@ var rateLimitThrottle = (function (axiosInstance) {
2683
2683
  };
2684
2684
  });
2685
2685
 
2686
- var attempts = {};
2687
- var networkErrorAttempts = 0;
2688
-
2689
2686
  var delay = function delay(ms) {
2690
2687
  return new Promise(function (resolve) {
2691
2688
  setTimeout(resolve, ms);
2692
2689
  });
2693
2690
  };
2694
2691
 
2692
+ var defaultWait = function defaultWait(attempts) {
2693
+ return Math.pow(Math.SQRT2, attempts);
2694
+ };
2695
+
2695
2696
  function rateLimit(instance) {
2696
2697
  var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
2697
2698
  var _instance$defaults = instance.defaults,
@@ -2717,40 +2718,24 @@ function rateLimit(instance) {
2717
2718
 
2718
2719
  if (!config || !instance.defaults.retryOnError) {
2719
2720
  return Promise.reject(error);
2721
+ } // Retried already for max attempts
2722
+
2723
+
2724
+ var doneAttempts = config.attempts || 1;
2725
+
2726
+ if (doneAttempts > maxRetry) {
2727
+ error.attempts = config.attempts;
2728
+ return Promise.reject(error);
2720
2729
  }
2721
2730
 
2722
2731
  var retryErrorType = null;
2723
- var wait = 0; // Errors without response did not receive anything from the server
2732
+ var wait = defaultWait(doneAttempts); // Errors without response did not receive anything from the server
2724
2733
 
2725
2734
  if (!response) {
2726
2735
  retryErrorType = 'Connection';
2727
- networkErrorAttempts++;
2728
-
2729
- if (networkErrorAttempts > maxRetry) {
2730
- error.attempts = networkErrorAttempts;
2731
- return Promise.reject(error);
2732
- }
2733
-
2734
- wait = Math.pow(Math.SQRT2, networkErrorAttempts);
2735
- response = {};
2736
- } else {
2737
- networkErrorAttempts = 0;
2738
- }
2739
-
2740
- if (response.status >= 500 && response.status < 600) {
2736
+ } else if (response.status >= 500 && response.status < 600) {
2741
2737
  // 5** errors are server related
2742
2738
  retryErrorType = "Server ".concat(response.status);
2743
- var headers = response.headers || {};
2744
- var requestId = headers['x-contentful-request-id'] || null;
2745
- attempts[requestId] = attempts[requestId] || 0;
2746
- attempts[requestId]++; // we reject if there are too many errors with the same request id or request id is not defined
2747
-
2748
- if (attempts[requestId] > maxRetry || !requestId) {
2749
- error.attempts = attempts[requestId];
2750
- return Promise.reject(error);
2751
- }
2752
-
2753
- wait = Math.pow(Math.SQRT2, attempts[requestId]);
2754
2739
  } else if (response.status === 429) {
2755
2740
  // 429 errors are exceeded rate limit exceptions
2756
2741
  retryErrorType = 'Rate limit'; // all headers are lowercased by axios https://github.com/mzabriskie/axios/issues/413
@@ -2763,7 +2748,9 @@ function rateLimit(instance) {
2763
2748
  if (retryErrorType) {
2764
2749
  // convert to ms and add jitter
2765
2750
  wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);
2766
- instance.defaults.logHandler('warning', "".concat(retryErrorType, " error occurred. Waiting for ").concat(wait, " ms before retrying..."));
2751
+ instance.defaults.logHandler('warning', "".concat(retryErrorType, " error occurred. Waiting for ").concat(wait, " ms before retrying...")); // increase attempts counter
2752
+
2753
+ config.attempts = doneAttempts + 1;
2767
2754
  /* Somehow between the interceptor and retrying the request the httpAgent/httpsAgent gets transformed from an Agent-like object
2768
2755
  to a regular object, causing failures on retries after rate limits. Removing these properties here fixes the error, but retry
2769
2756
  requests still use the original http/httpsAgent property */
@@ -6191,9 +6178,9 @@ __webpack_require__.r(__webpack_exports__);
6191
6178
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createWithId", function() { return createWithId; });
6192
6179
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "update", function() { return update; });
6193
6180
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "del", function() { return del; });
6194
- /* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
6195
- /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
6196
- /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_1__);
6181
+ /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
6182
+ /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);
6183
+ /* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
6197
6184
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
6198
6185
 
6199
6186
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -6203,27 +6190,27 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
6203
6190
 
6204
6191
 
6205
6192
  var get = function get(http, params) {
6206
- return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId));
6193
+ return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId));
6207
6194
  };
6208
6195
  var getMany = function getMany(http, params) {
6209
- return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/api_keys"), {
6196
+ return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, "/spaces/".concat(params.spaceId, "/api_keys"), {
6210
6197
  params: params.query
6211
6198
  });
6212
6199
  };
6213
6200
  var create = function create(http, params, data, headers) {
6214
- return _raw__WEBPACK_IMPORTED_MODULE_0__["post"](http, "/spaces/".concat(params.spaceId, "/api_keys"), data, {
6201
+ return _raw__WEBPACK_IMPORTED_MODULE_1__["post"](http, "/spaces/".concat(params.spaceId, "/api_keys"), data, {
6215
6202
  headers: headers
6216
6203
  });
6217
6204
  };
6218
6205
  var createWithId = function createWithId(http, params, data, headers) {
6219
- return _raw__WEBPACK_IMPORTED_MODULE_0__["put"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId), data, {
6206
+ return _raw__WEBPACK_IMPORTED_MODULE_1__["put"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId), data, {
6220
6207
  headers: headers
6221
6208
  });
6222
6209
  };
6223
6210
  var update = function update(http, params, rawData, headers) {
6224
6211
  var _rawData$sys$version;
6225
6212
 
6226
- var data = fast_copy__WEBPACK_IMPORTED_MODULE_1___default()(rawData);
6213
+ var data = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(rawData);
6227
6214
 
6228
6215
  if ('accessToken' in data) {
6229
6216
  delete data.accessToken;
@@ -6238,14 +6225,14 @@ var update = function update(http, params, rawData, headers) {
6238
6225
  }
6239
6226
 
6240
6227
  delete data.sys;
6241
- return _raw__WEBPACK_IMPORTED_MODULE_0__["put"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId), data, {
6228
+ return _raw__WEBPACK_IMPORTED_MODULE_1__["put"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId), data, {
6242
6229
  headers: _objectSpread({
6243
6230
  'X-Contentful-Version': (_rawData$sys$version = rawData.sys.version) !== null && _rawData$sys$version !== void 0 ? _rawData$sys$version : 0
6244
6231
  }, headers)
6245
6232
  });
6246
6233
  };
6247
6234
  var del = function del(http, params) {
6248
- return _raw__WEBPACK_IMPORTED_MODULE_0__["del"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId));
6235
+ return _raw__WEBPACK_IMPORTED_MODULE_1__["del"](http, "/spaces/".concat(params.spaceId, "/api_keys/").concat(params.apiKeyId));
6249
6236
  };
6250
6237
 
6251
6238
  /***/ }),
@@ -7215,9 +7202,10 @@ var references = function references(http, params) {
7215
7202
  var spaceId = params.spaceId,
7216
7203
  environmentId = params.environmentId,
7217
7204
  entryId = params.entryId,
7218
- _params$maxDepth = params.maxDepth,
7219
- maxDepth = _params$maxDepth === void 0 ? 2 : _params$maxDepth;
7220
- return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, "/spaces/".concat(spaceId, "/environments/").concat(environmentId, "/entries/").concat(entryId, "/references?include=").concat(maxDepth));
7205
+ maxDepth = params.maxDepth,
7206
+ include = params.include;
7207
+ var level = include || maxDepth || 2;
7208
+ return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, "/spaces/".concat(spaceId, "/environments/").concat(environmentId, "/entries/").concat(entryId, "/references?include=").concat(level));
7221
7209
  };
7222
7210
 
7223
7211
  /***/ }),
@@ -7820,10 +7808,10 @@ var get = function get(http, params) {
7820
7808
  });
7821
7809
 
7822
7810
  if (!org) {
7823
- var error = new Error("No organization was found with the ID ".concat(params.organizationId, " instead got ").concat(JSON.stringify(data))); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
7811
+ var error = new Error("No organization was found with the ID ".concat(params.organizationId, " instead got ").concat(JSON.stringify(data))); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7824
7812
  // @ts-ignore
7825
7813
 
7826
- error.status = 404; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
7814
+ error.status = 404; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7827
7815
  // @ts-ignore
7828
7816
 
7829
7817
  error.statusText = 'Not Found';
@@ -8386,14 +8374,14 @@ var create = function create(http, params, payload, headers) {
8386
8374
  }) : headers
8387
8375
  });
8388
8376
  };
8389
- var update = function update(http, params, payload, headers) {
8390
- var _payload$sys$version;
8377
+ var update = function update(http, params, rawData, headers) {
8378
+ var _rawData$sys$version;
8391
8379
 
8392
- var data = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(payload);
8380
+ var data = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(rawData);
8393
8381
  delete data.sys;
8394
8382
  return _raw__WEBPACK_IMPORTED_MODULE_1__["put"](http, "/spaces/".concat(params.spaceId), data, {
8395
8383
  headers: _objectSpread({
8396
- 'X-Contentful-Version': (_payload$sys$version = payload.sys.version) !== null && _payload$sys$version !== void 0 ? _payload$sys$version : 0
8384
+ 'X-Contentful-Version': (_rawData$sys$version = rawData.sys.version) !== null && _rawData$sys$version !== void 0 ? _rawData$sys$version : 0
8397
8385
  }, headers)
8398
8386
  });
8399
8387
  };
@@ -9114,7 +9102,7 @@ var RestAdapter = /*#__PURE__*/function () {
9114
9102
  entityType = _ref.entityType, actionInput = _ref.action, params = _ref.params, payload = _ref.payload, headers = _ref.headers, userAgent = _ref.userAgent;
9115
9103
  // `delete` is a reserved keyword. Therefore, the methods are called `del`.
9116
9104
  action = actionInput === 'delete' ? 'del' : actionInput;
9117
- endpoint = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
9105
+ endpoint = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9118
9106
  // @ts-ignore
9119
9107
  (_endpoints$entityType = _endpoints__WEBPACK_IMPORTED_MODULE_3__["default"][entityType]) === null || _endpoints$entityType === void 0 ? void 0 : _endpoints$entityType[action];
9120
9108
 
@@ -9174,7 +9162,7 @@ __webpack_require__.r(__webpack_exports__);
9174
9162
  /* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
9175
9163
  /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
9176
9164
  /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_1__);
9177
- /* eslint-disable @typescript-eslint/ban-ts-ignore */
9165
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
9178
9166
 
9179
9167
 
9180
9168
 
@@ -9570,7 +9558,6 @@ var SidebarWidgetTypes = {
9570
9558
  VERSIONS: 'versions-widget',
9571
9559
  INFO_PANEL: 'info-panel',
9572
9560
  JOBS: 'jobs-widget',
9573
- TASKS: 'content-workflows-tasks-widget',
9574
9561
  COMMENTS_PANEL: 'comments-panel'
9575
9562
  };
9576
9563
  var Publication = {
@@ -9585,12 +9572,6 @@ var Releases = {
9585
9572
  name: 'Release',
9586
9573
  description: 'Built-in - View release, add to it, etc.'
9587
9574
  };
9588
- var Tasks = {
9589
- widgetId: SidebarWidgetTypes.TASKS,
9590
- widgetNamespace: _types__WEBPACK_IMPORTED_MODULE_0__["WidgetNamespace"].SIDEBAR_BUILTIN,
9591
- name: 'Tasks',
9592
- description: 'Built-in - Assign tasks to be completed before publishing. Currently only supported for master environment.'
9593
- };
9594
9575
  var ContentPreview = {
9595
9576
  widgetId: SidebarWidgetTypes.CONTENT_PREVIEW,
9596
9577
  widgetNamespace: _types__WEBPACK_IMPORTED_MODULE_0__["WidgetNamespace"].SIDEBAR_BUILTIN,
@@ -9621,7 +9602,7 @@ var Users = {
9621
9602
  name: 'Users',
9622
9603
  description: 'Built-in - Displays users on the same entry.'
9623
9604
  };
9624
- var SidebarEntryConfiguration = [Publication, Releases, Tasks, ContentPreview, Links, Translation, Versions, Users];
9605
+ var SidebarEntryConfiguration = [Publication, Releases, ContentPreview, Links, Translation, Versions, Users];
9625
9606
  var SidebarAssetConfiguration = [Publication, Releases, Links, Translation, Users];
9626
9607
 
9627
9608
  /***/ }),
@@ -9714,7 +9695,7 @@ function createClient(params) {
9714
9695
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9715
9696
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
9716
9697
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
9717
- "".concat(sdkMain, "/").concat("7.45.0"), params.application, params.integration, params.feature);
9698
+ "".concat(sdkMain, "/").concat("7.45.4"), params.application, params.integration, params.feature);
9718
9699
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
9719
9700
  // https://github.com/microsoft/TypeScript/issues/26591
9720
9701
  // @ts-expect-error
@@ -10954,7 +10935,7 @@ function createEntryApi(makeRequest) {
10954
10935
  spaceId: raw.sys.space.sys.id,
10955
10936
  environmentId: raw.sys.environment.sys.id,
10956
10937
  entryId: raw.sys.id,
10957
- maxDepth: options === null || options === void 0 ? void 0 : options.maxDepth
10938
+ maxDepth: (options === null || options === void 0 ? void 0 : options.include) || (options === null || options === void 0 ? void 0 : options.maxDepth)
10958
10939
  }
10959
10940
  }).then(function (response) {
10960
10941
  return wrapEntryCollection(makeRequest, response);
@@ -11794,7 +11775,8 @@ function createEnvironmentApi(makeRequest) {
11794
11775
  /**
11795
11776
  * Get entry references
11796
11777
  * @param entryId - Entry ID
11797
- * @param {Object} options.maxDepth - Level of the entry descendants from 1 up to 10 maximum
11778
+ * @param {Object} options.include - Level of the entry descendants from 1 up to 10 maximum
11779
+ * @param {Object} options.maxDepth - alias for `include`. Deprecated, please use `include`
11798
11780
  * @returns Promise of Entry references
11799
11781
  * @example ```javascript
11800
11782
  * const contentful = require('contentful-management');
@@ -11806,10 +11788,10 @@ function createEnvironmentApi(makeRequest) {
11806
11788
  * // Get entry references
11807
11789
  * client.getSpace('<space_id>')
11808
11790
  * .then((space) => space.getEnvironment('<environment_id>'))
11809
- * .then((environment) => environment.getEntryReferences('<entry_id>', {maxDepth: number}))
11791
+ * .then((environment) => environment.getEntryReferences('<entry_id>', {include: number}))
11810
11792
  * .then((entry) => console.log(entry.includes))
11811
11793
  * // or
11812
- * .then((environment) => environment.getEntry('<entry_id>')).then((entry) => entry.references({maxDepth: number}))
11794
+ * .then((environment) => environment.getEntry('<entry_id>')).then((entry) => entry.references({include: number}))
11813
11795
  * .catch(console.error)
11814
11796
  * ```
11815
11797
  */
@@ -11822,7 +11804,11 @@ function createEnvironmentApi(makeRequest) {
11822
11804
  spaceId: raw.sys.space.sys.id,
11823
11805
  environmentId: raw.sys.id,
11824
11806
  entryId: entryId,
11825
- maxDepth: options === null || options === void 0 ? void 0 : options.maxDepth
11807
+
11808
+ /**
11809
+ * @deprecated use `include` instead
11810
+ */
11811
+ maxDepth: (options === null || options === void 0 ? void 0 : options.include) || (options === null || options === void 0 ? void 0 : options.maxDepth)
11826
11812
  }
11827
11813
  }).then(function (response) {
11828
11814
  return wrapEntryCollection(makeRequest, response);
@@ -17112,7 +17098,7 @@ function createLocaleApi(makeRequest) {
17112
17098
 
17113
17099
 
17114
17100
  function wrapLocale(makeRequest, data) {
17115
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
17101
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17116
17102
  // @ts-ignore
17117
17103
  delete data.internal_code;
17118
17104
  var locale = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(data));
@@ -19154,7 +19140,7 @@ var asIterator = function asIterator(fn, params) {
19154
19140
  var _this = this;
19155
19141
 
19156
19142
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
19157
- var _yield$currentResult, total, items, skip, limit, value, endOfPage, endOfList;
19143
+ var _yield$currentResult, _yield$currentResult$, total, _yield$currentResult$2, items, _yield$currentResult$3, skip, _yield$currentResult$4, limit, value, endOfPage, endOfList;
19158
19144
 
19159
19145
  return regeneratorRuntime.wrap(function _callee$(_context) {
19160
19146
  while (1) {
@@ -19165,13 +19151,17 @@ var asIterator = function asIterator(fn, params) {
19165
19151
 
19166
19152
  case 2:
19167
19153
  _yield$currentResult = _context.sent;
19168
- total = _yield$currentResult.total;
19169
- items = _yield$currentResult.items;
19170
- skip = _yield$currentResult.skip;
19171
- limit = _yield$currentResult.limit;
19154
+ _yield$currentResult$ = _yield$currentResult.total;
19155
+ total = _yield$currentResult$ === void 0 ? 0 : _yield$currentResult$;
19156
+ _yield$currentResult$2 = _yield$currentResult.items;
19157
+ items = _yield$currentResult$2 === void 0 ? [] : _yield$currentResult$2;
19158
+ _yield$currentResult$3 = _yield$currentResult.skip;
19159
+ skip = _yield$currentResult$3 === void 0 ? 0 : _yield$currentResult$3;
19160
+ _yield$currentResult$4 = _yield$currentResult.limit;
19161
+ limit = _yield$currentResult$4 === void 0 ? 100 : _yield$currentResult$4;
19172
19162
 
19173
19163
  if (!(total === _this.current)) {
19174
- _context.next = 9;
19164
+ _context.next = 13;
19175
19165
  break;
19176
19166
  }
19177
19167
 
@@ -19180,7 +19170,7 @@ var asIterator = function asIterator(fn, params) {
19180
19170
  value: null
19181
19171
  });
19182
19172
 
19183
- case 9:
19173
+ case 13:
19184
19174
  value = items[_this.current++ - skip];
19185
19175
  endOfPage = _this.current % limit === 0;
19186
19176
  endOfList = _this.current === total;
@@ -19199,7 +19189,7 @@ var asIterator = function asIterator(fn, params) {
19199
19189
  value: value
19200
19190
  });
19201
19191
 
19202
- case 14:
19192
+ case 18:
19203
19193
  case "end":
19204
19194
  return _context.stop();
19205
19195
  }