// Re-export all action creators from slice modules export * from './reducers/root'; export * from './reducers/header'; export * from './reducers/checkout'; export * from './reducers/config'; export * from './reducers/toast'; // Import RTK Query APIs import { basketApi } from '../data/client/basket'; import { productApi } from '../data/client/product'; import { miscApi } from '../data/client/misc'; import { checkoutApi } from '../data/client/checkout'; import { wishlistApi } from '../data/client/wishlist'; // Create RTK Query action creators export const rtkApiActionCreators = { // RTK Query API endpoints ...Object.fromEntries( Object.entries(basketApi.endpoints).map(([key, endpoint]) => [ `api_basket_${key}`, endpoint.initiate ]) ), ...Object.fromEntries( Object.entries(productApi.endpoints).map(([key, endpoint]) => [ `api_product_${key}`, endpoint.initiate ]) ), ...Object.fromEntries( Object.entries(miscApi.endpoints).map(([key, endpoint]) => [ `api_misc_${key}`, endpoint.initiate ]) ), ...Object.fromEntries( Object.entries(checkoutApi.endpoints).map(([key, endpoint]) => [ `api_checkout_${key}`, endpoint.initiate ]) ), ...Object.fromEntries( Object.entries(wishlistApi.endpoints).map(([key, endpoint]) => [ `api_wishlist_${key}`, endpoint.initiate ]) ) } as any;