contentful-management 11.55.0-canary.2 → 11.55.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.
@@ -2108,6 +2108,7 @@ __webpack_require__.r(__webpack_exports__);
2108
2108
  /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
2109
2109
  /* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
2110
2110
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
2111
+ /* harmony import */ var _release_entry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./release-entry */ "./adapters/REST/endpoints/release-entry.ts");
2111
2112
  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; }
2112
2113
  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; }
2113
2114
  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; }
@@ -2116,6 +2117,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
2116
2117
 
2117
2118
 
2118
2119
 
2120
+
2119
2121
  const get = (http, params, rawData, headers) => {
2120
2122
  if (params.releaseId) {
2121
2123
  params.query = _objectSpread(_objectSpread({}, params.query), {}, {
@@ -2145,6 +2147,9 @@ const getMany = (http, params, rawData, headers) => {
2145
2147
  });
2146
2148
  };
2147
2149
  const patch = (http, params, data, headers) => {
2150
+ if (params.releaseId) {
2151
+ return _release_entry__WEBPACK_IMPORTED_MODULE_3__.patch(http, params, data, headers !== null && headers !== void 0 ? headers : {});
2152
+ }
2148
2153
  return _raw__WEBPACK_IMPORTED_MODULE_1__.patch(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, data, {
2149
2154
  headers: _objectSpread({
2150
2155
  'X-Contentful-Version': params.version,
@@ -3489,6 +3494,7 @@ const queryForRelease = (http, params) => {
3489
3494
  "use strict";
3490
3495
  __webpack_require__.r(__webpack_exports__);
3491
3496
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3497
+ /* harmony export */ createWithId: () => (/* binding */ createWithId),
3492
3498
  /* harmony export */ get: () => (/* binding */ get),
3493
3499
  /* harmony export */ getMany: () => (/* binding */ getMany),
3494
3500
  /* harmony export */ patch: () => (/* binding */ patch),
@@ -3537,6 +3543,17 @@ const patch = (http, params, data, headers) => {
3537
3543
  }, headers)
3538
3544
  });
3539
3545
  };
3546
+ const createWithId = (http, params, rawData, headers) => {
3547
+ params.query = _objectSpread(_objectSpread({}, params.query), {}, {
3548
+ 'sys.schemaVersion': 'Release.V2'
3549
+ });
3550
+ const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
3551
+ return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/entries/${params.entryId}`, data, {
3552
+ headers: _objectSpread({
3553
+ 'X-Contentful-Content-Type': params.contentTypeId
3554
+ }, headers)
3555
+ });
3556
+ };
3540
3557
 
3541
3558
  /***/ }),
3542
3559
 
@@ -18316,7 +18333,8 @@ const createPlainClient = (makeRequest, defaults) => {
18316
18333
  get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'get'),
18317
18334
  getMany: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'getMany'),
18318
18335
  update: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'update'),
18319
- patch: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'patch')
18336
+ patch: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'patch'),
18337
+ createWithId: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'ReleaseEntry', 'createWithId')
18320
18338
  },
18321
18339
  archive: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Release', 'archive'),
18322
18340
  get: (0,_wrappers_wrap__WEBPACK_IMPORTED_MODULE_1__.wrap)(wrapParams, 'Release', 'get'),
@@ -32784,7 +32802,7 @@ function createClient(params, opts = {}) {
32784
32802
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
32785
32803
  const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
32786
32804
  // @ts-expect-error
32787
- `${sdkMain}/${"11.55.0-canary.2"}`, params.application, params.integration, params.feature);
32805
+ `${sdkMain}/${"11.55.0-canary.4"}`, params.application, params.integration, params.feature);
32788
32806
  const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
32789
32807
  userAgent
32790
32808
  }));