Vue Storefront is now Alokai! Learn More
@vsf-enterprise/bloomreach-content-api

@vsf-enterprise/bloomreach-content-api

2.1.0

Minor Changes

  • ADDED Added a unified normalizePage endpoint.

2.1.0-rc.0

Minor Changes

  • ADDED Added a unified normalizePage endpoint.

2.0.0

Major Changes

CHANGED

  • Update @vue-storefront/middleware to ^5.1.0
  • Update @vue-storefront/unified-data-model to ^3.0.0

1.3.0

Minor Changes

  • CHANGED The non-unified getPage() API method now supports the maxRefLevel parameter allowing to increase the maximum content item reference depth level.
const page = await sdk.cms.getPage({
  maxRefLevel: 4,
});
  • CHANGED The non-unified getPage() API method now supports passing Experience Manager authorization token through a new token property, with the existing previewToken property serving as an alias going forward.
const page = await sdk.cms.getPage({
  token: "XYZ" // valid, takes precedence
  previewToken: "XYZ" // also valid
});
  • CHANGED The searchParams parameter of the unified getPage() API method now has a more precise interface listing expected token, previewToken, endpoint and maxRefLevel properties.
const page = await sdk.unifiedCms.getPage({
  searchParams: {
    token: "XYZ",
    endpoint:
      "https://vuestorefront.bloomreach.io/delivery/site/v1/channels/en/pages",
    maxRefLevel: 4,
  },
});

1.2.2

Patch Changes

  • CHANGED Refactored resolving non-unified getPage() request url when endpoint param is provided.

1.2.1

Patch Changes

  • Updated dependencies:
    • @vsf-enterprise/cms-components-utils@2.0.0

1.2.0

Minor Changes

  • ADDED a new endpoint parameter to the default (non-unified) getPage() API method. When passed, it overwrites the URL constructed from channel and path parameters.

1.1.1

Patch Changes

  • FIXED RegExp path matching in resolvePages.

1.1.0

Minor Changes

  • ADDED Unified extension which allows fetching data from Bloomreach Content and extracting components. The extension is available at the /unified namespace and adds a new getPage endpoint.

To use the extension on the Storefront side:

  1. Export extension types in the storefront-middleware/types.ts file:
+ export type { UnifiedEndpoints as UnifiedCmsEndpoints } from '@vsf-enterprise/bloomreach-content-api';
  1. In the SDK config, add a new middlewareModule:
+ import type { UnifiedCmsEndpoints } from 'storefront-middleware/types';

+ unifiedCms: buildModule(middlewareModule<UnifiedCmsEndpoints>, {
+   apiUrl: `${config.middlewareUrl}/bloomreach-content/unified`,
+   defaultRequestConfig: {
+     headers: getRequestHeaders(),
+   },
+ }),
  // ...
  1. In your page component, use the getPage method to fetch the page data:
const page = await sdk.unifiedCms.getPage({
  path: "/",
  locale: "en",
});

All components are extracted, so you don't need to use the extractComponent utility from amplienceModule anymore.