UNPKG

koishi-plugin-booru-pixiv

Version:
104 lines (103 loc) 2.92 kB
export declare namespace PixivAppApi { type ImageSize = 'original' | 'large' | 'medium' | 'square_medium'; type Filter = 'for_ios'; type Type = 'illust' | 'manga'; type Restrict = 'public' | 'private'; type Content_type = 'illust' | 'manga'; type Mode = 'day' | 'week' | 'month' | 'day_male' | 'day_female' | 'week_original' | 'week_rookie' | 'day_manga' | 'day_r18' | 'day_male_r18' | 'day_female_r18' | 'week_r18' | 'week_r18g'; type SearchTarget = 'partial_match_for_tags' | 'exact_match_for_tags' | 'title_and_caption' | 'keyword'; enum SearchAIType { SHOW_AI = 0, HIDE_AI = 1 } type Sort = 'date_desc' | 'date_asc' | 'popular_desc'; type Duration = 'within_last_day' | 'within_last_week' | 'within_last_month'; interface SearchParams { word: string; search_target: SearchTarget; search_ai_type?: SearchAIType; sort?: Sort; filter: Filter; duration?: Duration; offset?: number; min_bookmarks?: number; max_bookmarks?: number; } interface RecommendParams { content_type: Content_type; include_ranking_label?: boolean; filter: Filter; } interface Result { illusts: Illust[]; } interface Illust { id: number; title: string; type: string; image_urls: ImageUrls; caption: string; restrict: number; user: User; tags: Tag[]; tools: string[]; create_date: string; page_count: number; width: number; height: number; sanity_level: number; /** * - 0: Safe * - 1: R18 * - 2: R18G */ x_restrict: number; series: unknown; meta_single_page: MetaSinglePage; meta_pages: { image_urls: { original: string; } & ImageUrls; }[]; total_view: number; total_bookmarks: number; is_bookmarked: boolean; visible: boolean; is_muted: boolean; /** * - 0: Original * - 1: Unknown? * - 2: AI generated */ illust_ai_type: 0 | 1 | 2; /** * TODO: What is this? * * - 0: Illust * - 1: Manga * - 2: Ugoira * - 3: Novel */ illust_book_style: number; } interface ImageUrls { square_medium: string; medium: string; large: string; } interface User { id: number; name: string; account: string; profile_image_urls: ProfileImageUrls; is_followed: boolean; } interface ProfileImageUrls { medium: string; } interface Tag { name: string; translated_name?: string; } type MetaSinglePage = Record<`${ImageSize}_image_url`, string>; }