You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
1.2 KiB

import type {
IMovie as IMovieBase,
IMovieDetails as IMovieDetailsBase
} from "@autoplex-api/search";
/**
* Basic user information schema
*/
export interface IUser {
id : number,
name : string,
isAdmin: boolean
}
/**
* The JWT auth token structure
*/
export interface ITokenSchema extends IUser {
iat: number,
exp: number
}
/**
* The general API response structure
*/
export interface IApiResponse {
errors?: any[]
status: string
}
/**
* A generic data response from the API
*/
export interface IApiDataResponse<T> extends IApiResponse {
data: T
}
/**
* A generic data response conatining paginated results
*/
export type IPaginatedResponse<T> = IApiDataResponse<{
page: number,
results: T[]
totalPages: number,
totalResults: number
}>;
/**
* Movie request information schema
*/
interface IMovieRequestInfo {
plexLink: string | null,
ticketId: number | null
}
/**
* General movie information schema
*/
export interface IMovie extends IMovieBase, IMovieRequestInfo {}
/**
* Detailed movie information schema
*/
export interface IMovieDetails extends IMovieDetailsBase, IMovieRequestInfo {
requestedBy: null | {
id : number,
isAdmin: boolean,
name : string
}
}