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.

36 lines (35 loc) 1.5 kB
import { AppState } from '../../app'; import { Discount, Discounts, RequestError, RequestStatus } from '@open-tender/types'; export interface PointsShopState { entities: Discounts; data: Discount | null; error: RequestError; loading: RequestStatus; } export declare enum PointsShopActionType { FetchPointsShop = "pointsShop/fetchPointsShop", ExchangePointsShopReward = "pointsShop/exchangePointsShopReward" } export declare const fetchPointsShop: import("@reduxjs/toolkit").AsyncThunk<Discounts, 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 exchangePointsShopReward: import("@reduxjs/toolkit").AsyncThunk<Discounts, string, { 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 resetPointsShop: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"pointsShop/resetPointsShop">; export declare const selectPointsShop: (state: AppState) => PointsShopState; export declare const pointsShopReducer: import("redux").Reducer<PointsShopState, import("redux").AnyAction>;