import { FetchStateAndError, ID } from '../../../commonStateTypes/common'; import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport'; import { InvoicingCoupon } from '../../../entity/invoicing/coupon/couponState'; import { InvoicingDiscountLifecycleActionOption, InvoicingListCounts, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload'; import { RootState } from '../../../rootStateTypes'; import { InvoicingListSort } from '../invoicingApiHelper'; import { InvoicingCouponColumnConfig, InvoicingCouponFilters, InvoicingCouponTabId } from './couponViewState'; export declare const getInvoicingCouponListItems: (state: RootState) => InvoicingCoupon[]; export declare const getInvoicingCouponListFetchState: (state: RootState) => FetchStateAndError; export declare const getInvoicingCouponListNextCursor: (state: RootState) => string | null; export declare const getInvoicingCouponListHasMore: (state: RootState) => boolean; export declare const getInvoicingCouponListFilters: (state: RootState) => InvoicingCouponFilters; export declare const getInvoicingCouponCounts: (state: RootState) => InvoicingListCounts; export interface InvoicingCouponListView extends SelectorView { activeTab: InvoicingCouponTabId; columns: InvoicingCouponColumnConfig[]; count: InvoicingListCounts; countsFetchState: FetchStateAndError; coupons: InvoicingCoupon[]; /** Config-owned; folded in so the screen reads one selector. */ discountLifecycleActionOptions: InvoicingDiscountLifecycleActionOption[]; filters: InvoicingCouponFilters; nextCursor: string | null; /** Config status/type list; the page labels tabs and badges from it. */ statusOptions: InvoicingNamedOption[]; tabIds: InvoicingCouponTabId[]; /** * The coupon whose lifecycle action is in flight, so the list disables that * row's menu without reaching into the action slice itself. */ runningActionId?: ID; sort?: InvoicingListSort; } /** * Bundled read view for the discounts list page: the denormalized coupon rows * plus list counts and their fetch states. Memoized so the `coupons` * array (and the wrapping view object) keep referential identity until the * coupon entity slice or the list-view slice actually change. */ export declare const getInvoicingCouponListView: (state: RootState) => InvoicingCouponListView;