@sonic-equipment/ui 236.0.0 → 238.0.0

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/dist/index.js CHANGED
@@ -322,7 +322,7 @@ export { useFetchProductDetailsPageData } from './shared/api/bff/hooks/use-fetch
322
322
  export { useFetchProductListingPageData } from './shared/api/bff/hooks/use-fetch-product-listing-page-data.js';
323
323
  export { useFetchProductsPrices } from './shared/api/bff/hooks/use-fetch-products-prices.js';
324
324
  export { useFetchRecentlyViewedProducts } from './shared/api/bff/hooks/use-fetch-recently-viewed-products.js';
325
- export { fetchAnnouncements, fetchNavigationLinks, fetchProductDetailsPageData, fetchProductListingPageData, fetchProductsPrices, fetchRecentlyViewedProducts, patchCart, placeOrder, saveCartForLater } from './shared/api/bff/services/bff-service.js';
325
+ export { fetchAnnouncements, fetchNavigationLinks, fetchProductDetailsPageData, fetchProductListingPageData, fetchProductsPrices, fetchRecentlyViewedProducts, isNavigationLinkSource, patchCart, placeOrder, saveCartForLater } from './shared/api/bff/services/bff-service.js';
326
326
  export { useAwaitableMutation } from './shared/api/shared/hooks/use-awaitable-mutation.js';
327
327
  export { useCreateAccount } from './shared/api/storefront/hooks/account/use-create-account.js';
328
328
  export { useCreateGuestAccount } from './shared/api/storefront/hooks/account/use-create-guest-account.js';
@@ -223,6 +223,8 @@ export type ProductsPricesResponse = {
223
223
  currencyCode: CurrencyCode;
224
224
  customerPrice: ProductsPricesPrice;
225
225
  isOnSale: boolean;
226
+ originalPrice: ProductsPricesPrice;
227
+ price: ProductsPricesPrice;
226
228
  productId: UUID;
227
229
  }[];
228
230
  export {};
@@ -16,6 +16,7 @@ export interface FetchProductPageDataArgs {
16
16
  export declare function fetchProductDetailsPageData({ cultureCode, headers, ignoreCache, pageUrl, }: FetchProductPageDataArgs & APIArguments): Promise<ProductDetailsPageDataResponse>;
17
17
  export declare function fetchProductListingPageData({ cultureCode, headers, ignoreCache, pageUrl, }: FetchProductPageDataArgs & APIArguments): Promise<ProductListingPageData>;
18
18
  export type NavigationLinkSource = 'shop' | 'marketing';
19
+ export declare function isNavigationLinkSource(value: unknown): value is NavigationLinkSource;
19
20
  export interface FetchNavigationLinksArgs {
20
21
  cultureCode: CultureCode;
21
22
  source: NavigationLinkSource;
@@ -97,6 +97,9 @@ async function fetchProductListingPageData({ cultureCode, headers, ignoreCache,
97
97
  })),
98
98
  };
99
99
  }
100
+ function isNavigationLinkSource(value) {
101
+ return value === 'shop' || value === 'marketing';
102
+ }
100
103
  async function fetchNavigationLinks({ cultureCode, headers, ignoreCache, source, }) {
101
104
  const { body } = await request({
102
105
  headers: { 'Current-Language-Id': cultureCode, Source: source, ...headers },
@@ -180,4 +183,4 @@ async function saveCartForLater({ cart }) {
180
183
  return body;
181
184
  }
182
185
 
183
- export { fetchAnnouncements, fetchNavigationLinks, fetchProductDetailsPageData, fetchProductListingPageData, fetchProductsPrices, fetchRecentlyViewedProducts, patchCart, placeOrder, saveCartForLater };
186
+ export { fetchAnnouncements, fetchNavigationLinks, fetchProductDetailsPageData, fetchProductListingPageData, fetchProductsPrices, fetchRecentlyViewedProducts, isNavigationLinkSource, patchCart, placeOrder, saveCartForLater };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "236.0.0",
3
+ "version": "238.0.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {