contentful-management 11.63.0-dx-542-update-to-gha.1 → 11.63.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/README.md CHANGED
@@ -53,7 +53,6 @@
53
53
  - [Authentication](#authentication)
54
54
  - [Using ES6 import](#using-es6-import)
55
55
  - [Your first Request](#your-first-request)
56
- - [Cursor based pagination](#cursor-based-pagination)
57
56
  - [Alternative plain API](#alternative-plain-api)
58
57
  - [App Framework](#app-framework)
59
58
  - [Troubleshooting](#troubleshooting)
@@ -228,18 +227,6 @@ The benefits of using the "plain" version of the client, over the legacy version
228
227
  - The ability to scope CMA client instance to a specific `spaceId`, `environmentId`, and `organizationId` when initializing the client.
229
228
  - You can pass a concrete values to `defaults` and omit specifying these params in actual CMA methods calls.
230
229
 
231
- ## Cursor Based Pagination
232
-
233
- Cursor-based pagination is supported on collection endpoints for content types, entries, and assets. To use cursor-based pagination, pass the `cursor: true` parameter in your query:
234
-
235
- ```js
236
- const response = await environment.getEntries({ cursor: true, limit: 10 });
237
- console.log(response.items); // Array of items
238
- console.log(response.pages?.next); // Cursor for next page
239
- ```
240
-
241
- Use the value from `response.pages.next` to fetch the next page.
242
-
243
230
  ## Legacy Client Interface
244
231
 
245
232
  The following code snippet is an example of the legacy client interface, which reads and writes data as a sequence of nested requests:
@@ -5547,7 +5547,6 @@ __webpack_require__.r(__webpack_exports__);
5547
5547
  /* harmony export */ isSuccessful: function() { return /* binding */ isSuccessful; },
5548
5548
  /* harmony export */ shouldRePoll: function() { return /* binding */ shouldRePoll; },
5549
5549
  /* harmony export */ waitFor: function() { return /* binding */ waitFor; },
5550
- /* harmony export */ withOptionalCursorApi: function() { return /* binding */ withOptionalCursorApi; },
5551
5550
  /* harmony export */ wrapCollection: function() { return /* binding */ wrapCollection; },
5552
5551
  /* harmony export */ wrapCursorPaginatedCollection: function() { return /* binding */ wrapCursorPaginatedCollection; }
5553
5552
  /* harmony export */ });
@@ -5578,18 +5577,6 @@ var wrapCollection = function wrapCollection(fn) {
5578
5577
  return collectionData;
5579
5578
  };
5580
5579
  };
5581
-
5582
- /**
5583
- * @private
5584
- * Function for endpoints allowing `?cursor=true` wrapping the call
5585
- * to ensure the correct return type for cursor based pagination
5586
- * when `cursor: true`.
5587
- */
5588
- var withOptionalCursorApi = function withOptionalCursorApi(fn) {
5589
- return function (args) {
5590
- return fn.call(this, args);
5591
- };
5592
- };
5593
5580
  var wrapCursorPaginatedCollection = function wrapCursorPaginatedCollection(fn) {
5594
5581
  return function (makeRequest, data) {
5595
5582
  for (var _len2 = arguments.length, rest = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
@@ -7718,7 +7705,6 @@ __webpack_require__.r(__webpack_exports__);
7718
7705
  /* harmony import */ var _entities_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./entities/function */ "./entities/function.ts");
7719
7706
  /* harmony import */ var _entities_function_log__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./entities/function-log */ "./entities/function-log.ts");
7720
7707
  /* harmony import */ var _entities_ai_action_invocation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./entities/ai-action-invocation */ "./entities/ai-action-invocation.ts");
7721
- /* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./common-utils */ "./common-utils.ts");
7722
7708
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
7723
7709
  var _excluded = ["installationId"];
7724
7710
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -7744,7 +7730,6 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
7744
7730
 
7745
7731
 
7746
7732
 
7747
-
7748
7733
  /**
7749
7734
  * @private
7750
7735
  */
@@ -8180,7 +8165,7 @@ function createEnvironmentApi(makeRequest) {
8180
8165
  * .catch(console.error)
8181
8166
  * ```
8182
8167
  */
8183
- getContentTypes: (0,_common_utils__WEBPACK_IMPORTED_MODULE_11__.withOptionalCursorApi)(function () {
8168
+ getContentTypes: function getContentTypes() {
8184
8169
  var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8185
8170
  var raw = this.toPlainObject();
8186
8171
  return makeRequest({
@@ -8196,7 +8181,7 @@ function createEnvironmentApi(makeRequest) {
8196
8181
  }).then(function (data) {
8197
8182
  return wrapContentTypeCollection(makeRequest, data);
8198
8183
  });
8199
- }),
8184
+ },
8200
8185
  /**
8201
8186
  * Creates a Content Type
8202
8187
  * @param data - Object representation of the Content Type to be created
@@ -8438,7 +8423,7 @@ function createEnvironmentApi(makeRequest) {
8438
8423
  * .catch(console.error)
8439
8424
  * ```
8440
8425
  */
8441
- getEntries: (0,_common_utils__WEBPACK_IMPORTED_MODULE_11__.withOptionalCursorApi)(function () {
8426
+ getEntries: function getEntries() {
8442
8427
  var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8443
8428
  var raw = this.toPlainObject();
8444
8429
  return makeRequest({
@@ -8454,7 +8439,7 @@ function createEnvironmentApi(makeRequest) {
8454
8439
  }).then(function (data) {
8455
8440
  return wrapEntryCollection(makeRequest, data);
8456
8441
  });
8457
- }),
8442
+ },
8458
8443
  /**
8459
8444
  * Gets a collection of published Entries
8460
8445
  * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
@@ -8473,7 +8458,7 @@ function createEnvironmentApi(makeRequest) {
8473
8458
  * .catch(console.error)
8474
8459
  * ```
8475
8460
  */
8476
- getPublishedEntries: (0,_common_utils__WEBPACK_IMPORTED_MODULE_11__.withOptionalCursorApi)(function () {
8461
+ getPublishedEntries: function getPublishedEntries() {
8477
8462
  var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8478
8463
  var raw = this.toPlainObject();
8479
8464
  return makeRequest({
@@ -8489,7 +8474,7 @@ function createEnvironmentApi(makeRequest) {
8489
8474
  }).then(function (data) {
8490
8475
  return wrapEntryCollection(makeRequest, data);
8491
8476
  });
8492
- }),
8477
+ },
8493
8478
  /**
8494
8479
  * Creates a Entry
8495
8480
  * @param contentTypeId - The Content Type ID of the newly created Entry
@@ -8669,7 +8654,7 @@ function createEnvironmentApi(makeRequest) {
8669
8654
  * .catch(console.error)
8670
8655
  * ```
8671
8656
  */
8672
- getAssets: (0,_common_utils__WEBPACK_IMPORTED_MODULE_11__.withOptionalCursorApi)(function () {
8657
+ getAssets: function getAssets() {
8673
8658
  var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8674
8659
  var raw = this.toPlainObject();
8675
8660
  return makeRequest({
@@ -8685,7 +8670,7 @@ function createEnvironmentApi(makeRequest) {
8685
8670
  }).then(function (data) {
8686
8671
  return wrapAssetCollection(makeRequest, data);
8687
8672
  });
8688
- }),
8673
+ },
8689
8674
  /**
8690
8675
  * Gets a collection of published Assets
8691
8676
  * @param query - Object with search parameters. Check the <a href="https://www.contentful.com/developers/docs/javascript/tutorials/using-js-cda-sdk/#retrieving-entries-with-search-parameters">JS SDK tutorial</a> and the <a href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters">REST API reference</a> for more details.
@@ -8704,7 +8689,7 @@ function createEnvironmentApi(makeRequest) {
8704
8689
  * .catch(console.error)
8705
8690
  * ```
8706
8691
  */
8707
- getPublishedAssets: (0,_common_utils__WEBPACK_IMPORTED_MODULE_11__.withOptionalCursorApi)(function () {
8692
+ getPublishedAssets: function getPublishedAssets() {
8708
8693
  var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8709
8694
  var raw = this.toPlainObject();
8710
8695
  return makeRequest({
@@ -8720,7 +8705,7 @@ function createEnvironmentApi(makeRequest) {
8720
8705
  }).then(function (data) {
8721
8706
  return wrapAssetCollection(makeRequest, data);
8722
8707
  });
8723
- }),
8708
+ },
8724
8709
  /**
8725
8710
  * Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
8726
8711
  * @param data - Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
@@ -14791,6 +14776,13 @@ __webpack_require__.r(__webpack_exports__);
14791
14776
 
14792
14777
 
14793
14778
 
14779
+
14780
+ /**
14781
+ * These locations are currently restricted to internal Contentful apps only.
14782
+ * If you are interested in using these locations for your app,
14783
+ * please reach out to Contentful Support (https://www.contentful.com/support/).
14784
+ */
14785
+
14794
14786
  /**
14795
14787
  * @private
14796
14788
  * @param makeRequest - function to make requests via an adapter
@@ -29905,31 +29897,33 @@ var __webpack_exports__ = {};
29905
29897
  \**********************************/
29906
29898
  __webpack_require__.r(__webpack_exports__);
29907
29899
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
29908
- /* harmony export */ RestAdapter: function() { return /* reexport safe */ _adapters_REST_rest_adapter__WEBPACK_IMPORTED_MODULE_8__.RestAdapter; },
29909
- /* harmony export */ ScheduledActionReferenceFilters: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_10__.ScheduledActionReferenceFilters; },
29910
- /* harmony export */ WorkflowStepPermissionAction: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_10__.WorkflowStepPermissionAction; },
29911
- /* harmony export */ WorkflowStepPermissionEffect: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_10__.WorkflowStepPermissionEffect; },
29912
- /* harmony export */ WorkflowStepPermissionType: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_10__.WorkflowStepPermissionType; },
29913
- /* harmony export */ asIterator: function() { return /* reexport safe */ _plain_as_iterator__WEBPACK_IMPORTED_MODULE_5__.asIterator; },
29900
+ /* harmony export */ RestAdapter: function() { return /* reexport safe */ _adapters_REST_rest_adapter__WEBPACK_IMPORTED_MODULE_9__.RestAdapter; },
29901
+ /* harmony export */ ScheduledActionReferenceFilters: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_11__.ScheduledActionReferenceFilters; },
29902
+ /* harmony export */ ScheduledActionStatus: function() { return /* reexport safe */ _entities_scheduled_action__WEBPACK_IMPORTED_MODULE_5__.ScheduledActionStatus; },
29903
+ /* harmony export */ WorkflowStepPermissionAction: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_11__.WorkflowStepPermissionAction; },
29904
+ /* harmony export */ WorkflowStepPermissionEffect: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_11__.WorkflowStepPermissionEffect; },
29905
+ /* harmony export */ WorkflowStepPermissionType: function() { return /* reexport safe */ _export_types__WEBPACK_IMPORTED_MODULE_11__.WorkflowStepPermissionType; },
29906
+ /* harmony export */ asIterator: function() { return /* reexport safe */ _plain_as_iterator__WEBPACK_IMPORTED_MODULE_6__.asIterator; },
29914
29907
  /* harmony export */ createClient: function() { return /* binding */ createClient; },
29915
29908
  /* harmony export */ editorInterfaceDefaults: function() { return /* reexport module object */ _constants_editor_interface_defaults__WEBPACK_IMPORTED_MODULE_4__; },
29916
- /* harmony export */ fetchAll: function() { return /* reexport safe */ _plain_pagination_helper__WEBPACK_IMPORTED_MODULE_6__.fetchAll; },
29917
- /* harmony export */ isDraft: function() { return /* reexport safe */ _plain_checks__WEBPACK_IMPORTED_MODULE_7__.isDraft; },
29918
- /* harmony export */ isPublished: function() { return /* reexport safe */ _plain_checks__WEBPACK_IMPORTED_MODULE_7__.isPublished; },
29919
- /* harmony export */ isUpdated: function() { return /* reexport safe */ _plain_checks__WEBPACK_IMPORTED_MODULE_7__.isUpdated; },
29920
- /* harmony export */ makeRequest: function() { return /* reexport safe */ _adapters_REST_make_request__WEBPACK_IMPORTED_MODULE_9__.makeRequest; }
29909
+ /* harmony export */ fetchAll: function() { return /* reexport safe */ _plain_pagination_helper__WEBPACK_IMPORTED_MODULE_7__.fetchAll; },
29910
+ /* harmony export */ isDraft: function() { return /* reexport safe */ _plain_checks__WEBPACK_IMPORTED_MODULE_8__.isDraft; },
29911
+ /* harmony export */ isPublished: function() { return /* reexport safe */ _plain_checks__WEBPACK_IMPORTED_MODULE_8__.isPublished; },
29912
+ /* harmony export */ isUpdated: function() { return /* reexport safe */ _plain_checks__WEBPACK_IMPORTED_MODULE_8__.isUpdated; },
29913
+ /* harmony export */ makeRequest: function() { return /* reexport safe */ _adapters_REST_make_request__WEBPACK_IMPORTED_MODULE_10__.makeRequest; }
29921
29914
  /* harmony export */ });
29922
29915
  /* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ "../node_modules/contentful-sdk-core/dist/index.js");
29923
29916
  /* harmony import */ var _create_adapter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-adapter */ "./create-adapter.ts");
29924
29917
  /* harmony import */ var _create_contentful_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./create-contentful-api */ "./create-contentful-api.ts");
29925
29918
  /* harmony import */ var _plain_plain_client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plain/plain-client */ "./plain/plain-client.ts");
29926
29919
  /* harmony import */ var _constants_editor_interface_defaults__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants/editor-interface-defaults */ "./constants/editor-interface-defaults/index.ts");
29927
- /* harmony import */ var _plain_as_iterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./plain/as-iterator */ "./plain/as-iterator.ts");
29928
- /* harmony import */ var _plain_pagination_helper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./plain/pagination-helper */ "./plain/pagination-helper.ts");
29929
- /* harmony import */ var _plain_checks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./plain/checks */ "./plain/checks.ts");
29930
- /* harmony import */ var _adapters_REST_rest_adapter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./adapters/REST/rest-adapter */ "./adapters/REST/rest-adapter.ts");
29931
- /* harmony import */ var _adapters_REST_make_request__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./adapters/REST/make-request */ "./adapters/REST/make-request.ts");
29932
- /* harmony import */ var _export_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./export-types */ "./export-types.ts");
29920
+ /* harmony import */ var _entities_scheduled_action__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./entities/scheduled-action */ "./entities/scheduled-action.ts");
29921
+ /* harmony import */ var _plain_as_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./plain/as-iterator */ "./plain/as-iterator.ts");
29922
+ /* harmony import */ var _plain_pagination_helper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./plain/pagination-helper */ "./plain/pagination-helper.ts");
29923
+ /* harmony import */ var _plain_checks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./plain/checks */ "./plain/checks.ts");
29924
+ /* harmony import */ var _adapters_REST_rest_adapter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./adapters/REST/rest-adapter */ "./adapters/REST/rest-adapter.ts");
29925
+ /* harmony import */ var _adapters_REST_make_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./adapters/REST/make-request */ "./adapters/REST/make-request.ts");
29926
+ /* harmony import */ var _export_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./export-types */ "./export-types.ts");
29933
29927
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
29934
29928
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
29935
29929
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -29956,6 +29950,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29956
29950
 
29957
29951
 
29958
29952
 
29953
+
29954
+
29959
29955
  /**
29960
29956
  * @deprecated
29961
29957
  */
@@ -29980,7 +29976,7 @@ function createClient(params) {
29980
29976
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29981
29977
  var sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
29982
29978
  var userAgent = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(// @ts-expect-error
29983
- "".concat(sdkMain, "/").concat("11.63.0-dx-542-update-to-gha.1"), params.application, params.integration, params.feature);
29979
+ "".concat(sdkMain, "/").concat("11.63.1"), params.application, params.integration, params.feature);
29984
29980
  var adapter = (0,_create_adapter__WEBPACK_IMPORTED_MODULE_1__.createAdapter)(_objectSpread(_objectSpread({}, params), {}, {
29985
29981
  userAgent: userAgent
29986
29982
  }));