contentful-management 12.2.0 → 12.3.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.
- package/dist/browser/index.js +352 -173
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.min.js +1 -1
- package/dist/browser/index.min.js.map +1 -1
- package/dist/cjs/index.cjs +232 -87
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/available-license.mjs +11 -0
- package/dist/esm/adapters/REST/endpoints/available-license.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/eligible-license.mjs +11 -0
- package/dist/esm/adapters/REST/endpoints/eligible-license.mjs.map +1 -0
- package/dist/esm/adapters/REST/endpoints/index.mjs +4 -0
- package/dist/esm/adapters/REST/endpoints/index.mjs.map +1 -1
- package/dist/esm/adapters/REST/endpoints/space.mjs +6 -1
- package/dist/esm/adapters/REST/endpoints/space.mjs.map +1 -1
- package/dist/esm/common-types.mjs.map +1 -1
- package/dist/esm/create-organization-api.mjs +28 -0
- package/dist/esm/create-organization-api.mjs.map +1 -1
- package/dist/esm/create-space-api.mjs +57 -0
- package/dist/esm/create-space-api.mjs.map +1 -1
- package/dist/esm/entities/app-definition.mjs.map +1 -1
- package/dist/esm/entities/available-license.mjs +21 -0
- package/dist/esm/entities/available-license.mjs.map +1 -0
- package/dist/esm/entities/eligible-license.mjs +21 -0
- package/dist/esm/entities/eligible-license.mjs.map +1 -0
- package/dist/esm/entities/space.mjs.map +1 -1
- package/dist/types/adapters/REST/endpoints/available-license.d.ts +2 -0
- package/dist/types/adapters/REST/endpoints/available-license.js +11 -0
- package/dist/types/adapters/REST/endpoints/available-license.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/eligible-license.d.ts +2 -0
- package/dist/types/adapters/REST/endpoints/eligible-license.js +11 -0
- package/dist/types/adapters/REST/endpoints/eligible-license.js.map +1 -0
- package/dist/types/adapters/REST/endpoints/index.d.ts +4 -0
- package/dist/types/adapters/REST/endpoints/index.js +4 -0
- package/dist/types/adapters/REST/endpoints/index.js.map +1 -1
- package/dist/types/adapters/REST/endpoints/space.d.ts +1 -0
- package/dist/types/adapters/REST/endpoints/space.js +6 -1
- package/dist/types/adapters/REST/endpoints/space.js.map +1 -1
- package/dist/types/common-types.d.ts +24 -1
- package/dist/types/common-types.js.map +1 -1
- package/dist/types/create-organization-api.d.ts +17 -0
- package/dist/types/create-organization-api.js +28 -0
- package/dist/types/create-organization-api.js.map +1 -1
- package/dist/types/create-space-api.d.ts +37 -0
- package/dist/types/create-space-api.js +57 -0
- package/dist/types/create-space-api.js.map +1 -1
- package/dist/types/entities/app-definition.d.ts +9 -0
- package/dist/types/entities/app-definition.js.map +1 -1
- package/dist/types/entities/available-license.d.ts +47 -0
- package/dist/types/entities/available-license.js +21 -0
- package/dist/types/entities/available-license.js.map +1 -0
- package/dist/types/entities/eligible-license.d.ts +59 -0
- package/dist/types/entities/eligible-license.js +21 -0
- package/dist/types/entities/eligible-license.js.map +1 -0
- package/dist/types/entities/space.d.ts +3 -0
- package/dist/types/entities/space.js.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -5463,7 +5463,7 @@ var contentfulManagement = (function (exports) {
|
|
|
5463
5463
|
throw error;
|
|
5464
5464
|
}
|
|
5465
5465
|
|
|
5466
|
-
/*! Axios v1.
|
|
5466
|
+
/*! Axios v1.15.0 Copyright (c) 2026 Matt Zabriskie and contributors */
|
|
5467
5467
|
|
|
5468
5468
|
var axios_1;
|
|
5469
5469
|
var hasRequiredAxios;
|
|
@@ -6486,8 +6486,6 @@ var contentfulManagement = (function (exports) {
|
|
|
6486
6486
|
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
6487
6487
|
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
6488
6488
|
|
|
6489
|
-
var AxiosError$1 = AxiosError;
|
|
6490
|
-
|
|
6491
6489
|
// eslint-disable-next-line strict
|
|
6492
6490
|
var httpAdapter = null;
|
|
6493
6491
|
|
|
@@ -6619,7 +6617,7 @@ var contentfulManagement = (function (exports) {
|
|
|
6619
6617
|
}
|
|
6620
6618
|
|
|
6621
6619
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
6622
|
-
throw new AxiosError
|
|
6620
|
+
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
6623
6621
|
}
|
|
6624
6622
|
|
|
6625
6623
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
@@ -6782,8 +6780,8 @@ var contentfulManagement = (function (exports) {
|
|
|
6782
6780
|
};
|
|
6783
6781
|
|
|
6784
6782
|
/**
|
|
6785
|
-
* It replaces
|
|
6786
|
-
*
|
|
6783
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
6784
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
6787
6785
|
*
|
|
6788
6786
|
* @param {string} val The value to be encoded.
|
|
6789
6787
|
*
|
|
@@ -6910,8 +6908,6 @@ var contentfulManagement = (function (exports) {
|
|
|
6910
6908
|
}
|
|
6911
6909
|
}
|
|
6912
6910
|
|
|
6913
|
-
var InterceptorManager$1 = InterceptorManager;
|
|
6914
|
-
|
|
6915
6911
|
var transitionalDefaults = {
|
|
6916
6912
|
silentJSONParsing: true,
|
|
6917
6913
|
forcedJSONParsing: true,
|
|
@@ -6983,8 +6979,8 @@ var contentfulManagement = (function (exports) {
|
|
|
6983
6979
|
var utils = /*#__PURE__*/Object.freeze({
|
|
6984
6980
|
__proto__: null,
|
|
6985
6981
|
hasBrowserEnv: hasBrowserEnv,
|
|
6986
|
-
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
6987
6982
|
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
6983
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
6988
6984
|
navigator: _navigator,
|
|
6989
6985
|
origin: origin
|
|
6990
6986
|
});
|
|
@@ -7215,7 +7211,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7215
7211
|
} catch (e) {
|
|
7216
7212
|
if (strictJSONParsing) {
|
|
7217
7213
|
if (e.name === 'SyntaxError') {
|
|
7218
|
-
throw AxiosError
|
|
7214
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
7219
7215
|
}
|
|
7220
7216
|
throw e;
|
|
7221
7217
|
}
|
|
@@ -7259,8 +7255,6 @@ var contentfulManagement = (function (exports) {
|
|
|
7259
7255
|
defaults.headers[method] = {};
|
|
7260
7256
|
});
|
|
7261
7257
|
|
|
7262
|
-
var defaults$1 = defaults;
|
|
7263
|
-
|
|
7264
7258
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
7265
7259
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
7266
7260
|
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
@@ -7329,16 +7323,49 @@ var contentfulManagement = (function (exports) {
|
|
|
7329
7323
|
|
|
7330
7324
|
const $internals = Symbol('internals');
|
|
7331
7325
|
|
|
7326
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
7327
|
+
|
|
7328
|
+
function assertValidHeaderValue(value, header) {
|
|
7329
|
+
if (value === false || value == null) {
|
|
7330
|
+
return;
|
|
7331
|
+
}
|
|
7332
|
+
|
|
7333
|
+
if (utils$1.isArray(value)) {
|
|
7334
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
7335
|
+
return;
|
|
7336
|
+
}
|
|
7337
|
+
|
|
7338
|
+
if (!isValidHeaderValue(String(value))) {
|
|
7339
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
7340
|
+
}
|
|
7341
|
+
}
|
|
7342
|
+
|
|
7332
7343
|
function normalizeHeader(header) {
|
|
7333
7344
|
return header && String(header).trim().toLowerCase();
|
|
7334
7345
|
}
|
|
7335
7346
|
|
|
7347
|
+
function stripTrailingCRLF(str) {
|
|
7348
|
+
let end = str.length;
|
|
7349
|
+
|
|
7350
|
+
while (end > 0) {
|
|
7351
|
+
const charCode = str.charCodeAt(end - 1);
|
|
7352
|
+
|
|
7353
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
7354
|
+
break;
|
|
7355
|
+
}
|
|
7356
|
+
|
|
7357
|
+
end -= 1;
|
|
7358
|
+
}
|
|
7359
|
+
|
|
7360
|
+
return end === str.length ? str : str.slice(0, end);
|
|
7361
|
+
}
|
|
7362
|
+
|
|
7336
7363
|
function normalizeValue(value) {
|
|
7337
7364
|
if (value === false || value == null) {
|
|
7338
7365
|
return value;
|
|
7339
7366
|
}
|
|
7340
7367
|
|
|
7341
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
7368
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
7342
7369
|
}
|
|
7343
7370
|
|
|
7344
7371
|
function parseTokens(str) {
|
|
@@ -7420,6 +7447,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7420
7447
|
_rewrite === true ||
|
|
7421
7448
|
(_rewrite === undefined && self[key] !== false)
|
|
7422
7449
|
) {
|
|
7450
|
+
assertValidHeaderValue(_value, _header);
|
|
7423
7451
|
self[key || _header] = normalizeValue(_value);
|
|
7424
7452
|
}
|
|
7425
7453
|
}
|
|
@@ -7665,8 +7693,6 @@ var contentfulManagement = (function (exports) {
|
|
|
7665
7693
|
|
|
7666
7694
|
utils$1.freezeMethods(AxiosHeaders);
|
|
7667
7695
|
|
|
7668
|
-
var AxiosHeaders$1 = AxiosHeaders;
|
|
7669
|
-
|
|
7670
7696
|
/**
|
|
7671
7697
|
* Transform the data for a request or a response
|
|
7672
7698
|
*
|
|
@@ -7676,9 +7702,9 @@ var contentfulManagement = (function (exports) {
|
|
|
7676
7702
|
* @returns {*} The resulting transformed data
|
|
7677
7703
|
*/
|
|
7678
7704
|
function transformData(fns, response) {
|
|
7679
|
-
const config = this || defaults
|
|
7705
|
+
const config = this || defaults;
|
|
7680
7706
|
const context = response || config;
|
|
7681
|
-
const headers = AxiosHeaders
|
|
7707
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
7682
7708
|
let data = context.data;
|
|
7683
7709
|
|
|
7684
7710
|
utils$1.forEach(fns, function transform(fn) {
|
|
@@ -7694,7 +7720,7 @@ var contentfulManagement = (function (exports) {
|
|
|
7694
7720
|
return !!(value && value.__CANCEL__);
|
|
7695
7721
|
}
|
|
7696
7722
|
|
|
7697
|
-
class CanceledError extends AxiosError
|
|
7723
|
+
class CanceledError extends AxiosError {
|
|
7698
7724
|
/**
|
|
7699
7725
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
7700
7726
|
*
|
|
@@ -7705,14 +7731,12 @@ var contentfulManagement = (function (exports) {
|
|
|
7705
7731
|
* @returns {CanceledError} The created error.
|
|
7706
7732
|
*/
|
|
7707
7733
|
constructor(message, config, request) {
|
|
7708
|
-
super(message == null ? 'canceled' : message, AxiosError
|
|
7734
|
+
super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
|
|
7709
7735
|
this.name = 'CanceledError';
|
|
7710
7736
|
this.__CANCEL__ = true;
|
|
7711
7737
|
}
|
|
7712
7738
|
}
|
|
7713
7739
|
|
|
7714
|
-
var CanceledError$1 = CanceledError;
|
|
7715
|
-
|
|
7716
7740
|
/**
|
|
7717
7741
|
* Resolve or reject a Promise based on response status.
|
|
7718
7742
|
*
|
|
@@ -7728,9 +7752,9 @@ var contentfulManagement = (function (exports) {
|
|
|
7728
7752
|
resolve(response);
|
|
7729
7753
|
} else {
|
|
7730
7754
|
reject(
|
|
7731
|
-
new AxiosError
|
|
7755
|
+
new AxiosError(
|
|
7732
7756
|
'Request failed with status code ' + response.status,
|
|
7733
|
-
[AxiosError
|
|
7757
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][
|
|
7734
7758
|
Math.floor(response.status / 100) - 4
|
|
7735
7759
|
],
|
|
7736
7760
|
response.config,
|
|
@@ -8000,7 +8024,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8000
8024
|
return requestedURL;
|
|
8001
8025
|
}
|
|
8002
8026
|
|
|
8003
|
-
const headersToObject = (thing) => (thing instanceof AxiosHeaders
|
|
8027
|
+
const headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);
|
|
8004
8028
|
|
|
8005
8029
|
/**
|
|
8006
8030
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -8108,7 +8132,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8108
8132
|
|
|
8109
8133
|
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
8110
8134
|
|
|
8111
|
-
newConfig.headers = headers = AxiosHeaders
|
|
8135
|
+
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
8112
8136
|
|
|
8113
8137
|
newConfig.url = buildURL(
|
|
8114
8138
|
buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
@@ -8172,7 +8196,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8172
8196
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
8173
8197
|
const _config = resolveConfig(config);
|
|
8174
8198
|
let requestData = _config.data;
|
|
8175
|
-
const requestHeaders = AxiosHeaders
|
|
8199
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
8176
8200
|
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
8177
8201
|
let onCanceled;
|
|
8178
8202
|
let uploadThrottled, downloadThrottled;
|
|
@@ -8199,7 +8223,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8199
8223
|
return;
|
|
8200
8224
|
}
|
|
8201
8225
|
// Prepare the response
|
|
8202
|
-
const responseHeaders = AxiosHeaders
|
|
8226
|
+
const responseHeaders = AxiosHeaders.from(
|
|
8203
8227
|
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
8204
8228
|
);
|
|
8205
8229
|
const responseData =
|
|
@@ -8263,7 +8287,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8263
8287
|
return;
|
|
8264
8288
|
}
|
|
8265
8289
|
|
|
8266
|
-
reject(new AxiosError
|
|
8290
|
+
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
8267
8291
|
|
|
8268
8292
|
// Clean up request
|
|
8269
8293
|
request = null;
|
|
@@ -8275,7 +8299,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8275
8299
|
// (message may be empty; when present, surface it)
|
|
8276
8300
|
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
8277
8301
|
const msg = event && event.message ? event.message : 'Network Error';
|
|
8278
|
-
const err = new AxiosError
|
|
8302
|
+
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
8279
8303
|
// attach the underlying event for consumers who want details
|
|
8280
8304
|
err.event = event || null;
|
|
8281
8305
|
reject(err);
|
|
@@ -8292,9 +8316,9 @@ var contentfulManagement = (function (exports) {
|
|
|
8292
8316
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
8293
8317
|
}
|
|
8294
8318
|
reject(
|
|
8295
|
-
new AxiosError
|
|
8319
|
+
new AxiosError(
|
|
8296
8320
|
timeoutErrorMessage,
|
|
8297
|
-
transitional.clarifyTimeoutError ? AxiosError
|
|
8321
|
+
transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
|
|
8298
8322
|
config,
|
|
8299
8323
|
request
|
|
8300
8324
|
)
|
|
@@ -8346,7 +8370,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8346
8370
|
if (!request) {
|
|
8347
8371
|
return;
|
|
8348
8372
|
}
|
|
8349
|
-
reject(!cancel || cancel.type ? new CanceledError
|
|
8373
|
+
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
8350
8374
|
request.abort();
|
|
8351
8375
|
request = null;
|
|
8352
8376
|
};
|
|
@@ -8363,9 +8387,9 @@ var contentfulManagement = (function (exports) {
|
|
|
8363
8387
|
|
|
8364
8388
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
8365
8389
|
reject(
|
|
8366
|
-
new AxiosError
|
|
8390
|
+
new AxiosError(
|
|
8367
8391
|
'Unsupported protocol ' + protocol + ':',
|
|
8368
|
-
AxiosError
|
|
8392
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
8369
8393
|
config
|
|
8370
8394
|
)
|
|
8371
8395
|
);
|
|
@@ -8391,9 +8415,9 @@ var contentfulManagement = (function (exports) {
|
|
|
8391
8415
|
unsubscribe();
|
|
8392
8416
|
const err = reason instanceof Error ? reason : this.reason;
|
|
8393
8417
|
controller.abort(
|
|
8394
|
-
err instanceof AxiosError
|
|
8418
|
+
err instanceof AxiosError
|
|
8395
8419
|
? err
|
|
8396
|
-
: new CanceledError
|
|
8420
|
+
: new CanceledError(err instanceof Error ? err.message : err)
|
|
8397
8421
|
);
|
|
8398
8422
|
}
|
|
8399
8423
|
};
|
|
@@ -8402,7 +8426,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8402
8426
|
timeout &&
|
|
8403
8427
|
setTimeout(() => {
|
|
8404
8428
|
timer = null;
|
|
8405
|
-
onabort(new AxiosError
|
|
8429
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
8406
8430
|
}, timeout);
|
|
8407
8431
|
|
|
8408
8432
|
const unsubscribe = () => {
|
|
@@ -8428,8 +8452,6 @@ var contentfulManagement = (function (exports) {
|
|
|
8428
8452
|
}
|
|
8429
8453
|
};
|
|
8430
8454
|
|
|
8431
|
-
var composeSignals$1 = composeSignals;
|
|
8432
|
-
|
|
8433
8455
|
const streamChunk = function* (chunk, chunkSize) {
|
|
8434
8456
|
let len = chunk.byteLength;
|
|
8435
8457
|
|
|
@@ -8574,8 +8596,10 @@ var contentfulManagement = (function (exports) {
|
|
|
8574
8596
|
test(() => {
|
|
8575
8597
|
let duplexAccessed = false;
|
|
8576
8598
|
|
|
8599
|
+
const body = new ReadableStream$1();
|
|
8600
|
+
|
|
8577
8601
|
const hasContentType = new Request(platform.origin, {
|
|
8578
|
-
body
|
|
8602
|
+
body,
|
|
8579
8603
|
method: 'POST',
|
|
8580
8604
|
get duplex() {
|
|
8581
8605
|
duplexAccessed = true;
|
|
@@ -8583,6 +8607,8 @@ var contentfulManagement = (function (exports) {
|
|
|
8583
8607
|
},
|
|
8584
8608
|
}).headers.has('Content-Type');
|
|
8585
8609
|
|
|
8610
|
+
body.cancel();
|
|
8611
|
+
|
|
8586
8612
|
return duplexAccessed && !hasContentType;
|
|
8587
8613
|
});
|
|
8588
8614
|
|
|
@@ -8606,9 +8632,9 @@ var contentfulManagement = (function (exports) {
|
|
|
8606
8632
|
return method.call(res);
|
|
8607
8633
|
}
|
|
8608
8634
|
|
|
8609
|
-
throw new AxiosError
|
|
8635
|
+
throw new AxiosError(
|
|
8610
8636
|
`Response type '${type}' is not supported`,
|
|
8611
|
-
AxiosError
|
|
8637
|
+
AxiosError.ERR_NOT_SUPPORT,
|
|
8612
8638
|
config
|
|
8613
8639
|
);
|
|
8614
8640
|
});
|
|
@@ -8671,7 +8697,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8671
8697
|
|
|
8672
8698
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
8673
8699
|
|
|
8674
|
-
let composedSignal = composeSignals
|
|
8700
|
+
let composedSignal = composeSignals(
|
|
8675
8701
|
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
8676
8702
|
timeout
|
|
8677
8703
|
);
|
|
@@ -8782,7 +8808,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8782
8808
|
return await new Promise((resolve, reject) => {
|
|
8783
8809
|
settle(resolve, reject, {
|
|
8784
8810
|
data: responseData,
|
|
8785
|
-
headers: AxiosHeaders
|
|
8811
|
+
headers: AxiosHeaders.from(response.headers),
|
|
8786
8812
|
status: response.status,
|
|
8787
8813
|
statusText: response.statusText,
|
|
8788
8814
|
config,
|
|
@@ -8794,9 +8820,9 @@ var contentfulManagement = (function (exports) {
|
|
|
8794
8820
|
|
|
8795
8821
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
8796
8822
|
throw Object.assign(
|
|
8797
|
-
new AxiosError
|
|
8823
|
+
new AxiosError(
|
|
8798
8824
|
'Network Error',
|
|
8799
|
-
AxiosError
|
|
8825
|
+
AxiosError.ERR_NETWORK,
|
|
8800
8826
|
config,
|
|
8801
8827
|
request,
|
|
8802
8828
|
err && err.response
|
|
@@ -8807,7 +8833,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8807
8833
|
);
|
|
8808
8834
|
}
|
|
8809
8835
|
|
|
8810
|
-
throw AxiosError
|
|
8836
|
+
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
8811
8837
|
}
|
|
8812
8838
|
};
|
|
8813
8839
|
};
|
|
@@ -8914,7 +8940,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8914
8940
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
8915
8941
|
|
|
8916
8942
|
if (adapter === undefined) {
|
|
8917
|
-
throw new AxiosError
|
|
8943
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
8918
8944
|
}
|
|
8919
8945
|
}
|
|
8920
8946
|
|
|
@@ -8938,7 +8964,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8938
8964
|
: ' ' + renderReason(reasons[0])
|
|
8939
8965
|
: 'as no adapter specified';
|
|
8940
8966
|
|
|
8941
|
-
throw new AxiosError
|
|
8967
|
+
throw new AxiosError(
|
|
8942
8968
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
8943
8969
|
'ERR_NOT_SUPPORT'
|
|
8944
8970
|
);
|
|
@@ -8977,7 +9003,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8977
9003
|
}
|
|
8978
9004
|
|
|
8979
9005
|
if (config.signal && config.signal.aborted) {
|
|
8980
|
-
throw new CanceledError
|
|
9006
|
+
throw new CanceledError(null, config);
|
|
8981
9007
|
}
|
|
8982
9008
|
}
|
|
8983
9009
|
|
|
@@ -8991,7 +9017,7 @@ var contentfulManagement = (function (exports) {
|
|
|
8991
9017
|
function dispatchRequest(config) {
|
|
8992
9018
|
throwIfCancellationRequested(config);
|
|
8993
9019
|
|
|
8994
|
-
config.headers = AxiosHeaders
|
|
9020
|
+
config.headers = AxiosHeaders.from(config.headers);
|
|
8995
9021
|
|
|
8996
9022
|
// Transform request data
|
|
8997
9023
|
config.data = transformData.call(config, config.transformRequest);
|
|
@@ -9000,7 +9026,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9000
9026
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
9001
9027
|
}
|
|
9002
9028
|
|
|
9003
|
-
const adapter = adapters.getAdapter(config.adapter || defaults
|
|
9029
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
9004
9030
|
|
|
9005
9031
|
return adapter(config).then(
|
|
9006
9032
|
function onAdapterResolution(response) {
|
|
@@ -9009,7 +9035,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9009
9035
|
// Transform response data
|
|
9010
9036
|
response.data = transformData.call(config, config.transformResponse, response);
|
|
9011
9037
|
|
|
9012
|
-
response.headers = AxiosHeaders
|
|
9038
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
9013
9039
|
|
|
9014
9040
|
return response;
|
|
9015
9041
|
},
|
|
@@ -9024,7 +9050,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9024
9050
|
config.transformResponse,
|
|
9025
9051
|
reason.response
|
|
9026
9052
|
);
|
|
9027
|
-
reason.response.headers = AxiosHeaders
|
|
9053
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
9028
9054
|
}
|
|
9029
9055
|
}
|
|
9030
9056
|
|
|
@@ -9033,7 +9059,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9033
9059
|
);
|
|
9034
9060
|
}
|
|
9035
9061
|
|
|
9036
|
-
const VERSION = "1.
|
|
9062
|
+
const VERSION = "1.15.0";
|
|
9037
9063
|
|
|
9038
9064
|
const validators$1 = {};
|
|
9039
9065
|
|
|
@@ -9071,9 +9097,9 @@ var contentfulManagement = (function (exports) {
|
|
|
9071
9097
|
// eslint-disable-next-line func-names
|
|
9072
9098
|
return (value, opt, opts) => {
|
|
9073
9099
|
if (validator === false) {
|
|
9074
|
-
throw new AxiosError
|
|
9100
|
+
throw new AxiosError(
|
|
9075
9101
|
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
9076
|
-
AxiosError
|
|
9102
|
+
AxiosError.ERR_DEPRECATED
|
|
9077
9103
|
);
|
|
9078
9104
|
}
|
|
9079
9105
|
|
|
@@ -9112,7 +9138,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9112
9138
|
|
|
9113
9139
|
function assertOptions(options, schema, allowUnknown) {
|
|
9114
9140
|
if (typeof options !== 'object') {
|
|
9115
|
-
throw new AxiosError
|
|
9141
|
+
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
9116
9142
|
}
|
|
9117
9143
|
const keys = Object.keys(options);
|
|
9118
9144
|
let i = keys.length;
|
|
@@ -9123,15 +9149,15 @@ var contentfulManagement = (function (exports) {
|
|
|
9123
9149
|
const value = options[opt];
|
|
9124
9150
|
const result = value === undefined || validator(value, opt, options);
|
|
9125
9151
|
if (result !== true) {
|
|
9126
|
-
throw new AxiosError
|
|
9152
|
+
throw new AxiosError(
|
|
9127
9153
|
'option ' + opt + ' must be ' + result,
|
|
9128
|
-
AxiosError
|
|
9154
|
+
AxiosError.ERR_BAD_OPTION_VALUE
|
|
9129
9155
|
);
|
|
9130
9156
|
}
|
|
9131
9157
|
continue;
|
|
9132
9158
|
}
|
|
9133
9159
|
if (allowUnknown !== true) {
|
|
9134
|
-
throw new AxiosError
|
|
9160
|
+
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
9135
9161
|
}
|
|
9136
9162
|
}
|
|
9137
9163
|
}
|
|
@@ -9154,8 +9180,8 @@ var contentfulManagement = (function (exports) {
|
|
|
9154
9180
|
constructor(instanceConfig) {
|
|
9155
9181
|
this.defaults = instanceConfig || {};
|
|
9156
9182
|
this.interceptors = {
|
|
9157
|
-
request: new InterceptorManager
|
|
9158
|
-
response: new InterceptorManager
|
|
9183
|
+
request: new InterceptorManager(),
|
|
9184
|
+
response: new InterceptorManager(),
|
|
9159
9185
|
};
|
|
9160
9186
|
}
|
|
9161
9187
|
|
|
@@ -9177,13 +9203,29 @@ var contentfulManagement = (function (exports) {
|
|
|
9177
9203
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
9178
9204
|
|
|
9179
9205
|
// slice off the Error: ... line
|
|
9180
|
-
const stack =
|
|
9206
|
+
const stack = (() => {
|
|
9207
|
+
if (!dummy.stack) {
|
|
9208
|
+
return '';
|
|
9209
|
+
}
|
|
9210
|
+
|
|
9211
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
9212
|
+
|
|
9213
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
9214
|
+
})();
|
|
9181
9215
|
try {
|
|
9182
9216
|
if (!err.stack) {
|
|
9183
9217
|
err.stack = stack;
|
|
9184
9218
|
// match without the 2 top stack lines
|
|
9185
|
-
} else if (stack
|
|
9186
|
-
|
|
9219
|
+
} else if (stack) {
|
|
9220
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
9221
|
+
const secondNewlineIndex =
|
|
9222
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
9223
|
+
const stackWithoutTwoTopLines =
|
|
9224
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
9225
|
+
|
|
9226
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
9227
|
+
err.stack += '\n' + stack;
|
|
9228
|
+
}
|
|
9187
9229
|
}
|
|
9188
9230
|
} catch (e) {
|
|
9189
9231
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -9265,7 +9307,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9265
9307
|
delete headers[method];
|
|
9266
9308
|
});
|
|
9267
9309
|
|
|
9268
|
-
config.headers = AxiosHeaders
|
|
9310
|
+
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
9269
9311
|
|
|
9270
9312
|
// filter out skipped interceptors
|
|
9271
9313
|
const requestInterceptorChain = [];
|
|
@@ -9365,8 +9407,6 @@ var contentfulManagement = (function (exports) {
|
|
|
9365
9407
|
});
|
|
9366
9408
|
|
|
9367
9409
|
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
9368
|
-
/*eslint func-names:0*/
|
|
9369
|
-
|
|
9370
9410
|
function generateHTTPMethod(isForm) {
|
|
9371
9411
|
return function httpMethod(url, data, config) {
|
|
9372
9412
|
return this.request(
|
|
@@ -9389,8 +9429,6 @@ var contentfulManagement = (function (exports) {
|
|
|
9389
9429
|
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
9390
9430
|
});
|
|
9391
9431
|
|
|
9392
|
-
var Axios$1 = Axios;
|
|
9393
|
-
|
|
9394
9432
|
/**
|
|
9395
9433
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
9396
9434
|
*
|
|
@@ -9446,7 +9484,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9446
9484
|
return;
|
|
9447
9485
|
}
|
|
9448
9486
|
|
|
9449
|
-
token.reason = new CanceledError
|
|
9487
|
+
token.reason = new CanceledError(message, config, request);
|
|
9450
9488
|
resolvePromise(token.reason);
|
|
9451
9489
|
});
|
|
9452
9490
|
}
|
|
@@ -9521,8 +9559,6 @@ var contentfulManagement = (function (exports) {
|
|
|
9521
9559
|
}
|
|
9522
9560
|
}
|
|
9523
9561
|
|
|
9524
|
-
var CancelToken$1 = CancelToken;
|
|
9525
|
-
|
|
9526
9562
|
/**
|
|
9527
9563
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
9528
9564
|
*
|
|
@@ -9637,8 +9673,6 @@ var contentfulManagement = (function (exports) {
|
|
|
9637
9673
|
HttpStatusCode[value] = key;
|
|
9638
9674
|
});
|
|
9639
9675
|
|
|
9640
|
-
var HttpStatusCode$1 = HttpStatusCode;
|
|
9641
|
-
|
|
9642
9676
|
/**
|
|
9643
9677
|
* Create an instance of Axios
|
|
9644
9678
|
*
|
|
@@ -9647,11 +9681,11 @@ var contentfulManagement = (function (exports) {
|
|
|
9647
9681
|
* @returns {Axios} A new instance of Axios
|
|
9648
9682
|
*/
|
|
9649
9683
|
function createInstance(defaultConfig) {
|
|
9650
|
-
const context = new Axios
|
|
9651
|
-
const instance = bind(Axios
|
|
9684
|
+
const context = new Axios(defaultConfig);
|
|
9685
|
+
const instance = bind(Axios.prototype.request, context);
|
|
9652
9686
|
|
|
9653
9687
|
// Copy axios.prototype to instance
|
|
9654
|
-
utils$1.extend(instance, Axios
|
|
9688
|
+
utils$1.extend(instance, Axios.prototype, context, { allOwnKeys: true });
|
|
9655
9689
|
|
|
9656
9690
|
// Copy context to instance
|
|
9657
9691
|
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
@@ -9665,20 +9699,20 @@ var contentfulManagement = (function (exports) {
|
|
|
9665
9699
|
}
|
|
9666
9700
|
|
|
9667
9701
|
// Create the default instance to be exported
|
|
9668
|
-
const axios = createInstance(defaults
|
|
9702
|
+
const axios = createInstance(defaults);
|
|
9669
9703
|
|
|
9670
9704
|
// Expose Axios class to allow class inheritance
|
|
9671
|
-
axios.Axios = Axios
|
|
9705
|
+
axios.Axios = Axios;
|
|
9672
9706
|
|
|
9673
9707
|
// Expose Cancel & CancelToken
|
|
9674
|
-
axios.CanceledError = CanceledError
|
|
9675
|
-
axios.CancelToken = CancelToken
|
|
9708
|
+
axios.CanceledError = CanceledError;
|
|
9709
|
+
axios.CancelToken = CancelToken;
|
|
9676
9710
|
axios.isCancel = isCancel;
|
|
9677
9711
|
axios.VERSION = VERSION;
|
|
9678
9712
|
axios.toFormData = toFormData;
|
|
9679
9713
|
|
|
9680
9714
|
// Expose AxiosError class
|
|
9681
|
-
axios.AxiosError = AxiosError
|
|
9715
|
+
axios.AxiosError = AxiosError;
|
|
9682
9716
|
|
|
9683
9717
|
// alias for CanceledError for backward compatibility
|
|
9684
9718
|
axios.Cancel = axios.CanceledError;
|
|
@@ -9696,13 +9730,13 @@ var contentfulManagement = (function (exports) {
|
|
|
9696
9730
|
// Expose mergeConfig
|
|
9697
9731
|
axios.mergeConfig = mergeConfig;
|
|
9698
9732
|
|
|
9699
|
-
axios.AxiosHeaders = AxiosHeaders
|
|
9733
|
+
axios.AxiosHeaders = AxiosHeaders;
|
|
9700
9734
|
|
|
9701
9735
|
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
9702
9736
|
|
|
9703
9737
|
axios.getAdapter = adapters.getAdapter;
|
|
9704
9738
|
|
|
9705
|
-
axios.HttpStatusCode = HttpStatusCode
|
|
9739
|
+
axios.HttpStatusCode = HttpStatusCode;
|
|
9706
9740
|
|
|
9707
9741
|
axios.default = axios;
|
|
9708
9742
|
|
|
@@ -9715,13 +9749,13 @@ var contentfulManagement = (function (exports) {
|
|
|
9715
9749
|
var axios = /*@__PURE__*/getDefaultExportFromCjs(axiosExports);
|
|
9716
9750
|
|
|
9717
9751
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9718
|
-
function getBaseUrl$
|
|
9752
|
+
function getBaseUrl$t(http) {
|
|
9719
9753
|
return http.defaults.baseURL?.split('/spaces')[0];
|
|
9720
9754
|
}
|
|
9721
9755
|
function get$14(http, url, config) {
|
|
9722
9756
|
return http
|
|
9723
9757
|
.get(url, {
|
|
9724
|
-
baseURL: getBaseUrl$
|
|
9758
|
+
baseURL: getBaseUrl$t(http),
|
|
9725
9759
|
...config,
|
|
9726
9760
|
})
|
|
9727
9761
|
.then((response) => response.data, errorHandler);
|
|
@@ -9729,7 +9763,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9729
9763
|
function patch$5(http, url, payload, config) {
|
|
9730
9764
|
return http
|
|
9731
9765
|
.patch(url, payload, {
|
|
9732
|
-
baseURL: getBaseUrl$
|
|
9766
|
+
baseURL: getBaseUrl$t(http),
|
|
9733
9767
|
...config,
|
|
9734
9768
|
})
|
|
9735
9769
|
.then((response) => response.data, errorHandler);
|
|
@@ -9737,7 +9771,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9737
9771
|
function post$1(http, url, payload, config) {
|
|
9738
9772
|
return http
|
|
9739
9773
|
.post(url, payload, {
|
|
9740
|
-
baseURL: getBaseUrl$
|
|
9774
|
+
baseURL: getBaseUrl$t(http),
|
|
9741
9775
|
...config,
|
|
9742
9776
|
})
|
|
9743
9777
|
.then((response) => response.data, errorHandler);
|
|
@@ -9745,7 +9779,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9745
9779
|
function put$1(http, url, payload, config) {
|
|
9746
9780
|
return http
|
|
9747
9781
|
.put(url, payload, {
|
|
9748
|
-
baseURL: getBaseUrl$
|
|
9782
|
+
baseURL: getBaseUrl$t(http),
|
|
9749
9783
|
...config,
|
|
9750
9784
|
})
|
|
9751
9785
|
.then((response) => response.data, errorHandler);
|
|
@@ -9753,14 +9787,14 @@ var contentfulManagement = (function (exports) {
|
|
|
9753
9787
|
function del$H(http, url, config) {
|
|
9754
9788
|
return http
|
|
9755
9789
|
.delete(url, {
|
|
9756
|
-
baseURL: getBaseUrl$
|
|
9790
|
+
baseURL: getBaseUrl$t(http),
|
|
9757
9791
|
...config,
|
|
9758
9792
|
})
|
|
9759
9793
|
.then((response) => response.data, errorHandler);
|
|
9760
9794
|
}
|
|
9761
9795
|
function http(http, url, config) {
|
|
9762
9796
|
return http(url, {
|
|
9763
|
-
baseURL: getBaseUrl$
|
|
9797
|
+
baseURL: getBaseUrl$t(http),
|
|
9764
9798
|
...config,
|
|
9765
9799
|
}).then((response) => response.data, errorHandler);
|
|
9766
9800
|
}
|
|
@@ -9770,7 +9804,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9770
9804
|
headers,
|
|
9771
9805
|
});
|
|
9772
9806
|
};
|
|
9773
|
-
const getMany$
|
|
9807
|
+
const getMany$R = (http, params, headers) => {
|
|
9774
9808
|
return get$14(http, `/spaces/${params.spaceId}/ai/actions`, {
|
|
9775
9809
|
params: params.query,
|
|
9776
9810
|
headers,
|
|
@@ -9814,7 +9848,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9814
9848
|
create: create$F,
|
|
9815
9849
|
del: del$G,
|
|
9816
9850
|
get: get$13,
|
|
9817
|
-
getMany: getMany$
|
|
9851
|
+
getMany: getMany$R,
|
|
9818
9852
|
invoke: invoke,
|
|
9819
9853
|
publish: publish$5,
|
|
9820
9854
|
unpublish: unpublish$5,
|
|
@@ -9841,7 +9875,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9841
9875
|
},
|
|
9842
9876
|
});
|
|
9843
9877
|
};
|
|
9844
|
-
const getMany$
|
|
9878
|
+
const getMany$Q = (http, params, headers) => {
|
|
9845
9879
|
return get$14(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/ai/agents`, {
|
|
9846
9880
|
headers: {
|
|
9847
9881
|
...AgentAlphaHeaders,
|
|
@@ -9862,7 +9896,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9862
9896
|
__proto__: null,
|
|
9863
9897
|
generate: generate,
|
|
9864
9898
|
get: get$11,
|
|
9865
|
-
getMany: getMany$
|
|
9899
|
+
getMany: getMany$Q
|
|
9866
9900
|
});
|
|
9867
9901
|
|
|
9868
9902
|
const AgentRunAlphaHeaders = {
|
|
@@ -9876,7 +9910,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9876
9910
|
},
|
|
9877
9911
|
});
|
|
9878
9912
|
};
|
|
9879
|
-
const getMany$
|
|
9913
|
+
const getMany$P = (http, params, headers) => {
|
|
9880
9914
|
return get$14(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/ai/agents/runs`, {
|
|
9881
9915
|
params: params.query,
|
|
9882
9916
|
headers: {
|
|
@@ -9897,7 +9931,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9897
9931
|
var AgentRun = /*#__PURE__*/Object.freeze({
|
|
9898
9932
|
__proto__: null,
|
|
9899
9933
|
get: get$10,
|
|
9900
|
-
getMany: getMany$
|
|
9934
|
+
getMany: getMany$P,
|
|
9901
9935
|
resumeRun: resumeRun
|
|
9902
9936
|
});
|
|
9903
9937
|
|
|
@@ -9945,7 +9979,7 @@ var contentfulManagement = (function (exports) {
|
|
|
9945
9979
|
* .catch(console.error)
|
|
9946
9980
|
* ```
|
|
9947
9981
|
*/
|
|
9948
|
-
const getMany$
|
|
9982
|
+
const getMany$O = (http, params) => {
|
|
9949
9983
|
return get$14(http, '/users/me/access_tokens', {
|
|
9950
9984
|
params: params.query,
|
|
9951
9985
|
});
|
|
@@ -10032,23 +10066,23 @@ var contentfulManagement = (function (exports) {
|
|
|
10032
10066
|
__proto__: null,
|
|
10033
10067
|
createPersonalAccessToken: createPersonalAccessToken,
|
|
10034
10068
|
get: get$$,
|
|
10035
|
-
getMany: getMany$
|
|
10069
|
+
getMany: getMany$O,
|
|
10036
10070
|
getManyForOrganization: getManyForOrganization$7,
|
|
10037
10071
|
revoke: revoke$1
|
|
10038
10072
|
});
|
|
10039
10073
|
|
|
10040
|
-
const getBaseUrl$
|
|
10041
|
-
const getAutomationDefinitionUrl = (params) => `${getBaseUrl$
|
|
10074
|
+
const getBaseUrl$s = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/automation_definitions`;
|
|
10075
|
+
const getAutomationDefinitionUrl = (params) => `${getBaseUrl$s(params)}/${params.automationDefinitionId}`;
|
|
10042
10076
|
const get$_ = (http, params, headers) => get$14(http, getAutomationDefinitionUrl(params), {
|
|
10043
10077
|
headers,
|
|
10044
10078
|
});
|
|
10045
|
-
const getMany$
|
|
10079
|
+
const getMany$N = (http, params, headers) => get$14(http, getBaseUrl$s(params), {
|
|
10046
10080
|
headers,
|
|
10047
10081
|
params: params.query,
|
|
10048
10082
|
});
|
|
10049
10083
|
const create$E = (http, params, rawData, headers) => {
|
|
10050
10084
|
const data = index$2(rawData);
|
|
10051
|
-
return post$1(http, getBaseUrl$
|
|
10085
|
+
return post$1(http, getBaseUrl$s(params), data, {
|
|
10052
10086
|
headers,
|
|
10053
10087
|
});
|
|
10054
10088
|
};
|
|
@@ -10073,17 +10107,17 @@ var contentfulManagement = (function (exports) {
|
|
|
10073
10107
|
create: create$E,
|
|
10074
10108
|
del: del$F,
|
|
10075
10109
|
get: get$_,
|
|
10076
|
-
getMany: getMany$
|
|
10110
|
+
getMany: getMany$N,
|
|
10077
10111
|
update: update$y
|
|
10078
10112
|
});
|
|
10079
10113
|
|
|
10080
|
-
const getBaseUrl$
|
|
10081
|
-
const getAutomationExecutionUrl = (params) => `${getBaseUrl$
|
|
10114
|
+
const getBaseUrl$r = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/automation_executions`;
|
|
10115
|
+
const getAutomationExecutionUrl = (params) => `${getBaseUrl$r(params)}/${params.automationExecutionId}`;
|
|
10082
10116
|
const getExecutionsByDefinitionUrl = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/automation_definitions/${params.automationDefinitionId}/automation_executions`;
|
|
10083
10117
|
const get$Z = (http, params, headers) => get$14(http, getAutomationExecutionUrl(params), {
|
|
10084
10118
|
headers,
|
|
10085
10119
|
});
|
|
10086
|
-
const getMany$
|
|
10120
|
+
const getMany$M = (http, params, headers) => get$14(http, getBaseUrl$r(params), {
|
|
10087
10121
|
headers,
|
|
10088
10122
|
params: params.query,
|
|
10089
10123
|
});
|
|
@@ -10096,13 +10130,13 @@ var contentfulManagement = (function (exports) {
|
|
|
10096
10130
|
__proto__: null,
|
|
10097
10131
|
get: get$Z,
|
|
10098
10132
|
getForAutomationDefinition: getForAutomationDefinition,
|
|
10099
|
-
getMany: getMany$
|
|
10133
|
+
getMany: getMany$M
|
|
10100
10134
|
});
|
|
10101
10135
|
|
|
10102
10136
|
const get$Y = (http, params) => {
|
|
10103
10137
|
return get$14(http, `/spaces/${params.spaceId}/api_keys/${params.apiKeyId}`);
|
|
10104
10138
|
};
|
|
10105
|
-
const getMany$
|
|
10139
|
+
const getMany$L = (http, params) => {
|
|
10106
10140
|
return get$14(http, `/spaces/${params.spaceId}/api_keys`, {
|
|
10107
10141
|
params: params.query,
|
|
10108
10142
|
});
|
|
@@ -10144,7 +10178,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10144
10178
|
createWithId: createWithId$e,
|
|
10145
10179
|
del: del$E,
|
|
10146
10180
|
get: get$Y,
|
|
10147
|
-
getMany: getMany$
|
|
10181
|
+
getMany: getMany$L,
|
|
10148
10182
|
update: update$x
|
|
10149
10183
|
});
|
|
10150
10184
|
|
|
@@ -10177,8 +10211,8 @@ var contentfulManagement = (function (exports) {
|
|
|
10177
10211
|
return query;
|
|
10178
10212
|
}
|
|
10179
10213
|
|
|
10180
|
-
const getBaseUrl$
|
|
10181
|
-
const getAppActionUrl = (params) => `${getBaseUrl$
|
|
10214
|
+
const getBaseUrl$q = (params) => `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/actions`;
|
|
10215
|
+
const getAppActionUrl = (params) => `${getBaseUrl$q(params)}/${params.appActionId}`;
|
|
10182
10216
|
const getAppActionsEnvUrl = (params) => {
|
|
10183
10217
|
if (params.environmentId) {
|
|
10184
10218
|
return `/spaces/${params.spaceId}/environments/${params.environmentId}/actions`;
|
|
@@ -10188,8 +10222,8 @@ var contentfulManagement = (function (exports) {
|
|
|
10188
10222
|
const get$X = (http, params) => {
|
|
10189
10223
|
return get$14(http, getAppActionUrl(params));
|
|
10190
10224
|
};
|
|
10191
|
-
const getMany$
|
|
10192
|
-
return get$14(http, getBaseUrl$
|
|
10225
|
+
const getMany$K = (http, params) => {
|
|
10226
|
+
return get$14(http, getBaseUrl$q(params), {
|
|
10193
10227
|
params: normalizeSelect(params.query),
|
|
10194
10228
|
});
|
|
10195
10229
|
};
|
|
@@ -10202,7 +10236,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10202
10236
|
return del$H(http, getAppActionUrl(params));
|
|
10203
10237
|
};
|
|
10204
10238
|
const create$B = (http, params, data) => {
|
|
10205
|
-
return post$1(http, getBaseUrl$
|
|
10239
|
+
return post$1(http, getBaseUrl$q(params), data);
|
|
10206
10240
|
};
|
|
10207
10241
|
const update$w = (http, params, data) => {
|
|
10208
10242
|
return put$1(http, getAppActionUrl(params), data);
|
|
@@ -10213,7 +10247,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10213
10247
|
create: create$B,
|
|
10214
10248
|
del: del$D,
|
|
10215
10249
|
get: get$X,
|
|
10216
|
-
getMany: getMany$
|
|
10250
|
+
getMany: getMany$K,
|
|
10217
10251
|
getManyForEnvironment: getManyForEnvironment$2,
|
|
10218
10252
|
update: update$w
|
|
10219
10253
|
});
|
|
@@ -10398,13 +10432,13 @@ var contentfulManagement = (function (exports) {
|
|
|
10398
10432
|
getResponse: getResponse
|
|
10399
10433
|
});
|
|
10400
10434
|
|
|
10401
|
-
const getBaseUrl$
|
|
10402
|
-
const getAppBundleUrl = (params) => `${getBaseUrl$
|
|
10435
|
+
const getBaseUrl$p = (params) => `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/app_bundles`;
|
|
10436
|
+
const getAppBundleUrl = (params) => `${getBaseUrl$p(params)}/${params.appBundleId}`;
|
|
10403
10437
|
const get$V = (http, params) => {
|
|
10404
10438
|
return get$14(http, getAppBundleUrl(params));
|
|
10405
10439
|
};
|
|
10406
|
-
const getMany$
|
|
10407
|
-
return get$14(http, getBaseUrl$
|
|
10440
|
+
const getMany$J = (http, params) => {
|
|
10441
|
+
return get$14(http, getBaseUrl$p(params), {
|
|
10408
10442
|
params: normalizeSelect(params.query),
|
|
10409
10443
|
});
|
|
10410
10444
|
};
|
|
@@ -10425,7 +10459,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10425
10459
|
actions,
|
|
10426
10460
|
functions,
|
|
10427
10461
|
};
|
|
10428
|
-
return post$1(http, getBaseUrl$
|
|
10462
|
+
return post$1(http, getBaseUrl$p(params), data);
|
|
10429
10463
|
};
|
|
10430
10464
|
|
|
10431
10465
|
var AppBundle = /*#__PURE__*/Object.freeze({
|
|
@@ -10433,25 +10467,25 @@ var contentfulManagement = (function (exports) {
|
|
|
10433
10467
|
create: create$z,
|
|
10434
10468
|
del: del$C,
|
|
10435
10469
|
get: get$V,
|
|
10436
|
-
getMany: getMany$
|
|
10470
|
+
getMany: getMany$J
|
|
10437
10471
|
});
|
|
10438
10472
|
|
|
10439
|
-
const getBaseUrl$
|
|
10440
|
-
const getAppDefinitionUrl = (params) => getBaseUrl$
|
|
10473
|
+
const getBaseUrl$o = (params) => `/organizations/${params.organizationId}/app_definitions`;
|
|
10474
|
+
const getAppDefinitionUrl = (params) => getBaseUrl$o(params) + `/${params.appDefinitionId}`;
|
|
10441
10475
|
const getBaseUrlForOrgInstallations$1 = (params) => `/app_definitions/${params.appDefinitionId}/app_installations`;
|
|
10442
10476
|
const get$U = (http, params) => {
|
|
10443
10477
|
return get$14(http, getAppDefinitionUrl(params), {
|
|
10444
10478
|
params: normalizeSelect(params.query),
|
|
10445
10479
|
});
|
|
10446
10480
|
};
|
|
10447
|
-
const getMany$
|
|
10448
|
-
return get$14(http, getBaseUrl$
|
|
10481
|
+
const getMany$I = (http, params) => {
|
|
10482
|
+
return get$14(http, getBaseUrl$o(params), {
|
|
10449
10483
|
params: params.query,
|
|
10450
10484
|
});
|
|
10451
10485
|
};
|
|
10452
10486
|
const create$y = (http, params, rawData) => {
|
|
10453
10487
|
const data = index$2(rawData);
|
|
10454
|
-
return post$1(http, getBaseUrl$
|
|
10488
|
+
return post$1(http, getBaseUrl$o(params), data);
|
|
10455
10489
|
};
|
|
10456
10490
|
const update$v = (http, params, rawData, headers) => {
|
|
10457
10491
|
const data = index$2(rawData);
|
|
@@ -10482,7 +10516,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10482
10516
|
get: get$U,
|
|
10483
10517
|
getAppDefinitionUrl: getAppDefinitionUrl,
|
|
10484
10518
|
getInstallationsForOrg: getInstallationsForOrg,
|
|
10485
|
-
getMany: getMany$
|
|
10519
|
+
getMany: getMany$I,
|
|
10486
10520
|
update: update$v
|
|
10487
10521
|
});
|
|
10488
10522
|
|
|
@@ -10520,16 +10554,16 @@ var contentfulManagement = (function (exports) {
|
|
|
10520
10554
|
upsert: upsert$4
|
|
10521
10555
|
});
|
|
10522
10556
|
|
|
10523
|
-
const getBaseUrl$
|
|
10557
|
+
const getBaseUrl$n = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/app_installations`;
|
|
10524
10558
|
const getBaseUrlForOrgInstallations = (params) => `/app_definitions/${params.appDefinitionId}/app_installations`;
|
|
10525
|
-
const getAppInstallationUrl = (params) => getBaseUrl$
|
|
10559
|
+
const getAppInstallationUrl = (params) => getBaseUrl$n(params) + `/${params.appDefinitionId}`;
|
|
10526
10560
|
const get$R = (http, params) => {
|
|
10527
10561
|
return get$14(http, getAppInstallationUrl(params), {
|
|
10528
10562
|
params: normalizeSelect(params.query),
|
|
10529
10563
|
});
|
|
10530
10564
|
};
|
|
10531
|
-
const getMany$
|
|
10532
|
-
return get$14(http, getBaseUrl$
|
|
10565
|
+
const getMany$H = (http, params) => {
|
|
10566
|
+
return get$14(http, getBaseUrl$n(params), {
|
|
10533
10567
|
params: normalizeSelect(params.query),
|
|
10534
10568
|
});
|
|
10535
10569
|
};
|
|
@@ -10562,14 +10596,14 @@ var contentfulManagement = (function (exports) {
|
|
|
10562
10596
|
get: get$R,
|
|
10563
10597
|
getAppInstallationUrl: getAppInstallationUrl,
|
|
10564
10598
|
getForOrganization: getForOrganization$3,
|
|
10565
|
-
getMany: getMany$
|
|
10599
|
+
getMany: getMany$H,
|
|
10566
10600
|
upsert: upsert$3
|
|
10567
10601
|
});
|
|
10568
10602
|
|
|
10569
10603
|
const get$Q = (http, params) => {
|
|
10570
10604
|
return get$14(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/keys/${params.fingerprint}`);
|
|
10571
10605
|
};
|
|
10572
|
-
const getMany$
|
|
10606
|
+
const getMany$G = (http, params) => {
|
|
10573
10607
|
return get$14(http, `/organizations/${params.organizationId}/app_definitions/${params.appDefinitionId}/keys`);
|
|
10574
10608
|
};
|
|
10575
10609
|
const create$x = (http, params, data) => {
|
|
@@ -10584,7 +10618,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10584
10618
|
create: create$x,
|
|
10585
10619
|
del: del$x,
|
|
10586
10620
|
get: get$Q,
|
|
10587
|
-
getMany: getMany$
|
|
10621
|
+
getMany: getMany$G
|
|
10588
10622
|
});
|
|
10589
10623
|
|
|
10590
10624
|
const create$w = (http, params, data) => {
|
|
@@ -10626,8 +10660,8 @@ var contentfulManagement = (function (exports) {
|
|
|
10626
10660
|
return uploadHttp;
|
|
10627
10661
|
}
|
|
10628
10662
|
|
|
10629
|
-
const getBaseUrl$
|
|
10630
|
-
const getAppUploadUrl = (params) => `${getBaseUrl$
|
|
10663
|
+
const getBaseUrl$m = (params) => `/organizations/${params.organizationId}/app_uploads`;
|
|
10664
|
+
const getAppUploadUrl = (params) => `${getBaseUrl$m(params)}/${params.appUploadId}`;
|
|
10631
10665
|
const get$O = (http, params) => {
|
|
10632
10666
|
const httpUpload = getUploadHttpClient(http);
|
|
10633
10667
|
return get$14(httpUpload, getAppUploadUrl(params));
|
|
@@ -10639,7 +10673,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10639
10673
|
const create$v = (http, params, payload) => {
|
|
10640
10674
|
const httpUpload = getUploadHttpClient(http);
|
|
10641
10675
|
const { file } = payload;
|
|
10642
|
-
return post$1(httpUpload, getBaseUrl$
|
|
10676
|
+
return post$1(httpUpload, getBaseUrl$m(params), file, {
|
|
10643
10677
|
headers: {
|
|
10644
10678
|
'Content-Type': 'application/octet-stream',
|
|
10645
10679
|
},
|
|
@@ -10700,7 +10734,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10700
10734
|
headers: headers ? { ...headers } : undefined,
|
|
10701
10735
|
});
|
|
10702
10736
|
};
|
|
10703
|
-
const getMany$
|
|
10737
|
+
const getMany$F = (http, params, rawData, headers) => {
|
|
10704
10738
|
return get$14(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/assets`, {
|
|
10705
10739
|
params: normalizeSelect(params.query),
|
|
10706
10740
|
headers: headers ? { ...headers } : undefined,
|
|
@@ -10834,7 +10868,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10834
10868
|
createFromFiles: createFromFiles$1,
|
|
10835
10869
|
createWithId: createWithId$d,
|
|
10836
10870
|
get: get$M,
|
|
10837
|
-
getMany: getMany$
|
|
10871
|
+
getMany: getMany$F,
|
|
10838
10872
|
processForAllLocales: processForAllLocales$1,
|
|
10839
10873
|
processForLocale: processForLocale$1,
|
|
10840
10874
|
update: update$u
|
|
@@ -10855,9 +10889,9 @@ var contentfulManagement = (function (exports) {
|
|
|
10855
10889
|
headers: headers ? { ...headers } : undefined,
|
|
10856
10890
|
});
|
|
10857
10891
|
};
|
|
10858
|
-
const getMany$
|
|
10892
|
+
const getMany$E = (http, params, rawData, headers) => {
|
|
10859
10893
|
if (params.releaseId) {
|
|
10860
|
-
return getMany$
|
|
10894
|
+
return getMany$F(http, params);
|
|
10861
10895
|
}
|
|
10862
10896
|
return get$14(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/assets`, {
|
|
10863
10897
|
params: normalizeSelect(params.query),
|
|
@@ -10904,7 +10938,7 @@ var contentfulManagement = (function (exports) {
|
|
|
10904
10938
|
const archive$2 = (http, params) => {
|
|
10905
10939
|
return put$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/assets/${params.assetId}/archived`);
|
|
10906
10940
|
};
|
|
10907
|
-
const unarchive$
|
|
10941
|
+
const unarchive$3 = (http, params) => {
|
|
10908
10942
|
return del$H(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/assets/${params.assetId}/archived`);
|
|
10909
10943
|
};
|
|
10910
10944
|
const create$s = (http, params, rawData) => {
|
|
@@ -11046,12 +11080,12 @@ var contentfulManagement = (function (exports) {
|
|
|
11046
11080
|
createWithId: createWithId$c,
|
|
11047
11081
|
del: del$t,
|
|
11048
11082
|
get: get$L,
|
|
11049
|
-
getMany: getMany$
|
|
11083
|
+
getMany: getMany$E,
|
|
11050
11084
|
getPublished: getPublished$1,
|
|
11051
11085
|
processForAllLocales: processForAllLocales,
|
|
11052
11086
|
processForLocale: processForLocale,
|
|
11053
11087
|
publish: publish$4,
|
|
11054
|
-
unarchive: unarchive$
|
|
11088
|
+
unarchive: unarchive$3,
|
|
11055
11089
|
unpublish: unpublish$4,
|
|
11056
11090
|
update: update$t
|
|
11057
11091
|
});
|
|
@@ -11090,6 +11124,18 @@ var contentfulManagement = (function (exports) {
|
|
|
11090
11124
|
create: create$r
|
|
11091
11125
|
});
|
|
11092
11126
|
|
|
11127
|
+
const getBaseUrl$l = (params) => `/organizations/${params.organizationId}/available_licenses`;
|
|
11128
|
+
const getMany$D = (http, params) => {
|
|
11129
|
+
return get$14(http, getBaseUrl$l(params), {
|
|
11130
|
+
params: params.query,
|
|
11131
|
+
});
|
|
11132
|
+
};
|
|
11133
|
+
|
|
11134
|
+
var AvailableLicense = /*#__PURE__*/Object.freeze({
|
|
11135
|
+
__proto__: null,
|
|
11136
|
+
getMany: getMany$D
|
|
11137
|
+
});
|
|
11138
|
+
|
|
11093
11139
|
const get$K = (http, params) => {
|
|
11094
11140
|
return get$14(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/bulk_actions/actions/${params.bulkActionId}`);
|
|
11095
11141
|
};
|
|
@@ -11170,7 +11216,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11170
11216
|
}
|
|
11171
11217
|
: {},
|
|
11172
11218
|
});
|
|
11173
|
-
const getMany$
|
|
11219
|
+
const getMany$C = (http, params) => get$14(http, getEntityBaseUrl(params), {
|
|
11174
11220
|
params: normalizeSelect(params.query),
|
|
11175
11221
|
headers: params.bodyFormat === 'rich-text'
|
|
11176
11222
|
? {
|
|
@@ -11210,7 +11256,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11210
11256
|
/**
|
|
11211
11257
|
* @deprecated use `getMany` instead.
|
|
11212
11258
|
*/
|
|
11213
|
-
const getAll$1 = getMany$
|
|
11259
|
+
const getAll$1 = getMany$C;
|
|
11214
11260
|
|
|
11215
11261
|
var Comment = /*#__PURE__*/Object.freeze({
|
|
11216
11262
|
__proto__: null,
|
|
@@ -11218,13 +11264,13 @@ var contentfulManagement = (function (exports) {
|
|
|
11218
11264
|
del: del$s,
|
|
11219
11265
|
get: get$J,
|
|
11220
11266
|
getAll: getAll$1,
|
|
11221
|
-
getMany: getMany$
|
|
11267
|
+
getMany: getMany$C,
|
|
11222
11268
|
update: update$s
|
|
11223
11269
|
});
|
|
11224
11270
|
|
|
11225
|
-
const getBaseUrl$
|
|
11226
|
-
const getMany$
|
|
11227
|
-
return get$14(http, getBaseUrl$
|
|
11271
|
+
const getBaseUrl$k = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/component_types`;
|
|
11272
|
+
const getMany$B = (http, params, headers) => {
|
|
11273
|
+
return get$14(http, getBaseUrl$k(params), {
|
|
11228
11274
|
params: params.query,
|
|
11229
11275
|
headers,
|
|
11230
11276
|
});
|
|
@@ -11232,7 +11278,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11232
11278
|
|
|
11233
11279
|
var ComponentType = /*#__PURE__*/Object.freeze({
|
|
11234
11280
|
__proto__: null,
|
|
11235
|
-
getMany: getMany$
|
|
11281
|
+
getMany: getMany$B
|
|
11236
11282
|
});
|
|
11237
11283
|
|
|
11238
11284
|
function basePath$1(organizationId) {
|
|
@@ -11268,7 +11314,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11268
11314
|
...headers,
|
|
11269
11315
|
},
|
|
11270
11316
|
});
|
|
11271
|
-
const getMany$
|
|
11317
|
+
const getMany$A = (http, params) => {
|
|
11272
11318
|
const { url, queryParams } = cursorBasedCollection('', params);
|
|
11273
11319
|
return get$14(http, url, {
|
|
11274
11320
|
params: queryParams,
|
|
@@ -11300,7 +11346,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11300
11346
|
get: get$I,
|
|
11301
11347
|
getAncestors: getAncestors,
|
|
11302
11348
|
getDescendants: getDescendants,
|
|
11303
|
-
getMany: getMany$
|
|
11349
|
+
getMany: getMany$A,
|
|
11304
11350
|
getTotal: getTotal$1,
|
|
11305
11351
|
patch: patch$4,
|
|
11306
11352
|
update: update$r
|
|
@@ -11316,7 +11362,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11316
11362
|
...headers,
|
|
11317
11363
|
},
|
|
11318
11364
|
});
|
|
11319
|
-
const getMany$
|
|
11365
|
+
const getMany$z = (http, params) => {
|
|
11320
11366
|
const url = params.query?.pageUrl ?? basePath(params.organizationId);
|
|
11321
11367
|
return get$14(http, url, {
|
|
11322
11368
|
params: params.query?.pageUrl ? undefined : params.query,
|
|
@@ -11353,29 +11399,29 @@ var contentfulManagement = (function (exports) {
|
|
|
11353
11399
|
createWithId: createWithId$a,
|
|
11354
11400
|
del: del$q,
|
|
11355
11401
|
get: get$H,
|
|
11356
|
-
getMany: getMany$
|
|
11402
|
+
getMany: getMany$z,
|
|
11357
11403
|
getTotal: getTotal,
|
|
11358
11404
|
patch: patch$3,
|
|
11359
11405
|
update: update$q
|
|
11360
11406
|
});
|
|
11361
11407
|
|
|
11362
|
-
const getBaseUrl$
|
|
11363
|
-
const getContentTypeUrl$1 = (params) => getBaseUrl$
|
|
11408
|
+
const getBaseUrl$j = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/content_types`;
|
|
11409
|
+
const getContentTypeUrl$1 = (params) => getBaseUrl$j(params) + `/${params.contentTypeId}`;
|
|
11364
11410
|
const get$G = (http, params, headers) => {
|
|
11365
11411
|
return get$14(http, getContentTypeUrl$1(params), {
|
|
11366
11412
|
params: normalizeSelect(params.query),
|
|
11367
11413
|
headers,
|
|
11368
11414
|
});
|
|
11369
11415
|
};
|
|
11370
|
-
const getMany$
|
|
11371
|
-
return get$14(http, getBaseUrl$
|
|
11416
|
+
const getMany$y = (http, params, headers) => {
|
|
11417
|
+
return get$14(http, getBaseUrl$j(params), {
|
|
11372
11418
|
params: params.query,
|
|
11373
11419
|
headers,
|
|
11374
11420
|
});
|
|
11375
11421
|
};
|
|
11376
11422
|
const create$n = (http, params, rawData, headers) => {
|
|
11377
11423
|
const data = index$2(rawData);
|
|
11378
|
-
return post$1(http, getBaseUrl$
|
|
11424
|
+
return post$1(http, getBaseUrl$j(params), data, { headers });
|
|
11379
11425
|
};
|
|
11380
11426
|
const createWithId$9 = (http, params, rawData, headers) => {
|
|
11381
11427
|
const data = index$2(rawData);
|
|
@@ -11412,23 +11458,23 @@ var contentfulManagement = (function (exports) {
|
|
|
11412
11458
|
createWithId: createWithId$9,
|
|
11413
11459
|
del: del$p,
|
|
11414
11460
|
get: get$G,
|
|
11415
|
-
getMany: getMany$
|
|
11461
|
+
getMany: getMany$y,
|
|
11416
11462
|
publish: publish$2,
|
|
11417
11463
|
unpublish: unpublish$2,
|
|
11418
11464
|
update: update$p
|
|
11419
11465
|
});
|
|
11420
11466
|
|
|
11421
|
-
const getBaseUrl$
|
|
11467
|
+
const getBaseUrl$i = (params) => `/spaces/${params.spaceId}/environments/${params.environmentId}/content_types/${params.contentTypeId}/editor_interface`;
|
|
11422
11468
|
const get$F = (http, params) => {
|
|
11423
|
-
return get$14(http, getBaseUrl$
|
|
11469
|
+
return get$14(http, getBaseUrl$i(params));
|
|
11424
11470
|
};
|
|
11425
|
-
const getMany$
|
|
11471
|
+
const getMany$x = (http, params) => {
|
|
11426
11472
|
return get$14(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/editor_interfaces`);
|
|
11427
11473
|
};
|
|
11428
11474
|
const update$o = (http, params, rawData, headers) => {
|
|
11429
11475
|
const data = index$2(rawData);
|
|
11430
11476
|
delete data.sys;
|
|
11431
|
-
return put$1(http, getBaseUrl$
|
|
11477
|
+
return put$1(http, getBaseUrl$i(params), data, {
|
|
11432
11478
|
headers: {
|
|
11433
11479
|
'X-Contentful-Version': rawData.sys.version ?? 0,
|
|
11434
11480
|
...headers,
|
|
@@ -11439,10 +11485,22 @@ var contentfulManagement = (function (exports) {
|
|
|
11439
11485
|
var EditorInterface = /*#__PURE__*/Object.freeze({
|
|
11440
11486
|
__proto__: null,
|
|
11441
11487
|
get: get$F,
|
|
11442
|
-
getMany: getMany$
|
|
11488
|
+
getMany: getMany$x,
|
|
11443
11489
|
update: update$o
|
|
11444
11490
|
});
|
|
11445
11491
|
|
|
11492
|
+
const getBaseUrl$h = (params) => `/spaces/${params.spaceId}/eligible_licenses`;
|
|
11493
|
+
const getMany$w = (http, params) => {
|
|
11494
|
+
return get$14(http, getBaseUrl$h(params), {
|
|
11495
|
+
params: params.query,
|
|
11496
|
+
});
|
|
11497
|
+
};
|
|
11498
|
+
|
|
11499
|
+
var EligibleLicense = /*#__PURE__*/Object.freeze({
|
|
11500
|
+
__proto__: null,
|
|
11501
|
+
getMany: getMany$w
|
|
11502
|
+
});
|
|
11503
|
+
|
|
11446
11504
|
const get$E = (http, params, rawData, headers) => {
|
|
11447
11505
|
return get$14(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/entries/${params.entryId}`, {
|
|
11448
11506
|
params: normalizeSelect(params.query),
|
|
@@ -11579,7 +11637,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11579
11637
|
const archive$1 = (http, params) => {
|
|
11580
11638
|
return put$1(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}/archived`);
|
|
11581
11639
|
};
|
|
11582
|
-
const unarchive$
|
|
11640
|
+
const unarchive$2 = (http, params) => {
|
|
11583
11641
|
return del$H(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/entries/${params.entryId}/archived`);
|
|
11584
11642
|
};
|
|
11585
11643
|
const create$l = (http, params, rawData) => {
|
|
@@ -11622,7 +11680,7 @@ var contentfulManagement = (function (exports) {
|
|
|
11622
11680
|
patch: patch$1,
|
|
11623
11681
|
publish: publish$1,
|
|
11624
11682
|
references: references,
|
|
11625
|
-
unarchive: unarchive$
|
|
11683
|
+
unarchive: unarchive$2,
|
|
11626
11684
|
unpublish: unpublish$1,
|
|
11627
11685
|
update: update$m
|
|
11628
11686
|
});
|
|
@@ -12308,7 +12366,7 @@ var contentfulManagement = (function (exports) {
|
|
|
12308
12366
|
},
|
|
12309
12367
|
});
|
|
12310
12368
|
};
|
|
12311
|
-
const unarchive = (http, params) => {
|
|
12369
|
+
const unarchive$1 = (http, params) => {
|
|
12312
12370
|
return del$H(http, `/spaces/${params.spaceId}/environments/${params.environmentId}/releases/${params.releaseId}/archived`, {
|
|
12313
12371
|
headers: {
|
|
12314
12372
|
'X-Contentful-Version': params.version,
|
|
@@ -12324,7 +12382,7 @@ var contentfulManagement = (function (exports) {
|
|
|
12324
12382
|
get: get$o,
|
|
12325
12383
|
publish: publish,
|
|
12326
12384
|
query: query,
|
|
12327
|
-
unarchive: unarchive,
|
|
12385
|
+
unarchive: unarchive$1,
|
|
12328
12386
|
unpublish: unpublish,
|
|
12329
12387
|
update: update$e,
|
|
12330
12388
|
validate: validate
|
|
@@ -12624,6 +12682,11 @@ var contentfulManagement = (function (exports) {
|
|
|
12624
12682
|
},
|
|
12625
12683
|
});
|
|
12626
12684
|
};
|
|
12685
|
+
const unarchive = (http, params, data, headers) => {
|
|
12686
|
+
return post$1(http, `/spaces/${params.spaceId}/unarchive`, data, {
|
|
12687
|
+
headers,
|
|
12688
|
+
});
|
|
12689
|
+
};
|
|
12627
12690
|
const del$9 = (http, params) => del$H(http, `/spaces/${params.spaceId}`);
|
|
12628
12691
|
|
|
12629
12692
|
var Space = /*#__PURE__*/Object.freeze({
|
|
@@ -12633,6 +12696,7 @@ var contentfulManagement = (function (exports) {
|
|
|
12633
12696
|
get: get$c,
|
|
12634
12697
|
getMany: getMany$b,
|
|
12635
12698
|
getManyForOrganization: getManyForOrganization$5,
|
|
12699
|
+
unarchive: unarchive,
|
|
12636
12700
|
update: update$b
|
|
12637
12701
|
});
|
|
12638
12702
|
|
|
@@ -13238,6 +13302,7 @@ var contentfulManagement = (function (exports) {
|
|
|
13238
13302
|
AppDetails,
|
|
13239
13303
|
Asset,
|
|
13240
13304
|
AssetKey,
|
|
13305
|
+
AvailableLicense,
|
|
13241
13306
|
BulkAction,
|
|
13242
13307
|
Comment,
|
|
13243
13308
|
ComponentType,
|
|
@@ -13245,6 +13310,7 @@ var contentfulManagement = (function (exports) {
|
|
|
13245
13310
|
ConceptScheme,
|
|
13246
13311
|
ContentType,
|
|
13247
13312
|
EditorInterface,
|
|
13313
|
+
EligibleLicense,
|
|
13248
13314
|
Entry,
|
|
13249
13315
|
Environment,
|
|
13250
13316
|
EnvironmentAlias,
|
|
@@ -13367,6 +13433,21 @@ var contentfulManagement = (function (exports) {
|
|
|
13367
13433
|
}
|
|
13368
13434
|
}
|
|
13369
13435
|
|
|
13436
|
+
/**
|
|
13437
|
+
* @internal
|
|
13438
|
+
* Wraps the raw eligible license data
|
|
13439
|
+
* @param makeRequest - function to make requests via an adapter
|
|
13440
|
+
* @param data - Raw eligible license data
|
|
13441
|
+
* @returns Wrapped eligible license data
|
|
13442
|
+
*/
|
|
13443
|
+
function wrapEligibleLicense(makeRequest, data) {
|
|
13444
|
+
return toPlainObject(index$2(data));
|
|
13445
|
+
}
|
|
13446
|
+
/**
|
|
13447
|
+
* @internal
|
|
13448
|
+
*/
|
|
13449
|
+
const wrapEligibleLicenseCollection = wrapCollection(wrapEligibleLicense);
|
|
13450
|
+
|
|
13370
13451
|
/**
|
|
13371
13452
|
* This method enhances a base object which would normally contain data, with
|
|
13372
13453
|
* methods from another object that might work on manipulating that data.
|
|
@@ -18866,6 +18947,34 @@ var contentfulManagement = (function (exports) {
|
|
|
18866
18947
|
headers: {},
|
|
18867
18948
|
}).then((data) => wrapSpace(makeRequest, data));
|
|
18868
18949
|
},
|
|
18950
|
+
/**
|
|
18951
|
+
* Unarchives the space
|
|
18952
|
+
* @returns Promise for the unarchived space.
|
|
18953
|
+
* @example ```javascript
|
|
18954
|
+
* const contentful = require('contentful-management')
|
|
18955
|
+
*
|
|
18956
|
+
* const client = contentful.createClient({
|
|
18957
|
+
* accessToken: '<content_management_api_key>'
|
|
18958
|
+
* })
|
|
18959
|
+
*
|
|
18960
|
+
* client.getSpace('<space_id>')
|
|
18961
|
+
* .then((space) => {
|
|
18962
|
+
* return space.unarchive({productId: 'id'})
|
|
18963
|
+
* })
|
|
18964
|
+
* .then((space) => console.log(`Space ${space.sys.id} unarchived.`)
|
|
18965
|
+
* .catch(console.error)
|
|
18966
|
+
* ```
|
|
18967
|
+
*/
|
|
18968
|
+
unarchive: function unarchiveSpace(productId) {
|
|
18969
|
+
const raw = this.toPlainObject();
|
|
18970
|
+
return makeRequest({
|
|
18971
|
+
entityType: 'Space',
|
|
18972
|
+
action: 'unarchive',
|
|
18973
|
+
params: { spaceId: raw.sys.id },
|
|
18974
|
+
payload: { productId },
|
|
18975
|
+
headers: {},
|
|
18976
|
+
}).then((data) => wrapSpace(makeRequest, data));
|
|
18977
|
+
},
|
|
18869
18978
|
/**
|
|
18870
18979
|
* Gets an environment
|
|
18871
18980
|
* @param id - Environment ID
|
|
@@ -20393,6 +20502,34 @@ var contentfulManagement = (function (exports) {
|
|
|
20393
20502
|
params: { spaceId: raw.sys.id, query: createRequestConfig({ query }).params },
|
|
20394
20503
|
}).then((data) => wrapSpaceAddOnCollection(makeRequest, data));
|
|
20395
20504
|
},
|
|
20505
|
+
/**
|
|
20506
|
+
* Gets a collection of Eligible Licenses for the space
|
|
20507
|
+
* @param query - Object with search parameters. The API supports pagination with skip and limit parameters.
|
|
20508
|
+
* @returns Promise for a collection of Eligible Licenses that can be assigned to this space
|
|
20509
|
+
* @example ```javascript
|
|
20510
|
+
* const contentful = require('contentful-management')
|
|
20511
|
+
*
|
|
20512
|
+
* const client = contentful.createClient({
|
|
20513
|
+
* accessToken: '<content_management_api_key>'
|
|
20514
|
+
* })
|
|
20515
|
+
*
|
|
20516
|
+
* client.getSpace('<space_id>')
|
|
20517
|
+
* .then((space) => space.getEligibleLicenses({ limit: 10, skip: 0 }))
|
|
20518
|
+
* .then((response) => console.log(response.items))
|
|
20519
|
+
* .catch(console.error)
|
|
20520
|
+
* ```
|
|
20521
|
+
*/
|
|
20522
|
+
getEligibleLicenses(query = {}) {
|
|
20523
|
+
const raw = this.toPlainObject();
|
|
20524
|
+
return makeRequest({
|
|
20525
|
+
entityType: 'EligibleLicense',
|
|
20526
|
+
action: 'getMany',
|
|
20527
|
+
params: {
|
|
20528
|
+
spaceId: raw.sys.id,
|
|
20529
|
+
query: createRequestConfig({ query }).params,
|
|
20530
|
+
},
|
|
20531
|
+
}).then((data) => wrapEligibleLicenseCollection(makeRequest, data));
|
|
20532
|
+
},
|
|
20396
20533
|
/**
|
|
20397
20534
|
* Updates Space Add-on allocations
|
|
20398
20535
|
* @param allocations - Array of add-on allocation updates
|
|
@@ -21227,6 +21364,21 @@ var contentfulManagement = (function (exports) {
|
|
|
21227
21364
|
*/
|
|
21228
21365
|
const wrapAppActionCollection = wrapCollection(wrapAppAction);
|
|
21229
21366
|
|
|
21367
|
+
/**
|
|
21368
|
+
* @internal
|
|
21369
|
+
* Wraps the raw available license data
|
|
21370
|
+
* @param makeRequest - function to make requests via an adapter
|
|
21371
|
+
* @param data - Raw available license data
|
|
21372
|
+
* @returns Wrapped available license data
|
|
21373
|
+
*/
|
|
21374
|
+
function wrapAvailableLicense(makeRequest, data) {
|
|
21375
|
+
return toPlainObject(index$2(data));
|
|
21376
|
+
}
|
|
21377
|
+
/**
|
|
21378
|
+
* @internal
|
|
21379
|
+
*/
|
|
21380
|
+
const wrapAvailableLicenseCollection = wrapCollection(wrapAvailableLicense);
|
|
21381
|
+
|
|
21230
21382
|
function wrapContentSemanticsSettings(_makeRequest, data) {
|
|
21231
21383
|
const result = toPlainObject(index$2(data));
|
|
21232
21384
|
return freezeSys(result);
|
|
@@ -21643,6 +21795,33 @@ var contentfulManagement = (function (exports) {
|
|
|
21643
21795
|
},
|
|
21644
21796
|
}).then((data) => wrapSpaceMembershipCollection(makeRequest, data));
|
|
21645
21797
|
},
|
|
21798
|
+
/**
|
|
21799
|
+
* Gets a collection of Available Licenses for the organization
|
|
21800
|
+
* @param query - Object with search parameters. The API supports pagination with skip and limit parameters.
|
|
21801
|
+
* @returns Promise for a collection of Available Licenses
|
|
21802
|
+
* @example ```javascript
|
|
21803
|
+
* const contentful = require('contentful-management')
|
|
21804
|
+
* const client = contentful.createClient({
|
|
21805
|
+
* accessToken: '<content_management_api_key>'
|
|
21806
|
+
* })
|
|
21807
|
+
*
|
|
21808
|
+
* client.getOrganization('organization_id')
|
|
21809
|
+
* .then((organization) => organization.getAvailableLicenses({ limit: 10, skip: 0 }))
|
|
21810
|
+
* .then((response) => console.log(response.items))
|
|
21811
|
+
* .catch(console.error)
|
|
21812
|
+
* ```
|
|
21813
|
+
*/
|
|
21814
|
+
getAvailableLicenses(query = {}) {
|
|
21815
|
+
const raw = this.toPlainObject();
|
|
21816
|
+
return makeRequest({
|
|
21817
|
+
entityType: 'AvailableLicense',
|
|
21818
|
+
action: 'getMany',
|
|
21819
|
+
params: {
|
|
21820
|
+
organizationId: raw.sys.id,
|
|
21821
|
+
query: createRequestConfig({ query }).params,
|
|
21822
|
+
},
|
|
21823
|
+
}).then((data) => wrapAvailableLicenseCollection(makeRequest, data));
|
|
21824
|
+
},
|
|
21646
21825
|
/**
|
|
21647
21826
|
* Gets an Invitation in Organization
|
|
21648
21827
|
* @returns Promise for a OrganizationInvitation in an organization
|