///
import { Got, ExtendOptions } from 'got';
import { BaseResponse, RegisterPayload, SignInPayload, SignInResponse, AuthorizationPayload, PunchInResponse, UserProfileResponse, UserFavouritePayload, UserFavouriteResponse, CategoriesResponse, ComicsPayload, ComicsResponse, ComicIdPayload, ComicDetailResponse, ComicEpisodesPayload, ComicEpisodesResponse, ComicEpisodePagesPayload, ComicEpisodePagesResponse, ComicCommentsPayload, ComicCommentsResponse, SearchComicsPayload, SearchComicsResponse, SwitchComicLikeResponse, SwitchComicFavouriteResponse, UserProfileSloganPayload, ImageMediaPayload } from './type';
export interface PicaComicOptions {
api: string;
apiKey: string;
signatureKey: string;
accept: string;
channel: '1' | '2' | '3';
version: string;
uuid: string;
platform: string;
buildVersion: string;
userAgent: string;
imageQuality: 'original' | 'low' | 'medium' | 'high';
}
interface FetcherInstanceHolder {
fetch: Got;
appOptions?: Partial;
}
type DeclaredEndpoint = (payload: T) => Promise;
type DeclaredEndpointWithFetcher = (fetcher: FetcherInstanceHolder, payload: T) => Promise;
type PickDeclaredEndpointFromInstance = Instance extends DeclaredEndpointWithFetcher ? DeclaredEndpoint : never;
export declare class PicaComicError extends Error {
readonly code: number;
readonly error: string;
readonly detail?: string;
constructor(code: number, error: string, message: string, detail?: string);
}
export declare const Endpoints: {
register: DeclaredEndpointWithFetcher, RegisterPayload>;
signIn: DeclaredEndpointWithFetcher;
punchIn: DeclaredEndpointWithFetcher;
fetchUserProfile: DeclaredEndpointWithFetcher;
fetchUserFavourite: DeclaredEndpointWithFetcher;
fetchCategories: DeclaredEndpointWithFetcher;
fetchComics: DeclaredEndpointWithFetcher;
fetchComicDetail: DeclaredEndpointWithFetcher;
fetchComicEpisodes: DeclaredEndpointWithFetcher;
fetchComicEpisodePages: DeclaredEndpointWithFetcher;
fetchComicComments: DeclaredEndpointWithFetcher;
searchComics: DeclaredEndpointWithFetcher;
switchComicLike: DeclaredEndpointWithFetcher;
switchComicFavourite: DeclaredEndpointWithFetcher;
setUserProfileSlogan: DeclaredEndpointWithFetcher, AuthorizationPayload & UserProfileSloganPayload>;
};
export interface PicaComicAPIOptions {
fetch?: Got | ExtendOptions;
appOptions?: Partial;
reauthorizationTokenCallback?: (self: PicaComicAPI) => string | undefined | Promise;
}
export declare class PicaComicAPI implements FetcherInstanceHolder {
readonly fetch: Got;
readonly appOptions?: Partial;
readonly reauthorizationTokenCallback?: (self: this) => string | undefined | Promise;
constructor(options?: PicaComicAPIOptions);
readonly register: PickDeclaredEndpointFromInstance;
readonly signIn: PickDeclaredEndpointFromInstance;
readonly punchIn: PickDeclaredEndpointFromInstance;
readonly fetchUserProfile: PickDeclaredEndpointFromInstance;
readonly fetchUserFavourite: PickDeclaredEndpointFromInstance;
readonly fetchCategories: PickDeclaredEndpointFromInstance;
readonly fetchComics: PickDeclaredEndpointFromInstance;
readonly fetchComicDetail: PickDeclaredEndpointFromInstance;
readonly fetchComicEpisodes: PickDeclaredEndpointFromInstance;
readonly fetchComicEpisodePages: PickDeclaredEndpointFromInstance;
readonly fetchComicComments: PickDeclaredEndpointFromInstance;
readonly searchComics: PickDeclaredEndpointFromInstance;
readonly switchComicLike: PickDeclaredEndpointFromInstance;
readonly switchComicFavourite: PickDeclaredEndpointFromInstance;
readonly setUserProfileSlogan: PickDeclaredEndpointFromInstance;
readonly stringifyImageUrl: (payload: ImageMediaPayload) => string;
readonly createImageRequest: (payload: ImageMediaPayload) => import("got/dist/source/core").default;
readonly createImageRequestAsBuffer: (payload: ImageMediaPayload) => Promise;
}
export {};