contentful-management 10.15.1 → 10.17.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/contentful-management.browser.js +71 -19
- package/dist/contentful-management.browser.js.map +1 -1
- package/dist/contentful-management.browser.min.js +1 -1
- package/dist/contentful-management.node.js +71 -20
- 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/app-definition.js +2 -6
- package/dist/es-modules/adapters/REST/endpoints/app-installation.js +2 -2
- package/dist/es-modules/adapters/REST/endpoints/utils.js +9 -0
- package/dist/es-modules/common-types.js +39 -1
- package/dist/es-modules/contentful-management.js +1 -1
- package/dist/es-modules/create-app-definition-api.js +9 -7
- package/dist/typings/adapters/REST/endpoints/app-definition.d.ts +0 -3
- package/dist/typings/adapters/REST/endpoints/utils.d.ts +1 -0
- package/dist/typings/common-types.d.ts +12 -1
- package/dist/typings/create-app-definition-api.d.ts +8 -7
- package/dist/typings/entities/scheduled-action.d.ts +6 -2
- package/dist/typings/plain/common-types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -8940,13 +8940,9 @@ var update = function update(http, params, rawData, headers) {
|
|
|
8940
8940
|
var del = function del(http, params) {
|
|
8941
8941
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["del"](http, getAppDefinitionUrl(params));
|
|
8942
8942
|
};
|
|
8943
|
-
/**
|
|
8944
|
-
* @deprecated
|
|
8945
|
-
*/
|
|
8946
|
-
|
|
8947
8943
|
var getInstallationsForOrg = function getInstallationsForOrg(http, params) {
|
|
8948
8944
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, getBaseUrlForOrgInstallations(params), {
|
|
8949
|
-
params: Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSelect"])(params.query)
|
|
8945
|
+
params: Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSpaceId"])(Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSelect"])(params.query))
|
|
8950
8946
|
});
|
|
8951
8947
|
};
|
|
8952
8948
|
|
|
@@ -9041,7 +9037,7 @@ var del = function del(http, params) {
|
|
|
9041
9037
|
};
|
|
9042
9038
|
var getForOrganization = function getForOrganization(http, params) {
|
|
9043
9039
|
return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, getBaseUrlForOrgInstallations(params), {
|
|
9044
|
-
params: Object(_utils__WEBPACK_IMPORTED_MODULE_1__["normalizeSelect"])(params.query)
|
|
9040
|
+
params: Object(_utils__WEBPACK_IMPORTED_MODULE_1__["normalizeSpaceId"])(Object(_utils__WEBPACK_IMPORTED_MODULE_1__["normalizeSelect"])(params.query))
|
|
9045
9041
|
});
|
|
9046
9042
|
};
|
|
9047
9043
|
|
|
@@ -11663,12 +11659,13 @@ var getManyForOrganization = function getManyForOrganization(http, params) {
|
|
|
11663
11659
|
/*!******************************************!*\
|
|
11664
11660
|
!*** ./adapters/REST/endpoints/utils.ts ***!
|
|
11665
11661
|
\******************************************/
|
|
11666
|
-
/*! exports provided: normalizeSelect */
|
|
11662
|
+
/*! exports provided: normalizeSelect, normalizeSpaceId */
|
|
11667
11663
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
11668
11664
|
|
|
11669
11665
|
"use strict";
|
|
11670
11666
|
__webpack_require__.r(__webpack_exports__);
|
|
11671
11667
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeSelect", function() { return normalizeSelect; });
|
|
11668
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeSpaceId", function() { return normalizeSpaceId; });
|
|
11672
11669
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11673
11670
|
|
|
11674
11671
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -11684,6 +11681,15 @@ function normalizeSelect(query) {
|
|
|
11684
11681
|
|
|
11685
11682
|
return query;
|
|
11686
11683
|
}
|
|
11684
|
+
function normalizeSpaceId(query) {
|
|
11685
|
+
if (query && query.spaceId) {
|
|
11686
|
+
return _objectSpread(_objectSpread({}, query), {}, {
|
|
11687
|
+
'sys.space.sys.id[in]': query.spaceId
|
|
11688
|
+
});
|
|
11689
|
+
}
|
|
11690
|
+
|
|
11691
|
+
return query;
|
|
11692
|
+
}
|
|
11687
11693
|
|
|
11688
11694
|
/***/ }),
|
|
11689
11695
|
|
|
@@ -12141,12 +12147,51 @@ var RestAdapter = /*#__PURE__*/function () {
|
|
|
12141
12147
|
/*!*************************!*\
|
|
12142
12148
|
!*** ./common-types.ts ***!
|
|
12143
12149
|
\*************************/
|
|
12144
|
-
/*!
|
|
12150
|
+
/*! exports provided: ScheduledActionReferenceFilters */
|
|
12145
12151
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12146
12152
|
|
|
12147
12153
|
"use strict";
|
|
12148
12154
|
__webpack_require__.r(__webpack_exports__);
|
|
12155
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScheduledActionReferenceFilters", function() { return ScheduledActionReferenceFilters; });
|
|
12156
|
+
/**
|
|
12157
|
+
* Link is a reference object to another entity that can be resolved using tools such as contentful-resolve
|
|
12158
|
+
*/
|
|
12149
12159
|
|
|
12160
|
+
/** String will be in ISO8601 datetime format e.g. 2013-06-26T13:57:24Z */
|
|
12161
|
+
|
|
12162
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
12163
|
+
|
|
12164
|
+
/**
|
|
12165
|
+
* @private
|
|
12166
|
+
*/
|
|
12167
|
+
|
|
12168
|
+
/**
|
|
12169
|
+
* @private
|
|
12170
|
+
*/
|
|
12171
|
+
|
|
12172
|
+
/**
|
|
12173
|
+
* @private
|
|
12174
|
+
*/
|
|
12175
|
+
|
|
12176
|
+
/**
|
|
12177
|
+
* @private
|
|
12178
|
+
*/
|
|
12179
|
+
|
|
12180
|
+
/**
|
|
12181
|
+
* @private
|
|
12182
|
+
*/
|
|
12183
|
+
|
|
12184
|
+
/**
|
|
12185
|
+
* @private
|
|
12186
|
+
*/
|
|
12187
|
+
|
|
12188
|
+
/** Base interface for all Payload interfaces. Used as part of the MakeRequestOptions to simplify payload definitions. */
|
|
12189
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
12190
|
+
var ScheduledActionReferenceFilters;
|
|
12191
|
+
|
|
12192
|
+
(function (ScheduledActionReferenceFilters) {
|
|
12193
|
+
ScheduledActionReferenceFilters["contentTypeAnnotationNotIn"] = "sys.contentType.metadata.annotations.ContentType[nin]";
|
|
12194
|
+
})(ScheduledActionReferenceFilters || (ScheduledActionReferenceFilters = {}));
|
|
12150
12195
|
|
|
12151
12196
|
/***/ }),
|
|
12152
12197
|
|
|
@@ -12661,7 +12706,7 @@ var in_ = function in_(key, object) {
|
|
|
12661
12706
|
/*!**********************************!*\
|
|
12662
12707
|
!*** ./contentful-management.ts ***!
|
|
12663
12708
|
\**********************************/
|
|
12664
|
-
/*! exports provided: asIterator, isDraft, isPublished, isUpdated, createClient, RestAdapter, editorInterfaceDefaults */
|
|
12709
|
+
/*! exports provided: asIterator, isDraft, isPublished, isUpdated, createClient, RestAdapter, editorInterfaceDefaults, ScheduledActionReferenceFilters */
|
|
12665
12710
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12666
12711
|
|
|
12667
12712
|
"use strict";
|
|
@@ -12687,7 +12732,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12687
12732
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RestAdapter", function() { return _adapters_REST_rest_adapter__WEBPACK_IMPORTED_MODULE_7__["RestAdapter"]; });
|
|
12688
12733
|
|
|
12689
12734
|
/* harmony import */ var _export_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./export-types */ "./export-types.ts");
|
|
12690
|
-
/*
|
|
12735
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScheduledActionReferenceFilters", function() { return _export_types__WEBPACK_IMPORTED_MODULE_8__["ScheduledActionReferenceFilters"]; });
|
|
12736
|
+
|
|
12737
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12691
12738
|
|
|
12692
12739
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12693
12740
|
|
|
@@ -12714,7 +12761,7 @@ function createClient(params) {
|
|
|
12714
12761
|
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12715
12762
|
var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
|
|
12716
12763
|
var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
|
|
12717
|
-
"".concat(sdkMain, "/").concat("10.
|
|
12764
|
+
"".concat(sdkMain, "/").concat("10.17.0"), params.application, params.integration, params.feature);
|
|
12718
12765
|
var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
|
|
12719
12766
|
// https://github.com/microsoft/TypeScript/issues/26591
|
|
12720
12767
|
// @ts-expect-error
|
|
@@ -12953,29 +13000,32 @@ function createAppDefinitionApi(makeRequest) {
|
|
|
12953
13000
|
},
|
|
12954
13001
|
|
|
12955
13002
|
/**
|
|
12956
|
-
* Gets a list of App Installations across an org for given App Definition
|
|
12957
|
-
*
|
|
12958
|
-
* @param Object - organizationId and appDefinitionId
|
|
13003
|
+
* Gets a list of App Installations across an org for given organization and App Definition
|
|
13004
|
+
* If a spaceId is provided in the query object, it will return the App Installations for that specific space.
|
|
12959
13005
|
* @return Promise for the newly created AppBundle
|
|
12960
13006
|
* @example ```javascript
|
|
12961
13007
|
* const contentful = require('contentful-management')
|
|
12962
13008
|
* const client = contentful.createClient({
|
|
12963
13009
|
* accessToken: '<content_management_api_key>'
|
|
12964
13010
|
* })
|
|
12965
|
-
* client.getAppDefinition('<
|
|
12966
|
-
* .then((appDefinition) => appDefinition.getInstallationsForOrg(
|
|
13011
|
+
* client.getAppDefinition('<organization_id>', '<app_definition_id>'))
|
|
13012
|
+
* .then((appDefinition) => appDefinition.getInstallationsForOrg(
|
|
13013
|
+
* { spaceId: '<space_id>' } // optional
|
|
13014
|
+
* ))
|
|
12967
13015
|
* .then((appInstallationsForOrg) => console.log(appInstallationsForOrg.items))
|
|
12968
13016
|
* .catch(console.error)
|
|
12969
13017
|
* ```
|
|
12970
13018
|
*/
|
|
12971
13019
|
getInstallationsForOrg: function getInstallationsForOrg() {
|
|
13020
|
+
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12972
13021
|
var raw = this.toPlainObject();
|
|
12973
13022
|
return makeRequest({
|
|
12974
13023
|
entityType: 'AppDefinition',
|
|
12975
13024
|
action: 'getInstallationsForOrg',
|
|
12976
13025
|
params: {
|
|
12977
13026
|
appDefinitionId: raw.sys.id,
|
|
12978
|
-
organizationId: raw.sys.organization.sys.id
|
|
13027
|
+
organizationId: raw.sys.organization.sys.id,
|
|
13028
|
+
query: query
|
|
12979
13029
|
}
|
|
12980
13030
|
});
|
|
12981
13031
|
}
|
|
@@ -22919,13 +22969,15 @@ var wrapWorkflowDefinitionCollection = Object(_common_utils__WEBPACK_IMPORTED_MO
|
|
|
22919
22969
|
/*!*************************!*\
|
|
22920
22970
|
!*** ./export-types.ts ***!
|
|
22921
22971
|
\*************************/
|
|
22922
|
-
/*!
|
|
22972
|
+
/*! exports provided: ScheduledActionReferenceFilters */
|
|
22923
22973
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
22924
22974
|
|
|
22925
22975
|
"use strict";
|
|
22926
22976
|
__webpack_require__.r(__webpack_exports__);
|
|
22927
22977
|
/* harmony import */ var _common_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common-types */ "./common-types.ts");
|
|
22928
|
-
/*
|
|
22978
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScheduledActionReferenceFilters", function() { return _common_types__WEBPACK_IMPORTED_MODULE_0__["ScheduledActionReferenceFilters"]; });
|
|
22979
|
+
|
|
22980
|
+
|
|
22929
22981
|
|
|
22930
22982
|
|
|
22931
22983
|
/***/ }),
|