contentful-management 11.50.1 → 11.52.0

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.
@@ -249,7 +249,7 @@ var del = function del(http, params, headers) {
249
249
  var publish = function publish(http, params, rawData, headers) {
250
250
  return _raw__WEBPACK_IMPORTED_MODULE_1__.put(http, "/spaces/".concat(params.spaceId, "/ai/actions/").concat(params.aiActionId, "/published"), null, {
251
251
  headers: _objectSpread({
252
- 'X-Contentful-Version': rawData.sys.version
252
+ 'X-Contentful-Version': params.version
253
253
  }, headers)
254
254
  });
255
255
  };
@@ -13385,18 +13385,16 @@ function createSpaceApi(makeRequest) {
13385
13385
  * .catch(console.error)
13386
13386
  * ```
13387
13387
  */
13388
- publishAiAction: function publishAiAction(aiActionId, data) {
13388
+ publishAiAction: function publishAiAction(aiActionId, _ref4) {
13389
+ var version = _ref4.version;
13389
13390
  var raw = this.toPlainObject();
13390
13391
  return makeRequest({
13391
13392
  entityType: 'AiAction',
13392
13393
  action: 'publish',
13393
13394
  params: {
13394
13395
  spaceId: raw.sys.id,
13395
- aiActionId: aiActionId
13396
- },
13397
- payload: data,
13398
- headers: {
13399
- 'X-Contentful-Version': data.sys.version
13396
+ aiActionId: aiActionId,
13397
+ version: version
13400
13398
  }
13401
13399
  }).then(function (response) {
13402
13400
  return wrapAiAction(makeRequest, response);
@@ -13877,8 +13875,11 @@ function createAiActionApi(makeRequest) {
13877
13875
  return makeRequest({
13878
13876
  entityType: 'AiAction',
13879
13877
  action: 'publish',
13880
- params: getParams(self),
13881
- payload: self
13878
+ params: {
13879
+ aiActionId: self.sys.id,
13880
+ spaceId: self.sys.space.sys.id,
13881
+ version: self.sys.version
13882
+ }
13882
13883
  }).then(function (data) {
13883
13884
  return wrapAiAction(makeRequest, data);
13884
13885
  });
@@ -29276,7 +29277,7 @@ function createClient(params) {
29276
29277
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29277
29278
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
29278
29279
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
29279
- "".concat(sdkMain, "/").concat("11.50.1"), params.application, params.integration, params.feature);
29280
+ "".concat(sdkMain, "/").concat("11.52.0"), params.application, params.integration, params.feature);
29280
29281
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
29281
29282
  userAgent: userAgent
29282
29283
  }));