@sonic-equipment/ui 236.0.0 → 237.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';
|
|
@@ -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 };
|