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.
- package/dist/contentful-management.browser.js +15 -9
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.legacy.js +15 -9
- package/dist/contentful-management.legacy.js.map +1 -1
- package/dist/contentful-management.legacy.min.js +1 -1
- package/dist/contentful-management.node.js +15 -9
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/entry.js +4 -3
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-entry-api.js +1 -1
- package/dist/es-modules/create-environment-api.js +9 -4
- package/dist/typings/common-types.d.ts +4 -0
- package/dist/typings/create-environment-api.d.ts +4 -3
- package/dist/typings/entities/entry.d.ts +6 -2
- package/dist/typings/plain/common-types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
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.
|
|
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.
|
|
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>', {
|
|
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({
|
|
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
|
-
|
|
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);
|