UNPKG

@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.

99 lines (98 loc) 3.99 kB
import { AppState } from '../../app'; import { GiftCardPurchase, GiftCards, RequestError, RequestStatus } from '@open-tender/types'; export interface CustomerGiftCardsState { entities: GiftCards; error: RequestError; loading: RequestStatus; lookup: { [key: number | string]: number; }; } export declare enum CustomerGiftCardsActionType { FetchCustomerGiftCards = "customer/fetchCustomerGiftCards", RemoveCustomerGiftCard = "customer/removeCustomerGiftCard", AddCustomerGiftCard = "customer/addCustomerGiftCard", AssignCustomerGiftCard = "customer/assignCustomerGiftCard", AssignCustomerGiftCardOther = "customer/assignCustomerGiftCardOther", UpdateCustomerGiftCard = "customer/updateCustomerGiftCard" } export declare const fetchCustomerGiftCards: import("@reduxjs/toolkit").AsyncThunk<GiftCards, 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 updateCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, { giftCardId: number; data: GiftCardPurchase; 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 removeCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, { giftCardId: number; 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 addCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, { data: GiftCardPurchase; 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 assignCustomerGiftCard: import("@reduxjs/toolkit").AsyncThunk<GiftCards, { cardNumber: number; 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 assignCustomerGiftCardOther: import("@reduxjs/toolkit").AsyncThunk<GiftCards, { giftCardId: number; email: string; 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 resetCustomerGiftCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"giftCards/resetCustomerGiftCards">, resetCustomerGiftCardsError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"giftCards/resetCustomerGiftCardsError">, setCustomerGiftCards: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "giftCards/setCustomerGiftCards">; export declare const selectCustomerGiftCards: (state: AppState) => CustomerGiftCardsState; export declare const customerGiftCardsReducer: import("redux").Reducer<CustomerGiftCardsState, import("redux").AnyAction>;