opds-web-client
Version:
53 lines (52 loc) • 2.02 kB
TypeScript
import { CollectionData, BookData, AuthCallback, AuthCredentials } from "../interfaces";
export declare function findBookInCollection(collection: CollectionData, book: string): BookData;
export declare function mapStateToProps(state: any, ownProps: any): {
collectionData: any;
isFetching: any;
isFetchingPage: any;
error: any;
bookData: any;
history: any;
loadedCollectionUrl: any;
loadedBookUrl: any;
collectionUrl: any;
bookUrl: any;
loansUrl: any;
loans: any;
auth: any;
isSignedIn: boolean;
};
export declare function mapDispatchToProps(dispatch: any): {
createDispatchProps: (fetcher: any) => {
fetchCollection: (url: string) => any;
fetchPage: (url: string) => any;
fetchBook: (url: string) => any;
loadBook: (book: BookData, url: string) => any;
clearCollection: () => any;
clearBook: () => any;
fetchSearchDescription: (url: string) => any;
closeError: () => any;
updateBook: (url: string) => any;
fulfillBook: (url: string) => any;
indirectFulfillBook: (url: string, type: string) => any;
fetchLoans: (url: string) => any;
saveAuthCredentials: (credentials: AuthCredentials) => any;
clearAuthCredentials: () => any;
showAuthForm: (callback: AuthCallback, cancel: () => void, providers: any, title: string) => any;
closeErrorAndHideAuthForm: () => any;
};
};
export declare function createFetchCollectionAndBook(dispatch: any): (collectionUrl: string, bookUrl: string) => Promise<{
collectionData: CollectionData;
bookData: BookData;
}>;
export declare function fetchCollectionAndBook({fetchCollection, fetchBook, collectionUrl, bookUrl}: {
fetchCollection: any;
fetchBook: any;
collectionUrl: any;
bookUrl: any;
}): Promise<{
collectionData: CollectionData;
bookData: BookData;
}>;
export declare function mergeRootProps(stateProps: any, createDispatchProps: any, componentProps: any): any;