import { ConfigOptions, EndpointFn, ResponseFullData } from "./public/RapixCore"; export declare type RapixRichResponse = ResponseFullData; export declare type RapixResponse = { response: T; __original: any; __reqTime: number; __resTime: number; __ping: number; __cached: boolean; }; export interface RapixProps { onSuccess: (callback?: (data: RapixResponse, fullResponse: RapixRichResponse) => any) => RapixProps; onError: (callback?: (data: RapixResponse, fullResponse: RapixRichResponse) => any) => RapixProps; always: (response?: any) => RapixProps; abort: () => {}; then: (onSuccess?: (data: E, fullResponse: RapixRichResponse) => any, onError?: (data: E, fullResponse: RapixRichResponse) => any) => RapixProps; } declare type FunctionWithProps = T extends (props: infer P) => any ? (params?: P) => RapixProps : never; declare type ResponseMap = { [F in keyof C]: FunctionWithProps; }; export declare function rapix>(props: { settings: (params?: any) => ConfigOptions; collection: C; }): ResponseMap; export declare function cascade(props: Array<(prevCallResponse?: any) => RapixProps>, callbacks?: [(success: any, error?: any) => void]): Promise; export {};