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
|
@@ -2216,7 +2216,6 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
2216
2216
|
|
|
2217
2217
|
|
|
2218
2218
|
|
|
2219
|
-
|
|
2220
2219
|
const get = (http, params, rawData, headers) => {
|
|
2221
2220
|
if (params.releaseId) {
|
|
2222
2221
|
return _release_entry__WEBPACK_IMPORTED_MODULE_2__.get(http, params);
|
|
@@ -2321,15 +2320,14 @@ const create = (http, params, rawData) => {
|
|
|
2321
2320
|
};
|
|
2322
2321
|
const createWithId = (http, params, rawData) => {
|
|
2323
2322
|
if (params.releaseId) {
|
|
2324
|
-
return
|
|
2325
|
-
} else {
|
|
2326
|
-
const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
2327
|
-
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, data, {
|
|
2328
|
-
headers: {
|
|
2329
|
-
'X-Contentful-Content-Type': params.contentTypeId
|
|
2330
|
-
}
|
|
2331
|
-
});
|
|
2323
|
+
return _release_entry__WEBPACK_IMPORTED_MODULE_2__.createWithId(http, params, rawData, {});
|
|
2332
2324
|
}
|
|
2325
|
+
const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
2326
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, data, {
|
|
2327
|
+
headers: {
|
|
2328
|
+
'X-Contentful-Content-Type': params.contentTypeId
|
|
2329
|
+
}
|
|
2330
|
+
});
|
|
2333
2331
|
};
|
|
2334
2332
|
const references = (http, params) => {
|
|
2335
2333
|
const {
|
|
@@ -3613,8 +3611,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3613
3611
|
/* harmony export */ });
|
|
3614
3612
|
/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.js");
|
|
3615
3613
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
3616
|
-
/* harmony import */ var
|
|
3617
|
-
/* harmony import */ var
|
|
3614
|
+
/* harmony import */ var _upload_http_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../upload-http-client */ "./upload-http-client.ts");
|
|
3615
|
+
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
3618
3616
|
/* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./upload */ "./adapters/REST/endpoints/upload.ts");
|
|
3619
3617
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
|
|
3620
3618
|
const _excluded = ["asset", "locale", "options"],
|
|
@@ -3633,7 +3631,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
3633
3631
|
|
|
3634
3632
|
|
|
3635
3633
|
const get = (http, params, rawData, headers) => {
|
|
3636
|
-
return
|
|
3634
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.get(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/assets/${params.assetId}`, {
|
|
3637
3635
|
params: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.normalizeSelect)(params.query),
|
|
3638
3636
|
headers: headers ? _objectSpread({}, headers) : undefined
|
|
3639
3637
|
});
|
|
@@ -3642,7 +3640,7 @@ const getMany = (http, params, rawData, headers) => {
|
|
|
3642
3640
|
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3643
3641
|
'sys.schemaVersion': 'Release.V2'
|
|
3644
3642
|
});
|
|
3645
|
-
return
|
|
3643
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.get(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/assets`, {
|
|
3646
3644
|
params: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.normalizeSelect)(params.query),
|
|
3647
3645
|
headers: headers ? _objectSpread({}, headers) : undefined
|
|
3648
3646
|
});
|
|
@@ -3651,7 +3649,7 @@ const update = (http, params, rawData, headers) => {
|
|
|
3651
3649
|
var _rawData$sys$version;
|
|
3652
3650
|
const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(rawData);
|
|
3653
3651
|
delete data.sys;
|
|
3654
|
-
return
|
|
3652
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/assets/${params.assetId}`, data, {
|
|
3655
3653
|
headers: _objectSpread({
|
|
3656
3654
|
'X-Contentful-Version': (_rawData$sys$version = rawData.sys.version) !== null && _rawData$sys$version !== void 0 ? _rawData$sys$version : 0
|
|
3657
3655
|
}, headers)
|
|
@@ -3659,18 +3657,18 @@ const update = (http, params, rawData, headers) => {
|
|
|
3659
3657
|
};
|
|
3660
3658
|
const create = (http, params, rawData, headers) => {
|
|
3661
3659
|
const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(rawData);
|
|
3662
|
-
return
|
|
3660
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.post(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/assets`, data, {
|
|
3663
3661
|
headers
|
|
3664
3662
|
});
|
|
3665
3663
|
};
|
|
3666
3664
|
const createWithId = (http, params, rawData, headers) => {
|
|
3667
3665
|
const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_1__["default"])(rawData);
|
|
3668
|
-
return
|
|
3666
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/assets/${params.assetId}`, data, {
|
|
3669
3667
|
headers
|
|
3670
3668
|
});
|
|
3671
3669
|
};
|
|
3672
3670
|
const createFromFiles = async (http, params, data) => {
|
|
3673
|
-
const httpUpload = (0,
|
|
3671
|
+
const httpUpload = (0,_upload_http_client__WEBPACK_IMPORTED_MODULE_2__.getUploadHttpClient)(http, {
|
|
3674
3672
|
uploadTimeout: params.uploadTimeout
|
|
3675
3673
|
});
|
|
3676
3674
|
const {
|
|
@@ -3752,7 +3750,7 @@ const processForLocale = async (http, _ref) => {
|
|
|
3752
3750
|
} = {}
|
|
3753
3751
|
} = _ref,
|
|
3754
3752
|
params = _objectWithoutProperties(_ref, _excluded);
|
|
3755
|
-
return
|
|
3753
|
+
return _raw__WEBPACK_IMPORTED_MODULE_3__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${asset.sys.release.sys.id}/assets/${asset.sys.id}/files/${locale}/process`, null, {
|
|
3756
3754
|
headers: {
|
|
3757
3755
|
'X-Contentful-Version': asset.sys.version
|
|
3758
3756
|
}
|
|
@@ -7904,7 +7902,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
7904
7902
|
*
|
|
7905
7903
|
* // Using Thenables
|
|
7906
7904
|
* client.getSpace('<space_id>')
|
|
7907
|
-
* .then((space) => space.getEnvironment('<
|
|
7905
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
7908
7906
|
* .then((environment) => environment.createUnpublishBulkAction(payload))
|
|
7909
7907
|
* .then((bulkAction) => console.log(bulkAction.waitProcessing()))
|
|
7910
7908
|
* .catch(console.error)
|
|
@@ -7912,7 +7910,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
7912
7910
|
* // Using async/await
|
|
7913
7911
|
* try {
|
|
7914
7912
|
* const space = await clientgetSpace('<space_id>')
|
|
7915
|
-
* const environment = await space.getEnvironment('<
|
|
7913
|
+
* const environment = await space.getEnvironment('<environment_id>')
|
|
7916
7914
|
* const bulkActionInProgress = await environment.createUnpublishBulkAction(payload)
|
|
7917
7915
|
*
|
|
7918
7916
|
* // You can wait for a recently created BulkAction to be processed by using `bulkAction.waitProcessing()`
|
|
@@ -8366,7 +8364,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
8366
8364
|
*
|
|
8367
8365
|
* // Get entry references
|
|
8368
8366
|
* client.getSpace('<space_id>')
|
|
8369
|
-
* .then((space) => space.getEnvironment('<
|
|
8367
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
8370
8368
|
* .then((environment) => environment.getEntryReferences('<entry_id>', {include: number}))
|
|
8371
8369
|
* .then((entry) => console.log(entry.includes))
|
|
8372
8370
|
* // or
|
|
@@ -9951,7 +9949,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
9951
9949
|
* })
|
|
9952
9950
|
*
|
|
9953
9951
|
* client.getSpace('<space_id>')
|
|
9954
|
-
* .then((space) => space.getEnvironment('<
|
|
9952
|
+
* .then((space) => space.getEnvironment('<environment_id>'))
|
|
9955
9953
|
* .then((environment) => environment.getResourceTypes({limit: 10}))
|
|
9956
9954
|
* .then((installations) => console.log(installations.items))
|
|
9957
9955
|
* .catch(console.error)
|
|
@@ -33404,7 +33402,7 @@ function createClient(params, opts = {}) {
|
|
|
33404
33402
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
33405
33403
|
const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
|
|
33406
33404
|
// @ts-expect-error
|
|
33407
|
-
`${sdkMain}/${"11.58.0-canary.
|
|
33405
|
+
`${sdkMain}/${"11.58.0-canary.4"}`, params.application, params.integration, params.feature);
|
|
33408
33406
|
const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
33409
33407
|
userAgent
|
|
33410
33408
|
}));
|