import { Buffer } from 'node:buffer'; import { Readable } from 'node:stream'; interface IResult { data: IResultData; header: IResultHeader; } interface IResultData { ext_urls: string[]; title: string; da_id: number; author_name: string; author_url: string; anidb_aid?: string; bcy_id?: string; bcy_type?: string; danbooru_id?: string; ddb_id?: string; drawr_id?: string; e621_id?: string; file?: string; gelbooru_id?: string; idol_id?: string; imdb_id?: string; konachan_id?: string; member_link_id?: string; mu_id?: string; nijie_id?: string; pawoo_id?: string; pg_id?: string; pixiv_id?: string; sankaku_id?: string; seiga_id?: string; material?: string; source?: string; url?: string; user_acct?: string; yandere_id?: string; "anime-pictures_id"?: string; member_id?: string; member_name?: string; characters: string; est_time: string; md_id?: string; author?: string; artist?: string; part?: string; as_project?: string; created_at?: string; tweet_id?: string; twitter_user_id?: string; twitter_user_handle?: string; fa_id?: string; fn_id?: string; fn_type?: string; creator?: string; creator_name?: string; path?: string; service?: "patreon" | "dlsite" | "fanbox" | "gumroad" | "subscribestar" | "fantia"; service_name?: "Patreon" | "DLsite" | "pixiv Fanbox" | "Gumroad" | "SubscribeStar" | "Fantia"; id?: string; user_id?: string; user_name?: string; published?: string; } interface IResultHeader { index_id: Indices; index_name: string; similarity: number; thumbnail: string; } type Indices = "3" | "4" | "5" | "6" | "8" | "9" | "10" | "11" | "12" | "13" | "16" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36"; /** * Represents the valid options to pass on to SauceNAO. */ interface IOptions { results?: number; mask?: number[]; excludeMask?: number[]; getRatings?: boolean; testMode?: boolean; db?: number; } type File = string | Buffer | globalThis.Blob | Readable; /** * Creates a function to be used for finding potential sources for a given image. * By default has options set to give 5 results from SauceNAO. * @param token your saucenao token, get one from https://saucenao.com/user.php * @param defaultOpts the default options that the client will use for querying * @returns an `async function (file: File, optionOverrides?: Options)` which is loaded with the given token and default options to use. */ declare const sagiri: (token: string, defaultOpts?: IOptions) => ((file: File, opts?: IOptions) => Promise<{ url: string; site: string; index: number; similarity: number; thumbnail: string; authorName: string; authorUrl: string; raw: IResult; }[]>); export { sagiri as default };