contentful-management 8.2.1 → 9.0.0
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 +41 -15
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.legacy.js +41 -15
- package/dist/contentful-management.legacy.js.map +1 -1
- package/dist/contentful-management.legacy.min.js +1 -1
- package/dist/contentful-management.node.js +37 -10
- 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/comment.js +10 -2
- package/dist/es-modules/adapters/REST/endpoints/http.js +8 -3
- package/dist/es-modules/adapters/REST/endpoints/task.js +10 -2
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-entry-api.js +2 -2
- package/dist/es-modules/plain/plain-client.js +2 -2
- package/dist/typings/adapters/REST/endpoints/comment.d.ts +4 -0
- package/dist/typings/adapters/REST/endpoints/http.d.ts +1 -0
- package/dist/typings/adapters/REST/endpoints/task.d.ts +4 -0
- package/dist/typings/common-types.d.ts +12 -2
- package/dist/typings/entities/app-definition.d.ts +1 -1
- package/dist/typings/plain/common-types.d.ts +2 -2
- package/package.json +7 -7
|
@@ -7088,12 +7088,13 @@ var validate = function validate(http, params, payload) {
|
|
|
7088
7088
|
/*!********************************************!*\
|
|
7089
7089
|
!*** ./adapters/REST/endpoints/comment.ts ***!
|
|
7090
7090
|
\********************************************/
|
|
7091
|
-
/*! exports provided: get, getAll, create, update, del */
|
|
7091
|
+
/*! exports provided: get, getMany, getAll, create, update, del */
|
|
7092
7092
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7093
7093
|
|
|
7094
7094
|
"use strict";
|
|
7095
7095
|
__webpack_require__.r(__webpack_exports__);
|
|
7096
7096
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
|
|
7097
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMany", function() { return getMany; });
|
|
7097
7098
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAll", function() { return getAll; });
|
|
7098
7099
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; });
|
|
7099
7100
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "update", function() { return update; });
|
|
@@ -7101,6 +7102,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7101
7102
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
|
|
7102
7103
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);
|
|
7103
7104
|
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
7105
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
|
|
7104
7106
|
var _excluded = ["version"];
|
|
7105
7107
|
|
|
7106
7108
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -7116,6 +7118,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7116
7118
|
|
|
7117
7119
|
|
|
7118
7120
|
|
|
7121
|
+
|
|
7119
7122
|
var getBaseUrl = function getBaseUrl(params) {
|
|
7120
7123
|
return "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId, "/comments");
|
|
7121
7124
|
};
|
|
@@ -7127,9 +7130,16 @@ var getCommentUrl = function getCommentUrl(params) {
|
|
|
7127
7130
|
var get = function get(http, params) {
|
|
7128
7131
|
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getCommentUrl(params));
|
|
7129
7132
|
};
|
|
7130
|
-
var
|
|
7131
|
-
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getBaseUrl(params)
|
|
7133
|
+
var getMany = function getMany(http, params) {
|
|
7134
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getBaseUrl(params), {
|
|
7135
|
+
params: Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSelect"])(params.query)
|
|
7136
|
+
});
|
|
7132
7137
|
};
|
|
7138
|
+
/**
|
|
7139
|
+
* @deprecated use `getMany` instead. `getAll` may never be removed for app compatibility reasons.
|
|
7140
|
+
*/
|
|
7141
|
+
|
|
7142
|
+
var getAll = getMany;
|
|
7133
7143
|
var create = function create(http, params, rawData) {
|
|
7134
7144
|
var data = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(rawData);
|
|
7135
7145
|
return _raw__WEBPACK_IMPORTED_MODULE_1__["post"](http, getBaseUrl(params), data);
|
|
@@ -7649,7 +7659,7 @@ var del = function del(http, params) {
|
|
|
7649
7659
|
/*!*****************************************!*\
|
|
7650
7660
|
!*** ./adapters/REST/endpoints/http.ts ***!
|
|
7651
7661
|
\*****************************************/
|
|
7652
|
-
/*! exports provided: get, post, put, del, request */
|
|
7662
|
+
/*! exports provided: get, post, put, patch, del, request */
|
|
7653
7663
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7654
7664
|
|
|
7655
7665
|
"use strict";
|
|
@@ -7657,6 +7667,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7657
7667
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
|
|
7658
7668
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "post", function() { return post; });
|
|
7659
7669
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "put", function() { return put; });
|
|
7670
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "patch", function() { return patch; });
|
|
7660
7671
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "del", function() { return del; });
|
|
7661
7672
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "request", function() { return request; });
|
|
7662
7673
|
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
@@ -7677,14 +7688,19 @@ var put = function put(http, _ref3, payload) {
|
|
|
7677
7688
|
config = _ref3.config;
|
|
7678
7689
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["put"](http, url, payload, config);
|
|
7679
7690
|
};
|
|
7680
|
-
var
|
|
7691
|
+
var patch = function patch(http, _ref4, payload) {
|
|
7681
7692
|
var url = _ref4.url,
|
|
7682
7693
|
config = _ref4.config;
|
|
7683
|
-
return _raw__WEBPACK_IMPORTED_MODULE_0__["
|
|
7694
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__["patch"](http, url, payload, config);
|
|
7684
7695
|
};
|
|
7685
|
-
var
|
|
7696
|
+
var del = function del(http, _ref5) {
|
|
7686
7697
|
var url = _ref5.url,
|
|
7687
7698
|
config = _ref5.config;
|
|
7699
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__["del"](http, url, config);
|
|
7700
|
+
};
|
|
7701
|
+
var request = function request(http, _ref6) {
|
|
7702
|
+
var url = _ref6.url,
|
|
7703
|
+
config = _ref6.config;
|
|
7688
7704
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["http"](http, url, config);
|
|
7689
7705
|
};
|
|
7690
7706
|
|
|
@@ -8699,12 +8715,13 @@ var del = function del(http, _ref) {
|
|
|
8699
8715
|
/*!*****************************************!*\
|
|
8700
8716
|
!*** ./adapters/REST/endpoints/task.ts ***!
|
|
8701
8717
|
\*****************************************/
|
|
8702
|
-
/*! exports provided: get, getAll, create, update, del */
|
|
8718
|
+
/*! exports provided: get, getMany, getAll, create, update, del */
|
|
8703
8719
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8704
8720
|
|
|
8705
8721
|
"use strict";
|
|
8706
8722
|
__webpack_require__.r(__webpack_exports__);
|
|
8707
8723
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
|
|
8724
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMany", function() { return getMany; });
|
|
8708
8725
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAll", function() { return getAll; });
|
|
8709
8726
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; });
|
|
8710
8727
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "update", function() { return update; });
|
|
@@ -8712,6 +8729,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8712
8729
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
|
|
8713
8730
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_copy__WEBPACK_IMPORTED_MODULE_0__);
|
|
8714
8731
|
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
8732
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
|
|
8715
8733
|
var _excluded = ["version"];
|
|
8716
8734
|
|
|
8717
8735
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -8727,6 +8745,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8727
8745
|
|
|
8728
8746
|
|
|
8729
8747
|
|
|
8748
|
+
|
|
8730
8749
|
var getBaseUrl = function getBaseUrl(params) {
|
|
8731
8750
|
return "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId, "/tasks");
|
|
8732
8751
|
};
|
|
@@ -8738,9 +8757,16 @@ var getTaskUrl = function getTaskUrl(params) {
|
|
|
8738
8757
|
var get = function get(http, params) {
|
|
8739
8758
|
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getTaskUrl(params));
|
|
8740
8759
|
};
|
|
8741
|
-
var
|
|
8742
|
-
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getBaseUrl(params)
|
|
8760
|
+
var getMany = function getMany(http, params) {
|
|
8761
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__["get"](http, getBaseUrl(params), {
|
|
8762
|
+
params: Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSelect"])(params.query)
|
|
8763
|
+
});
|
|
8743
8764
|
};
|
|
8765
|
+
/**
|
|
8766
|
+
* @deprecated use `getMany` instead. `getAll` may never be removed for app compatibility reasons.
|
|
8767
|
+
*/
|
|
8768
|
+
|
|
8769
|
+
var getAll = getMany;
|
|
8744
8770
|
var create = function create(http, params, rawData) {
|
|
8745
8771
|
var data = fast_copy__WEBPACK_IMPORTED_MODULE_0___default()(rawData);
|
|
8746
8772
|
return _raw__WEBPACK_IMPORTED_MODULE_1__["post"](http, getBaseUrl(params), data);
|
|
@@ -10148,7 +10174,7 @@ function createClient(params) {
|
|
|
10148
10174
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10149
10175
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
10150
10176
|
var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
|
|
10151
|
-
"".concat(sdkMain, "/").concat("
|
|
10177
|
+
"".concat(sdkMain, "/").concat("9.0.0"), params.application, params.integration, params.feature);
|
|
10152
10178
|
var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
10153
10179
|
// https://github.com/microsoft/TypeScript/issues/26591
|
|
10154
10180
|
// @ts-expect-error
|
|
@@ -11212,7 +11238,7 @@ function createEntryApi(makeRequest) {
|
|
|
11212
11238
|
|
|
11213
11239
|
return makeRequest({
|
|
11214
11240
|
entityType: 'Comment',
|
|
11215
|
-
action: '
|
|
11241
|
+
action: 'getMany',
|
|
11216
11242
|
params: params
|
|
11217
11243
|
}).then(function (data) {
|
|
11218
11244
|
return wrapCommentCollection(makeRequest, data);
|
|
@@ -11311,7 +11337,7 @@ function createEntryApi(makeRequest) {
|
|
|
11311
11337
|
|
|
11312
11338
|
return makeRequest({
|
|
11313
11339
|
entityType: 'Task',
|
|
11314
|
-
action: '
|
|
11340
|
+
action: 'getMany',
|
|
11315
11341
|
params: params
|
|
11316
11342
|
}).then(function (data) {
|
|
11317
11343
|
return wrapTaskCollection(makeRequest, data);
|
|
@@ -20298,7 +20324,7 @@ var createPlainClient = function createPlainClient(makeRequest, defaults, alphaF
|
|
|
20298
20324
|
},
|
|
20299
20325
|
comment: {
|
|
20300
20326
|
get: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Comment', 'get'),
|
|
20301
|
-
|
|
20327
|
+
getMany: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Comment', 'getMany'),
|
|
20302
20328
|
create: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Comment', 'create'),
|
|
20303
20329
|
update: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Comment', 'update'),
|
|
20304
20330
|
delete: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Comment', 'delete')
|
|
@@ -20327,7 +20353,7 @@ var createPlainClient = function createPlainClient(makeRequest, defaults, alphaF
|
|
|
20327
20353
|
},
|
|
20328
20354
|
task: {
|
|
20329
20355
|
get: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Task', 'get'),
|
|
20330
|
-
|
|
20356
|
+
getMany: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Task', 'getMany'),
|
|
20331
20357
|
create: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Task', 'create'),
|
|
20332
20358
|
update: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Task', 'update'),
|
|
20333
20359
|
delete: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'Task', 'delete')
|