contentful-management 11.57.1 → 11.57.3

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 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 URI's.
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 uri's.
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
 
@@ -14105,80 +14105,44 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
14105
14105
 
14106
14106
 
14107
14107
 
14108
-
14109
- // Raw App Action call response (new endpoint). Not yet wired to runtime behavior.
14110
-
14111
14108
  /**
14112
14109
  * @private
14113
14110
  */
14114
14111
  function createAppActionCallApi(makeRequest, retryOptions) {
14115
14112
  return {
14116
- createWithResponse: function createWithResponse() {
14117
- var payload = {
14118
- parameters: {
14119
- recipient: 'Alice <alice@my-company.com>',
14120
- message_body: 'Hello from Bob!'
14121
- }
14122
- };
14113
+ createWithResponse: function createWithResponse(params, payload) {
14123
14114
  return makeRequest({
14124
14115
  entityType: 'AppActionCall',
14125
14116
  action: 'createWithResponse',
14126
- params: _objectSpread({
14127
- spaceId: 'space-id',
14128
- environmentId: 'environment-id',
14129
- appDefinitionId: 'app-definiton-id',
14130
- appActionId: 'app-action-id'
14131
- }, retryOptions),
14117
+ params: _objectSpread(_objectSpread({}, params), retryOptions),
14132
14118
  payload: payload
14133
14119
  }).then(function (data) {
14134
14120
  return wrapAppActionCallResponse(makeRequest, data);
14135
14121
  });
14136
14122
  },
14137
- getCallDetails: function getCallDetails() {
14123
+ getCallDetails: function getCallDetails(params) {
14138
14124
  return makeRequest({
14139
14125
  entityType: 'AppActionCall',
14140
14126
  action: 'getCallDetails',
14141
- params: {
14142
- spaceId: 'space-id',
14143
- environmentId: 'environment-id',
14144
- callId: 'call-id',
14145
- appActionId: 'app-action-id'
14146
- }
14127
+ params: params
14147
14128
  }).then(function (data) {
14148
14129
  return wrapAppActionCallResponse(makeRequest, data);
14149
14130
  });
14150
14131
  },
14151
- get: function get() {
14132
+ get: function get(params) {
14152
14133
  return makeRequest({
14153
14134
  entityType: 'AppActionCall',
14154
14135
  action: 'get',
14155
- params: {
14156
- spaceId: 'space-id',
14157
- environmentId: 'environment-id',
14158
- appDefinitionId: 'app-definiton-id',
14159
- appActionId: 'app-action-id',
14160
- callId: 'call-id'
14161
- }
14136
+ params: params
14162
14137
  }).then(function (data) {
14163
14138
  return wrapAppActionCall(makeRequest, data);
14164
14139
  });
14165
14140
  },
14166
- createWithResult: function createWithResult() {
14167
- var payload = {
14168
- parameters: {
14169
- recipient: 'Alice <alice@my-company.com>',
14170
- message_body: 'Hello from Bob!'
14171
- }
14172
- };
14141
+ createWithResult: function createWithResult(params, payload) {
14173
14142
  return makeRequest({
14174
14143
  entityType: 'AppActionCall',
14175
14144
  action: 'createWithResult',
14176
- params: _objectSpread({
14177
- spaceId: 'space-id',
14178
- environmentId: 'environment-id',
14179
- appDefinitionId: 'app-definiton-id',
14180
- appActionId: 'app-action-id'
14181
- }, retryOptions),
14145
+ params: _objectSpread(_objectSpread({}, params), retryOptions),
14182
14146
  payload: payload
14183
14147
  }).then(function (data) {
14184
14148
  return wrapAppActionCall(makeRequest, data);
@@ -23342,9 +23306,9 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
23342
23306
 
23343
23307
  const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"];
23344
23308
 
23345
- const globalFetchAPI = (({fetch, Request, Response}) => ({
23346
- fetch, Request, Response
23347
- }))(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global);
23309
+ const globalFetchAPI = (({Request, Response}) => ({
23310
+ Request, Response
23311
+ }))(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].global);
23348
23312
 
23349
23313
  const {
23350
23314
  ReadableStream, TextEncoder
@@ -23360,8 +23324,12 @@ const test = (fn, ...args) => {
23360
23324
  }
23361
23325
 
23362
23326
  const factory = (env) => {
23363
- const {fetch, Request, Response} = Object.assign({}, globalFetchAPI, env);
23364
- const isFetchSupported = isFunction(fetch);
23327
+ env = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({
23328
+ skipUndefined: true
23329
+ }, globalFetchAPI, env);
23330
+
23331
+ const {fetch: envFetch, Request, Response} = env;
23332
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
23365
23333
  const isRequestSupported = isFunction(Request);
23366
23334
  const isResponseSupported = isFunction(Response);
23367
23335
 
@@ -23464,6 +23432,8 @@ const factory = (env) => {
23464
23432
  fetchOptions
23465
23433
  } = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"])(config);
23466
23434
 
23435
+ let _fetch = envFetch || fetch;
23436
+
23467
23437
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
23468
23438
 
23469
23439
  let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_4__["default"])([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -23523,7 +23493,7 @@ const factory = (env) => {
23523
23493
 
23524
23494
  request = isRequestSupported && new Request(url, resolvedOptions);
23525
23495
 
23526
- let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
23496
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
23527
23497
 
23528
23498
  const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
23529
23499
 
@@ -23586,12 +23556,8 @@ const factory = (env) => {
23586
23556
  const seedCache = new Map();
23587
23557
 
23588
23558
  const getFetch = (config) => {
23589
- let env = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({
23590
- skipUndefined: true
23591
- }, globalFetchAPI, config ? config.env : null);
23592
-
23559
+ let env = config ? config.env : {};
23593
23560
  const {fetch, Request, Response} = env;
23594
-
23595
23561
  const seeds = [
23596
23562
  Request, Response, fetch
23597
23563
  ];
@@ -24353,8 +24319,6 @@ class Axios {
24353
24319
 
24354
24320
  let newConfig = config;
24355
24321
 
24356
- i = 0;
24357
-
24358
24322
  while (i < len) {
24359
24323
  const onFulfilled = requestInterceptorChain[i++];
24360
24324
  const onRejected = requestInterceptorChain[i++];
@@ -25525,7 +25489,7 @@ __webpack_require__.r(__webpack_exports__);
25525
25489
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25526
25490
  /* harmony export */ VERSION: function() { return /* binding */ VERSION; }
25527
25491
  /* harmony export */ });
25528
- const VERSION = "1.12.0";
25492
+ const VERSION = "1.12.2";
25529
25493
 
25530
25494
  /***/ }),
25531
25495
 
@@ -27561,10 +27525,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
27561
27525
  result[targetKey] = merge({}, val);
27562
27526
  } else if (isArray(val)) {
27563
27527
  result[targetKey] = val.slice();
27564
- } else {
27565
- if (!skipUndefined || !isUndefined(val)) {
27566
- result[targetKey] = val;
27567
- }
27528
+ } else if (!skipUndefined || !isUndefined(val)) {
27529
+ result[targetKey] = val;
27568
27530
  }
27569
27531
  }
27570
27532
 
@@ -29455,7 +29417,7 @@ function createClient(params) {
29455
29417
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29456
29418
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
29457
29419
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
29458
- "".concat(sdkMain, "/").concat("11.57.1"), params.application, params.integration, params.feature);
29420
+ "".concat(sdkMain, "/").concat("11.57.3"), params.application, params.integration, params.feature);
29459
29421
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
29460
29422
  userAgent: userAgent
29461
29423
  }));