contentful-management 11.58.0-canary.3 → 11.58.0-canary.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 +21 -23
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +21 -23
- 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 +8 -10
- package/dist/es-modules/adapters/REST/endpoints/release-asset.js +1 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-api.js +4 -4
- package/dist/typings/common-types.d.ts +21 -23
- package/dist/typings/create-environment-api.d.ts +6 -6
- package/dist/typings/entities/release.d.ts +2 -2
- package/dist/typings/plain/common-types.d.ts +38 -21
- package/package.json +2 -2
|
@@ -1977,7 +1977,6 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
1977
1977
|
|
|
1978
1978
|
|
|
1979
1979
|
|
|
1980
|
-
|
|
1981
1980
|
var get = function get(http, params, rawData, headers) {
|
|
1982
1981
|
if (params.releaseId) {
|
|
1983
1982
|
return _release_entry__WEBPACK_IMPORTED_MODULE_2__.get(http, params);
|
|
@@ -2082,15 +2081,14 @@ var create = function create(http, params, rawData) {
|
|
|
2082
2081
|
};
|
|
2083
2082
|
var createWithId = function createWithId(http, params, rawData) {
|
|
2084
2083
|
if (params.releaseId) {
|
|
2085
|
-
return
|
|
2086
|
-
} else {
|
|
2087
|
-
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
2088
|
-
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId), data, {
|
|
2089
|
-
headers: {
|
|
2090
|
-
'X-Contentful-Content-Type': params.contentTypeId
|
|
2091
|
-
}
|
|
2092
|
-
});
|
|
2084
|
+
return _release_entry__WEBPACK_IMPORTED_MODULE_2__.createWithId(http, params, rawData, {});
|
|
2093
2085
|
}
|
|
2086
|
+
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
2087
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId), data, {
|
|
2088
|
+
headers: {
|
|
2089
|
+
'X-Contentful-Content-Type': params.contentTypeId
|
|
2090
|
+
}
|
|
2091
|
+
});
|
|
2094
2092
|
};
|
|
2095
2093
|
var references = function references(http, params) {
|
|
2096
2094
|
var spaceId = params.spaceId,
|
|
@@ -3438,8 +3436,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3438
3436
|
/* harmony export */ });
|
|
3439
3437
|
/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.js");
|
|
3440
3438
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
3441
|
-
/* harmony import */ var
|
|
3442
|
-
/* harmony import */ var
|
|
3439
|
+
/* harmony import */ var _upload_http_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../upload-http-client */ "./upload-http-client.ts");
|
|
3440
|
+
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
3443
3441
|
/* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./upload */ "./adapters/REST/endpoints/upload.ts");
|
|
3444
3442
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
|
|
3445
3443
|
var _excluded = ["asset", "locale", "options"],
|
|
@@ -3463,7 +3461,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
3463
3461
|
|
|
3464
3462
|
|
|
3465
3463
|
var get = function get(http, params, rawData, headers) {
|
|
3466
|
-
return
|
|
3464
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/assets/").concat(params.assetId), {
|
|
3467
3465
|
params: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.normalizeSelect)(params.query),
|
|
3468
3466
|
headers: headers ? _objectSpread({}, headers) : undefined
|
|
3469
3467
|
});
|
|
@@ -3472,7 +3470,7 @@ var getMany = function getMany(http, params, rawData, headers) {
|
|
|
3472
3470
|
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3473
3471
|
'sys.schemaVersion': 'Release.V2'
|
|
3474
3472
|
});
|
|
3475
|
-
return
|
|
3473
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/assets"), {
|
|
3476
3474
|
params: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.normalizeSelect)(params.query),
|
|
3477
3475
|
headers: headers ? _objectSpread({}, headers) : undefined
|
|
3478
3476
|
});
|
|
@@ -3481,7 +3479,7 @@ var update = function update(http, params, rawData, headers) {
|
|
|
3481
3479
|
var _rawData$sys$version;
|
|
3482
3480
|
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(rawData);
|
|
3483
3481
|
delete data.sys;
|
|
3484
|
-
return
|
|
3482
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/assets/").concat(params.assetId), data, {
|
|
3485
3483
|
headers: _objectSpread({
|
|
3486
3484
|
'X-Contentful-Version': (_rawData$sys$version = rawData.sys.version) !== null && _rawData$sys$version !== void 0 ? _rawData$sys$version : 0
|
|
3487
3485
|
}, headers)
|
|
@@ -3489,13 +3487,13 @@ var update = function update(http, params, rawData, headers) {
|
|
|
3489
3487
|
};
|
|
3490
3488
|
var create = function create(http, params, rawData, headers) {
|
|
3491
3489
|
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(rawData);
|
|
3492
|
-
return
|
|
3490
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.post(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/assets"), data, {
|
|
3493
3491
|
headers: headers
|
|
3494
3492
|
});
|
|
3495
3493
|
};
|
|
3496
3494
|
var createWithId = function createWithId(http, params, rawData, headers) {
|
|
3497
3495
|
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(rawData);
|
|
3498
|
-
return
|
|
3496
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/assets/").concat(params.assetId), data, {
|
|
3499
3497
|
headers: headers
|
|
3500
3498
|
});
|
|
3501
3499
|
};
|
|
@@ -3505,7 +3503,7 @@ var createFromFiles = /*#__PURE__*/function () {
|
|
|
3505
3503
|
return _regenerator().w(function (_context2) {
|
|
3506
3504
|
while (1) switch (_context2.n) {
|
|
3507
3505
|
case 0:
|
|
3508
|
-
httpUpload = (0,
|
|
3506
|
+
httpUpload = (0,_upload_http_client__WEBPACK_IMPORTED_MODULE_2__.getUploadHttpClient)(http, {
|
|
3509
3507
|
uploadTimeout: params.uploadTimeout
|
|
3510
3508
|
});
|
|
3511
3509
|
file = data.fields.file;
|
|
@@ -3604,7 +3602,7 @@ var processForLocale = /*#__PURE__*/function () {
|
|
|
3604
3602
|
while (1) switch (_context3.n) {
|
|
3605
3603
|
case 0:
|
|
3606
3604
|
asset = _ref5.asset, locale = _ref5.locale, _ref5$options = _ref5.options, _ref5$options2 = _ref5$options === void 0 ? {} : _ref5$options, processingCheckRetries = _ref5$options2.processingCheckRetries, processingCheckWait = _ref5$options2.processingCheckWait, params = _objectWithoutProperties(_ref5, _excluded);
|
|
3607
|
-
return _context3.a(2,
|
|
3605
|
+
return _context3.a(2, _raw__WEBPACK_IMPORTED_MODULE_3__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(asset.sys.release.sys.id, "/assets/").concat(asset.sys.id, "/files/").concat(locale, "/process"), null, {
|
|
3608
3606
|
headers: {
|
|
3609
3607
|
'X-Contentful-Version': asset.sys.version
|
|
3610
3608
|
}
|
|
@@ -8071,7 +8069,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
8071
8069
|
*
|
|
8072
8070
|
* // Using Thenables
|
|
8073
8071
|
* client.getSpace('<space_id>')
|
|
8074
|
-
* .then((space) => space.getEnvironment('<
|
|
8072
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
8075
8073
|
* .then((environment) => environment.createUnpublishBulkAction(payload))
|
|
8076
8074
|
* .then((bulkAction) => console.log(bulkAction.waitProcessing()))
|
|
8077
8075
|
* .catch(console.error)
|
|
@@ -8079,7 +8077,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
8079
8077
|
* // Using async/await
|
|
8080
8078
|
* try {
|
|
8081
8079
|
* const space = await clientgetSpace('<space_id>')
|
|
8082
|
-
* const environment = await space.getEnvironment('<
|
|
8080
|
+
* const environment = await space.getEnvironment('<environment_id>')
|
|
8083
8081
|
* const bulkActionInProgress = await environment.createUnpublishBulkAction(payload)
|
|
8084
8082
|
*
|
|
8085
8083
|
* // You can wait for a recently created BulkAction to be processed by using `bulkAction.waitProcessing()`
|
|
@@ -8561,7 +8559,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
8561
8559
|
*
|
|
8562
8560
|
* // Get entry references
|
|
8563
8561
|
* client.getSpace('<space_id>')
|
|
8564
|
-
* .then((space) => space.getEnvironment('<
|
|
8562
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
8565
8563
|
* .then((environment) => environment.getEntryReferences('<entry_id>', {include: number}))
|
|
8566
8564
|
* .then((entry) => console.log(entry.includes))
|
|
8567
8565
|
* // or
|
|
@@ -10263,7 +10261,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
10263
10261
|
* })
|
|
10264
10262
|
*
|
|
10265
10263
|
* client.getSpace('<space_id>')
|
|
10266
|
-
* .then((space) => space.getEnvironment('<
|
|
10264
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
10267
10265
|
* .then((environment) => environment.getResourceTypes({limit: 10}))
|
|
10268
10266
|
* .then((installations) => console.log(installations.items))
|
|
10269
10267
|
* .catch(console.error)
|
|
@@ -29914,7 +29912,7 @@ function createClient(params) {
|
|
|
29914
29912
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
29915
29913
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
29916
29914
|
var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
|
|
29917
|
-
"".concat(sdkMain, "/").concat("11.58.0-canary.
|
|
29915
|
+
"".concat(sdkMain, "/").concat("11.58.0-canary.4"), params.application, params.integration, params.feature);
|
|
29918
29916
|
var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
29919
29917
|
userAgent: userAgent
|
|
29920
29918
|
}));
|