Dependency | Version | Notes |
---|---|---|
v16.13 | [ ] TODO Upgrade to LTS | |
v4.8.3 | Version @latest | |
v8.18 | [ ] TODO Upgrade to LTS | |
v3.2.2 | Version @latest | |
v2.75.5 | NOTE - Upgrade to LTS will introduce breaking changes |
This library provides a simplified access to the following Bloomreach APIs:
Simple and relatable APIs mean that designers and developers are free choose a front end and user experience that meets their needs.
The APIs are broken up into individual functions & calls to ensure that each API does one thing, and does it well.
To assist developers with their implementation, there is a basic example of a client-side implementation using React / Preact that can be built / loaded locally from a package located in packages/frontend/react-custom
To assist developers with their implementation of Bloomreach Experience Manager Widgets, there is a basic example of a client-side implementation using VanillaJS / Typescript that can be built / loaded locally from a package located in packages/frontend/vanilla-js
Version: 16.13.1
Click Here to view documentation
The preferred way to manage Yarn is through Corepack, a new binary shipped with all Node.js releases starting from 16.10. It acts as an intermediary between you and Yarn, and lets you use different package manager versions across multiple projects without having to check-in the Yarn binary anymore.
Click Here to view documentation
Version: 3.2.1
Click Here to view documentation
- SDK can be downloaded from npm.js using the following command, and should be installed as a
dependency
in the package.json, NOT adevDependency
yarn -i @bloomreach/discovery-sdk
- Install dependencies from root directory
yarn install
Click Here to view the Workspace
SKD foundational language
Click Here to view documentation
Primary coding language, utilizing ES6+
Click Here to view documentation
Code quality checks & enforcement Click Here to view documentation
Click Here to view documentation
Provide a lightweight and modern set of API packages that will provide developers easy to implement APIs that utilize the modern features of...
- Node.js
- Typescript
- Fetch API
- Effective Browser support for client-side calls
- Native Typescript support, and does not require incremental packages or dependencies
- Support for sync and async capabilities
- Native Node.js support for v16+
- NOTE...Node.js LTS version will be 18 as of August 2022
The API modules are built using custom rollup.js configurations, and will output the following formats...
- ES: ES Module file
- UMD: Universal module definition file file
- CJS: CommonJS file
Install the SDK Monorepo by running yarn install
from the project's parent directory
- Navigate to the path
./packages/api-client
- Run command
yarn build
Run command . ./cleanup.sh
which will access a custom script which will delete all of node_modules directories, which can be helpful when updating / modifying dependencies.
Primary code quality utility that utilizes a variety of plugins to provide resources such as...
- Code formatting
- Coding standard enforcement
- Best Practices Enforcement
- Type checking
Provides a utility that checks and provides an HTML reportof the the explicit type coverage for the various projects and files.
The configurations for the type coverage can be found in the package.json
for each module.
The audit command submits a description of the dependencies configured in your project to your default registry and asks for a report of known vulnerabilities. If any vulnerabilities are found, then the impact and appropriate remediation will be calculated.
Can be run utilizing command yarn npm audit --recursive
- By default, the response includes a maximum of 8 products.
- Keyword suggestions are in the
querySuggestions
field - Product suggestions are in the
searchSuggestions
field.
The SDK provides a function, escapeSpecialCharacters()
, that can be used to escape special characters from the search input.
The SDK provides a function, generateRequestID()
, that can be used to generate the recommended 13 character randomized / unique parameter request_id
See API documentation for more info on the request_id
The SDK provides a function, extractTrackingCookie()
, that can be used to check for the presence of the _br_uid_2
cookie, and if one is not found, the function will return the default value provided in the API Documentation
The SDK provides a function, debounce()
that can be called to set a delay to call the real time Autosuggest API
Click Here for a brief overview on using Debounce
The /dist stands for distributable. The /dist folder contains the minimized version of the source code. The code present in the /dist folder is actually the code which is used on production web applications.
The lib folder is what package. json main points to, and users that install your package using npm will consume that directly.
Each of the APIs can be included in a project via the SDK, but note EACH API is individually version controlled to allow for optimal flexibility of development & release.