@open-tender/cloud
Version:
A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.
103 lines (102 loc) • 5.14 kB
TypeScript
import { AppState } from '../app';
import { Allergens, AllergenLookupEnhanced, RequestError, RequestStatus } from '@open-tender/types';
export interface AllergensState {
entities: Allergens;
error: RequestError;
loading: RequestStatus;
selectedAllergens: Allergens | null;
lookup: AllergenLookupEnhanced;
}
export declare enum AllergensActionType {
FetchAllergens = "allergens/fetchAllergens"
}
export interface AllergensPayload {
data: Allergens;
lookup: AllergenLookupEnhanced;
}
export declare const fetchAllergens: import("@reduxjs/toolkit").AsyncThunk<AllergensPayload, void, {
state: AppState;
rejectValue: RequestError;
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
extra?: unknown;
serializedErrorType?: unknown;
pendingMeta?: unknown;
fulfilledMeta?: unknown;
rejectedMeta?: unknown;
}>;
export declare const resetAllergens: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"allergens/resetAllergens">, setSelectedAllergens: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "allergens/setSelectedAllergens">;
export declare const selectAllergens: (state: AppState) => AllergensState;
export declare const selectSelectedAllergens: (state: AppState) => Allergens | null;
export declare const selectSelectedAllergenNames: ((state: import("redux").EmptyObject & {
alerts: import("@open-tender/types").Alerts;
allergens: AllergensState;
announcements: import("./announcements").AnnouncementsState;
checkout: import("./checkout").CheckoutState;
completedOrders: import("./completedOrders").CompletedOrdersState;
config: import("./config").ConfigState;
confirmation: import("./confirmation").ConfirmationState;
customer: import("redux").CombinedState<{
account: import("./customer").AccountState;
communicationPreferences: import("./customer").CustomerCommunicationPrefsState;
creditCards: import("./customer").CustomerCreditCardsState;
allergens: import("./customer").CustomerAllergensState;
addresses: import("./customer").CustomerAddressesState;
favorites: import("./customer").CustomerFavoritesState;
fcmToken: import("./customer").CustomerFcmTokenState;
giftCards: import("./customer").CustomerGiftCardsState;
groupOrders: import("./customer").CustomerGroupOrdersState;
history: import("./customer").CustomerHistoryState;
houseAccounts: import("./customer").CustomerHouseAccountsState;
loyalty: import("./customer").CustomerLoyaltyState;
order: import("./customer").CustomerOrderState;
orders: import("./customer").CustomerOrdersState;
pointsShop: import("./customer").PointsShopState;
tplsPointsShop: import("./customer").TplsPointsShopState;
qrcode: import("./customer").CustomerQRCodeState;
rewards: import("./customer").CustomerRewardsState;
thanx: import("./customer").CustomerThanxState;
tpls: import("./customer").CustomerTplsState;
}>;
deals: import("./deals").DealsState;
donations: import("./donations").DonationState;
geolocation: import("./geolocation").GeoLocationState;
giftCards: import("./giftCards").GiftCardsState;
groupOrder: import("./groupOrder").GroupOrderState;
guest: import("./guest").GuestState;
loader: import("./loader").LoaderState;
menu: import("./menu").MenuState;
menuDisplay: import("./menuDisplay").MenuDisplayState;
menuItems: import("./menuItems").MenuItemsState;
modal: import("@open-tender/types").Modal;
misc: import("./misc").MiscState;
nav: import("./nav").NavState;
navSite: import("./navSite").NavSiteState;
notifications: import("@open-tender/types").Notifications;
oneTimePasscode: import("./oneTimePasscode").OneTimePasscodeState;
order: import("./order").OrderState;
orderFulfillment: import("./orderFulfillment").OrderFulfillmentState;
orderRating: import("./orderRating").OrderRatingState;
posts: import("./posts").PostsSlice;
pushNotifications: import("./pushNotifications").PushNotificationsState;
qr: import("./qr").QrState;
quote: import("./quote").QuoteState;
resetPassword: import("./resetPassword").ResetPasswordState;
revenueCenters: import("./revenueCenters").RevenueCentersState;
rewardCode: import("./rewardCode").RewardCodeState;
sidebar: import("./sidebar").SidebarState;
sidebarModal: import("./sidebarModal").SidebarModalState;
signUp: import("./signUp").SignUpState;
tags: import("./tags").TagsState;
terms: import("./terms").TermsSlice;
Unsubscribe: import("./unsubscribe").UnsubscribeState;
validTimes: import("./validTimes").ValidTimesState;
verifyAccount: import("./verifyAccount").VerifyAccountState;
}) => string[]) & import("reselect").OutputSelectorFields<(args_0: {
allergens: Allergens;
selectedAllergens: Allergens | null;
}) => string[], {
clearCache: () => void;
}> & {
clearCache: () => void;
};
export declare const allergensReducer: import("redux").Reducer<AllergensState, import("redux").AnyAction>;