contentful 11.8.13 → 11.9.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/README.md +10 -10
- package/dist/contentful.browser.js +4 -4
- package/dist/contentful.browser.min.js +1 -1
- package/dist/contentful.cjs +4 -4
- package/dist/esm/contentful.js +1 -1
- package/dist/esm/create-contentful-api.js +1 -1
- package/dist/esm/utils/timeline-preview-helpers.js +2 -2
- package/dist/stats-browser-min.html +1 -1
- package/dist/types/contentful.d.ts +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,15 +70,17 @@ JavaScript library for the Contentful [Content Delivery API](https://www.content
|
|
|
70
70
|
- [Authentication](#authentication)
|
|
71
71
|
- [Documentation \& References](#documentation--references)
|
|
72
72
|
- [Configuration](#configuration)
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
- [Request configuration options](#request-configuration-options)
|
|
74
|
+
- [Response configuration options](#response-configuration-options)
|
|
75
|
+
- [Timeline Preview](#timeline-preview)
|
|
76
|
+
- [Example](#example)
|
|
75
77
|
- [Client chain modifiers](#client-chain-modifiers)
|
|
76
78
|
- [Entries](#entries)
|
|
77
|
-
- [Example](#example)
|
|
78
|
-
- [Assets](#assets)
|
|
79
79
|
- [Example](#example-1)
|
|
80
|
-
- [
|
|
80
|
+
- [Assets](#assets)
|
|
81
81
|
- [Example](#example-2)
|
|
82
|
+
- [Sync](#sync)
|
|
83
|
+
- [Example](#example-3)
|
|
82
84
|
- [Reference documentation](#reference-documentation)
|
|
83
85
|
- [Tutorials \& other resources](#tutorials--other-resources)
|
|
84
86
|
- [Troubleshooting](#troubleshooting)
|
|
@@ -292,11 +294,9 @@ const client = contentful.createClient({
|
|
|
292
294
|
accessToken: 'preview_0b7f6x59a0',
|
|
293
295
|
host: 'preview.contentful.com',
|
|
294
296
|
// either release or timestamp or both can be passed as a valid config
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
timestamp: { lte: '2025-11-29T08:46:15Z' },
|
|
299
|
-
},
|
|
297
|
+
timelinePreview: {
|
|
298
|
+
release: { lte: 'black-friday' },
|
|
299
|
+
timestamp: { lte: '2025-11-29T08:46:15Z' },
|
|
300
300
|
},
|
|
301
301
|
})
|
|
302
302
|
```
|
|
@@ -9272,9 +9272,9 @@ var contentful = (function (exports) {
|
|
|
9272
9272
|
return hasRelease || hasTimestamp;
|
|
9273
9273
|
};
|
|
9274
9274
|
var getTimelinePreviewParams = function getTimelinePreviewParams(params) {
|
|
9275
|
-
var _a;
|
|
9275
|
+
var _a, _b;
|
|
9276
9276
|
var host = params === null || params === void 0 ? void 0 : params.host;
|
|
9277
|
-
var timelinePreview = (_a = params === null || params === void 0 ? void 0 : params.alphaFeatures) === null ||
|
|
9277
|
+
var timelinePreview = (_a = params === null || params === void 0 ? void 0 : params.timelinePreview) !== null && _a !== void 0 ? _a : (_b = params === null || params === void 0 ? void 0 : params.alphaFeatures) === null || _b === void 0 ? void 0 : _b.timelinePreview;
|
|
9278
9278
|
var enabled = checkEnableTimelinePreviewIsAllowed(host, timelinePreview);
|
|
9279
9279
|
return {
|
|
9280
9280
|
enabled: enabled,
|
|
@@ -10301,7 +10301,7 @@ var contentful = (function (exports) {
|
|
|
10301
10301
|
http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;
|
|
10302
10302
|
}
|
|
10303
10303
|
return {
|
|
10304
|
-
version: "11.
|
|
10304
|
+
version: "11.9.0",
|
|
10305
10305
|
getSpace: getSpace,
|
|
10306
10306
|
getContentType: getContentType,
|
|
10307
10307
|
getContentTypes: getContentTypes,
|
|
@@ -10430,7 +10430,7 @@ var contentful = (function (exports) {
|
|
|
10430
10430
|
environment: 'master'
|
|
10431
10431
|
};
|
|
10432
10432
|
var config = Object.assign(Object.assign({}, defaultConfig), params);
|
|
10433
|
-
var userAgentHeader = getUserAgentHeader("contentful.js/".concat("11.
|
|
10433
|
+
var userAgentHeader = getUserAgentHeader("contentful.js/".concat("11.9.0"), config.application, config.integration);
|
|
10434
10434
|
config.headers = Object.assign(Object.assign({}, config.headers), {
|
|
10435
10435
|
'Content-Type': 'application/vnd.contentful.delivery.v1+json',
|
|
10436
10436
|
'X-Contentful-User-Agent': userAgentHeader
|