@contentful/experiences-client 0.3.2 → 0.3.4

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,23 @@
1
+ ## 0.3.4 (2026-08-11)
2
+
3
+ ### 🚀 Features
4
+
5
+ - stop sending the alpha-feature header manually ([#131](https://github.com/contentful/experiences/pull/131))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated core to 0.7.4
10
+
11
+ ## 0.3.3 (2026-08-11)
12
+
13
+ ### 🩹 Fixes
14
+
15
+ - **deps:** update dependency @contentful/experience-delivery to v1.0.0-dev.7 ([#130](https://github.com/contentful/experiences/pull/130))
16
+
17
+ ### 🧱 Updated Dependencies
18
+
19
+ - Updated core to 0.7.3
20
+
1
21
  ## 0.3.2 (2026-08-10)
2
22
 
3
23
  ### 🧱 Updated Dependencies
@@ -1,17 +1,10 @@
1
1
  import { ContentfulViewDeliveryClient } from "@contentful/experience-delivery";
2
- import { ALPHA_FEATURE_HEADER, NEW_EXO_ENTITY_TYPES } from "./alpha-feature.js";
3
2
  function createClient(options) {
4
- const { accessToken, host, headers, ...rest } = options;
3
+ const { accessToken, host, ...rest } = options;
5
4
  return new ContentfulViewDeliveryClient({
6
5
  ...rest,
7
6
  token: accessToken,
8
- baseUrl: host,
9
- // Selects the ExO entity shapes this SDK reads (`component` /
10
- // `experienceTemplate` links). Set as a client default so direct
11
- // `client.experience.get(...)` calls get them too, not just
12
- // `fetchExperience`. A caller-supplied `headers` entry for the same key
13
- // wins, so a caller can pin a different alpha-feature set if they need to.
14
- headers: { [ALPHA_FEATURE_HEADER]: NEW_EXO_ENTITY_TYPES, ...headers }
7
+ baseUrl: host
15
8
  });
16
9
  }
17
10
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/create-client.ts"],"sourcesContent":["import { ContentfulViewDeliveryClient } from '@contentful/experience-delivery';\n\nimport { ALPHA_FEATURE_HEADER, NEW_EXO_ENTITY_TYPES } from './alpha-feature.js';\n\nexport type CreateClientOptions = {\n accessToken: string;\n /**\n * Base URL for the delivery client. Defaults to `DELIVERY_HOST` when omitted.\n * Pass `PREVIEW_HOST` for preview mode, or any custom URL (staging, proxy,\n * per-region). Both constants are exported from this package.\n */\n host?: string;\n} & Omit<ContentfulViewDeliveryClient.Options, 'token' | 'baseUrl'>;\n\nexport function createClient(options: CreateClientOptions): ContentfulViewDeliveryClient {\n const { accessToken, host, headers, ...rest } = options;\n return new ContentfulViewDeliveryClient({\n ...rest,\n token: accessToken,\n baseUrl: host,\n // Selects the ExO entity shapes this SDK reads (`component` /\n // `experienceTemplate` links). Set as a client default so direct\n // `client.experience.get(...)` calls get them too, not just\n // `fetchExperience`. A caller-supplied `headers` entry for the same key\n // wins, so a caller can pin a different alpha-feature set if they need to.\n headers: { [ALPHA_FEATURE_HEADER]: NEW_EXO_ENTITY_TYPES, ...headers },\n });\n}\n"],"mappings":"AAAA,SAAS,oCAAoC;AAE7C,SAAS,sBAAsB,4BAA4B;AAYpD,SAAS,aAAa,SAA4D;AACvF,QAAM,EAAE,aAAa,MAAM,SAAS,GAAG,KAAK,IAAI;AAChD,SAAO,IAAI,6BAA6B;AAAA,IACtC,GAAG;AAAA,IACH,OAAO;AAAA,IACP,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMT,SAAS,EAAE,CAAC,oBAAoB,GAAG,sBAAsB,GAAG,QAAQ;AAAA,EACtE,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/create-client.ts"],"sourcesContent":["import { ContentfulViewDeliveryClient } from '@contentful/experience-delivery';\n\nexport type CreateClientOptions = {\n accessToken: string;\n /**\n * Base URL for the delivery client. Defaults to `DELIVERY_HOST` when omitted.\n * Pass `PREVIEW_HOST` for preview mode, or any custom URL (staging, proxy,\n * per-region). Both constants are exported from this package.\n */\n host?: string;\n} & Omit<ContentfulViewDeliveryClient.Options, 'token' | 'baseUrl'>;\n\nexport function createClient(options: CreateClientOptions): ContentfulViewDeliveryClient {\n const { accessToken, host, ...rest } = options;\n return new ContentfulViewDeliveryClient({\n ...rest,\n token: accessToken,\n baseUrl: host,\n });\n}\n"],"mappings":"AAAA,SAAS,oCAAoC;AAYtC,SAAS,aAAa,SAA4D;AACvF,QAAM,EAAE,aAAa,MAAM,GAAG,KAAK,IAAI;AACvC,SAAO,IAAI,6BAA6B;AAAA,IACtC,GAAG;AAAA,IACH,OAAO;AAAA,IACP,SAAS;AAAA,EACX,CAAC;AACH;","names":[]}
@@ -1,5 +1,4 @@
1
1
  import { createDebugLogger, resolveExperience } from "@contentful/experiences-sdk-core";
2
- import { NEW_EXO_ENTITY_TYPES_HEADERS } from "./alpha-feature.js";
3
2
  import { createClient } from "./create-client.js";
4
3
  import { PREVIEW_HOST } from "./hosts.js";
5
4
  async function fetchExperience(experienceOptions, clientOptions, resolveOptions) {
@@ -25,13 +24,7 @@ async function fetchExperience(experienceOptions, clientOptions, resolveOptions)
25
24
  log.log("created delivery client", { preview: Boolean(preview), host: resolvedHost });
26
25
  }
27
26
  log.log("fetching experience", { spaceId, environmentId, experienceId, locale });
28
- const response = await client.experience.get(
29
- spaceId,
30
- environmentId,
31
- experienceId,
32
- { locale },
33
- { headers: NEW_EXO_ENTITY_TYPES_HEADERS }
34
- );
27
+ const response = await client.experience.get(spaceId, environmentId, experienceId, { locale });
35
28
  const payload = response;
36
29
  log.lazy("received raw payload", () => payload);
37
30
  return resolveExperience(payload, config, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/fetch-experience.ts"],"sourcesContent":["import type {\n ContentfulViewDelivery,\n ContentfulViewDeliveryClient,\n} from '@contentful/experience-delivery';\nimport { createDebugLogger, resolveExperience } from '@contentful/experiences-sdk-core';\nimport type {\n ExperiencePayload,\n PortableRenderPlan,\n ResolverConfig,\n} from '@contentful/experiences-sdk-core';\nimport { NEW_EXO_ENTITY_TYPES_HEADERS } from './alpha-feature.js';\nimport { createClient } from './create-client.js';\nimport { PREVIEW_HOST } from './hosts.js';\n\nexport type ExperienceOptions = {\n spaceId: string;\n environmentId: string;\n experienceId: string;\n locale?: string;\n};\n\nexport type ClientOptions =\n | {\n accessToken: string;\n /**\n * Preview access token. Required when calling with `preview: true`.\n */\n previewToken?: string;\n /**\n * Flip between delivery (default) and preview at request time. When\n * `true`, `fetchExperience` uses `previewToken` and the preview host;\n * when `false` or unset, it uses `accessToken` and the delivery host.\n * Ignored when a pre-made `client` is passed instead of inline creds.\n */\n preview?: boolean;\n /**\n * Custom base URL for the delivery client (staging, proxy, per-region).\n * Wins over the `preview`-derived default host — combine `host` with\n * `preview: true` to point preview mode at a non-prod endpoint.\n * Omit for the standard delivery / preview hosts.\n */\n host?: string;\n }\n | { client: ContentfulViewDeliveryClient };\n\nexport type ResolveOptions = {\n config: ResolverConfig;\n /**\n * Arbitrary per-render metadata exposed to every resolver as\n * `ctx.experience.metadata` and readable at render time via the framework\n * adapter's `useExperience()` / `getExperience()`.\n */\n metadata?: Record<string, unknown>;\n /**\n * Observability switch. When on: logs the fetch (host, ids) and the raw\n * payload here, and threads through to `resolveExperience` (resolution steps\n * + `resolveData` timings) and the renderer (visible missing-component box,\n * debug fallback). A single boolean across fetch + resolve + render.\n */\n debug?: boolean;\n /**\n * Per-request fallback viewport for server-side design pre-resolution. Pass\n * the same id you seed the renderer's `initialViewportId` with (e.g. a\n * User-Agent-derived viewport) so SSR paints correct design on first render.\n */\n initialViewportId?: string;\n};\n\nexport async function fetchExperience(\n experienceOptions: ExperienceOptions,\n clientOptions: ClientOptions,\n resolveOptions: ResolveOptions\n): Promise<PortableRenderPlan> {\n const { spaceId, environmentId, experienceId, locale } = experienceOptions;\n const { config, metadata, debug, initialViewportId } = resolveOptions;\n const log = createDebugLogger(debug, 'client');\n\n let client: ContentfulViewDeliveryClient;\n if ('client' in clientOptions) {\n client = clientOptions.client;\n log.log('using caller-supplied delivery client');\n } else {\n const { accessToken, previewToken, preview, host } = clientOptions;\n if (preview && !previewToken) {\n throw new Error(\n 'fetchExperience() called with preview: true but no previewToken was provided'\n );\n }\n const resolvedHost = host ?? (preview ? PREVIEW_HOST : undefined);\n client = createClient({\n accessToken: preview ? (previewToken as string) : accessToken,\n host: resolvedHost,\n });\n log.log('created delivery client', { preview: Boolean(preview), host: resolvedHost });\n }\n\n log.log('fetching experience', { spaceId, environmentId, experienceId, locale });\n\n // The alpha-feature header goes on the request as well as on clients built by\n // `createClient`, so a caller-supplied `{ client }` also gets the ExO entity\n // shapes this SDK reads.\n const response = await client.experience.get(\n spaceId,\n environmentId,\n experienceId,\n { locale },\n { headers: NEW_EXO_ENTITY_TYPES_HEADERS }\n );\n\n // `GetExperienceResponse` is a union of the shapes the endpoint can return;\n // the header above pins it to `HydratedExperienceView`, which is a structural\n // superset of `ExperiencePayload`.\n const payload = response as ContentfulViewDelivery.HydratedExperienceView as ExperiencePayload;\n\n log.lazy('received raw payload', () => payload);\n\n return resolveExperience(payload, config, {\n metadata,\n debug,\n initialViewportId,\n });\n}\n"],"mappings":"AAIA,SAAS,mBAAmB,yBAAyB;AAMrD,SAAS,oCAAoC;AAC7C,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAwD7B,eAAsB,gBACpB,mBACA,eACA,gBAC6B;AAC7B,QAAM,EAAE,SAAS,eAAe,cAAc,OAAO,IAAI;AACzD,QAAM,EAAE,QAAQ,UAAU,OAAO,kBAAkB,IAAI;AACvD,QAAM,MAAM,kBAAkB,OAAO,QAAQ;AAE7C,MAAI;AACJ,MAAI,YAAY,eAAe;AAC7B,aAAS,cAAc;AACvB,QAAI,IAAI,uCAAuC;AAAA,EACjD,OAAO;AACL,UAAM,EAAE,aAAa,cAAc,SAAS,KAAK,IAAI;AACrD,QAAI,WAAW,CAAC,cAAc;AAC5B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,UAAM,eAAe,SAAS,UAAU,eAAe;AACvD,aAAS,aAAa;AAAA,MACpB,aAAa,UAAW,eAA0B;AAAA,MAClD,MAAM;AAAA,IACR,CAAC;AACD,QAAI,IAAI,2BAA2B,EAAE,SAAS,QAAQ,OAAO,GAAG,MAAM,aAAa,CAAC;AAAA,EACtF;AAEA,MAAI,IAAI,uBAAuB,EAAE,SAAS,eAAe,cAAc,OAAO,CAAC;AAK/E,QAAM,WAAW,MAAM,OAAO,WAAW;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA,EAAE,OAAO;AAAA,IACT,EAAE,SAAS,6BAA6B;AAAA,EAC1C;AAKA,QAAM,UAAU;AAEhB,MAAI,KAAK,wBAAwB,MAAM,OAAO;AAE9C,SAAO,kBAAkB,SAAS,QAAQ;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/fetch-experience.ts"],"sourcesContent":["import type {\n ContentfulViewDelivery,\n ContentfulViewDeliveryClient,\n} from '@contentful/experience-delivery';\nimport { createDebugLogger, resolveExperience } from '@contentful/experiences-sdk-core';\nimport type {\n ExperiencePayload,\n PortableRenderPlan,\n ResolverConfig,\n} from '@contentful/experiences-sdk-core';\nimport { createClient } from './create-client.js';\nimport { PREVIEW_HOST } from './hosts.js';\n\nexport type ExperienceOptions = {\n spaceId: string;\n environmentId: string;\n experienceId: string;\n locale?: string;\n};\n\nexport type ClientOptions =\n | {\n accessToken: string;\n /**\n * Preview access token. Required when calling with `preview: true`.\n */\n previewToken?: string;\n /**\n * Flip between delivery (default) and preview at request time. When\n * `true`, `fetchExperience` uses `previewToken` and the preview host;\n * when `false` or unset, it uses `accessToken` and the delivery host.\n * Ignored when a pre-made `client` is passed instead of inline creds.\n */\n preview?: boolean;\n /**\n * Custom base URL for the delivery client (staging, proxy, per-region).\n * Wins over the `preview`-derived default host — combine `host` with\n * `preview: true` to point preview mode at a non-prod endpoint.\n * Omit for the standard delivery / preview hosts.\n */\n host?: string;\n }\n | { client: ContentfulViewDeliveryClient };\n\nexport type ResolveOptions = {\n config: ResolverConfig;\n /**\n * Arbitrary per-render metadata exposed to every resolver as\n * `ctx.experience.metadata` and readable at render time via the framework\n * adapter's `useExperience()` / `getExperience()`.\n */\n metadata?: Record<string, unknown>;\n /**\n * Observability switch. When on: logs the fetch (host, ids) and the raw\n * payload here, and threads through to `resolveExperience` (resolution steps\n * + `resolveData` timings) and the renderer (visible missing-component box,\n * debug fallback). A single boolean across fetch + resolve + render.\n */\n debug?: boolean;\n /**\n * Per-request fallback viewport for server-side design pre-resolution. Pass\n * the same id you seed the renderer's `initialViewportId` with (e.g. a\n * User-Agent-derived viewport) so SSR paints correct design on first render.\n */\n initialViewportId?: string;\n};\n\nexport async function fetchExperience(\n experienceOptions: ExperienceOptions,\n clientOptions: ClientOptions,\n resolveOptions: ResolveOptions\n): Promise<PortableRenderPlan> {\n const { spaceId, environmentId, experienceId, locale } = experienceOptions;\n const { config, metadata, debug, initialViewportId } = resolveOptions;\n const log = createDebugLogger(debug, 'client');\n\n let client: ContentfulViewDeliveryClient;\n if ('client' in clientOptions) {\n client = clientOptions.client;\n log.log('using caller-supplied delivery client');\n } else {\n const { accessToken, previewToken, preview, host } = clientOptions;\n if (preview && !previewToken) {\n throw new Error(\n 'fetchExperience() called with preview: true but no previewToken was provided'\n );\n }\n const resolvedHost = host ?? (preview ? PREVIEW_HOST : undefined);\n client = createClient({\n accessToken: preview ? (previewToken as string) : accessToken,\n host: resolvedHost,\n });\n log.log('created delivery client', { preview: Boolean(preview), host: resolvedHost });\n }\n\n log.log('fetching experience', { spaceId, environmentId, experienceId, locale });\n\n const response = await client.experience.get(spaceId, environmentId, experienceId, { locale });\n\n // The delivery API gates the ExO entity shapes this SDK reads (`component` /\n // `experienceTemplate` links) behind an alpha-feature header. Since\n // `@contentful/experience-delivery@1.0.0-dev.7` the client sends it on every\n // request itself, so a caller-supplied `{ client }` is covered too and we no\n // longer set it here.\n //\n // The client still types `GetExperienceResponse` as a union of every shape the\n // endpoint can return, so the narrowing stays manual. `HydratedExperienceView`\n // is a structural superset of `ExperiencePayload`.\n const payload = response as ContentfulViewDelivery.HydratedExperienceView as ExperiencePayload;\n\n log.lazy('received raw payload', () => payload);\n\n return resolveExperience(payload, config, {\n metadata,\n debug,\n initialViewportId,\n });\n}\n"],"mappings":"AAIA,SAAS,mBAAmB,yBAAyB;AAMrD,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAwD7B,eAAsB,gBACpB,mBACA,eACA,gBAC6B;AAC7B,QAAM,EAAE,SAAS,eAAe,cAAc,OAAO,IAAI;AACzD,QAAM,EAAE,QAAQ,UAAU,OAAO,kBAAkB,IAAI;AACvD,QAAM,MAAM,kBAAkB,OAAO,QAAQ;AAE7C,MAAI;AACJ,MAAI,YAAY,eAAe;AAC7B,aAAS,cAAc;AACvB,QAAI,IAAI,uCAAuC;AAAA,EACjD,OAAO;AACL,UAAM,EAAE,aAAa,cAAc,SAAS,KAAK,IAAI;AACrD,QAAI,WAAW,CAAC,cAAc;AAC5B,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AACA,UAAM,eAAe,SAAS,UAAU,eAAe;AACvD,aAAS,aAAa;AAAA,MACpB,aAAa,UAAW,eAA0B;AAAA,MAClD,MAAM;AAAA,IACR,CAAC;AACD,QAAI,IAAI,2BAA2B,EAAE,SAAS,QAAQ,OAAO,GAAG,MAAM,aAAa,CAAC;AAAA,EACtF;AAEA,MAAI,IAAI,uBAAuB,EAAE,SAAS,eAAe,cAAc,OAAO,CAAC;AAE/E,QAAM,WAAW,MAAM,OAAO,WAAW,IAAI,SAAS,eAAe,cAAc,EAAE,OAAO,CAAC;AAW7F,QAAM,UAAU;AAEhB,MAAI,KAAK,wBAAwB,MAAM,OAAO;AAE9C,SAAO,kBAAkB,SAAS,QAAQ;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { ContentfulViewDelivery } from '@contentful/experience-delivery';
2
2
  export { ContentfulViewDelivery, ContentfulViewDeliveryClient } from '@contentful/experience-delivery';
3
3
  export { CreateClientOptions, createClient } from './create-client.js';
4
- export { ALPHA_FEATURE_HEADER, NEW_EXO_ENTITY_TYPES, NEW_EXO_ENTITY_TYPES_HEADERS } from './alpha-feature.js';
5
4
  export { ClientOptions, ExperienceOptions, ResolveOptions, fetchExperience } from './fetch-experience.js';
6
5
  export { DELIVERY_HOST, PREVIEW_HOST } from './hosts.js';
7
6
  import '@contentful/experiences-sdk-core';
package/dist/index.js CHANGED
@@ -5,20 +5,12 @@ import {
5
5
  } from "@contentful/experience-delivery";
6
6
  const NotFoundError = ContentfulViewDelivery.NotFoundError;
7
7
  import { createClient } from "./create-client.js";
8
- import {
9
- ALPHA_FEATURE_HEADER,
10
- NEW_EXO_ENTITY_TYPES,
11
- NEW_EXO_ENTITY_TYPES_HEADERS
12
- } from "./alpha-feature.js";
13
8
  import { fetchExperience } from "./fetch-experience.js";
14
9
  import { DELIVERY_HOST, PREVIEW_HOST } from "./hosts.js";
15
10
  export {
16
- ALPHA_FEATURE_HEADER,
17
11
  ContentfulViewDelivery2 as ContentfulViewDelivery,
18
12
  ContentfulViewDeliveryClient,
19
13
  DELIVERY_HOST,
20
- NEW_EXO_ENTITY_TYPES,
21
- NEW_EXO_ENTITY_TYPES_HEADERS,
22
14
  NotFoundError,
23
15
  PREVIEW_HOST,
24
16
  createClient,
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 { createClient } from './create-client.js';\nexport type { CreateClientOptions } from './create-client.js';\n// Exported so customers who drive `ContentfulViewDeliveryClient` themselves and\n// call `resolveExperience` on the raw payload can select the same ExO entity\n// shapes this SDK expects. `createClient` / `fetchExperience` send it for you.\nexport {\n ALPHA_FEATURE_HEADER,\n NEW_EXO_ENTITY_TYPES,\n NEW_EXO_ENTITY_TYPES_HEADERS,\n} from './alpha-feature.js';\nexport { fetchExperience } from './fetch-experience.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,oBAAoB;AAK7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAEhC,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;\nexport type NotFoundError = InstanceType<typeof ContentfulViewDelivery.NotFoundError>;\nexport { createClient } from './create-client.js';\nexport type { CreateClientOptions } from './create-client.js';\nexport { fetchExperience } from './fetch-experience.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,oBAAoB;AAE7B,SAAS,uBAAuB;AAEhC,SAAS,eAAe,oBAAoB;","names":["ContentfulViewDelivery"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experiences-client",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Delivery client + fetchExperience for Contentful Experiences",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "directory": "packages/client"
31
31
  },
32
32
  "dependencies": {
33
- "@contentful/experience-delivery": "1.0.0-dev.6",
34
- "@contentful/experiences-sdk-core": "0.7.2"
33
+ "@contentful/experience-delivery": "1.0.0-dev.7",
34
+ "@contentful/experiences-sdk-core": "0.7.4"
35
35
  }
36
36
  }
@@ -1,6 +0,0 @@
1
- declare const ALPHA_FEATURE_HEADER = "x-contentful-enable-alpha-feature";
2
- declare const NEW_EXO_ENTITY_TYPES = "new-exo-entity-types";
3
- /** Ready-to-spread header bag selecting the ExO entity shapes this SDK reads. */
4
- declare const NEW_EXO_ENTITY_TYPES_HEADERS: Record<string, string>;
5
-
6
- export { ALPHA_FEATURE_HEADER, NEW_EXO_ENTITY_TYPES, NEW_EXO_ENTITY_TYPES_HEADERS };
@@ -1,11 +0,0 @@
1
- const ALPHA_FEATURE_HEADER = "x-contentful-enable-alpha-feature";
2
- const NEW_EXO_ENTITY_TYPES = "new-exo-entity-types";
3
- const NEW_EXO_ENTITY_TYPES_HEADERS = {
4
- [ALPHA_FEATURE_HEADER]: NEW_EXO_ENTITY_TYPES
5
- };
6
- export {
7
- ALPHA_FEATURE_HEADER,
8
- NEW_EXO_ENTITY_TYPES,
9
- NEW_EXO_ENTITY_TYPES_HEADERS
10
- };
11
- //# sourceMappingURL=alpha-feature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/alpha-feature.ts"],"sourcesContent":["/*\n * The Experience Delivery API gates the ExO entity shapes this SDK reads —\n * nodes linking `component` / `experienceTemplate`, and `sys.experienceTemplate`\n * for the page-level reference — behind an alpha-feature header. A request\n * without the header gets a different shape, which this SDK does not parse.\n *\n * The header is therefore required, not optional, and is sent from two places:\n * `createClient` sets it as a client default, and `fetchExperience` sends it\n * per request so a caller-supplied client is covered too.\n *\n * It also makes the response type unambiguous: the delivery client types\n * `GetExperienceResponse` as a union of the shapes the endpoint can return,\n * because it cannot know which header the caller sent. Sending the header is\n * what lets `fetch-experience.ts` narrow to `HydratedExperienceView`.\n */\n\nexport const ALPHA_FEATURE_HEADER = 'x-contentful-enable-alpha-feature';\n\nexport const NEW_EXO_ENTITY_TYPES = 'new-exo-entity-types';\n\n/** Ready-to-spread header bag selecting the ExO entity shapes this SDK reads. */\nexport const NEW_EXO_ENTITY_TYPES_HEADERS: Record<string, string> = {\n [ALPHA_FEATURE_HEADER]: NEW_EXO_ENTITY_TYPES,\n};\n"],"mappings":"AAgBO,MAAM,uBAAuB;AAE7B,MAAM,uBAAuB;AAG7B,MAAM,+BAAuD;AAAA,EAClE,CAAC,oBAAoB,GAAG;AAC1B;","names":[]}