contentful-management 11.57.1 → 11.58.0-canary.1
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/README.md +16 -2
- package/dist/contentful-management.browser.js +227 -83
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +226 -83
- 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 +31 -6
- package/dist/es-modules/adapters/REST/endpoints/index.js +2 -0
- package/dist/es-modules/adapters/REST/endpoints/release-entry.js +63 -0
- package/dist/es-modules/adapters/REST/endpoints/release.js +24 -0
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-api.js +4 -4
- package/dist/es-modules/plain/plain-client.js +8 -0
- package/dist/typings/adapters/REST/endpoints/index.d.ts +2 -0
- package/dist/typings/adapters/REST/endpoints/release-entry.d.ts +7 -0
- package/dist/typings/common-types.d.ts +136 -19
- package/dist/typings/create-entry-api.d.ts +1 -1
- package/dist/typings/create-environment-api.d.ts +8 -8
- package/dist/typings/entities/entry.d.ts +3 -3
- package/dist/typings/entities/release.d.ts +18 -1
- package/dist/typings/plain/common-types.d.ts +92 -17
- package/dist/typings/plain/wrappers/wrap.d.ts +2 -0
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -320,11 +320,11 @@ Your CMA access token.
|
|
|
320
320
|
|
|
321
321
|
#### host (default: `'api.contentful.com'`)
|
|
322
322
|
|
|
323
|
-
Set the host used to build the request
|
|
323
|
+
Set the host used to build the request URIs.
|
|
324
324
|
|
|
325
325
|
#### hostUpload (default: `'upload.contentful.com'`)
|
|
326
326
|
|
|
327
|
-
Set the host used to build the upload related request
|
|
327
|
+
Set the host used to build the upload related request URIs. Learn more about the Upload API [here](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/uploads).
|
|
328
328
|
|
|
329
329
|
#### basePath (default: ``)
|
|
330
330
|
|
|
@@ -417,6 +417,20 @@ This means that new versions are released automatically as fixes, features or br
|
|
|
417
417
|
|
|
418
418
|
You can check the changelog on the [releases](https://github.com/contentful/contentful-management.js/releases) page.
|
|
419
419
|
|
|
420
|
+
## Experimental features
|
|
421
|
+
|
|
422
|
+
To download a build that has features that are not yet released, you can use the `canary` channel. This is a pre-release version of the library that contains features that are still in development and may not be stable. To install a canary version, you can use the following command:
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
npm install contentful-management@canary
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### Current experimental features
|
|
429
|
+
|
|
430
|
+
#### Timeline Preview / Releases v2
|
|
431
|
+
|
|
432
|
+
This feature allows you to schedule content changes in the future and preview them before they go live.
|
|
433
|
+
|
|
420
434
|
## Reach out to us
|
|
421
435
|
|
|
422
436
|
### You have questions about how to use this library?
|
|
@@ -1920,7 +1920,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1920
1920
|
/* harmony export */ });
|
|
1921
1921
|
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
1922
1922
|
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
1923
|
-
/* harmony import */ var
|
|
1923
|
+
/* harmony import */ var _release_entry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./release-entry */ "./adapters/REST/endpoints/release-entry.ts");
|
|
1924
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
|
|
1924
1925
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1925
1926
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1926
1927
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1930,25 +1931,40 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
1930
1931
|
|
|
1931
1932
|
|
|
1932
1933
|
|
|
1934
|
+
|
|
1935
|
+
|
|
1933
1936
|
var get = function get(http, params, rawData, headers) {
|
|
1937
|
+
if (params.releaseId) {
|
|
1938
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
1939
|
+
'release[lte]': params.releaseId
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1934
1942
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId), {
|
|
1935
|
-
params: (0,
|
|
1943
|
+
params: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.normalizeSelect)(params.query),
|
|
1936
1944
|
headers: _objectSpread({}, headers)
|
|
1937
1945
|
});
|
|
1938
1946
|
};
|
|
1939
1947
|
var getPublished = function getPublished(http, params, rawData, headers) {
|
|
1940
1948
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/public/entries"), {
|
|
1941
|
-
params: (0,
|
|
1949
|
+
params: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.normalizeSelect)(params.query),
|
|
1942
1950
|
headers: _objectSpread({}, headers)
|
|
1943
1951
|
});
|
|
1944
1952
|
};
|
|
1945
1953
|
var getMany = function getMany(http, params, rawData, headers) {
|
|
1954
|
+
if (params.releaseId) {
|
|
1955
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
1956
|
+
'release[lte]': params.releaseId
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1946
1959
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries"), {
|
|
1947
|
-
params: (0,
|
|
1960
|
+
params: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.normalizeSelect)(params.query),
|
|
1948
1961
|
headers: _objectSpread({}, headers)
|
|
1949
1962
|
});
|
|
1950
1963
|
};
|
|
1951
1964
|
var patch = function patch(http, params, data, headers) {
|
|
1965
|
+
if (params.releaseId) {
|
|
1966
|
+
return _release_entry__WEBPACK_IMPORTED_MODULE_2__.patch(http, params, data, headers !== null && headers !== void 0 ? headers : {});
|
|
1967
|
+
}
|
|
1952
1968
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.patch(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId), data, {
|
|
1953
1969
|
headers: _objectSpread({
|
|
1954
1970
|
'X-Contentful-Version': params.version,
|
|
@@ -1958,6 +1974,9 @@ var patch = function patch(http, params, data, headers) {
|
|
|
1958
1974
|
};
|
|
1959
1975
|
var update = function update(http, params, rawData, headers) {
|
|
1960
1976
|
var _rawData$sys$version;
|
|
1977
|
+
if (params.releaseId) {
|
|
1978
|
+
return _release_entry__WEBPACK_IMPORTED_MODULE_2__.update(http, params, rawData, headers !== null && headers !== void 0 ? headers : {});
|
|
1979
|
+
}
|
|
1961
1980
|
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
1962
1981
|
delete data.sys;
|
|
1963
1982
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId), data, {
|
|
@@ -2010,6 +2029,9 @@ var unarchive = function unarchive(http, params) {
|
|
|
2010
2029
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.del(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId, "/archived"));
|
|
2011
2030
|
};
|
|
2012
2031
|
var create = function create(http, params, rawData) {
|
|
2032
|
+
if (params.releaseId) {
|
|
2033
|
+
return _release_entry__WEBPACK_IMPORTED_MODULE_2__.create(http, params, rawData, {});
|
|
2034
|
+
}
|
|
2013
2035
|
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
2014
2036
|
return _raw__WEBPACK_IMPORTED_MODULE_1__.post(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries"), data, {
|
|
2015
2037
|
headers: {
|
|
@@ -2018,12 +2040,16 @@ var create = function create(http, params, rawData) {
|
|
|
2018
2040
|
});
|
|
2019
2041
|
};
|
|
2020
2042
|
var createWithId = function createWithId(http, params, rawData) {
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2043
|
+
if (params.releaseId) {
|
|
2044
|
+
return (0,_release_entry__WEBPACK_IMPORTED_MODULE_2__.createWithId)(http, params, rawData, {});
|
|
2045
|
+
} else {
|
|
2046
|
+
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
2047
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/entries/").concat(params.entryId), data, {
|
|
2048
|
+
headers: {
|
|
2049
|
+
'X-Contentful-Content-Type': params.contentTypeId
|
|
2050
|
+
}
|
|
2051
|
+
});
|
|
2052
|
+
}
|
|
2027
2053
|
};
|
|
2028
2054
|
var references = function references(http, params) {
|
|
2029
2055
|
var spaceId = params.spaceId,
|
|
@@ -2635,31 +2661,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2635
2661
|
/* harmony import */ var _personal_access_token__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./personal-access-token */ "./adapters/REST/endpoints/personal-access-token.ts");
|
|
2636
2662
|
/* harmony import */ var _preview_api_key__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./preview-api-key */ "./adapters/REST/endpoints/preview-api-key.ts");
|
|
2637
2663
|
/* harmony import */ var _release__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./release */ "./adapters/REST/endpoints/release.ts");
|
|
2638
|
-
/* harmony import */ var
|
|
2639
|
-
/* harmony import */ var
|
|
2640
|
-
/* harmony import */ var
|
|
2641
|
-
/* harmony import */ var
|
|
2642
|
-
/* harmony import */ var
|
|
2643
|
-
/* harmony import */ var
|
|
2644
|
-
/* harmony import */ var
|
|
2645
|
-
/* harmony import */ var
|
|
2646
|
-
/* harmony import */ var
|
|
2647
|
-
/* harmony import */ var
|
|
2648
|
-
/* harmony import */ var
|
|
2649
|
-
/* harmony import */ var
|
|
2650
|
-
/* harmony import */ var
|
|
2651
|
-
/* harmony import */ var
|
|
2652
|
-
/* harmony import */ var
|
|
2653
|
-
/* harmony import */ var
|
|
2654
|
-
/* harmony import */ var
|
|
2655
|
-
/* harmony import */ var
|
|
2656
|
-
/* harmony import */ var
|
|
2657
|
-
/* harmony import */ var
|
|
2658
|
-
/* harmony import */ var
|
|
2659
|
-
/* harmony import */ var
|
|
2660
|
-
/* harmony import */ var
|
|
2661
|
-
/* harmony import */ var
|
|
2662
|
-
/* harmony import */ var
|
|
2664
|
+
/* harmony import */ var _release_entry__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./release-entry */ "./adapters/REST/endpoints/release-entry.ts");
|
|
2665
|
+
/* harmony import */ var _release_action__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./release-action */ "./adapters/REST/endpoints/release-action.ts");
|
|
2666
|
+
/* harmony import */ var _resource__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./resource */ "./adapters/REST/endpoints/resource.ts");
|
|
2667
|
+
/* harmony import */ var _resource_provider__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./resource-provider */ "./adapters/REST/endpoints/resource-provider.ts");
|
|
2668
|
+
/* harmony import */ var _resource_type__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./resource-type */ "./adapters/REST/endpoints/resource-type.ts");
|
|
2669
|
+
/* harmony import */ var _role__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./role */ "./adapters/REST/endpoints/role.ts");
|
|
2670
|
+
/* harmony import */ var _scheduled_action__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./scheduled-action */ "./adapters/REST/endpoints/scheduled-action.ts");
|
|
2671
|
+
/* harmony import */ var _snapshot__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./snapshot */ "./adapters/REST/endpoints/snapshot.ts");
|
|
2672
|
+
/* harmony import */ var _space__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./space */ "./adapters/REST/endpoints/space.ts");
|
|
2673
|
+
/* harmony import */ var _space_member__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./space-member */ "./adapters/REST/endpoints/space-member.ts");
|
|
2674
|
+
/* harmony import */ var _space_membership__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./space-membership */ "./adapters/REST/endpoints/space-membership.ts");
|
|
2675
|
+
/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./tag */ "./adapters/REST/endpoints/tag.ts");
|
|
2676
|
+
/* harmony import */ var _task__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./task */ "./adapters/REST/endpoints/task.ts");
|
|
2677
|
+
/* harmony import */ var _team__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./team */ "./adapters/REST/endpoints/team.ts");
|
|
2678
|
+
/* harmony import */ var _team_membership__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./team-membership */ "./adapters/REST/endpoints/team-membership.ts");
|
|
2679
|
+
/* harmony import */ var _team_space_membership__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./team-space-membership */ "./adapters/REST/endpoints/team-space-membership.ts");
|
|
2680
|
+
/* harmony import */ var _ui_config__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./ui-config */ "./adapters/REST/endpoints/ui-config.ts");
|
|
2681
|
+
/* harmony import */ var _upload__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./upload */ "./adapters/REST/endpoints/upload.ts");
|
|
2682
|
+
/* harmony import */ var _upload_credentials__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./upload-credentials */ "./adapters/REST/endpoints/upload-credentials.ts");
|
|
2683
|
+
/* harmony import */ var _usage__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./usage */ "./adapters/REST/endpoints/usage.ts");
|
|
2684
|
+
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./user */ "./adapters/REST/endpoints/user.ts");
|
|
2685
|
+
/* harmony import */ var _user_ui_config__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./user-ui-config */ "./adapters/REST/endpoints/user-ui-config.ts");
|
|
2686
|
+
/* harmony import */ var _webhook__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./webhook */ "./adapters/REST/endpoints/webhook.ts");
|
|
2687
|
+
/* harmony import */ var _workflow__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./workflow */ "./adapters/REST/endpoints/workflow.ts");
|
|
2688
|
+
/* harmony import */ var _workflow_definition__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./workflow-definition */ "./adapters/REST/endpoints/workflow-definition.ts");
|
|
2689
|
+
/* harmony import */ var _workflows_changelog__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./workflows-changelog */ "./adapters/REST/endpoints/workflows-changelog.ts");
|
|
2690
|
+
|
|
2663
2691
|
|
|
2664
2692
|
|
|
2665
2693
|
|
|
@@ -2768,31 +2796,32 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2768
2796
|
AccessToken: _access_token__WEBPACK_IMPORTED_MODULE_2__,
|
|
2769
2797
|
PreviewApiKey: _preview_api_key__WEBPACK_IMPORTED_MODULE_39__,
|
|
2770
2798
|
Release: _release__WEBPACK_IMPORTED_MODULE_40__,
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2799
|
+
ReleaseEntry: _release_entry__WEBPACK_IMPORTED_MODULE_41__,
|
|
2800
|
+
ReleaseAction: _release_action__WEBPACK_IMPORTED_MODULE_42__,
|
|
2801
|
+
Resource: _resource__WEBPACK_IMPORTED_MODULE_43__,
|
|
2802
|
+
ResourceProvider: _resource_provider__WEBPACK_IMPORTED_MODULE_44__,
|
|
2803
|
+
ResourceType: _resource_type__WEBPACK_IMPORTED_MODULE_45__,
|
|
2804
|
+
Role: _role__WEBPACK_IMPORTED_MODULE_46__,
|
|
2805
|
+
ScheduledAction: _scheduled_action__WEBPACK_IMPORTED_MODULE_47__,
|
|
2806
|
+
Snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_48__,
|
|
2807
|
+
Space: _space__WEBPACK_IMPORTED_MODULE_49__,
|
|
2808
|
+
SpaceMember: _space_member__WEBPACK_IMPORTED_MODULE_50__,
|
|
2809
|
+
SpaceMembership: _space_membership__WEBPACK_IMPORTED_MODULE_51__,
|
|
2810
|
+
Tag: _tag__WEBPACK_IMPORTED_MODULE_52__,
|
|
2811
|
+
Task: _task__WEBPACK_IMPORTED_MODULE_53__,
|
|
2812
|
+
Team: _team__WEBPACK_IMPORTED_MODULE_54__,
|
|
2813
|
+
TeamMembership: _team_membership__WEBPACK_IMPORTED_MODULE_55__,
|
|
2814
|
+
TeamSpaceMembership: _team_space_membership__WEBPACK_IMPORTED_MODULE_56__,
|
|
2815
|
+
UIConfig: _ui_config__WEBPACK_IMPORTED_MODULE_57__,
|
|
2816
|
+
Upload: _upload__WEBPACK_IMPORTED_MODULE_58__,
|
|
2817
|
+
UploadCredential: _upload_credentials__WEBPACK_IMPORTED_MODULE_59__,
|
|
2818
|
+
Usage: _usage__WEBPACK_IMPORTED_MODULE_60__,
|
|
2819
|
+
User: _user__WEBPACK_IMPORTED_MODULE_61__,
|
|
2820
|
+
UserUIConfig: _user_ui_config__WEBPACK_IMPORTED_MODULE_62__,
|
|
2821
|
+
Webhook: _webhook__WEBPACK_IMPORTED_MODULE_63__,
|
|
2822
|
+
WorkflowDefinition: _workflow_definition__WEBPACK_IMPORTED_MODULE_65__,
|
|
2823
|
+
Workflow: _workflow__WEBPACK_IMPORTED_MODULE_64__,
|
|
2824
|
+
WorkflowsChangelog: _workflows_changelog__WEBPACK_IMPORTED_MODULE_66__
|
|
2796
2825
|
});
|
|
2797
2826
|
|
|
2798
2827
|
/***/ }),
|
|
@@ -3345,6 +3374,91 @@ var queryForRelease = function queryForRelease(http, params) {
|
|
|
3345
3374
|
|
|
3346
3375
|
/***/ }),
|
|
3347
3376
|
|
|
3377
|
+
/***/ "./adapters/REST/endpoints/release-entry.ts":
|
|
3378
|
+
/*!**************************************************!*\
|
|
3379
|
+
!*** ./adapters/REST/endpoints/release-entry.ts ***!
|
|
3380
|
+
\**************************************************/
|
|
3381
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3382
|
+
|
|
3383
|
+
"use strict";
|
|
3384
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3385
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3386
|
+
/* harmony export */ create: function() { return /* binding */ create; },
|
|
3387
|
+
/* harmony export */ createWithId: function() { return /* binding */ createWithId; },
|
|
3388
|
+
/* harmony export */ get: function() { return /* binding */ get; },
|
|
3389
|
+
/* harmony export */ getMany: function() { return /* binding */ getMany; },
|
|
3390
|
+
/* harmony export */ patch: function() { return /* binding */ patch; },
|
|
3391
|
+
/* harmony export */ update: function() { return /* binding */ update; }
|
|
3392
|
+
/* harmony export */ });
|
|
3393
|
+
/* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
|
|
3394
|
+
/* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
|
|
3395
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3396
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3397
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3398
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3399
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
3400
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
3401
|
+
|
|
3402
|
+
|
|
3403
|
+
var get = function get(http, params) {
|
|
3404
|
+
//TODO: not fully implemented yet, only the get method
|
|
3405
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/entries/").concat(params.entryId));
|
|
3406
|
+
};
|
|
3407
|
+
var getMany = function getMany(http, params) {
|
|
3408
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3409
|
+
'sys.schemaVersion': 'Release.V2'
|
|
3410
|
+
});
|
|
3411
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/entries"));
|
|
3412
|
+
};
|
|
3413
|
+
var update = function update(http, params, rawData, headers) {
|
|
3414
|
+
var _rawData$sys$version;
|
|
3415
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3416
|
+
'sys.schemaVersion': 'Release.V2'
|
|
3417
|
+
});
|
|
3418
|
+
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
3419
|
+
delete data.sys;
|
|
3420
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/entries/").concat(params.entryId), data, {
|
|
3421
|
+
headers: _objectSpread({
|
|
3422
|
+
'X-Contentful-Version': (_rawData$sys$version = rawData.sys.version) !== null && _rawData$sys$version !== void 0 ? _rawData$sys$version : 0
|
|
3423
|
+
}, headers)
|
|
3424
|
+
});
|
|
3425
|
+
};
|
|
3426
|
+
var patch = function patch(http, params, data, headers) {
|
|
3427
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3428
|
+
'sys.schemaVersion': 'Release.V2'
|
|
3429
|
+
});
|
|
3430
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.patch(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/entries/").concat(params.entryId), data, {
|
|
3431
|
+
headers: _objectSpread({
|
|
3432
|
+
'X-Contentful-Version': params.version,
|
|
3433
|
+
'Content-Type': 'application/json-patch+json'
|
|
3434
|
+
}, headers)
|
|
3435
|
+
});
|
|
3436
|
+
};
|
|
3437
|
+
var create = function create(http, params, rawData, headers) {
|
|
3438
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3439
|
+
'sys.schemaVersion': 'Release.V2'
|
|
3440
|
+
});
|
|
3441
|
+
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
3442
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.post(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/entries"), data, {
|
|
3443
|
+
headers: _objectSpread({
|
|
3444
|
+
'X-Contentful-Content-Type': params.contentTypeId
|
|
3445
|
+
}, headers)
|
|
3446
|
+
});
|
|
3447
|
+
};
|
|
3448
|
+
var createWithId = function createWithId(http, params, rawData, headers) {
|
|
3449
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3450
|
+
'sys.schemaVersion': 'Release.V2'
|
|
3451
|
+
});
|
|
3452
|
+
var data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
|
|
3453
|
+
return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId, "/entries/").concat(params.entryId), data, {
|
|
3454
|
+
headers: _objectSpread({
|
|
3455
|
+
'X-Contentful-Content-Type': params.contentTypeId
|
|
3456
|
+
}, headers)
|
|
3457
|
+
});
|
|
3458
|
+
};
|
|
3459
|
+
|
|
3460
|
+
/***/ }),
|
|
3461
|
+
|
|
3348
3462
|
/***/ "./adapters/REST/endpoints/release.ts":
|
|
3349
3463
|
/*!********************************************!*\
|
|
3350
3464
|
!*** ./adapters/REST/endpoints/release.ts ***!
|
|
@@ -3377,14 +3491,38 @@ var get = function get(http, params) {
|
|
|
3377
3491
|
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId));
|
|
3378
3492
|
};
|
|
3379
3493
|
var query = function query(http, params) {
|
|
3494
|
+
var _ref, _params$query$sysSch, _params$query;
|
|
3495
|
+
// Set the schema version in the query if provided in params or query options
|
|
3496
|
+
var releaseSchemaVersion = (_ref = (_params$query$sysSch = (_params$query = params.query) === null || _params$query === void 0 ? void 0 : _params$query['sys.schemaVersion']) !== null && _params$query$sysSch !== void 0 ? _params$query$sysSch : params.releaseSchemaVersion) !== null && _ref !== void 0 ? _ref : undefined;
|
|
3497
|
+
if (releaseSchemaVersion !== undefined) {
|
|
3498
|
+
params.query = _objectSpread(_objectSpread({}, params.query), {}, {
|
|
3499
|
+
'sys.schemaVersion': releaseSchemaVersion
|
|
3500
|
+
});
|
|
3501
|
+
}
|
|
3380
3502
|
return _raw__WEBPACK_IMPORTED_MODULE_0__.get(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases"), {
|
|
3381
3503
|
params: params.query
|
|
3382
3504
|
});
|
|
3383
3505
|
};
|
|
3384
3506
|
var create = function create(http, params, payload) {
|
|
3507
|
+
var _payload$sys$schemaVe, _payload$sys;
|
|
3508
|
+
var releaseSchemaVersion = (_payload$sys$schemaVe = (_payload$sys = payload.sys) === null || _payload$sys === void 0 ? void 0 : _payload$sys.schemaVersion) !== null && _payload$sys$schemaVe !== void 0 ? _payload$sys$schemaVe : params.releaseSchemaVersion;
|
|
3509
|
+
if (releaseSchemaVersion === 'Release.v2') {
|
|
3510
|
+
payload.sys = _objectSpread(_objectSpread({}, payload.sys), {}, {
|
|
3511
|
+
type: 'Release',
|
|
3512
|
+
schemaVersion: 'Release.v2'
|
|
3513
|
+
});
|
|
3514
|
+
}
|
|
3385
3515
|
return _raw__WEBPACK_IMPORTED_MODULE_0__.post(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases"), payload);
|
|
3386
3516
|
};
|
|
3387
3517
|
var update = function update(http, params, payload, headers) {
|
|
3518
|
+
var _payload$sys$schemaVe2, _payload$sys2;
|
|
3519
|
+
var releaseSchemaVersion = (_payload$sys$schemaVe2 = (_payload$sys2 = payload.sys) === null || _payload$sys2 === void 0 ? void 0 : _payload$sys2.schemaVersion) !== null && _payload$sys$schemaVe2 !== void 0 ? _payload$sys$schemaVe2 : params.releaseSchemaVersion;
|
|
3520
|
+
if (releaseSchemaVersion === 'Release.v2') {
|
|
3521
|
+
payload.sys = _objectSpread(_objectSpread({}, payload.sys), {}, {
|
|
3522
|
+
type: 'Release',
|
|
3523
|
+
schemaVersion: 'Release.v2'
|
|
3524
|
+
});
|
|
3525
|
+
}
|
|
3388
3526
|
return _raw__WEBPACK_IMPORTED_MODULE_0__.put(http, "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/releases/").concat(params.releaseId), payload, {
|
|
3389
3527
|
headers: _objectSpread({
|
|
3390
3528
|
'X-Contentful-Version': params.version
|
|
@@ -7647,7 +7785,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
7647
7785
|
*
|
|
7648
7786
|
* // Using Thenables
|
|
7649
7787
|
* client.getSpace('<space_id>')
|
|
7650
|
-
* .then((space) => space.getEnvironment('<
|
|
7788
|
+
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
7651
7789
|
* .then((environment) => environment.createUnpublishBulkAction(payload))
|
|
7652
7790
|
* .then((bulkAction) => console.log(bulkAction.waitProcessing()))
|
|
7653
7791
|
* .catch(console.error)
|
|
@@ -7655,7 +7793,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
7655
7793
|
* // Using async/await
|
|
7656
7794
|
* try {
|
|
7657
7795
|
* const space = await clientgetSpace('<space_id>')
|
|
7658
|
-
* const environment = await space.getEnvironment('<
|
|
7796
|
+
* const environment = await space.getEnvironment('<environment-id>')
|
|
7659
7797
|
* const bulkActionInProgress = await environment.createUnpublishBulkAction(payload)
|
|
7660
7798
|
*
|
|
7661
7799
|
* // You can wait for a recently created BulkAction to be processed by using `bulkAction.waitProcessing()`
|
|
@@ -8137,7 +8275,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
8137
8275
|
*
|
|
8138
8276
|
* // Get entry references
|
|
8139
8277
|
* client.getSpace('<space_id>')
|
|
8140
|
-
* .then((space) => space.getEnvironment('<
|
|
8278
|
+
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
8141
8279
|
* .then((environment) => environment.getEntryReferences('<entry_id>', {include: number}))
|
|
8142
8280
|
* .then((entry) => console.log(entry.includes))
|
|
8143
8281
|
* // or
|
|
@@ -9839,7 +9977,7 @@ function createEnvironmentApi(makeRequest) {
|
|
|
9839
9977
|
* })
|
|
9840
9978
|
*
|
|
9841
9979
|
* client.getSpace('<space_id>')
|
|
9842
|
-
* .then((space) => space.getEnvironment('<
|
|
9980
|
+
* .then((space) => space.getEnvironment('<environment-id>'))
|
|
9843
9981
|
* .then((environment) => environment.getResourceTypes({limit: 10}))
|
|
9844
9982
|
* .then((installations) => console.log(installations.items))
|
|
9845
9983
|
* .catch(console.error)
|
|
@@ -19361,6 +19499,14 @@ var createPlainClient = function createPlainClient(makeRequest, defaults) {
|
|
|
19361
19499
|
getManyForOrganization: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Usage', 'getManyForOrganization')
|
|
19362
19500
|
},
|
|
19363
19501
|
release: {
|
|
19502
|
+
entry: {
|
|
19503
|
+
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'get'),
|
|
19504
|
+
getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'getMany'),
|
|
19505
|
+
update: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'update'),
|
|
19506
|
+
patch: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'patch'),
|
|
19507
|
+
create: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'create'),
|
|
19508
|
+
createWithId: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'createWithId')
|
|
19509
|
+
},
|
|
19364
19510
|
archive: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Release', 'archive'),
|
|
19365
19511
|
get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Release', 'get'),
|
|
19366
19512
|
query: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Release', 'query'),
|
|
@@ -23342,9 +23488,9 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
|
23342
23488
|
|
|
23343
23489
|
const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
23344
23490
|
|
|
23345
|
-
const globalFetchAPI = (({
|
|
23346
|
-
|
|
23347
|
-
|
|
23491
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
|
23492
|
+
Request, Response
|
|
23493
|
+
}))(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global);
|
|
23348
23494
|
|
|
23349
23495
|
const {
|
|
23350
23496
|
ReadableStream, TextEncoder
|
|
@@ -23360,8 +23506,12 @@ const test = (fn, ...args) => {
|
|
|
23360
23506
|
}
|
|
23361
23507
|
|
|
23362
23508
|
const factory = (env) => {
|
|
23363
|
-
|
|
23364
|
-
|
|
23509
|
+
env = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({
|
|
23510
|
+
skipUndefined: true
|
|
23511
|
+
}, globalFetchAPI, env);
|
|
23512
|
+
|
|
23513
|
+
const {fetch: envFetch, Request, Response} = env;
|
|
23514
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
23365
23515
|
const isRequestSupported = isFunction(Request);
|
|
23366
23516
|
const isResponseSupported = isFunction(Response);
|
|
23367
23517
|
|
|
@@ -23464,6 +23614,8 @@ const factory = (env) => {
|
|
|
23464
23614
|
fetchOptions
|
|
23465
23615
|
} = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config);
|
|
23466
23616
|
|
|
23617
|
+
let _fetch = envFetch || fetch;
|
|
23618
|
+
|
|
23467
23619
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
23468
23620
|
|
|
23469
23621
|
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
@@ -23523,7 +23675,7 @@ const factory = (env) => {
|
|
|
23523
23675
|
|
|
23524
23676
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
23525
23677
|
|
|
23526
|
-
let response = await (isRequestSupported ?
|
|
23678
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
|
23527
23679
|
|
|
23528
23680
|
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
23529
23681
|
|
|
@@ -23586,12 +23738,8 @@ const factory = (env) => {
|
|
|
23586
23738
|
const seedCache = new Map();
|
|
23587
23739
|
|
|
23588
23740
|
const getFetch = (config) => {
|
|
23589
|
-
let env =
|
|
23590
|
-
skipUndefined: true
|
|
23591
|
-
}, globalFetchAPI, config ? config.env : null);
|
|
23592
|
-
|
|
23741
|
+
let env = config ? config.env : {};
|
|
23593
23742
|
const {fetch, Request, Response} = env;
|
|
23594
|
-
|
|
23595
23743
|
const seeds = [
|
|
23596
23744
|
Request, Response, fetch
|
|
23597
23745
|
];
|
|
@@ -24353,8 +24501,6 @@ class Axios {
|
|
|
24353
24501
|
|
|
24354
24502
|
let newConfig = config;
|
|
24355
24503
|
|
|
24356
|
-
i = 0;
|
|
24357
|
-
|
|
24358
24504
|
while (i < len) {
|
|
24359
24505
|
const onFulfilled = requestInterceptorChain[i++];
|
|
24360
24506
|
const onRejected = requestInterceptorChain[i++];
|
|
@@ -25525,7 +25671,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25525
25671
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25526
25672
|
/* harmony export */ VERSION: function() { return /* binding */ VERSION; }
|
|
25527
25673
|
/* harmony export */ });
|
|
25528
|
-
const VERSION = "1.12.
|
|
25674
|
+
const VERSION = "1.12.2";
|
|
25529
25675
|
|
|
25530
25676
|
/***/ }),
|
|
25531
25677
|
|
|
@@ -27561,10 +27707,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
27561
27707
|
result[targetKey] = merge({}, val);
|
|
27562
27708
|
} else if (isArray(val)) {
|
|
27563
27709
|
result[targetKey] = val.slice();
|
|
27564
|
-
} else {
|
|
27565
|
-
|
|
27566
|
-
result[targetKey] = val;
|
|
27567
|
-
}
|
|
27710
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
|
27711
|
+
result[targetKey] = val;
|
|
27568
27712
|
}
|
|
27569
27713
|
}
|
|
27570
27714
|
|
|
@@ -29455,7 +29599,7 @@ function createClient(params) {
|
|
|
29455
29599
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
29456
29600
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
29457
29601
|
var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
|
|
29458
|
-
"".concat(sdkMain, "/").concat("11.
|
|
29602
|
+
"".concat(sdkMain, "/").concat("11.58.0-canary.1"), params.application, params.integration, params.feature);
|
|
29459
29603
|
var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
29460
29604
|
userAgent: userAgent
|
|
29461
29605
|
}));
|