import type { Review, ReviewListFilters, ReviewsProductProps, ReviewsProductState, ReviewsState } from '../types/reviews'; export * from './reviewSettings'; export * from './reviewSummary'; export * from './ownReviewVotes'; type AuthorState = { user: { login?: { isLoggedIn?: boolean; } | null; data?: { firstName?: string; lastName?: string; } | null; }; }; /** * Retrieves the reviews collection which contains all reviews data. * @param state The current application state. * @returns The reviews collection stored as reviewId => review pairs. */ export declare const getReviews: ((state: ReviewsState) => import("../types/reviews").ReviewsById) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsSliceState) => import("../types/reviews").ReviewsById, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the number of reviews for a product * @param state The current application state. * @returns The total review count for a product */ export declare const getProductReviewCount: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => number | null) & import("reselect").OutputSelectorFields<(args_0: string | null, args_1: import("../types/reviews").ReviewsByProductId) => number | null, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the total number of reviews for a current product. * @param state The current application state. * @returns The total number of reviews. */ export declare const getReviewsTotalCount: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => number | null) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => number | null, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the total number of currently fetched reviews for a current product. * @param state The current application state. * @returns The current number of fetched reviews. */ export declare const getCurrentReviewCount: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => number | null) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => number | null, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the sort of the last review list request of the current base product. * @param state The current application state. * @returns The sort, or the default sort when the list was not requested yet. */ export declare const getReviewListSort: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => string) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => string, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the filters of the last review list request of the current base product. * @param state The current application state. * @returns The active filters; empty when the list is unfiltered or was not requested yet. */ export declare const getReviewListFilters: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => ReviewListFilters) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => ReviewListFilters, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the last request asked for the first page of another sort or filter than the stored * reviews were loaded with. The stored reviews then do not belong to the requested list. * @param state The current application state. * @returns True from the request until its reviews were received, also after it failed. */ export declare const isReviewListQueryChanged: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the review list of the current base product has a further page. * @param state The current application state. * @returns True when the provider returned a cursor for the next page or, with offset * pagination, fewer reviews are loaded than the list contains. */ export declare const hasMoreReviews: ((state: ReviewsState & { product: unknown; } & import("../types/reviewSettings").ReviewSettingsState, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null, args_1: number | null, args_2: number | null, args_3: boolean) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the information if reviews are currently fetched. * @param state The current application state. * @returns The boolean information if reviews are currently being fetched. */ export declare const getReviewsFetchingState: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean | null | undefined) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => boolean | null | undefined, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the review list of the current base product was not requested yet. * @param state The current application state. * @returns True when no list collection exists. */ export declare const isReviewListMissing: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the last review list request of the current base product failed. * @param state The current application state. * @returns True when the last request failed, also when earlier pages are still stored. */ export declare const hasReviewListError: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the review list of the current base product has to be requested again. * Not memoized, because the result depends on the current time. * @param state The current application state. * @param props The product id and an optional variant id. * @returns True when the list is missing, failed or expired, false while a request runs. */ export declare const isReviewListStale: (state: ReviewsProductState, props?: ReviewsProductProps) => boolean; /** * Whether the review list of the current base product is still loading. * @param state The current application state. * @returns True while a request runs or before the first response, unless the last request failed. */ export declare const isReviewListLoading: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null, args_1: boolean) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the offset of the last review list request of the current base product. * @param state The current application state. * @returns The offset, or 0 when the list was not requested yet. */ export declare const getReviewListRequestOffset: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => number) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null) => number, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves a user review for a product. */ export declare const getUserReviewForProduct: ((state: ReviewsState, props?: ReviewsProductProps | undefined) => Partial) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").UserReviewsByProductId, args_1: import("../types/reviews").ReviewsById, args_2: string | null | undefined) => Partial, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Gets user reviews fetching state. Only the first fetch is considered. * @returns True if user review for current product is being fetched. */ export declare const getUserReviewFirstFetchState: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: string | null, args_1: import("../types/reviews").UserReviewsByProductId) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Get a user name for the review form. * @param state The state. * @returns A user name. */ export declare const getDefaultAuthorName: (state: AuthorState) => string; /** * Retrieves the current product reviews in the order returned by the pipeline. * @param state The current application state. * @returns The reviews for a product. */ export declare const getProductReviews: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => Review[]) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ReviewsCollection | null, args_1: import("../types/reviews").ReviewsById) => Review[], { clearCache: () => void; }> & { clearCache: () => void; }; /** * Retrieves the current product reviews excerpt in the order returned by the pipeline. * @param state The current application state. * @returns The reviews for a product */ export declare const getProductReviewsExcerpt: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => Review[] | null) & import("reselect").OutputSelectorFields<(args_0: string | null, args_1: import("../types/reviews").ReviewsByProductId, args_2: import("../types/reviews").ReviewsById) => Review[] | null, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the review preview of the current base product was not requested yet. * @param state The current application state. * @returns True when no preview collection exists. */ export declare const isProductReviewsExcerptMissing: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ProductReviewsCollection) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the last review preview request of the current base product failed before any * reviews were received. * @param state The current application state. * @returns True when the preview request failed. */ export declare const hasProductReviewsExcerptError: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ProductReviewsCollection) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the review preview of the current base product is still loading. * @param state The current application state. * @returns True while a request runs or before the first response, unless the last request failed. */ export declare const isProductReviewsExcerptLoading: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ProductReviewsCollection, args_1: boolean) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; /** * Whether the review preview of the current base product is requested without stored reviews. * @param state The current application state. * @returns True while a request runs and no response was stored yet; false for a refresh. */ export declare const isProductReviewsExcerptPending: ((state: ReviewsState & { product: unknown; }, props?: ReviewsProductProps | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/reviews").ProductReviewsCollection) => boolean, { clearCache: () => void; }> & { clearCache: () => void; }; //# sourceMappingURL=index.d.ts.map