@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.
28 lines (27 loc) • 1.14 kB
TypeScript
import { AppState } from '../app';
import { GiftCardsPurchase, GiftCardsPurchased, RequestError, RequestStatus } from '@open-tender/types';
export interface GiftCardsState {
loading: RequestStatus;
error: RequestError;
success: boolean;
giftCards: GiftCardsPurchased;
}
export declare enum GiftCardsActionType {
PurchaseGiftCards = "giftCards/purchaseGiftCards"
}
export declare const purchaseGiftCards: import("@reduxjs/toolkit").AsyncThunk<GiftCardsPurchased, {
data: GiftCardsPurchase;
callback?: (() => void) | undefined;
}, {
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 resetGiftCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"giftCards/resetGiftCards">;
export declare const selectGiftCards: (state: AppState) => GiftCardsState;
export declare const giftCardsReducer: import("redux").Reducer<GiftCardsState, import("redux").AnyAction>;