contentful-management 11.35.0 → 11.36.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contentful-management.browser.js +13 -8
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +14 -10
- package/dist/contentful-management.node.js.map +1 -1
- package/dist/contentful-management.node.min.js +1 -1
- package/dist/es-modules/adapters/REST/endpoints/access-token.js +5 -5
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-environment-api.js +5 -2
- package/dist/es-modules/entities/scheduled-action.js +2 -2
- package/dist/typings/adapters/REST/endpoints/access-token.d.ts +5 -5
- package/dist/typings/common-types.d.ts +16 -16
- package/dist/typings/create-contentful-api.d.ts +3 -3
- package/dist/typings/create-environment-api.d.ts +1 -1
- package/dist/typings/entities/access-token.d.ts +4 -4
- package/dist/typings/entities/organization.d.ts +4 -4
- package/dist/typings/entities/personal-access-token.d.ts +4 -4
- package/dist/typings/entities/release-action.d.ts +1 -0
- package/dist/typings/entities/scheduled-action.d.ts +1 -1
- package/dist/typings/export-types.d.ts +3 -3
- package/dist/typings/plain/common-types.d.ts +11 -11
- package/dist/typings/plain/entities/organization.d.ts +3 -3
- package/dist/typings/plain/entities/resource-provider.d.ts +14 -11
- package/dist/typings/plain/entities/resource.d.ts +9 -7
- package/package.json +1 -1
|
@@ -496,7 +496,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
496
496
|
* @param {AxiosInstance} http - An Axios HTTP client instance.
|
|
497
497
|
* @param {Object} params - Parameters for the request.
|
|
498
498
|
* @param {string} params.tokenId - The unique token ID of the access token to retrieve.
|
|
499
|
-
* @returns {Promise<
|
|
499
|
+
* @returns {Promise<AccessTokenProps>} A Promise that resolves with the retrieved access token information.
|
|
500
500
|
* @example ```javascript
|
|
501
501
|
* const contentful = require('contentful-management')
|
|
502
502
|
*
|
|
@@ -520,7 +520,7 @@ const get = (http, params) => {
|
|
|
520
520
|
*
|
|
521
521
|
* @param {AxiosInstance} http - An Axios HTTP client instance.
|
|
522
522
|
* @param {QueryParams} params - Query parameters to filter and customize the request.
|
|
523
|
-
* @returns {Promise<CollectionProp<
|
|
523
|
+
* @returns {Promise<CollectionProp<AccessTokenProps>>} A Promise that resolves with a collection of access token properties.
|
|
524
524
|
* @example ```javascript
|
|
525
525
|
* const contentful = require('contentful-management')
|
|
526
526
|
*
|
|
@@ -548,7 +548,7 @@ const getMany = (http, params) => {
|
|
|
548
548
|
* @param {Object} _params - Unused parameters (can be an empty object).
|
|
549
549
|
* @param {CreatePersonalAccessTokenProps} rawData - Data for creating the personal access token.
|
|
550
550
|
* @param {RawAxiosRequestHeaders} [headers] - Optional HTTP headers for the request.
|
|
551
|
-
* @returns {Promise<
|
|
551
|
+
* @returns {Promise<AccessTokenProps>} A Promise that resolves with the created personal access token.
|
|
552
552
|
* @example ```javascript
|
|
553
553
|
* const contentful = require('contentful-management')
|
|
554
554
|
*
|
|
@@ -575,7 +575,7 @@ const createPersonalAccessToken = (http, _params, rawData, headers) => {
|
|
|
575
575
|
* @param {AxiosInstance} http - The Axios HTTP client instance.
|
|
576
576
|
* @param {Object} params - The parameters for revoking the access token.
|
|
577
577
|
* @param {string} params.tokenId - The unique identifier of the access token to revoke.
|
|
578
|
-
* @returns {Promise<
|
|
578
|
+
* @returns {Promise<AccessTokenProps>} A Promise that resolves with the updated access token information after revocation.
|
|
579
579
|
* @example ```javascript
|
|
580
580
|
* const contentful = require('contentful-management')
|
|
581
581
|
*
|
|
@@ -600,7 +600,7 @@ const revoke = (http, params) => {
|
|
|
600
600
|
* @param {AxiosInstance} http - The Axios HTTP client instance.
|
|
601
601
|
* @param {GetOrganizationParams & QueryParams} params - Parameters for the request, including organization ID and query parameters.
|
|
602
602
|
* @param {string} params.organizationId - The unique identifier of the organization.
|
|
603
|
-
* @returns {Promise<CollectionProp<
|
|
603
|
+
* @returns {Promise<CollectionProp<AccessTokenProps>>} A promise that resolves to a collection of access tokens.
|
|
604
604
|
* @example ```javascript
|
|
605
605
|
* const contentful = require('contentful-management')
|
|
606
606
|
*
|
|
@@ -7714,14 +7714,17 @@ function createEnvironmentApi(makeRequest) {
|
|
|
7714
7714
|
* .catch(console.error)
|
|
7715
7715
|
* ```
|
|
7716
7716
|
*/
|
|
7717
|
-
getLocales() {
|
|
7717
|
+
getLocales(query = {}) {
|
|
7718
7718
|
const raw = this.toPlainObject();
|
|
7719
7719
|
return makeRequest({
|
|
7720
7720
|
entityType: 'Locale',
|
|
7721
7721
|
action: 'getMany',
|
|
7722
7722
|
params: {
|
|
7723
7723
|
spaceId: raw.sys.space.sys.id,
|
|
7724
|
-
environmentId: raw.sys.id
|
|
7724
|
+
environmentId: raw.sys.id,
|
|
7725
|
+
query: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({
|
|
7726
|
+
query
|
|
7727
|
+
}).params
|
|
7725
7728
|
}
|
|
7726
7729
|
}).then(data => wrapLocaleCollection(makeRequest, data));
|
|
7727
7730
|
},
|
|
@@ -14936,6 +14939,7 @@ const wrapRoleCollection = (0,_common_utils__WEBPACK_IMPORTED_MODULE_3__.wrapCol
|
|
|
14936
14939
|
"use strict";
|
|
14937
14940
|
__webpack_require__.r(__webpack_exports__);
|
|
14938
14941
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14942
|
+
/* harmony export */ ScheduledActionStatus: () => (/* binding */ ScheduledActionStatus),
|
|
14939
14943
|
/* harmony export */ "default": () => (/* binding */ getInstanceMethods),
|
|
14940
14944
|
/* harmony export */ wrapScheduledAction: () => (/* binding */ wrapScheduledAction),
|
|
14941
14945
|
/* harmony export */ wrapScheduledActionCollection: () => (/* binding */ wrapScheduledActionCollection)
|
|
@@ -14955,14 +14959,14 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
14955
14959
|
/**
|
|
14956
14960
|
* Represents that state of the scheduled action
|
|
14957
14961
|
*/
|
|
14958
|
-
|
|
14962
|
+
let ScheduledActionStatus = /*#__PURE__*/function (ScheduledActionStatus) {
|
|
14959
14963
|
ScheduledActionStatus["scheduled"] = "scheduled";
|
|
14960
14964
|
ScheduledActionStatus["inProgress"] = "inProgress";
|
|
14961
14965
|
ScheduledActionStatus["succeeded"] = "succeeded";
|
|
14962
14966
|
ScheduledActionStatus["failed"] = "failed";
|
|
14963
14967
|
ScheduledActionStatus["canceled"] = "canceled";
|
|
14964
14968
|
return ScheduledActionStatus;
|
|
14965
|
-
}(
|
|
14969
|
+
}({});
|
|
14966
14970
|
function getInstanceMethods(makeRequest) {
|
|
14967
14971
|
const getParams = self => {
|
|
14968
14972
|
var _scheduledAction$envi;
|
|
@@ -31052,7 +31056,7 @@ function createClient(params, opts = {}) {
|
|
|
31052
31056
|
const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
31053
31057
|
const userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(
|
|
31054
31058
|
// @ts-expect-error
|
|
31055
|
-
`${sdkMain}/${"11.
|
|
31059
|
+
`${sdkMain}/${"11.36.0-beta.1"}`, params.application, params.integration, params.feature);
|
|
31056
31060
|
const adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
|
|
31057
31061
|
userAgent
|
|
31058
31062
|
}));
|