contentful-management 8.1.2 → 8.2.1

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
@@ -102,24 +102,12 @@ You can use the es6 import with the library as follow
102
102
 
103
103
  ```js
104
104
  // import createClient directly
105
- import { createClient } from 'contentful-management'
106
- const client = createClient({
107
- // This is the access token for this space. Normally you get the token in the Contentful web app
108
- accessToken: 'YOUR_ACCESS_TOKEN',
109
- })
110
- //....
111
- ```
112
-
113
- OR
114
-
115
- ```js
116
- // import everything from contentful
117
- import * as contentful from 'contentful-management'
105
+ import contentful from 'contentful-management'
118
106
  const client = contentful.createClient({
119
107
  // This is the access token for this space. Normally you get the token in the Contentful web app
120
108
  accessToken: 'YOUR_ACCESS_TOKEN',
121
109
  })
122
- // ....
110
+ //....
123
111
  ```
124
112
 
125
113
  ## Your first request
@@ -327,7 +315,7 @@ Interceptor called on every response. Takes Axios response object as an arg. Def
327
315
 
328
316
  #### apiAdapter (default: `new RestAdapter(configuration)`)
329
317
 
330
- An [`Adapter`](https://github.com/contentful/contentful-management.js/blob/2350b47053459694b21b19c71025632fe57815cc/lib/common-types.ts#L493-L495)
318
+ An [`Adapter`](https://github.com/contentful/contentful-management.js/blob/2350b47053459694b21b19c71025632fe57815cc/lib/common-types.ts#L493-L495)
331
319
  that can be utilized to issue requests. It defaults to a [`RestAdapter`](https://github.com/contentful/contentful-management.js/blob/b50534c629a8ddc81637170a07bc63477d136cec/lib/adapters/REST/rest-adapter.ts)
332
320
  initialized with provided configuration.
333
321
 
@@ -337,9 +325,11 @@ initialized with provided configuration.
337
325
  > information it needs to issue the request (e.g., host or auth headers)
338
326
 
339
327
  #### throttle (default: `0`)
328
+
340
329
  Maximum number of requests per second.
341
- - `1`-`30` (fixed number of limit),
342
- - `'auto'` (calculated limit based on your plan),
330
+
331
+ - `1`-`30` (fixed number of limit),
332
+ - `'auto'` (calculated limit based on your plan),
343
333
  - `'0%'` - `'100%'` (calculated % limit based on your plan)
344
334
 
345
335
  ### Reference documentation
@@ -125,7 +125,7 @@ var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "../node_mo
125
125
  var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "../node_modules/axios/lib/helpers/parseHeaders.js");
126
126
  var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "../node_modules/axios/lib/helpers/isURLSameOrigin.js");
127
127
  var createError = __webpack_require__(/*! ../core/createError */ "../node_modules/axios/lib/core/createError.js");
128
- var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults.js");
128
+ var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "../node_modules/axios/lib/defaults/transitional.js");
129
129
  var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
130
130
 
131
131
  module.exports = function xhrAdapter(config) {
@@ -240,7 +240,7 @@ module.exports = function xhrAdapter(config) {
240
240
  // Handle timeout
241
241
  request.ontimeout = function handleTimeout() {
242
242
  var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
243
- var transitional = config.transitional || defaults.transitional;
243
+ var transitional = config.transitional || transitionalDefaults;
244
244
  if (config.timeoutErrorMessage) {
245
245
  timeoutErrorMessage = config.timeoutErrorMessage;
246
246
  }
@@ -345,7 +345,7 @@ var utils = __webpack_require__(/*! ./utils */ "../node_modules/axios/lib/utils.
345
345
  var bind = __webpack_require__(/*! ./helpers/bind */ "../node_modules/axios/lib/helpers/bind.js");
346
346
  var Axios = __webpack_require__(/*! ./core/Axios */ "../node_modules/axios/lib/core/Axios.js");
347
347
  var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "../node_modules/axios/lib/core/mergeConfig.js");
348
- var defaults = __webpack_require__(/*! ./defaults */ "../node_modules/axios/lib/defaults.js");
348
+ var defaults = __webpack_require__(/*! ./defaults */ "../node_modules/axios/lib/defaults/index.js");
349
349
 
350
350
  /**
351
351
  * Create an instance of Axios
@@ -880,7 +880,7 @@ module.exports = function createError(message, config, code, request, response)
880
880
  var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
881
881
  var transformData = __webpack_require__(/*! ./transformData */ "../node_modules/axios/lib/core/transformData.js");
882
882
  var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "../node_modules/axios/lib/cancel/isCancel.js");
883
- var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults.js");
883
+ var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults/index.js");
884
884
  var Cancel = __webpack_require__(/*! ../cancel/Cancel */ "../node_modules/axios/lib/cancel/Cancel.js");
885
885
 
886
886
  /**
@@ -1180,7 +1180,7 @@ module.exports = function settle(resolve, reject, response) {
1180
1180
 
1181
1181
 
1182
1182
  var utils = __webpack_require__(/*! ./../utils */ "../node_modules/axios/lib/utils.js");
1183
- var defaults = __webpack_require__(/*! ./../defaults */ "../node_modules/axios/lib/defaults.js");
1183
+ var defaults = __webpack_require__(/*! ../defaults */ "../node_modules/axios/lib/defaults/index.js");
1184
1184
 
1185
1185
  /**
1186
1186
  * Transform the data for a request or a response
@@ -1203,19 +1203,20 @@ module.exports = function transformData(data, headers, fns) {
1203
1203
 
1204
1204
  /***/ }),
1205
1205
 
1206
- /***/ "../node_modules/axios/lib/defaults.js":
1207
- /*!*********************************************!*\
1208
- !*** ../node_modules/axios/lib/defaults.js ***!
1209
- \*********************************************/
1206
+ /***/ "../node_modules/axios/lib/defaults/index.js":
1207
+ /*!***************************************************!*\
1208
+ !*** ../node_modules/axios/lib/defaults/index.js ***!
1209
+ \***************************************************/
1210
1210
  /*! no static exports found */
1211
1211
  /***/ (function(module, exports, __webpack_require__) {
1212
1212
 
1213
1213
  "use strict";
1214
1214
  /* WEBPACK VAR INJECTION */(function(process) {
1215
1215
 
1216
- var utils = __webpack_require__(/*! ./utils */ "../node_modules/axios/lib/utils.js");
1217
- var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "../node_modules/axios/lib/helpers/normalizeHeaderName.js");
1218
- var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "../node_modules/axios/lib/core/enhanceError.js");
1216
+ var utils = __webpack_require__(/*! ../utils */ "../node_modules/axios/lib/utils.js");
1217
+ var normalizeHeaderName = __webpack_require__(/*! ../helpers/normalizeHeaderName */ "../node_modules/axios/lib/helpers/normalizeHeaderName.js");
1218
+ var enhanceError = __webpack_require__(/*! ../core/enhanceError */ "../node_modules/axios/lib/core/enhanceError.js");
1219
+ var transitionalDefaults = __webpack_require__(/*! ./transitional */ "../node_modules/axios/lib/defaults/transitional.js");
1219
1220
 
1220
1221
  var DEFAULT_CONTENT_TYPE = {
1221
1222
  'Content-Type': 'application/x-www-form-urlencoded'
@@ -1231,10 +1232,10 @@ function getDefaultAdapter() {
1231
1232
  var adapter;
1232
1233
  if (typeof XMLHttpRequest !== 'undefined') {
1233
1234
  // For browsers use XHR adapter
1234
- adapter = __webpack_require__(/*! ./adapters/xhr */ "../node_modules/axios/lib/adapters/xhr.js");
1235
+ adapter = __webpack_require__(/*! ../adapters/xhr */ "../node_modules/axios/lib/adapters/xhr.js");
1235
1236
  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
1236
1237
  // For node use HTTP adapter
1237
- adapter = __webpack_require__(/*! ./adapters/http */ "../node_modules/axios/lib/adapters/xhr.js");
1238
+ adapter = __webpack_require__(/*! ../adapters/http */ "../node_modules/axios/lib/adapters/xhr.js");
1238
1239
  }
1239
1240
  return adapter;
1240
1241
  }
@@ -1256,11 +1257,7 @@ function stringifySafely(rawValue, parser, encoder) {
1256
1257
 
1257
1258
  var defaults = {
1258
1259
 
1259
- transitional: {
1260
- silentJSONParsing: true,
1261
- forcedJSONParsing: true,
1262
- clarifyTimeoutError: false
1263
- },
1260
+ transitional: transitionalDefaults,
1264
1261
 
1265
1262
  adapter: getDefaultAdapter(),
1266
1263
 
@@ -1346,7 +1343,26 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1346
1343
 
1347
1344
  module.exports = defaults;
1348
1345
 
1349
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "../node_modules/process/browser.js")))
1346
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ "../node_modules/process/browser.js")))
1347
+
1348
+ /***/ }),
1349
+
1350
+ /***/ "../node_modules/axios/lib/defaults/transitional.js":
1351
+ /*!**********************************************************!*\
1352
+ !*** ../node_modules/axios/lib/defaults/transitional.js ***!
1353
+ \**********************************************************/
1354
+ /*! no static exports found */
1355
+ /***/ (function(module, exports, __webpack_require__) {
1356
+
1357
+ "use strict";
1358
+
1359
+
1360
+ module.exports = {
1361
+ silentJSONParsing: true,
1362
+ forcedJSONParsing: true,
1363
+ clarifyTimeoutError: false
1364
+ };
1365
+
1350
1366
 
1351
1367
  /***/ }),
1352
1368
 
@@ -1358,7 +1374,7 @@ module.exports = defaults;
1358
1374
  /***/ (function(module, exports) {
1359
1375
 
1360
1376
  module.exports = {
1361
- "version": "0.26.0"
1377
+ "version": "0.26.1"
1362
1378
  };
1363
1379
 
1364
1380
  /***/ }),
@@ -10132,7 +10148,7 @@ function createClient(params) {
10132
10148
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10133
10149
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
10134
10150
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
10135
- "".concat(sdkMain, "/").concat("8.1.2"), params.application, params.integration, params.feature);
10151
+ "".concat(sdkMain, "/").concat("8.2.1"), params.application, params.integration, params.feature);
10136
10152
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
10137
10153
  // https://github.com/microsoft/TypeScript/issues/26591
10138
10154
  // @ts-expect-error
@@ -19631,11 +19647,12 @@ var wrapWebhookCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["w
19631
19647
  /*!*****************************************!*\
19632
19648
  !*** ./entities/workflow-definition.ts ***!
19633
19649
  \*****************************************/
19634
- /*! exports provided: default, wrapWorkflowDefinition, wrapWorkflowDefinitionCollection */
19650
+ /*! exports provided: WorkflowStepActionType, default, wrapWorkflowDefinition, wrapWorkflowDefinitionCollection */
19635
19651
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
19636
19652
 
19637
19653
  "use strict";
19638
19654
  __webpack_require__.r(__webpack_exports__);
19655
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkflowStepActionType", function() { return WorkflowStepActionType; });
19639
19656
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createWorkflowDefinitionApi; });
19640
19657
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapWorkflowDefinition", function() { return wrapWorkflowDefinition; });
19641
19658
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapWorkflowDefinitionCollection", function() { return wrapWorkflowDefinitionCollection; });
@@ -19655,6 +19672,15 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
19655
19672
 
19656
19673
 
19657
19674
 
19675
+ /* Workflow Step Action */
19676
+ var WorkflowStepActionType;
19677
+
19678
+ (function (WorkflowStepActionType) {
19679
+ WorkflowStepActionType["App"] = "app";
19680
+ WorkflowStepActionType["Email"] = "email";
19681
+ WorkflowStepActionType["Task"] = "task";
19682
+ })(WorkflowStepActionType || (WorkflowStepActionType = {}));
19683
+
19658
19684
  /**
19659
19685
  * @private
19660
19686
  */