Add itype in IQuery and type TQueryInterface

pull/73/head
MillenniumEarl 2021-02-25 12:03:09 +01:00
parent 1f9fe7265a
commit 63aa32851b
1 changed files with 18 additions and 0 deletions

View File

@ -59,6 +59,11 @@ export type TStatus = "Completed" | "Ongoing" | "Abandoned" | "Onhold";
*/
export type TCategory = "games" | "mods" | "comics" | "animations" | "assets";
/**
* Valid names of classes that implement the IQuery interface.
*/
export type TQueryInterface = "LatestSearchQuery" | "ThreadSearchQuery" | "HandiworkSearchQuery";
/**
* Collection of values defined for each
* handiwork on the F95Zone platform.
@ -256,6 +261,10 @@ export interface IAsset extends IBasic {
export interface IHandiwork extends IGame, IComic, IAnimation, IAsset { }
export interface IQuery {
/**
* Name of the implemented interface.
*/
itype: TQueryInterface,
/**
* Category of items to search among.
*/
@ -274,4 +283,13 @@ export interface IQuery {
* Between 1 and infinity.
*/
page: number,
/**
* Verify that the query values are valid.
*/
validate(): boolean,
/**
* From the query values it generates the corresponding URL for the platform.
* If the query is invalid it throws an exception.
*/
createURL(): URL,
}