/** * Discount Code Cache utilities * * Convenience wrappers around the shared cache helpers used across modules. * These helpers are intentionally small: callers in the UI layer expect * simple, well-typed functions such as `getCachedDiscountCodes` and * `invalidateDiscountCodeCache`. * * Usage examples: * - `await getCachedDiscountCodes({ params: { page: 1 } })` * - `invalidateDiscountCodeCache()` after a successful create/update/delete */ import { DiscountCodeBE } from "../../type"; /** Synchronous access to cached discount codes (localStorage) */ export declare const getCachedDiscountCodesSync: () => import("@react-pakistan/util-functions/general/generic-cache").ListResponse; /** Fetch cached list (may call network if cache miss or stale) */ export declare const getCachedDiscountCodes: ({ params, }: { params: Record; }) => Promise>; /** Get a single discount code from the cache by id */ export declare const getCachedDiscountCodeById: (discountCodeId: string) => DiscountCodeBE | null; /** Remove discount-code cache entries (used after writes) */ export declare const invalidateDiscountCodeCache: () => void; /** Preload discount codes into cache (useful during bootstrap) */ export declare const preloadDiscountCodes: () => Promise>; /** Utility to check if the discount codes cache is stale */ export declare const isDiscountCodesCacheStale: () => boolean;