import React from 'react'; import { Settings } from 'react-slick'; declare const requiredSetup: { apiKey: string; }; declare const BreinifyGlobalConfigs: IConfig; declare function BreinifySetup({ apiKey, secret }: SetupProps): void; declare function isSetupComplete(): boolean; interface IConfig { apiKey?: string; secret?: string; } declare type RequiredProperties = keyof typeof requiredSetup; declare type RequiredPickConfig = Required>; declare type SetupProps = IConfig & RequiredPickConfig; interface GenericProperties { [key: string]: any; } interface User extends GenericProperties { email?: string; phone?: string; sessionId?: string; userId?: string; identifiers?: { browserId: string; }; additional?: UserAdditionalData; } interface UserAdditionalData extends GenericProperties { identifiers?: { browserId?: string; assignedGroup?: string; originalSessionId?: string; }; localDateTime?: string; location?: { storeId?: number; }; timezone?: string; userAgent?: string; url?: string; } interface Recommendation extends GenericProperties { namedRecommendations?: Array; numRecommendations?: number; queryPostProcessors?: Array; recommendationAdditionalParameters?: RecommendationAdditionalParameters; recommendationAtTime?: number; recommendationCategories?: Array; recommendationCategoriesBlacklist?: Array; recommendationDisableFilters?: boolean; recommendationForItems?: Array; recommendationMinQuantity?: number; recommendationQueryName?: string; recommendationRemoveDuplicates?: boolean; recommendationSubBlockers?: Array; recommendationSubInhibitors?: Array; recommendationSubRecommenders?: Array; } interface DataTags extends GenericProperties { atStore?: string; deviceType?: 'Bot' | 'Personal computer' | 'Smartphone' | Omit; } interface CuratedLists extends GenericProperties { specifiedLists: Array; } interface RecommendationAdditionalParameters extends GenericProperties { customSorterTypes?: Array; dataTags?: DataTags; dataTagsToConsider?: Array>; ignoreRecommendations?: boolean; manual?: CuratedLists; numRecommendationsInternal?: number; postProcessors?: Array; selectedModels?: Array; temporalTypes?: Array; } interface BaseRecommendationQuery extends GenericProperties, IConfig { unixTimestamp?: number; user?: User; signature?: string | null; } interface SingleRecommendationQuery extends BaseRecommendationQuery { recommendation: Recommendation; } interface MultipleRecommendationQuery extends BaseRecommendationQuery { recommendations: Array; } declare type RecommendationQuery = SingleRecommendationQuery | MultipleRecommendationQuery; declare const enum STATUS { SUCCESS = "SUCCESS", REQUESTING = "REQUESTING", FAILURE = "FAILURE", REFETCH = "REFETCH", INIT = "INIT" } declare type LoadingState = { status: STATUS; reason: object | string; }; declare function getRecommendations({ user, unixTimestamp, signature, recommendation, recommendations, }: RecommendationQuery): Promise; declare const RECOMMENDATION_URL: string; declare const useRecommendations: (defaultDataState?: any) => { getRecs: ({ user, unixTimestamp, signature, recommendation, recommendations }: RecommendationQuery, selector?: ((response: any) => any) | undefined) => void; data: any; isInit: boolean; isLoading: boolean; isSuccess: boolean; isFailure: boolean; error: string | object; }; interface CarouselProps extends Settings { component?: React.ComponentType; loaderComponent?: React.ComponentType; getComponentProps?(dataResult: any): Record; selector?(response: any): any; recommendationQuery: RecommendationQuery; containerClassName?: string; containerStyles?: React.CSSProperties; onButtonClick?(props: any): void; onError?(error: any): void; buttonLabel?: string; } declare function Carousel({ component: Component, loaderComponent: LoaderComponent, getComponentProps, selector, recommendationQuery, containerClassName, containerStyles, onButtonClick, onError, buttonLabel, ...sliderProps }: CarouselProps): JSX.Element | null; export { BreinifyGlobalConfigs, BreinifySetup, Carousel, CarouselProps, CuratedLists, DataTags, IConfig, LoadingState, RECOMMENDATION_URL, Recommendation, RecommendationAdditionalParameters, RecommendationQuery, STATUS, SetupProps, User, UserAdditionalData, getRecommendations, isSetupComplete, requiredSetup, useRecommendations };