contentful-management 11.55.0-canary.3 → 11.55.0-canary.5

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.
@@ -2107,7 +2107,8 @@ __webpack_require__.r(__webpack_exports__);
2107
2107
  /* harmony export */ });
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
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
2110
+ /* harmony import */ var _release_entry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./release-entry */ "./adapters/REST/endpoints/release-entry.ts");
2111
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.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,8 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
2116
2117
 
2117
2118
 
2118
2119
 
2120
+
2121
+
2119
2122
  const get = (http, params, rawData, headers) => {
2120
2123
  if (params.releaseId) {
2121
2124
  params.query = _objectSpread(_objectSpread({}, params.query), {}, {
@@ -2123,13 +2126,13 @@ const get = (http, params, rawData, headers) => {
2123
2126
  });
2124
2127
  }
2125
2128
  return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, {
2126
- params: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.normalizeSelect)(params.query),
2129
+ params: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.normalizeSelect)(params.query),
2127
2130
  headers: _objectSpread({}, headers)
2128
2131
  });
2129
2132
  };
2130
2133
  const getPublished = (http, params, rawData, headers) => {
2131
2134
  return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/public/entries`, {
2132
- params: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.normalizeSelect)(params.query),
2135
+ params: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.normalizeSelect)(params.query),
2133
2136
  headers: _objectSpread({}, headers)
2134
2137
  });
2135
2138
  };
@@ -2140,11 +2143,14 @@ const getMany = (http, params, rawData, headers) => {
2140
2143
  });
2141
2144
  }
2142
2145
  return _raw__WEBPACK_IMPORTED_MODULE_1__.get(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries`, {
2143
- params: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.normalizeSelect)(params.query),
2146
+ params: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.normalizeSelect)(params.query),
2144
2147
  headers: _objectSpread({}, headers)
2145
2148
  });
2146
2149
  };
2147
2150
  const patch = (http, params, data, headers) => {
2151
+ if (params.releaseId) {
2152
+ return _release_entry__WEBPACK_IMPORTED_MODULE_2__.patch(http, params, data, headers !== null && headers !== void 0 ? headers : {});
2153
+ }
2148
2154
  return _raw__WEBPACK_IMPORTED_MODULE_1__.patch(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, data, {
2149
2155
  headers: _objectSpread({
2150
2156
  'X-Contentful-Version': params.version,
@@ -2214,12 +2220,16 @@ const create = (http, params, rawData) => {
2214
2220
  });
2215
2221
  };
2216
2222
  const createWithId = (http, params, rawData) => {
2217
- const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
2218
- return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, data, {
2219
- headers: {
2220
- 'X-Contentful-Content-Type': params.contentTypeId
2221
- }
2222
- });
2223
+ if (params.releaseId) {
2224
+ return (0,_release_entry__WEBPACK_IMPORTED_MODULE_2__.createWithId)(http, params, rawData, {});
2225
+ } else {
2226
+ const data = (0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(rawData);
2227
+ return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}`, data, {
2228
+ headers: {
2229
+ 'X-Contentful-Content-Type': params.contentTypeId
2230
+ }
2231
+ });
2232
+ }
2223
2233
  };
2224
2234
  const references = (http, params) => {
2225
2235
  const {
@@ -32797,7 +32807,7 @@ function createClient(params, opts = {}) {
32797
32807
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
32798
32808
  const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
32799
32809
  // @ts-expect-error
32800
- `${sdkMain}/${"11.55.0-canary.3"}`, params.application, params.integration, params.feature);
32810
+ `${sdkMain}/${"11.55.0-canary.5"}`, params.application, params.integration, params.feature);
32801
32811
  const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
32802
32812
  userAgent
32803
32813
  }));