contentful-management 7.45.6 → 7.45.7
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 +19 -3
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.legacy.js +19 -3
- package/dist/contentful-management.legacy.js.map +1 -1
- package/dist/contentful-management.legacy.min.js +1 -1
- package/dist/contentful-management.node.js +11 -3
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/common-utils.js +15 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/entities/release.js +2 -2
- package/dist/typings/common-utils.d.ts +2 -1
- package/dist/typings/create-environment-api.d.ts +1 -5
- package/dist/typings/entities/release.d.ts +2 -6
- package/dist/typings/plain/common-types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9181,12 +9181,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9181
9181
|
/*!*************************!*\
|
|
9182
9182
|
!*** ./common-utils.ts ***!
|
|
9183
9183
|
\*************************/
|
|
9184
|
-
/*! exports provided: wrapCollection */
|
|
9184
|
+
/*! exports provided: wrapCollection, wrapCursorPaginatedCollection */
|
|
9185
9185
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9186
9186
|
|
|
9187
9187
|
"use strict";
|
|
9188
9188
|
__webpack_require__.r(__webpack_exports__);
|
|
9189
9189
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapCollection", function() { return wrapCollection; });
|
|
9190
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapCursorPaginatedCollection", function() { return wrapCursorPaginatedCollection; });
|
|
9190
9191
|
/* 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");
|
|
9191
9192
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
|
|
9192
9193
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_1__);
|
|
@@ -9212,6 +9213,21 @@ var wrapCollection = function wrapCollection(fn) {
|
|
|
9212
9213
|
return collectionData;
|
|
9213
9214
|
};
|
|
9214
9215
|
};
|
|
9216
|
+
var wrapCursorPaginatedCollection = function wrapCursorPaginatedCollection(fn) {
|
|
9217
|
+
return function (makeRequest, data) {
|
|
9218
|
+
for (var _len2 = arguments.length, rest = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
9219
|
+
rest[_key2 - 2] = arguments[_key2];
|
|
9220
|
+
}
|
|
9221
|
+
|
|
9222
|
+
var collectionData = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["toPlainObject"])(fast_copy__WEBPACK_IMPORTED_MODULE_1___default()(data)); // @ts-expect-error
|
|
9223
|
+
|
|
9224
|
+
collectionData.items = collectionData.items.map(function (entity) {
|
|
9225
|
+
return fn.apply(void 0, [makeRequest, entity].concat(rest));
|
|
9226
|
+
}); // @ts-expect-error
|
|
9227
|
+
|
|
9228
|
+
return collectionData;
|
|
9229
|
+
};
|
|
9230
|
+
};
|
|
9215
9231
|
|
|
9216
9232
|
/***/ }),
|
|
9217
9233
|
|
|
@@ -9725,7 +9741,7 @@ function createClient(params) {
|
|
|
9725
9741
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9726
9742
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
9727
9743
|
var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
|
|
9728
|
-
"".concat(sdkMain, "/").concat("7.45.
|
|
9744
|
+
"".concat(sdkMain, "/").concat("7.45.7"), params.application, params.integration, params.feature);
|
|
9729
9745
|
var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
9730
9746
|
// https://github.com/microsoft/TypeScript/issues/26591
|
|
9731
9747
|
// @ts-expect-error
|
|
@@ -17726,7 +17742,7 @@ function wrapRelease(makeRequest, data) {
|
|
|
17726
17742
|
* @private
|
|
17727
17743
|
*/
|
|
17728
17744
|
|
|
17729
|
-
var wrapReleaseCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["
|
|
17745
|
+
var wrapReleaseCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["wrapCursorPaginatedCollection"])(wrapRelease);
|
|
17730
17746
|
|
|
17731
17747
|
/***/ }),
|
|
17732
17748
|
|