https://github.com/vtex/vtex-search-mapper
A utility library to translate form VTEX Search results to VTEX Catalog json format
https://github.com/vtex/vtex-search-mapper
Last synced: about 1 month ago
JSON representation
A utility library to translate form VTEX Search results to VTEX Catalog json format
- Host: GitHub
- URL: https://github.com/vtex/vtex-search-mapper
- Owner: vtex
- Created: 2020-11-12T17:18:14.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-01T22:25:23.000Z (over 5 years ago)
- Last Synced: 2025-10-26T06:23:03.390Z (8 months ago)
- Language: TypeScript
- Size: 201 KB
- Stars: 1
- Watchers: 15
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# vtex-search-mapper
## Usage
```
yarn add @vtex/vtex-search-mapper
```
```ts
import { convertFromBiggyProductsToCatalogApiProducts, BiggySearchResult, BiggyProduct, CatalogApiProduct } from '@vtex/vtex-search-mapper'
// ...
const biggySearchResult: BiggySearchResult = await myBiggyClientGetSearchResults(params)
const biggyProducts: BiggyProduct[] = biggySearchResult.products
const newProducts: CatalogApiProduct[] = convertFromBiggyProductsToCatalogApiProducts(biggyProducts)
```
## Developing this module
### Setup
```
yarn
```
### Run tests
```
yarn test
```
### Develop tests in watch mode
```
yarn jest
```
### Link this app to other module and develop changes
On this project:
```
yarn link
```
To watch changes locally:
```
yarn watch
```
On the other project:
```
yarn link @vtex/vtex-search-mapper
```
Then any changes you make on this project will reflect on the project that uses it
## Release
To release new versions use semver pattern and follow the next commands to choose how to release this package on npm
### Patch version
```
yarn release
```
### Minor version
```
yarn release-minor
```
### Patch version
```
yarn release-patch
```