contentful-management 10.12.0 → 10.12.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.
@@ -8940,6 +8940,10 @@ 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
+
8943
8947
  var getInstallationsForOrg = function getInstallationsForOrg(http, params) {
8944
8948
  return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, getBaseUrlForOrgInstallations(params), {
8945
8949
  params: Object(_utils__WEBPACK_IMPORTED_MODULE_2__["normalizeSelect"])(params.query)
@@ -8978,7 +8982,7 @@ var del = function del(http, params) {
8978
8982
  /*!*****************************************************!*\
8979
8983
  !*** ./adapters/REST/endpoints/app-installation.ts ***!
8980
8984
  \*****************************************************/
8981
- /*! exports provided: getAppInstallationUrl, get, getMany, upsert, del */
8985
+ /*! exports provided: getAppInstallationUrl, get, getMany, upsert, del, getForOrganization */
8982
8986
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
8983
8987
 
8984
8988
  "use strict";
@@ -8988,6 +8992,7 @@ __webpack_require__.r(__webpack_exports__);
8988
8992
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMany", function() { return getMany; });
8989
8993
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "upsert", function() { return upsert; });
8990
8994
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "del", function() { return del; });
8995
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getForOrganization", function() { return getForOrganization; });
8991
8996
  /* harmony import */ var _raw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./raw */ "./adapters/REST/endpoints/raw.ts");
8992
8997
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./adapters/REST/endpoints/utils.ts");
8993
8998
  /* harmony import */ var fast_copy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fast-copy */ "../node_modules/fast-copy/dist/fast-copy.js");
@@ -9006,6 +9011,10 @@ var getBaseUrl = function getBaseUrl(params) {
9006
9011
  return "/spaces/".concat(params.spaceId, "/environments/").concat(params.environmentId, "/app_installations");
9007
9012
  };
9008
9013
 
9014
+ var getBaseUrlForOrgInstallations = function getBaseUrlForOrgInstallations(params) {
9015
+ return "/app_definitions/".concat(params.appDefinitionId, "/app_installations?sys.organization.sys.id[in]=").concat(params.organizationId || '');
9016
+ };
9017
+
9009
9018
  var getAppInstallationUrl = function getAppInstallationUrl(params) {
9010
9019
  return getBaseUrl(params) + "/".concat(params.appDefinitionId);
9011
9020
  };
@@ -9030,6 +9039,11 @@ var upsert = function upsert(http, params, rawData, headers) {
9030
9039
  var del = function del(http, params) {
9031
9040
  return _raw__WEBPACK_IMPORTED_MODULE_0__["del"](http, getAppInstallationUrl(params));
9032
9041
  };
9042
+ var getForOrganization = function getForOrganization(http, params) {
9043
+ return _raw__WEBPACK_IMPORTED_MODULE_0__["get"](http, getBaseUrlForOrgInstallations(params), {
9044
+ params: Object(_utils__WEBPACK_IMPORTED_MODULE_1__["normalizeSelect"])(params.query)
9045
+ });
9046
+ };
9033
9047
 
9034
9048
  /***/ }),
9035
9049
 
@@ -12691,7 +12705,7 @@ function createClient(params) {
12691
12705
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12692
12706
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
12693
12707
  var userAgent = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["getUserAgentHeader"])( // @ts-expect-error
12694
- "".concat(sdkMain, "/").concat("10.12.0"), params.application, params.integration, params.feature);
12708
+ "".concat(sdkMain, "/").concat("10.12.1"), params.application, params.integration, params.feature);
12695
12709
  var adapter = Object(_create_adapter__WEBPACK_IMPORTED_MODULE_1__["createAdapter"])(params); // Parameters<?> and ReturnType<?> only return the types of the last overload
12696
12710
  // https://github.com/microsoft/TypeScript/issues/26591
12697
12711
  // @ts-expect-error
@@ -12940,7 +12954,7 @@ function createAppDefinitionApi(makeRequest) {
12940
12954
  * accessToken: '<content_management_api_key>'
12941
12955
  * })
12942
12956
  * client.getAppDefinition('<organizationId>', '<appDefinitionId>')
12943
- * .then((appDefinition) => appDefinition.getInstallationsForOrg(<{organizationId: string, appDefinitionId: string}>))
12957
+ * .then((appDefinition) => appDefinition.getInstallationsForOrg()
12944
12958
  * .then((appInstallationsForOrg) => console.log(appInstallationsForOrg.items))
12945
12959
  * .catch(console.error)
12946
12960
  * ```
@@ -23594,6 +23608,7 @@ var createPlainClient = function createPlainClient(makeRequest, defaults, alphaF
23594
23608
  appInstallation: {
23595
23609
  get: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'AppInstallation', 'get'),
23596
23610
  getMany: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'AppInstallation', 'getMany'),
23611
+ getForOrganization: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'AppInstallation', 'getForOrganization'),
23597
23612
  upsert: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'AppInstallation', 'upsert'),
23598
23613
  delete: Object(_wrappers_wrap__WEBPACK_IMPORTED_MODULE_2__["wrap"])(wrapParams, 'AppInstallation', 'delete')
23599
23614
  },