contentful-management 7.5.2 → 7.7.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/CHANGELOG.md +3 -3
- package/dist/contentful-management.browser.js +59 -10
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.legacy.js +59 -10
- package/dist/contentful-management.legacy.js.map +1 -1
- package/dist/contentful-management.legacy.min.js +1 -1
- package/dist/contentful-management.node.js +92 -27
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/create-cma-http-client.js +1 -1
- package/dist/es-modules/create-contentful-api.js +2 -2
- package/dist/es-modules/plain/endpoints/user.js +4 -2
- package/dist/es-modules/plain/plain-client.js +21 -3
- package/dist/typings/create-contentful-api.d.ts +5 -1
- package/dist/typings/create-organization-api.d.ts +6 -2
- package/dist/typings/create-space-api.d.ts +6 -2
- package/dist/typings/entities/user.d.ts +6 -2
- package/dist/typings/plain/endpoints/raw.d.ts +1 -1
- package/dist/typings/plain/endpoints/user.d.ts +1 -1
- package/dist/typings/plain/plain-client.d.ts +27 -27
- package/package.json +2 -2
|
@@ -355,6 +355,9 @@ axios.all = function all(promises) {
|
|
|
355
355
|
};
|
|
356
356
|
axios.spread = __webpack_require__(/*! ./helpers/spread */ "../node_modules/axios/lib/helpers/spread.js");
|
|
357
357
|
|
|
358
|
+
// Expose isAxiosError
|
|
359
|
+
axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "../node_modules/axios/lib/helpers/isAxiosError.js");
|
|
360
|
+
|
|
358
361
|
module.exports = axios;
|
|
359
362
|
|
|
360
363
|
// Allow use of default import syntax in TypeScript
|
|
@@ -1357,6 +1360,29 @@ module.exports = function isAbsoluteURL(url) {
|
|
|
1357
1360
|
};
|
|
1358
1361
|
|
|
1359
1362
|
|
|
1363
|
+
/***/ }),
|
|
1364
|
+
|
|
1365
|
+
/***/ "../node_modules/axios/lib/helpers/isAxiosError.js":
|
|
1366
|
+
/*!*********************************************************!*\
|
|
1367
|
+
!*** ../node_modules/axios/lib/helpers/isAxiosError.js ***!
|
|
1368
|
+
\*********************************************************/
|
|
1369
|
+
/*! no static exports found */
|
|
1370
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1371
|
+
|
|
1372
|
+
"use strict";
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* Determines whether the payload is an error thrown by Axios
|
|
1377
|
+
*
|
|
1378
|
+
* @param {*} payload The value to test
|
|
1379
|
+
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
1380
|
+
*/
|
|
1381
|
+
module.exports = function isAxiosError(payload) {
|
|
1382
|
+
return (typeof payload === 'object') && (payload.isAxiosError === true);
|
|
1383
|
+
};
|
|
1384
|
+
|
|
1385
|
+
|
|
1360
1386
|
/***/ }),
|
|
1361
1387
|
|
|
1362
1388
|
/***/ "../node_modules/axios/lib/helpers/isURLSameOrigin.js":
|
|
@@ -5656,8 +5682,7 @@ for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++
|
|
|
5656
5682
|
}
|
|
5657
5683
|
// blobs
|
|
5658
5684
|
if (realm.Blob && object instanceof realm.Blob) {
|
|
5659
|
-
|
|
5660
|
-
return clone;
|
|
5685
|
+
return object.slice(0, object.size, object.type);
|
|
5661
5686
|
}
|
|
5662
5687
|
// buffers (node-only)
|
|
5663
5688
|
if (realm.Buffer && realm.Buffer.isBuffer(object)) {
|
|
@@ -5700,6 +5725,10 @@ for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++
|
|
|
5700
5725
|
};
|
|
5701
5726
|
return handleCopy(object, createCache());
|
|
5702
5727
|
}
|
|
5728
|
+
// Adding reference to allow usage in CommonJS libraries compiled using TSC, which
|
|
5729
|
+
// expects there to be a default property on the exported object. See
|
|
5730
|
+
// [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.
|
|
5731
|
+
copy.default = copy;
|
|
5703
5732
|
/**
|
|
5704
5733
|
* @function strictCopy
|
|
5705
5734
|
*
|
|
@@ -7106,7 +7135,7 @@ function createCMAHttpClient(params) {
|
|
|
7106
7135
|
var plainClient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7107
7136
|
var sdkMain = plainClient ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
7108
7137
|
var userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])( // @ts-expect-error
|
|
7109
|
-
"".concat(sdkMain, "/").concat("7.
|
|
7138
|
+
"".concat(sdkMain, "/").concat("7.7.0"), params.application, params.integration, params.feature);
|
|
7110
7139
|
var requiredHeaders = {
|
|
7111
7140
|
'Content-Type': 'application/vnd.contentful.management.v1+json',
|
|
7112
7141
|
'X-Contentful-User-Agent': userAgentHeader
|
|
@@ -7292,8 +7321,8 @@ function createClientApi(_ref) {
|
|
|
7292
7321
|
* .catch(console.error)
|
|
7293
7322
|
* ```
|
|
7294
7323
|
*/
|
|
7295
|
-
getCurrentUser: function getCurrentUser() {
|
|
7296
|
-
return _plain_endpoints__WEBPACK_IMPORTED_MODULE_3__["user"].getCurrent(http).then(function (data) {
|
|
7324
|
+
getCurrentUser: function getCurrentUser(params) {
|
|
7325
|
+
return _plain_endpoints__WEBPACK_IMPORTED_MODULE_3__["user"].getCurrent(http, params).then(function (data) {
|
|
7297
7326
|
return wrapUser(http, data);
|
|
7298
7327
|
});
|
|
7299
7328
|
},
|
|
@@ -14784,8 +14813,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14784
14813
|
var getForSpace = function getForSpace(http, params) {
|
|
14785
14814
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/users/").concat(params.userId));
|
|
14786
14815
|
};
|
|
14787
|
-
var getCurrent = function getCurrent(http) {
|
|
14788
|
-
return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/users/me"
|
|
14816
|
+
var getCurrent = function getCurrent(http, params) {
|
|
14817
|
+
return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/users/me", {
|
|
14818
|
+
params: params === null || params === void 0 ? void 0 : params.query
|
|
14819
|
+
});
|
|
14789
14820
|
};
|
|
14790
14821
|
var getManyForSpace = function getManyForSpace(http, params) {
|
|
14791
14822
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, "/spaces/".concat(params.spaceId, "/users"), {
|
|
@@ -15100,7 +15131,25 @@ var createPlainClient = function createPlainClient(params, defaults) {
|
|
|
15100
15131
|
user: {
|
|
15101
15132
|
getManyForSpace: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, _endpoints__WEBPACK_IMPORTED_MODULE_1__["user"].getManyForSpace),
|
|
15102
15133
|
getForSpace: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, _endpoints__WEBPACK_IMPORTED_MODULE_1__["user"].getForSpace),
|
|
15103
|
-
getCurrent:
|
|
15134
|
+
getCurrent: function (_getCurrent) {
|
|
15135
|
+
function getCurrent() {
|
|
15136
|
+
return _getCurrent.apply(this, arguments);
|
|
15137
|
+
}
|
|
15138
|
+
|
|
15139
|
+
getCurrent.toString = function () {
|
|
15140
|
+
return _getCurrent.toString();
|
|
15141
|
+
};
|
|
15142
|
+
|
|
15143
|
+
return getCurrent;
|
|
15144
|
+
}(function () {
|
|
15145
|
+
var _endpoints$user;
|
|
15146
|
+
|
|
15147
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
15148
|
+
args[_key6] = arguments[_key6];
|
|
15149
|
+
}
|
|
15150
|
+
|
|
15151
|
+
return (_endpoints$user = _endpoints__WEBPACK_IMPORTED_MODULE_1__["user"]).getCurrent.apply(_endpoints$user, [_http].concat(args));
|
|
15152
|
+
}),
|
|
15104
15153
|
getForOrganization: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, _endpoints__WEBPACK_IMPORTED_MODULE_1__["user"].getForOrganization),
|
|
15105
15154
|
getManyForOrganization: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, _endpoints__WEBPACK_IMPORTED_MODULE_1__["user"].getManyForOrganization)
|
|
15106
15155
|
},
|
|
@@ -15159,8 +15208,8 @@ var createPlainClient = function createPlainClient(params, defaults) {
|
|
|
15159
15208
|
}(function () {
|
|
15160
15209
|
var _endpoints$personalAc;
|
|
15161
15210
|
|
|
15162
|
-
for (var
|
|
15163
|
-
args[
|
|
15211
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
15212
|
+
args[_key7] = arguments[_key7];
|
|
15164
15213
|
}
|
|
15165
15214
|
|
|
15166
15215
|
return (_endpoints$personalAc = _endpoints__WEBPACK_IMPORTED_MODULE_1__["personalAccessToken"]).create.apply(_endpoints$personalAc, [_http].concat(args));
|