r34-types
Version:
Types for both frontend and backend applications using kurozenzen's R34 environment.
59 lines • 1.61 kB
TypeScript
import { QueryTag } from "./QueryTag";
import { AliasTag } from "./AliasTag";
import { Artist } from "./Artist";
import { Post } from "./Post";
import { PostsSort } from "./PostsSort";
import { ScoreFilter } from "./ScoreFilter";
import { Supertag } from "./Supertag";
import { Tag } from "./Tag";
import { TagsError } from "./TagsError";
import { TagsSort } from "./TagsSort";
import { Comment } from "./Comment";
export declare namespace api {
/**
* Utility namespace for looking up API response types
*/
namespace responses {
type Tags = TagsError | Array<Supertag | Tag>;
type Posts = {
count: number;
posts: Post[];
};
type Aliases = AliasTag[];
type Comments = Comment[];
type Artists = Artist;
}
/**
* Utility namespace for looking up API parameter types
*/
namespace params {
type Tags = {
name?: string;
limit?: number;
sort?: TagsSort;
supertags?: boolean;
};
type Posts = {
tags?: Record<string, QueryTag | Supertag>;
limit?: number;
page?: number;
score?: ScoreFilter;
sort?: PostsSort;
};
type PostsLegacy = {
tags?: string;
limit?: number;
pid?: number;
};
type Aliases = {
name: string;
};
type Comments = {
commentsUrl: string;
};
type Artist = {
id: number;
};
}
}
//# sourceMappingURL=Api.d.ts.map