contentful-management 12.0.0-beta.13 → 12.0.0-beta.14

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.
Files changed (35) hide show
  1. package/dist/contentful-management.bundle.browser.js +20407 -21488
  2. package/dist/contentful-management.bundle.browser.js.map +1 -1
  3. package/dist/contentful-management.bundle.browser.min.js +1 -1
  4. package/dist/contentful-management.bundle.browser.min.js.map +1 -1
  5. package/dist/contentful-management.bundle.node.cjs +140 -82
  6. package/dist/contentful-management.bundle.node.cjs.map +1 -1
  7. package/dist/esm/adapters/REST/endpoints/bulk-action.js +13 -1
  8. package/dist/esm/adapters/REST/endpoints/bulk-action.js.map +1 -1
  9. package/dist/esm/common-types.js.map +1 -1
  10. package/dist/esm/create-contentful-api.js +1 -1
  11. package/dist/esm/entities/app-definition.js.map +1 -1
  12. package/dist/esm/entities/bulk-action.js.map +1 -1
  13. package/dist/esm/index.js +2 -1
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/plain/plain-client.js +5 -1
  16. package/dist/esm/plain/plain-client.js.map +1 -1
  17. package/dist/stats-browser-min.html +1 -1
  18. package/dist/types/adapters/REST/endpoints/bulk-action.d.ts +4 -0
  19. package/dist/types/adapters/REST/endpoints/bulk-action.js +13 -1
  20. package/dist/types/adapters/REST/endpoints/bulk-action.js.map +1 -1
  21. package/dist/types/common-types.d.ts +24 -1
  22. package/dist/types/common-types.js.map +1 -1
  23. package/dist/types/entities/app-definition.d.ts +7 -1
  24. package/dist/types/entities/app-definition.js.map +1 -1
  25. package/dist/types/entities/bulk-action.d.ts +31 -3
  26. package/dist/types/entities/bulk-action.js.map +1 -1
  27. package/dist/types/export-types.d.ts +1 -1
  28. package/dist/types/index.d.ts +2 -0
  29. package/dist/types/index.js +1 -0
  30. package/dist/types/index.js.map +1 -1
  31. package/dist/types/plain/common-types.d.ts +5 -1
  32. package/dist/types/plain/plain-client.js +4 -0
  33. package/dist/types/plain/plain-client.js.map +1 -1
  34. package/package.json +15 -10
  35. package/dist/types/methods/bulk-action.d.ts +0 -14
@@ -9,7 +9,7 @@ var require$$4 = require('https');
9
9
  var require$$0$2 = require('url');
10
10
  var require$$6 = require('fs');
11
11
  var require$$8 = require('crypto');
12
- var require$$3$1 = require('http2');
12
+ var require$$6$1 = require('http2');
13
13
  var require$$4$1 = require('assert');
14
14
  var require$$0$4 = require('tty');
15
15
  var require$$0$3 = require('os');
@@ -1040,7 +1040,8 @@ function pThrottle({
1040
1040
  interval,
1041
1041
  strict,
1042
1042
  signal,
1043
- onDelay
1043
+ onDelay,
1044
+ weight
1044
1045
  }) {
1045
1046
  if (!Number.isFinite(limit)) {
1046
1047
  throw new TypeError('Expected `limit` to be a finite number');
@@ -1051,25 +1052,37 @@ function pThrottle({
1051
1052
  if (limit < 0) {
1052
1053
  throw new TypeError('Expected `limit` to be >= 0');
1053
1054
  }
1055
+ if (weight !== undefined && typeof weight !== 'function') {
1056
+ throw new TypeError('Expected `weight` to be a function');
1057
+ }
1058
+
1059
+ // TODO: Uncomment in next major version (breaking change)
1060
+ // The combination of strict mode with interval=0 doesn't enforce the limit correctly
1061
+ // (minSpacing becomes 0, allowing unlimited calls in the same millisecond).
1062
+ // For now, we allow it to avoid breaking existing code, but it should be rejected in v9.
1063
+ // if (strict && interval === 0) {
1064
+ // throw new TypeError('The `strict` option cannot be used with `interval` of 0');
1065
+ // }
1066
+
1054
1067
  const state = {
1055
1068
  queue: new Map(),
1056
1069
  strictTicks: [],
1057
1070
  // Track windowed algorithm state so it can be reset on abort
1058
1071
  currentTick: 0,
1059
- activeCount: 0
1072
+ activeWeight: 0
1060
1073
  };
1061
- function windowedDelay() {
1074
+ function windowedDelay(requestWeight) {
1062
1075
  const now = Date.now();
1063
1076
  if (now - state.currentTick > interval) {
1064
- state.activeCount = 1;
1077
+ state.activeWeight = requestWeight;
1065
1078
  state.currentTick = now;
1066
1079
  return 0;
1067
1080
  }
1068
- if (state.activeCount < limit) {
1069
- state.activeCount++;
1081
+ if (state.activeWeight + requestWeight <= limit) {
1082
+ state.activeWeight += requestWeight;
1070
1083
  } else {
1071
1084
  state.currentTick += interval;
1072
- state.activeCount = 1;
1085
+ state.activeWeight = requestWeight;
1073
1086
  }
1074
1087
  return state.currentTick - now;
1075
1088
  }
@@ -1081,6 +1094,28 @@ function pThrottle({
1081
1094
  }
1082
1095
  let timeoutId;
1083
1096
  return new Promise((resolve, reject) => {
1097
+ // Calculate weight for this call
1098
+ let requestWeight = 1;
1099
+ if (weight) {
1100
+ try {
1101
+ requestWeight = weight(...arguments_);
1102
+ } catch (error) {
1103
+ reject(error);
1104
+ return;
1105
+ }
1106
+
1107
+ // Validate weight
1108
+ if (!Number.isFinite(requestWeight) || requestWeight < 0) {
1109
+ reject(new TypeError('Expected `weight` to be a finite non-negative number'));
1110
+ return;
1111
+ }
1112
+ if (requestWeight > limit) {
1113
+ reject(new TypeError(`Expected \`weight\` (${requestWeight}) to be <= \`limit\` (${limit})`));
1114
+ return;
1115
+ }
1116
+ }
1117
+ const delayResult = getDelay(requestWeight);
1118
+ const delay = delayResult;
1084
1119
  const execute = () => {
1085
1120
  try {
1086
1121
  resolve(function_.apply(this, arguments_));
@@ -1089,7 +1124,6 @@ function pThrottle({
1089
1124
  }
1090
1125
  state.queue.delete(timeoutId);
1091
1126
  };
1092
- const delay = getDelay();
1093
1127
  if (delay > 0) {
1094
1128
  timeoutId = setTimeout(execute, delay);
1095
1129
  state.queue.set(timeoutId, reject);
@@ -1127,7 +1161,7 @@ function pThrottle({
1127
1161
  functionState.strictTicks.length = 0;
1128
1162
  // Reset windowed state so subsequent calls are not artificially delayed
1129
1163
  functionState.currentTick = 0;
1130
- functionState.activeCount = 0;
1164
+ functionState.activeWeight = 0;
1131
1165
  }
1132
1166
  signalThrottleds.delete(signal);
1133
1167
  };
@@ -15184,7 +15218,7 @@ var hasRequiredMimeTypes;
15184
15218
  function requireMimeTypes() {
15185
15219
  if (hasRequiredMimeTypes) return mimeTypes;
15186
15220
  hasRequiredMimeTypes = 1;
15187
- (function (exports) {
15221
+ (function (exports$1) {
15188
15222
 
15189
15223
  /**
15190
15224
  * Module dependencies.
@@ -15206,18 +15240,18 @@ function requireMimeTypes() {
15206
15240
  * @public
15207
15241
  */
15208
15242
 
15209
- exports.charset = charset;
15210
- exports.charsets = {
15243
+ exports$1.charset = charset;
15244
+ exports$1.charsets = {
15211
15245
  lookup: charset
15212
15246
  };
15213
- exports.contentType = contentType;
15214
- exports.extension = extension;
15215
- exports.extensions = Object.create(null);
15216
- exports.lookup = lookup;
15217
- exports.types = Object.create(null);
15247
+ exports$1.contentType = contentType;
15248
+ exports$1.extension = extension;
15249
+ exports$1.extensions = Object.create(null);
15250
+ exports$1.lookup = lookup;
15251
+ exports$1.types = Object.create(null);
15218
15252
 
15219
15253
  // Populate the extensions/types maps
15220
- populateMaps(exports.extensions, exports.types);
15254
+ populateMaps(exports$1.extensions, exports$1.types);
15221
15255
 
15222
15256
  /**
15223
15257
  * Get the default charset for a MIME type.
@@ -15257,14 +15291,14 @@ function requireMimeTypes() {
15257
15291
  if (!str || typeof str !== 'string') {
15258
15292
  return false;
15259
15293
  }
15260
- var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str;
15294
+ var mime = str.indexOf('/') === -1 ? exports$1.lookup(str) : str;
15261
15295
  if (!mime) {
15262
15296
  return false;
15263
15297
  }
15264
15298
 
15265
15299
  // TODO: use content-type or other module
15266
15300
  if (mime.indexOf('charset') === -1) {
15267
- var charset = exports.charset(mime);
15301
+ var charset = exports$1.charset(mime);
15268
15302
  if (charset) mime += '; charset=' + charset.toLowerCase();
15269
15303
  }
15270
15304
  return mime;
@@ -15286,7 +15320,7 @@ function requireMimeTypes() {
15286
15320
  var match = EXTRACT_TYPE_REGEXP.exec(type);
15287
15321
 
15288
15322
  // get extensions
15289
- var exts = match && exports.extensions[match[1].toLowerCase()];
15323
+ var exts = match && exports$1.extensions[match[1].toLowerCase()];
15290
15324
  if (!exts || !exts.length) {
15291
15325
  return false;
15292
15326
  }
@@ -15310,7 +15344,7 @@ function requireMimeTypes() {
15310
15344
  if (!extension) {
15311
15345
  return false;
15312
15346
  }
15313
- return exports.types[extension] || false;
15347
+ return exports$1.types[extension] || false;
15314
15348
  }
15315
15349
 
15316
15350
  /**
@@ -16238,7 +16272,7 @@ function requireForm_data() {
16238
16272
  var callback = function (error, responce) {
16239
16273
  request.removeListener('error', callback);
16240
16274
  request.removeListener('response', onResponse);
16241
- return cb.call(this, error, responce); // eslint-disable-line no-invalid-this
16275
+ return cb.call(this, error, responce);
16242
16276
  };
16243
16277
  onResponse = callback.bind(this, null);
16244
16278
  request.on('error', callback);
@@ -16257,7 +16291,7 @@ function requireForm_data() {
16257
16291
  FormData.prototype.toString = function () {
16258
16292
  return '[object FormData]';
16259
16293
  };
16260
- setToStringTag(FormData, 'FormData');
16294
+ setToStringTag(FormData.prototype, 'FormData');
16261
16295
 
16262
16296
  // Public API
16263
16297
  form_data = FormData;
@@ -16811,17 +16845,17 @@ var hasRequiredBrowser;
16811
16845
  function requireBrowser() {
16812
16846
  if (hasRequiredBrowser) return browser.exports;
16813
16847
  hasRequiredBrowser = 1;
16814
- (function (module, exports) {
16848
+ (function (module, exports$1) {
16815
16849
  /**
16816
16850
  * This is the web browser implementation of `debug()`.
16817
16851
  */
16818
16852
 
16819
- exports.formatArgs = formatArgs;
16820
- exports.save = save;
16821
- exports.load = load;
16822
- exports.useColors = useColors;
16823
- exports.storage = localstorage();
16824
- exports.destroy = (() => {
16853
+ exports$1.formatArgs = formatArgs;
16854
+ exports$1.save = save;
16855
+ exports$1.load = load;
16856
+ exports$1.useColors = useColors;
16857
+ exports$1.storage = localstorage();
16858
+ exports$1.destroy = (() => {
16825
16859
  let warned = false;
16826
16860
  return () => {
16827
16861
  if (!warned) {
@@ -16835,7 +16869,7 @@ function requireBrowser() {
16835
16869
  * Colors.
16836
16870
  */
16837
16871
 
16838
- exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
16872
+ exports$1.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
16839
16873
 
16840
16874
  /**
16841
16875
  * Currently only WebKit-based Web Inspectors, Firefox >= v31,
@@ -16914,7 +16948,7 @@ function requireBrowser() {
16914
16948
  *
16915
16949
  * @api public
16916
16950
  */
16917
- exports.log = console.debug || console.log || (() => {});
16951
+ exports$1.log = console.debug || console.log || (() => {});
16918
16952
 
16919
16953
  /**
16920
16954
  * Save `namespaces`.
@@ -16925,9 +16959,9 @@ function requireBrowser() {
16925
16959
  function save(namespaces) {
16926
16960
  try {
16927
16961
  if (namespaces) {
16928
- exports.storage.setItem('debug', namespaces);
16962
+ exports$1.storage.setItem('debug', namespaces);
16929
16963
  } else {
16930
- exports.storage.removeItem('debug');
16964
+ exports$1.storage.removeItem('debug');
16931
16965
  }
16932
16966
  } catch (error) {
16933
16967
  // Swallow
@@ -16944,7 +16978,7 @@ function requireBrowser() {
16944
16978
  function load() {
16945
16979
  let r;
16946
16980
  try {
16947
- r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG');
16981
+ r = exports$1.storage.getItem('debug') || exports$1.storage.getItem('DEBUG');
16948
16982
  } catch (error) {
16949
16983
  // Swallow
16950
16984
  // XXX (@Qix-) should we be logging these?
@@ -16978,7 +17012,7 @@ function requireBrowser() {
16978
17012
  // XXX (@Qix-) should we be logging these?
16979
17013
  }
16980
17014
  }
16981
- module.exports = requireCommon()(exports);
17015
+ module.exports = requireCommon()(exports$1);
16982
17016
  const {
16983
17017
  formatters
16984
17018
  } = module.exports;
@@ -17125,7 +17159,7 @@ var hasRequiredNode;
17125
17159
  function requireNode() {
17126
17160
  if (hasRequiredNode) return node.exports;
17127
17161
  hasRequiredNode = 1;
17128
- (function (module, exports) {
17162
+ (function (module, exports$1) {
17129
17163
  const tty = require$$0$4;
17130
17164
  const util = require$$1;
17131
17165
 
@@ -17133,25 +17167,25 @@ function requireNode() {
17133
17167
  * This is the Node.js implementation of `debug()`.
17134
17168
  */
17135
17169
 
17136
- exports.init = init;
17137
- exports.log = log;
17138
- exports.formatArgs = formatArgs;
17139
- exports.save = save;
17140
- exports.load = load;
17141
- exports.useColors = useColors;
17142
- exports.destroy = util.deprecate(() => {}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
17170
+ exports$1.init = init;
17171
+ exports$1.log = log;
17172
+ exports$1.formatArgs = formatArgs;
17173
+ exports$1.save = save;
17174
+ exports$1.load = load;
17175
+ exports$1.useColors = useColors;
17176
+ exports$1.destroy = util.deprecate(() => {}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
17143
17177
 
17144
17178
  /**
17145
17179
  * Colors.
17146
17180
  */
17147
17181
 
17148
- exports.colors = [6, 2, 3, 4, 5, 1];
17182
+ exports$1.colors = [6, 2, 3, 4, 5, 1];
17149
17183
  try {
17150
17184
  // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
17151
17185
  // eslint-disable-next-line import/no-extraneous-dependencies
17152
17186
  const supportsColor = requireSupportsColor();
17153
17187
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
17154
- exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
17188
+ exports$1.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
17155
17189
  }
17156
17190
  } catch (error) {
17157
17191
  // Swallow - we only care if `supports-color` is available; it doesn't have to be.
@@ -17163,7 +17197,7 @@ function requireNode() {
17163
17197
  * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
17164
17198
  */
17165
17199
 
17166
- exports.inspectOpts = Object.keys(process.env).filter(key => {
17200
+ exports$1.inspectOpts = Object.keys(process.env).filter(key => {
17167
17201
  return /^debug_/i.test(key);
17168
17202
  }).reduce((obj, key) => {
17169
17203
  // Camel-case
@@ -17191,7 +17225,7 @@ function requireNode() {
17191
17225
  */
17192
17226
 
17193
17227
  function useColors() {
17194
- return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
17228
+ return 'colors' in exports$1.inspectOpts ? Boolean(exports$1.inspectOpts.colors) : tty.isatty(process.stderr.fd);
17195
17229
  }
17196
17230
 
17197
17231
  /**
@@ -17216,7 +17250,7 @@ function requireNode() {
17216
17250
  }
17217
17251
  }
17218
17252
  function getDate() {
17219
- if (exports.inspectOpts.hideDate) {
17253
+ if (exports$1.inspectOpts.hideDate) {
17220
17254
  return '';
17221
17255
  }
17222
17256
  return new Date().toISOString() + ' ';
@@ -17227,7 +17261,7 @@ function requireNode() {
17227
17261
  */
17228
17262
 
17229
17263
  function log(...args) {
17230
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
17264
+ return process.stderr.write(util.formatWithOptions(exports$1.inspectOpts, ...args) + '\n');
17231
17265
  }
17232
17266
 
17233
17267
  /**
@@ -17266,12 +17300,12 @@ function requireNode() {
17266
17300
 
17267
17301
  function init(debug) {
17268
17302
  debug.inspectOpts = {};
17269
- const keys = Object.keys(exports.inspectOpts);
17303
+ const keys = Object.keys(exports$1.inspectOpts);
17270
17304
  for (let i = 0; i < keys.length; i++) {
17271
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
17305
+ debug.inspectOpts[keys[i]] = exports$1.inspectOpts[keys[i]];
17272
17306
  }
17273
17307
  }
17274
- module.exports = requireCommon()(exports);
17308
+ module.exports = requireCommon()(exports$1);
17275
17309
  const {
17276
17310
  formatters
17277
17311
  } = module.exports;
@@ -17795,7 +17829,7 @@ function requireFollowRedirects() {
17795
17829
  // Wraps the key/value object of protocols with redirect functionality
17796
17830
  function wrap(protocols) {
17797
17831
  // Default settings
17798
- var exports = {
17832
+ var exports$1 = {
17799
17833
  maxRedirects: 21,
17800
17834
  maxBodyLength: 10 * 1024 * 1024
17801
17835
  };
@@ -17805,7 +17839,7 @@ function requireFollowRedirects() {
17805
17839
  Object.keys(protocols).forEach(function (scheme) {
17806
17840
  var protocol = scheme + ":";
17807
17841
  var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
17808
- var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
17842
+ var wrappedProtocol = exports$1[scheme] = Object.create(nativeProtocol);
17809
17843
 
17810
17844
  // Executes a request, following redirects
17811
17845
  function request(input, options, callback) {
@@ -17828,8 +17862,8 @@ function requireFollowRedirects() {
17828
17862
 
17829
17863
  // Set defaults
17830
17864
  options = Object.assign({
17831
- maxRedirects: exports.maxRedirects,
17832
- maxBodyLength: exports.maxBodyLength
17865
+ maxRedirects: exports$1.maxRedirects,
17866
+ maxBodyLength: exports$1.maxBodyLength
17833
17867
  }, input, options);
17834
17868
  options.nativeProtocols = nativeProtocols;
17835
17869
  if (!isString(options.host) && !isString(options.hostname)) {
@@ -17863,7 +17897,7 @@ function requireFollowRedirects() {
17863
17897
  }
17864
17898
  });
17865
17899
  });
17866
- return exports;
17900
+ return exports$1;
17867
17901
  }
17868
17902
  function noop() {/* empty */}
17869
17903
  function parseUrl(input) {
@@ -17995,10 +18029,10 @@ function requireAxios() {
17995
18029
  const FormData$1 = requireForm_data();
17996
18030
  const crypto = require$$8;
17997
18031
  const url = require$$0$2;
17998
- const http2 = require$$3$1;
17999
18032
  const proxyFromEnv = requireProxyFromEnv();
18000
18033
  const http = require$$3;
18001
18034
  const https = require$$4;
18035
+ const http2 = require$$6$1;
18002
18036
  const util = require$$1;
18003
18037
  const followRedirects = requireFollowRedirects();
18004
18038
  const zlib = require$$9;
@@ -18015,6 +18049,7 @@ function requireAxios() {
18015
18049
  const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
18016
18050
  const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
18017
18051
  const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
18052
+ const http2__default = /*#__PURE__*/_interopDefaultLegacy(http2);
18018
18053
  const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
18019
18054
  const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
18020
18055
  const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
@@ -19864,7 +19899,7 @@ function requireAxios() {
19864
19899
  }
19865
19900
  return requestedURL;
19866
19901
  }
19867
- const VERSION = "1.13.1";
19902
+ const VERSION = "1.13.2";
19868
19903
  function parseProtocol(url) {
19869
19904
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
19870
19905
  return match && match[1] || '';
@@ -20344,12 +20379,6 @@ function requireAxios() {
20344
20379
  flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH,
20345
20380
  finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
20346
20381
  };
20347
- const {
20348
- HTTP2_HEADER_SCHEME,
20349
- HTTP2_HEADER_METHOD,
20350
- HTTP2_HEADER_PATH,
20351
- HTTP2_HEADER_STATUS
20352
- } = http2.constants;
20353
20382
  const isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
20354
20383
  const {
20355
20384
  http: httpFollow,
@@ -20371,8 +20400,8 @@ function requireAxios() {
20371
20400
  options = Object.assign({
20372
20401
  sessionTimeout: 1000
20373
20402
  }, options);
20374
- let authoritySessions;
20375
- if (authoritySessions = this.sessions[authority]) {
20403
+ let authoritySessions = this.sessions[authority];
20404
+ if (authoritySessions) {
20376
20405
  let len = authoritySessions.length;
20377
20406
  for (let i = 0; i < len; i++) {
20378
20407
  const [sessionHandle, sessionOptions] = authoritySessions[i];
@@ -20381,7 +20410,7 @@ function requireAxios() {
20381
20410
  }
20382
20411
  }
20383
20412
  }
20384
- const session = http2.connect(authority, options);
20413
+ const session = http2__default["default"].connect(authority, options);
20385
20414
  let removed;
20386
20415
  const removeSession = () => {
20387
20416
  if (removed) {
@@ -20393,11 +20422,12 @@ function requireAxios() {
20393
20422
  i = len;
20394
20423
  while (i--) {
20395
20424
  if (entries[i][0] === session) {
20396
- entries.splice(i, 1);
20397
20425
  if (len === 1) {
20398
20426
  delete this.sessions[authority];
20399
- return;
20427
+ } else {
20428
+ entries.splice(i, 1);
20400
20429
  }
20430
+ return;
20401
20431
  }
20402
20432
  }
20403
20433
  };
@@ -20427,9 +20457,8 @@ function requireAxios() {
20427
20457
  };
20428
20458
  }
20429
20459
  session.once('close', removeSession);
20430
- let entries = this.sessions[authority],
20431
- entry = [session, options];
20432
- entries ? this.sessions[authority].push(entry) : authoritySessions = this.sessions[authority] = [entry];
20460
+ let entry = [session, options];
20461
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
20433
20462
  return session;
20434
20463
  }
20435
20464
  }
@@ -20547,6 +20576,12 @@ function requireAxios() {
20547
20576
  headers
20548
20577
  } = options;
20549
20578
  const session = http2Sessions.getSession(authority, http2Options);
20579
+ const {
20580
+ HTTP2_HEADER_SCHEME,
20581
+ HTTP2_HEADER_METHOD,
20582
+ HTTP2_HEADER_PATH,
20583
+ HTTP2_HEADER_STATUS
20584
+ } = http2__default["default"].constants;
20550
20585
  const http2Headers = {
20551
20586
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
20552
20587
  [HTTP2_HEADER_METHOD]: options.method,
@@ -21012,6 +21047,9 @@ function requireAxios() {
21012
21047
  }
21013
21048
  abort(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req));
21014
21049
  });
21050
+ } else {
21051
+ // explicitly reset the socket timeout value for a possible `keep-alive` request
21052
+ req.setTimeout(0);
21015
21053
  }
21016
21054
 
21017
21055
  // Send the request
@@ -23715,13 +23753,29 @@ const unpublish$3 = (http, params, payload) => {
23715
23753
  const validate$2 = (http, params, payload) => {
23716
23754
  return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions/validate`, payload);
23717
23755
  };
23756
+ const getV2 = (http, params) => {
23757
+ return get$W(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions/${params.bulkActionId}`);
23758
+ };
23759
+ const publishV2 = (http, params, payload) => {
23760
+ return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions`, payload);
23761
+ };
23762
+ const unpublishV2 = (http, params, payload) => {
23763
+ return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions`, payload);
23764
+ };
23765
+ const validateV2 = (http, params, payload) => {
23766
+ return post$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions`, payload);
23767
+ };
23718
23768
 
23719
23769
  var BulkAction = /*#__PURE__*/Object.freeze({
23720
23770
  __proto__: null,
23721
23771
  get: get$E,
23772
+ getV2: getV2,
23722
23773
  publish: publish$3,
23774
+ publishV2: publishV2,
23723
23775
  unpublish: unpublish$3,
23724
- validate: validate$2
23776
+ unpublishV2: unpublishV2,
23777
+ validate: validate$2,
23778
+ validateV2: validateV2
23725
23779
  });
23726
23780
 
23727
23781
  const VERSION_HEADER = 'X-Contentful-Version';
@@ -31098,7 +31152,7 @@ const wrapEnvironmentAliasCollection = wrapCollection(wrapEnvironmentAlias);
31098
31152
  /**
31099
31153
  * Represents that state of the scheduled action
31100
31154
  */
31101
- var ScheduledActionStatus;
31155
+ exports.ScheduledActionStatus = void 0;
31102
31156
  (function (ScheduledActionStatus) {
31103
31157
  /** action is pending execution */
31104
31158
  ScheduledActionStatus["scheduled"] = "scheduled";
@@ -31110,7 +31164,7 @@ var ScheduledActionStatus;
31110
31164
  ScheduledActionStatus["failed"] = "failed";
31111
31165
  /** action was canceled by a user (terminal state) */
31112
31166
  ScheduledActionStatus["canceled"] = "canceled";
31113
- })(ScheduledActionStatus || (ScheduledActionStatus = {}));
31167
+ })(exports.ScheduledActionStatus || (exports.ScheduledActionStatus = {}));
31114
31168
  function getInstanceMethods(makeRequest) {
31115
31169
  const getParams = (self) => {
31116
31170
  const scheduledAction = self.toPlainObject();
@@ -34604,7 +34658,7 @@ const wrapOAuthApplicationCollection = wrapCursorPaginatedCollection(wrapOAuthAp
34604
34658
  */
34605
34659
  function createClientApi(makeRequest) {
34606
34660
  return {
34607
- version: "12.0.0-beta.13",
34661
+ version: "12.0.0-beta.14",
34608
34662
  /**
34609
34663
  * Gets all environment templates for a given organization with the lasted version
34610
34664
  * @param organizationId - Organization ID
@@ -35203,7 +35257,7 @@ const wrap = ({ makeRequest, defaults }, entityType, action) => {
35203
35257
  const createPlainClient = (makeRequest, defaults) => {
35204
35258
  const wrapParams = { makeRequest, defaults };
35205
35259
  return {
35206
- version: "12.0.0-beta.13",
35260
+ version: "12.0.0-beta.14",
35207
35261
  raw: {
35208
35262
  getDefaultParams: () => defaults,
35209
35263
  get: (url, config) => makeRequest({
@@ -35382,6 +35436,10 @@ const createPlainClient = (makeRequest, defaults) => {
35382
35436
  publish: wrap(wrapParams, 'BulkAction', 'publish'),
35383
35437
  unpublish: wrap(wrapParams, 'BulkAction', 'unpublish'),
35384
35438
  validate: wrap(wrapParams, 'BulkAction', 'validate'),
35439
+ getV2: wrap(wrapParams, 'BulkAction', 'getV2'),
35440
+ publishV2: wrap(wrapParams, 'BulkAction', 'publishV2'),
35441
+ unpublishV2: wrap(wrapParams, 'BulkAction', 'unpublishV2'),
35442
+ validateV2: wrap(wrapParams, 'BulkAction', 'validateV2'),
35385
35443
  },
35386
35444
  comment: {
35387
35445
  get: wrap(wrapParams, 'Comment', 'get'),
@@ -36154,7 +36212,7 @@ var WorkflowStepActionType;
36154
36212
  */
36155
36213
  function createClient(params, opts = {}) {
36156
36214
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
36157
- const userAgent = getUserAgentHeader(`${sdkMain}/${"12.0.0-beta.13"}`, params.application, params.integration, params.feature);
36215
+ const userAgent = getUserAgentHeader(`${sdkMain}/${"12.0.0-beta.14"}`, params.application, params.integration, params.feature);
36158
36216
  const adapter = createAdapter({ ...params, userAgent });
36159
36217
  // Parameters<?> and ReturnType<?> only return the types of the last overload
36160
36218
  // https://github.com/microsoft/TypeScript/issues/26591