@contentful/experiences-client 0.4.3 → 0.4.5

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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 0.4.5 (2026-09-21)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated core to 0.8.4
6
+
7
+ ## 0.4.4 (2026-09-21)
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **client:** publish websocket host export [SPA-5290] ([#197](https://github.com/contentful/experiences/pull/197))
12
+
1
13
  ## 0.4.3 (2026-09-11)
2
14
 
3
15
  ### 🧱 Updated Dependencies
package/README.md CHANGED
@@ -97,15 +97,16 @@ const customClient = createClient({
97
97
  });
98
98
  ```
99
99
 
100
- #### `DELIVERY_HOST` / `PREVIEW_HOST`
100
+ #### `DELIVERY_HOST` / `PREVIEW_HOST` / `PREVIEW_WEBSOCKET_HOST`
101
101
 
102
- Named constants for the canonical XDA delivery and preview URLs. Use them so you don't have to hardcode the URL strings in your app.
102
+ Named constants for the canonical delivery, preview, and Preview Session WebSocket URLs. Use them so you don't have to hardcode the URL strings in your app.
103
103
 
104
104
  ```ts
105
- import { DELIVERY_HOST, PREVIEW_HOST } from '@contentful/experiences-react';
105
+ import { DELIVERY_HOST, PREVIEW_HOST, PREVIEW_WEBSOCKET_HOST } from '@contentful/experiences-react';
106
106
 
107
107
  DELIVERY_HOST; // 'https://xdn.contentful.com'
108
108
  PREVIEW_HOST; // 'https://preview.xdn.contentful.com'
109
+ PREVIEW_WEBSOCKET_HOST; // 'wss://preview.xdn.contentful.com'
109
110
  ```
110
111
 
111
112
  `createClient` is the fixed-mode path — one client, one token, one host. If you need to flip between delivery and preview per request (e.g. an `isPreview` URL param), use `fetchExperience`'s inline-credentials form with `preview: boolean` instead of pre-building a client here. See ["Preview mode"](#preview-mode) above.
package/dist/hosts.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  declare const DELIVERY_HOST = "https://xdn.contentful.com";
2
2
  declare const PREVIEW_HOST = "https://preview.xdn.contentful.com";
3
+ declare const PREVIEW_WEBSOCKET_HOST = "wss://preview.xdn.contentful.com";
3
4
 
4
- export { DELIVERY_HOST, PREVIEW_HOST };
5
+ export { DELIVERY_HOST, PREVIEW_HOST, PREVIEW_WEBSOCKET_HOST };
package/dist/hosts.js CHANGED
@@ -1,7 +1,9 @@
1
1
  const DELIVERY_HOST = "https://xdn.contentful.com";
2
2
  const PREVIEW_HOST = "https://preview.xdn.contentful.com";
3
+ const PREVIEW_WEBSOCKET_HOST = "wss://preview.xdn.contentful.com";
3
4
  export {
4
5
  DELIVERY_HOST,
5
- PREVIEW_HOST
6
+ PREVIEW_HOST,
7
+ PREVIEW_WEBSOCKET_HOST
6
8
  };
7
9
  //# sourceMappingURL=hosts.js.map
package/dist/hosts.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hosts.ts"],"sourcesContent":["export const DELIVERY_HOST = 'https://xdn.contentful.com';\nexport const PREVIEW_HOST = 'https://preview.xdn.contentful.com';\n"],"mappings":"AAAO,MAAM,gBAAgB;AACtB,MAAM,eAAe;","names":[]}
1
+ {"version":3,"sources":["../src/hosts.ts"],"sourcesContent":["export const DELIVERY_HOST = 'https://xdn.contentful.com';\nexport const PREVIEW_HOST = 'https://preview.xdn.contentful.com';\nexport const PREVIEW_WEBSOCKET_HOST = 'wss://preview.xdn.contentful.com';\n"],"mappings":"AAAO,MAAM,gBAAgB;AACtB,MAAM,eAAe;AACrB,MAAM,yBAAyB;","names":[]}
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { ExperienceFetchError } from './errors.js';
4
4
  export { CreateClientOptions, createClient } from './create-client.js';
5
5
  export { ClientOptions, ExperienceOptions, ResolveOptions, fetchExperience } from './fetch-experience.js';
6
6
  export { ExperienceResponse, readSourceMap, toExperiencePayload } from './to-experience-payload.js';
7
- export { DELIVERY_HOST, PREVIEW_HOST } from './hosts.js';
7
+ export { DELIVERY_HOST, PREVIEW_HOST, PREVIEW_WEBSOCKET_HOST } from './hosts.js';
8
8
  import '@contentful/experiences-sdk-core';
9
9
 
10
10
  declare const NotFoundError: typeof ContentfulViewDelivery.NotFoundError;
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { ExperienceFetchError } from "./errors.js";
8
8
  import { createClient } from "./create-client.js";
9
9
  import { fetchExperience } from "./fetch-experience.js";
10
10
  import { readSourceMap, toExperiencePayload } from "./to-experience-payload.js";
11
- import { DELIVERY_HOST, PREVIEW_HOST } from "./hosts.js";
11
+ import { DELIVERY_HOST, PREVIEW_HOST, PREVIEW_WEBSOCKET_HOST } from "./hosts.js";
12
12
  export {
13
13
  ContentfulViewDelivery2 as ContentfulViewDelivery,
14
14
  ContentfulViewDeliveryClient,
@@ -16,6 +16,7 @@ export {
16
16
  ExperienceFetchError,
17
17
  NotFoundError,
18
18
  PREVIEW_HOST,
19
+ PREVIEW_WEBSOCKET_HOST,
19
20
  createClient,
20
21
  fetchExperience,
21
22
  readSourceMap,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ContentfulViewDelivery } from '@contentful/experience-delivery';\n\nexport {\n ContentfulViewDelivery,\n ContentfulViewDeliveryClient,\n} from '@contentful/experience-delivery';\nexport const NotFoundError = ContentfulViewDelivery.NotFoundError;\nexport type NotFoundError = InstanceType<typeof ContentfulViewDelivery.NotFoundError>;\nexport { ExperienceFetchError } from './errors.js';\nexport { createClient } from './create-client.js';\nexport type { CreateClientOptions } from './create-client.js';\nexport { fetchExperience } from './fetch-experience.js';\nexport { readSourceMap, toExperiencePayload } from './to-experience-payload.js';\nexport type { ExperienceResponse } from './to-experience-payload.js';\nexport type { ExperienceOptions, ClientOptions, ResolveOptions } from './fetch-experience.js';\nexport { DELIVERY_HOST, PREVIEW_HOST } from './hosts.js';\n"],"mappings":"AAAA,SAAS,8BAA8B;AAEvC;AAAA,EACE,0BAAAA;AAAA,EACA;AAAA,OACK;AACA,MAAM,gBAAgB,uBAAuB;AAEpD,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAE7B,SAAS,uBAAuB;AAChC,SAAS,eAAe,2BAA2B;AAGnD,SAAS,eAAe,oBAAoB;","names":["ContentfulViewDelivery"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { ContentfulViewDelivery } from '@contentful/experience-delivery';\n\nexport {\n ContentfulViewDelivery,\n ContentfulViewDeliveryClient,\n} from '@contentful/experience-delivery';\nexport const NotFoundError = ContentfulViewDelivery.NotFoundError;\n// eslint-disable-next-line no-redeclare -- value + type share a name across separate TS namespaces, not a real redeclaration\nexport type NotFoundError = InstanceType<typeof ContentfulViewDelivery.NotFoundError>;\nexport { ExperienceFetchError } from './errors.js';\nexport { createClient } from './create-client.js';\nexport type { CreateClientOptions } from './create-client.js';\nexport { fetchExperience } from './fetch-experience.js';\nexport { readSourceMap, toExperiencePayload } from './to-experience-payload.js';\nexport type { ExperienceResponse } from './to-experience-payload.js';\nexport type { ExperienceOptions, ClientOptions, ResolveOptions } from './fetch-experience.js';\nexport { DELIVERY_HOST, PREVIEW_HOST, PREVIEW_WEBSOCKET_HOST } from './hosts.js';\n"],"mappings":"AAAA,SAAS,8BAA8B;AAEvC;AAAA,EACE,0BAAAA;AAAA,EACA;AAAA,OACK;AACA,MAAM,gBAAgB,uBAAuB;AAGpD,SAAS,4BAA4B;AACrC,SAAS,oBAAoB;AAE7B,SAAS,uBAAuB;AAChC,SAAS,eAAe,2BAA2B;AAGnD,SAAS,eAAe,cAAc,8BAA8B;","names":["ContentfulViewDelivery"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experiences-client",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Delivery client + fetchExperience for Contentful Experiences",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,6 +31,6 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@contentful/experience-delivery": "1.0.0-dev.7",
34
- "@contentful/experiences-sdk-core": "0.8.3"
34
+ "@contentful/experiences-sdk-core": "0.8.4"
35
35
  }
36
36
  }