import type { DetailedRaffle } from './types/raffles.types.js'; import type { Raffle, RaffleParticipation, RafflesQuery } from '@farfetch/blackout-client'; import type { StoreState } from '../types/storeState.types.js'; /** * Returns all raffles from state that might have been loaded by different * fetch raffles requests. If you want the raffles for a specific fetch raffles * request, use the `getRafflesResult` selector instead. * * @param state - Application state * * @returns All Raffle entities in the state. */ export declare const getRaffles: (state: StoreState) => Raffle[]; /** * Returns the result for a specific fetch raffles request. * * @param state - Application state * @param query - Query parameters used on the request. * * @returns - All raffles for a specific fetch request, if any. */ export declare const getRafflesResult: (state: StoreState, query?: RafflesQuery) => Raffle[] | undefined; /** * Returns a specific raffle by its id. * * @param state - Application state. * @param raffleId - Id of the raffle to get. * * @returns Raffle entity or undefined if not found. */ export declare const getRaffle: (state: StoreState, raffleId: Raffle['id']) => Raffle | undefined; /** * Returns the estimation for a raffle. * * @param state - Application state * @param raffleId - Id of the raffle to get estimation from. * * @returns The raffle estimation if it exists. */ export declare const getRaffleEstimation: (state: StoreState, raffleId: Raffle['id']) => import("@farfetch/blackout-client").RaffleEstimation | undefined; /** * Returns a raffle participation. * * @param state - Application state * @param participationId - Id of the raffle participation to get. * * @returns The raffle participation if found, otherwise undefined. */ export declare const getRaffleParticipation: (state: StoreState, participationId: RaffleParticipation['id']) => RaffleParticipation | undefined; /** * Returns the participation for a specific raffle. * * @param state - Application state * @param raffleId - Id of the raffle to get the participation from. * * @returns The participation for the raffle if found, otherwise undefined. */ export declare const getRaffleParticipationForRaffle: (state: StoreState, raffleId: Raffle['id']) => RaffleParticipation | undefined; /** * Returns a raffle with estimation and participation details. * * @param state - Application state. * @param raffleId - Id of the raffle to get the details from. * * @returns A raffle entity enhanced with an estimation and/or a participation entities if found. */ export declare const getDetailedRaffle: (state: StoreState, raffleId: Raffle['id']) => DetailedRaffle | undefined; /** * Returns the loading status for a specific fetch raffles request. * * @param state - Application state. * @param query - Query parameters used on the request. * * @returns Boolean indicating if the request is loading or not. */ export declare const areRafflesLoading: (state: StoreState, query?: RafflesQuery) => boolean; /** * Returns the error for a specific fetch raffles request. * * @param state - Application state. * @param query - Query parameters used on the request. * * @returns The error for the fetch raffles request, if any. */ export declare const getRafflesError: (state: StoreState, query?: RafflesQuery) => import("@farfetch/blackout-client").BlackoutError | null | undefined; /** * Return the loading status for the fetch request of a specific raffle. * * @param state - Application state. * @param raffleId - Id of the raffle to get the loading status. * * @returns Boolean indicating if the request is loading or not. */ export declare const isRaffleLoading: (state: StoreState, raffleId: Raffle['id']) => boolean; /** * Returns the error for the fetch request of a specific raffle. * * @param state - Application state. * @param raffleId - Id of the raffle to get the error. * * @returns Error for the fetch raffle request, if any. */ export declare const getRaffleError: (state: StoreState, raffleId: Raffle['id']) => import("@farfetch/blackout-client").BlackoutError | null | undefined; /** * Returns the loading status for the fetch estimation request of a specific raffle. * * @param state - Application state. * @param raffleId - Id of the raffle to get the loading estimation status. * * @returns Boolean indicating if the request is loading or not. */ export declare const isRaffleEstimationLoading: (state: StoreState, raffleId: Raffle['id']) => boolean; /** * Returns the error for the fetch estimation request of a specific raffle. * * @param state - Application state. * @param raffleId - Id of the raffle to get the error. * * @returns Error for the fetch raffle estimation request, if any. */ export declare const getRaffleEstimationError: (state: StoreState, raffleId: Raffle['id']) => import("@farfetch/blackout-client").BlackoutError | null | undefined; /** * Returns the loading status for the fetch request of a specific raffle participation. * * @param state - Application state. * @param participationId - Id of the raffle participation to get the loading status. * * @returns Boolean indicating if the request is loading or not. */ export declare const isRaffleParticipationLoading: (state: StoreState, participationId: RaffleParticipation['id']) => boolean; /** * Returns the error for the fetch request of a specific raffle participation. * * @param state - Application state. * @param participationId - Id of the raffle participation to get the error. * * @returns Error for the fetch raffle participation request, if any. */ export declare const getRaffleParticipationError: (state: StoreState, participationId: RaffleParticipation['id']) => import("@farfetch/blackout-client").BlackoutError | null | undefined; /** * Returns the loading status for the create participation request for a specific raffle. * * @param state - Application state. * @param raffleId - Id of the raffle to get the loading status. * * @returns Boolean indicating if the request is loading or not. */ export declare const isRaffleParticipationCreationLoading: (state: StoreState, raffleId: Raffle['id']) => boolean; /** * Returns the error for the create participation request for a specific raffle. * * @param state - Application state. * @param raffleId - Id of the raffle to get the create participation error. * * @returns Error for the create raffle participation, if any. */ export declare const getRaffleParticipationCreationError: (state: StoreState, raffleId: Raffle['id']) => import("@farfetch/blackout-client").BlackoutError | null | undefined;