contentful-management 10.42.0 → 10.44.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.
@@ -125,8 +125,8 @@ function _callAppActionResult() {
125
125
  case 0:
126
126
  callId = _ref.callId;
127
127
  checkCount = 1;
128
- retryInterval = APP_ACTION_CALL_RETRY_INTERVAL;
129
- retries = APP_ACTION_CALL_RETRIES;
128
+ retryInterval = params.retryInterval || APP_ACTION_CALL_RETRY_INTERVAL;
129
+ retries = params.retries || APP_ACTION_CALL_RETRIES;
130
130
  return _context3.abrupt("return", new Promise(function (resolve, reject) {
131
131
  var poll = /*#__PURE__*/function () {
132
132
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
@@ -11119,13 +11119,19 @@ __webpack_require__.r(__webpack_exports__);
11119
11119
  /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/esm/index.mjs");
11120
11120
  /* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
11121
11121
  /* harmony import */ var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enhance-with-methods */ "./enhance-with-methods.ts");
11122
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
11123
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11124
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11125
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11126
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11127
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11122
11128
 
11123
11129
 
11124
11130
 
11125
11131
  /**
11126
11132
  * @private
11127
11133
  */
11128
- function createAppActionCallApi(makeRequest) {
11134
+ function createAppActionCallApi(makeRequest, retryOptions) {
11129
11135
  return {
11130
11136
  createWithResponse: function createWithResponse() {
11131
11137
  var payload = {
@@ -11137,12 +11143,12 @@ function createAppActionCallApi(makeRequest) {
11137
11143
  return makeRequest({
11138
11144
  entityType: 'AppActionCall',
11139
11145
  action: 'createWithResponse',
11140
- params: {
11146
+ params: _objectSpread({
11141
11147
  spaceId: 'space-id',
11142
11148
  environmentId: 'environment-id',
11143
11149
  appDefinitionId: 'app-definiton-id',
11144
11150
  appActionId: 'app-action-id'
11145
- },
11151
+ }, retryOptions),
11146
11152
  payload: payload
11147
11153
  }).then(function (data) {
11148
11154
  return wrapAppActionCallResponse(makeRequest, data);
@@ -11183,9 +11189,9 @@ function wrapAppActionCall(makeRequest, data) {
11183
11189
  * @param data - Raw AppActionCall data
11184
11190
  * @return Wrapped AppActionCall data
11185
11191
  */
11186
- function wrapAppActionCallResponse(makeRequest, data) {
11192
+ function wrapAppActionCallResponse(makeRequest, data, retryOptions) {
11187
11193
  var appActionCallResponse = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__.toPlainObject)((0,fast_copy__WEBPACK_IMPORTED_MODULE_0__["default"])(data));
11188
- var appActionCallResponseWithMethods = (0,_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(appActionCallResponse, createAppActionCallApi(makeRequest));
11194
+ var appActionCallResponseWithMethods = (0,_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(appActionCallResponse, createAppActionCallApi(makeRequest, retryOptions));
11189
11195
  return appActionCallResponseWithMethods;
11190
11196
  }
11191
11197