add random, add autocomplete, more smaller changes
This commit is contained in:
parent
5fe235194b
commit
608f4d5e8d
10 changed files with 1039 additions and 66 deletions
33
types/booruResponses.d.ts
vendored
33
types/booruResponses.d.ts
vendored
|
@ -4,32 +4,23 @@ type Data = {
|
|||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
interface Rule34Post {
|
||||
preview_url: string;
|
||||
sample_url: string;
|
||||
file_url: string;
|
||||
interface DefaultPost {
|
||||
directory: number;
|
||||
hash: string;
|
||||
width: number;
|
||||
height: number;
|
||||
id: number;
|
||||
image: string;
|
||||
change: number;
|
||||
owner: string;
|
||||
parent_id: number;
|
||||
rating: string;
|
||||
sample: boolean;
|
||||
sample_height: number;
|
||||
sample_width: number;
|
||||
score: number;
|
||||
tags: string;
|
||||
source: string;
|
||||
status: string;
|
||||
has_notes: boolean;
|
||||
comment_count: number;
|
||||
}
|
||||
|
||||
type BooruPost = Rule34Post & {
|
||||
post_url: string;
|
||||
file_url: string;
|
||||
type E621Post = {
|
||||
id: number;
|
||||
file: {
|
||||
url: string;
|
||||
};
|
||||
tags: string;
|
||||
};
|
||||
|
||||
type BooruPost = {
|
||||
file_url?: string | null;
|
||||
post_url?: string;
|
||||
} & (DefaultPost | e621Post);
|
||||
|
|
2
types/config.d.ts
vendored
2
types/config.d.ts
vendored
|
@ -24,6 +24,7 @@ type IBooruConfigMap = {
|
|||
aliases: string[];
|
||||
endpoint: string;
|
||||
functions: IBooruDefaults;
|
||||
autocomplete?: string;
|
||||
auth?: Record<string, string>;
|
||||
};
|
||||
};
|
||||
|
@ -34,5 +35,6 @@ type IBooruConfig = {
|
|||
aliases: string[];
|
||||
endpoint: string;
|
||||
functions: IBooruDefaults;
|
||||
autocomplete?: string;
|
||||
auth?: Record<string, string>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue