contentful-management 7.45.3 → 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.
@@ -7202,9 +7202,10 @@ var references = function references(http, params) {
7202
7202
  var spaceId = params.spaceId,
7203
7203
  environmentId = params.environmentId,
7204
7204
  entryId = params.entryId,
7205
- _params$maxDepth = params.maxDepth,
7206
- maxDepth = _params$maxDepth === void 0 ? 2 : _params$maxDepth;
7207
- 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));
7208
7209
  };
7209
7210
 
7210
7211
  /***/ }),
@@ -9694,7 +9695,7 @@ function createClient(params) {
9694
9695
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9695
9696
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
9696
9697
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
9697
- "".concat(sdkMain, "/").concat("7.45.3"), params.application, params.integration, params.feature);
9698
+ "".concat(sdkMain, "/").concat("7.45.4"), params.application, params.integration, params.feature);
9698
9699
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
9699
9700
  // https://github.com/microsoft/TypeScript/issues/26591
9700
9701
  // @ts-expect-error
@@ -10934,7 +10935,7 @@ function createEntryApi(makeRequest) {
10934
10935
  spaceId: raw.sys.space.sys.id,
10935
10936
  environmentId: raw.sys.environment.sys.id,
10936
10937
  entryId: raw.sys.id,
10937
- 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)
10938
10939
  }
10939
10940
  }).then(function (response) {
10940
10941
  return wrapEntryCollection(makeRequest, response);
@@ -11774,7 +11775,8 @@ function createEnvironmentApi(makeRequest) {
11774
11775
  /**
11775
11776
  * Get entry references
11776
11777
  * @param entryId - Entry ID
11777
- * @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`
11778
11780
  * @returns Promise of Entry references
11779
11781
  * @example ```javascript
11780
11782
  * const contentful = require('contentful-management');
@@ -11786,10 +11788,10 @@ function createEnvironmentApi(makeRequest) {
11786
11788
  * // Get entry references
11787
11789
  * client.getSpace('<space_id>')
11788
11790
  * .then((space) => space.getEnvironment('<environment_id>'))
11789
- * .then((environment) => environment.getEntryReferences('<entry_id>', {maxDepth: number}))
11791
+ * .then((environment) => environment.getEntryReferences('<entry_id>', {include: number}))
11790
11792
  * .then((entry) => console.log(entry.includes))
11791
11793
  * // or
11792
- * .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}))
11793
11795
  * .catch(console.error)
11794
11796
  * ```
11795
11797
  */
@@ -11802,7 +11804,11 @@ function createEnvironmentApi(makeRequest) {
11802
11804
  spaceId: raw.sys.space.sys.id,
11803
11805
  environmentId: raw.sys.id,
11804
11806
  entryId: entryId,
11805
- 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)
11806
11812
  }
11807
11813
  }).then(function (response) {
11808
11814
  return wrapEntryCollection(makeRequest, response);