add random, add autocomplete, more smaller changes

This commit is contained in:
creations 2025-01-05 20:03:30 -05:00
parent 5fe235194b
commit 608f4d5e8d
Signed by: creations
GPG key ID: 8F553AA4320FC711
10 changed files with 1039 additions and 66 deletions

View file

@ -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
View file

@ -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>;
};