contentful-management 12.0.0-beta.5 → 12.0.0-beta.6
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/dist/cjs/create-contentful-api.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/plain/plain-client.cjs +1 -1
- package/dist/contentful-management.browser.js +51 -51
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.cjs +3 -3
- package/dist/esm/create-contentful-api.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/plain/plain-client.js +1 -1
- package/dist/stats-browser-min.html +1 -1
- package/dist/types/export-types.d.ts +6 -6
- package/package.json +1 -5
|
@@ -18,7 +18,7 @@ function createClientApi(makeRequest) {
|
|
|
18
18
|
const { wrapEnvironmentTemplate, wrapEnvironmentTemplateCollection } = index.environmentTemplate;
|
|
19
19
|
const { wrapOAuthApplication, wrapOAuthApplicationCollection } = index.oauthApplication;
|
|
20
20
|
return {
|
|
21
|
-
version: "12.0.0-beta.
|
|
21
|
+
version: "12.0.0-beta.6",
|
|
22
22
|
/**
|
|
23
23
|
* Gets all environment templates for a given organization with the lasted version
|
|
24
24
|
* @param organizationId - Organization ID
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@ var index__namespace = /*#__PURE__*/_interopNamespaceDefaultOnly(index);
|
|
|
24
24
|
*/
|
|
25
25
|
function createClient(params, opts = {}) {
|
|
26
26
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
27
|
-
const userAgent = contentfulSdkCore.getUserAgentHeader(`${sdkMain}/${"12.0.0-beta.
|
|
27
|
+
const userAgent = contentfulSdkCore.getUserAgentHeader(`${sdkMain}/${"12.0.0-beta.6"}`, params.application, params.integration, params.feature);
|
|
28
28
|
const adapter = createAdapter.createAdapter(Object.assign(Object.assign({}, params), { userAgent }));
|
|
29
29
|
// Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
30
30
|
// https://github.com/microsoft/TypeScript/issues/26591
|
|
@@ -9,7 +9,7 @@ var wrap = require('./wrappers/wrap.cjs');
|
|
|
9
9
|
const createPlainClient = (makeRequest, defaults) => {
|
|
10
10
|
const wrapParams = { makeRequest, defaults };
|
|
11
11
|
return {
|
|
12
|
-
version: "12.0.0-beta.
|
|
12
|
+
version: "12.0.0-beta.6",
|
|
13
13
|
raw: {
|
|
14
14
|
getDefaultParams: () => defaults,
|
|
15
15
|
get: (url, config) => makeRequest({
|
|
@@ -6681,8 +6681,8 @@ var contentfulManagement = (function (exports) {
|
|
|
6681
6681
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
6682
6682
|
|
|
6683
6683
|
// reserved names hotfix
|
|
6684
|
-
utils$1.reduceDescriptors(AxiosHeaders.prototype, function (
|
|
6685
|
-
var value =
|
|
6684
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref0, key) {
|
|
6685
|
+
var value = _ref0.value;
|
|
6686
6686
|
var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
6687
6687
|
return {
|
|
6688
6688
|
get: function get() {
|
|
@@ -7090,12 +7090,12 @@ var contentfulManagement = (function (exports) {
|
|
|
7090
7090
|
headers.setContentType(undefined); // Let the browser set it
|
|
7091
7091
|
} else if ((contentType = headers.getContentType()) !== false) {
|
|
7092
7092
|
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
7093
|
-
var
|
|
7093
|
+
var _ref1 = contentType ? contentType.split(';').map(function (token) {
|
|
7094
7094
|
return token.trim();
|
|
7095
7095
|
}).filter(Boolean) : [],
|
|
7096
|
-
|
|
7097
|
-
type =
|
|
7098
|
-
tokens =
|
|
7096
|
+
_ref10 = _toArray(_ref1),
|
|
7097
|
+
type = _ref10[0],
|
|
7098
|
+
tokens = _ref10.slice(1);
|
|
7099
7099
|
headers.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
|
|
7100
7100
|
}
|
|
7101
7101
|
}
|
|
@@ -7541,7 +7541,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7541
7541
|
return encoder.encode(str);
|
|
7542
7542
|
};
|
|
7543
7543
|
}(new TextEncoder()) : (/*#__PURE__*/function () {
|
|
7544
|
-
var
|
|
7544
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(str) {
|
|
7545
7545
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
7546
7546
|
while (1) switch (_context5.prev = _context5.next) {
|
|
7547
7547
|
case 0:
|
|
@@ -7558,7 +7558,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7558
7558
|
}, _callee4);
|
|
7559
7559
|
}));
|
|
7560
7560
|
return function (_x4) {
|
|
7561
|
-
return
|
|
7561
|
+
return _ref11.apply(this, arguments);
|
|
7562
7562
|
};
|
|
7563
7563
|
}()));
|
|
7564
7564
|
var test = function test(fn) {
|
|
@@ -7602,7 +7602,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7602
7602
|
});
|
|
7603
7603
|
}(new Response());
|
|
7604
7604
|
var getBodyLength = /*#__PURE__*/function () {
|
|
7605
|
-
var
|
|
7605
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(body) {
|
|
7606
7606
|
var _request;
|
|
7607
7607
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
7608
7608
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -7656,11 +7656,11 @@ var contentfulManagement = (function (exports) {
|
|
|
7656
7656
|
}, _callee5);
|
|
7657
7657
|
}));
|
|
7658
7658
|
return function getBodyLength(_x5) {
|
|
7659
|
-
return
|
|
7659
|
+
return _ref12.apply(this, arguments);
|
|
7660
7660
|
};
|
|
7661
7661
|
}();
|
|
7662
7662
|
var resolveBodyLength = /*#__PURE__*/function () {
|
|
7663
|
-
var
|
|
7663
|
+
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(headers, body) {
|
|
7664
7664
|
var length;
|
|
7665
7665
|
return _regeneratorRuntime.wrap(function _callee6$(_context7) {
|
|
7666
7666
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -7674,12 +7674,12 @@ var contentfulManagement = (function (exports) {
|
|
|
7674
7674
|
}, _callee6);
|
|
7675
7675
|
}));
|
|
7676
7676
|
return function resolveBodyLength(_x6, _x7) {
|
|
7677
|
-
return
|
|
7677
|
+
return _ref13.apply(this, arguments);
|
|
7678
7678
|
};
|
|
7679
7679
|
}();
|
|
7680
7680
|
var fetchAdapter = isFetchSupported && (/*#__PURE__*/function () {
|
|
7681
|
-
var
|
|
7682
|
-
var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, response, isStreamResponse, options, responseContentLength,
|
|
7681
|
+
var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(config) {
|
|
7682
|
+
var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, response, isStreamResponse, options, responseContentLength, _ref15, _ref16, _onProgress, _flush, responseData;
|
|
7683
7683
|
return _regeneratorRuntime.wrap(function _callee7$(_context8) {
|
|
7684
7684
|
while (1) switch (_context8.prev = _context8.next) {
|
|
7685
7685
|
case 0:
|
|
@@ -7744,7 +7744,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7744
7744
|
options[prop] = response[prop];
|
|
7745
7745
|
});
|
|
7746
7746
|
responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
7747
|
-
|
|
7747
|
+
_ref15 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref16 = _slicedToArray(_ref15, 2), _onProgress = _ref16[0], _flush = _ref16[1];
|
|
7748
7748
|
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () {
|
|
7749
7749
|
_flush && _flush();
|
|
7750
7750
|
unsubscribe && unsubscribe();
|
|
@@ -7789,7 +7789,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7789
7789
|
}, _callee7, null, [[4, 33]]);
|
|
7790
7790
|
}));
|
|
7791
7791
|
return function (_x8) {
|
|
7792
|
-
return
|
|
7792
|
+
return _ref14.apply(this, arguments);
|
|
7793
7793
|
};
|
|
7794
7794
|
}());
|
|
7795
7795
|
var knownAdapters = {
|
|
@@ -7841,10 +7841,10 @@ var contentfulManagement = (function (exports) {
|
|
|
7841
7841
|
rejectedReasons[id || '#' + i] = adapter;
|
|
7842
7842
|
}
|
|
7843
7843
|
if (!adapter) {
|
|
7844
|
-
var reasons = Object.entries(rejectedReasons).map(function (
|
|
7845
|
-
var
|
|
7846
|
-
id =
|
|
7847
|
-
state =
|
|
7844
|
+
var reasons = Object.entries(rejectedReasons).map(function (_ref17) {
|
|
7845
|
+
var _ref18 = _slicedToArray(_ref17, 2),
|
|
7846
|
+
id = _ref18[0],
|
|
7847
|
+
state = _ref18[1];
|
|
7848
7848
|
return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
|
|
7849
7849
|
});
|
|
7850
7850
|
var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
@@ -8057,7 +8057,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8057
8057
|
}
|
|
8058
8058
|
}, _callee8, this, [[0, 6]]);
|
|
8059
8059
|
}));
|
|
8060
|
-
function request(_x9,
|
|
8060
|
+
function request(_x9, _x0) {
|
|
8061
8061
|
return _request2.apply(this, arguments);
|
|
8062
8062
|
}
|
|
8063
8063
|
return request;
|
|
@@ -8442,10 +8442,10 @@ var contentfulManagement = (function (exports) {
|
|
|
8442
8442
|
NotExtended: 510,
|
|
8443
8443
|
NetworkAuthenticationRequired: 511
|
|
8444
8444
|
};
|
|
8445
|
-
Object.entries(HttpStatusCode).forEach(function (
|
|
8446
|
-
var
|
|
8447
|
-
key =
|
|
8448
|
-
value =
|
|
8445
|
+
Object.entries(HttpStatusCode).forEach(function (_ref19) {
|
|
8446
|
+
var _ref20 = _slicedToArray(_ref19, 2),
|
|
8447
|
+
key = _ref20[0],
|
|
8448
|
+
value = _ref20[1];
|
|
8449
8449
|
HttpStatusCode[value] = key;
|
|
8450
8450
|
});
|
|
8451
8451
|
var HttpStatusCode$1 = HttpStatusCode;
|
|
@@ -9689,7 +9689,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9689
9689
|
}
|
|
9690
9690
|
}, _callee4);
|
|
9691
9691
|
}));
|
|
9692
|
-
return function processForAllLocales(
|
|
9692
|
+
return function processForAllLocales(_x0, _x1) {
|
|
9693
9693
|
return _ref6.apply(this, arguments);
|
|
9694
9694
|
};
|
|
9695
9695
|
}();
|
|
@@ -10412,10 +10412,10 @@ var contentfulManagement = (function (exports) {
|
|
|
10412
10412
|
headers: headers
|
|
10413
10413
|
});
|
|
10414
10414
|
};
|
|
10415
|
-
var disconnect = function disconnect(http,
|
|
10416
|
-
var spaceId =
|
|
10417
|
-
environmentId =
|
|
10418
|
-
environmentTemplateId =
|
|
10415
|
+
var disconnect = function disconnect(http, _ref0, headers) {
|
|
10416
|
+
var spaceId = _ref0.spaceId,
|
|
10417
|
+
environmentId = _ref0.environmentId,
|
|
10418
|
+
environmentTemplateId = _ref0.environmentTemplateId;
|
|
10419
10419
|
return del$F(http, "/spaces/".concat(spaceId, "/environments/").concat(environmentId, "/template_installations/").concat(environmentTemplateId), {
|
|
10420
10420
|
headers: headers
|
|
10421
10421
|
});
|
|
@@ -11878,7 +11878,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11878
11878
|
}
|
|
11879
11879
|
}, _callee3);
|
|
11880
11880
|
}));
|
|
11881
|
-
return function upsertRetryPolicy(_x8, _x9,
|
|
11881
|
+
return function upsertRetryPolicy(_x8, _x9, _x0) {
|
|
11882
11882
|
return _ref3.apply(this, arguments);
|
|
11883
11883
|
};
|
|
11884
11884
|
}();
|
|
@@ -11897,7 +11897,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11897
11897
|
}
|
|
11898
11898
|
}, _callee4);
|
|
11899
11899
|
}));
|
|
11900
|
-
return function deleteSigningSecret(
|
|
11900
|
+
return function deleteSigningSecret(_x1, _x10) {
|
|
11901
11901
|
return _ref4.apply(this, arguments);
|
|
11902
11902
|
};
|
|
11903
11903
|
}();
|
|
@@ -11916,7 +11916,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11916
11916
|
}
|
|
11917
11917
|
}, _callee5);
|
|
11918
11918
|
}));
|
|
11919
|
-
return function deleteRetryPolicy(
|
|
11919
|
+
return function deleteRetryPolicy(_x11, _x12) {
|
|
11920
11920
|
return _ref5.apply(this, arguments);
|
|
11921
11921
|
};
|
|
11922
11922
|
}();
|
|
@@ -14276,8 +14276,8 @@ var contentfulManagement = (function (exports) {
|
|
|
14276
14276
|
* ```
|
|
14277
14277
|
*/
|
|
14278
14278
|
createComment: function createComment(data) {
|
|
14279
|
-
var
|
|
14280
|
-
params =
|
|
14279
|
+
var _getParams0 = getParams(this),
|
|
14280
|
+
params = _getParams0.params;
|
|
14281
14281
|
return makeRequest({
|
|
14282
14282
|
entityType: 'Comment',
|
|
14283
14283
|
action: 'create',
|
|
@@ -14310,8 +14310,8 @@ var contentfulManagement = (function (exports) {
|
|
|
14310
14310
|
* ```
|
|
14311
14311
|
*/
|
|
14312
14312
|
getComments: function getComments() {
|
|
14313
|
-
var
|
|
14314
|
-
params =
|
|
14313
|
+
var _getParams1 = getParams(this),
|
|
14314
|
+
params = _getParams1.params;
|
|
14315
14315
|
return makeRequest({
|
|
14316
14316
|
entityType: 'Comment',
|
|
14317
14317
|
action: 'getMany',
|
|
@@ -14338,8 +14338,8 @@ var contentfulManagement = (function (exports) {
|
|
|
14338
14338
|
* ```
|
|
14339
14339
|
*/
|
|
14340
14340
|
getComment: function getComment(id) {
|
|
14341
|
-
var
|
|
14342
|
-
params =
|
|
14341
|
+
var _getParams10 = getParams(this),
|
|
14342
|
+
params = _getParams10.params;
|
|
14343
14343
|
return makeRequest({
|
|
14344
14344
|
entityType: 'Comment',
|
|
14345
14345
|
action: 'get',
|
|
@@ -14374,8 +14374,8 @@ var contentfulManagement = (function (exports) {
|
|
|
14374
14374
|
* ```
|
|
14375
14375
|
*/
|
|
14376
14376
|
createTask: function createTask(data) {
|
|
14377
|
-
var
|
|
14378
|
-
params =
|
|
14377
|
+
var _getParams11 = getParams(this),
|
|
14378
|
+
params = _getParams11.params;
|
|
14379
14379
|
return makeRequest({
|
|
14380
14380
|
entityType: 'Task',
|
|
14381
14381
|
action: 'create',
|
|
@@ -14404,8 +14404,8 @@ var contentfulManagement = (function (exports) {
|
|
|
14404
14404
|
*/
|
|
14405
14405
|
getTasks: function getTasks() {
|
|
14406
14406
|
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14407
|
-
var
|
|
14408
|
-
params =
|
|
14407
|
+
var _getParams12 = getParams(this),
|
|
14408
|
+
params = _getParams12.params;
|
|
14409
14409
|
return makeRequest({
|
|
14410
14410
|
entityType: 'Task',
|
|
14411
14411
|
action: 'getMany',
|
|
@@ -14434,8 +14434,8 @@ var contentfulManagement = (function (exports) {
|
|
|
14434
14434
|
* ```
|
|
14435
14435
|
*/
|
|
14436
14436
|
getTask: function getTask(id) {
|
|
14437
|
-
var
|
|
14438
|
-
params =
|
|
14437
|
+
var _getParams13 = getParams(this),
|
|
14438
|
+
params = _getParams13.params;
|
|
14439
14439
|
return makeRequest({
|
|
14440
14440
|
entityType: 'Task',
|
|
14441
14441
|
action: 'get',
|
|
@@ -17798,9 +17798,9 @@ var contentfulManagement = (function (exports) {
|
|
|
17798
17798
|
* .catch(console.error)
|
|
17799
17799
|
* ```
|
|
17800
17800
|
*/
|
|
17801
|
-
getAiActionInvocation: function getAiActionInvocation(
|
|
17802
|
-
var aiActionId =
|
|
17803
|
-
invocationId =
|
|
17801
|
+
getAiActionInvocation: function getAiActionInvocation(_ref0) {
|
|
17802
|
+
var aiActionId = _ref0.aiActionId,
|
|
17803
|
+
invocationId = _ref0.invocationId;
|
|
17804
17804
|
var raw = this.toPlainObject();
|
|
17805
17805
|
return makeRequest({
|
|
17806
17806
|
entityType: 'AiActionInvocation',
|
|
@@ -22986,7 +22986,7 @@ var contentfulManagement = (function (exports) {
|
|
|
22986
22986
|
wrapOAuthApplication = _entities$oauthApplic.wrapOAuthApplication,
|
|
22987
22987
|
wrapOAuthApplicationCollection = _entities$oauthApplic.wrapOAuthApplicationCollection;
|
|
22988
22988
|
return {
|
|
22989
|
-
version: "12.0.0-beta.
|
|
22989
|
+
version: "12.0.0-beta.6",
|
|
22990
22990
|
/**
|
|
22991
22991
|
* Gets all environment templates for a given organization with the lasted version
|
|
22992
22992
|
* @param organizationId - Organization ID
|
|
@@ -23684,7 +23684,7 @@ var contentfulManagement = (function (exports) {
|
|
|
23684
23684
|
defaults: defaults
|
|
23685
23685
|
};
|
|
23686
23686
|
return {
|
|
23687
|
-
version: "12.0.0-beta.
|
|
23687
|
+
version: "12.0.0-beta.6",
|
|
23688
23688
|
raw: {
|
|
23689
23689
|
getDefaultParams: function getDefaultParams() {
|
|
23690
23690
|
return defaults;
|
|
@@ -24778,7 +24778,7 @@ var contentfulManagement = (function (exports) {
|
|
|
24778
24778
|
function createClient(params) {
|
|
24779
24779
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
24780
24780
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
24781
|
-
var userAgent = getUserAgentHeader("".concat(sdkMain, "/", "12.0.0-beta.
|
|
24781
|
+
var userAgent = getUserAgentHeader("".concat(sdkMain, "/", "12.0.0-beta.6"), params.application, params.integration, params.feature);
|
|
24782
24782
|
var adapter = createAdapter(Object.assign(Object.assign({}, params), {
|
|
24783
24783
|
userAgent: userAgent
|
|
24784
24784
|
}));
|