Skip to main content

Type Alias: SaveFavouriteConfiguration()

SaveFavouriteConfiguration: (configurationCode, favouriteCollectionIds) => Promise<boolean>

Update favourite configuration (only for regular products). Retrieves favourite collections from store, filters exisitng favourite collection state (if exists) and updates it selectively (removes redundant items and puts the new ones). Posts data (favourites toPut and toDelete ) to favoriteService /update-favourite-in-configurator endpoint. Calls internally getFavouriteItems() function ro update app state

Parameters

configurationCode: string

Configuration code to update

favouriteCollectionIds: string[]

Favourite collection ids

Returns

Promise<boolean>

If true save was successful

Fires

@mimeeq#mimeeq-favourites-remove-product

Fires

@mimeeq#mimeeq-favourites-add-product