/**
|
|
* 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 {
|
|
status: string
|
|
}
|
|
|
|
/**
|
|
* A generic data response from the API
|
|
*/
|
|
export interface IApiDataResponse<T> extends IApiResponse {
|
|
data: T
|
|
}
|
|
|
|
export interface IApiPaginatedResponse<T> {
|
|
page : number,
|
|
results : T[],
|
|
totalPages : number,
|
|
totalResults: number
|
|
};
|
|
|
|
/**
|
|
* A movie listing returned from the API
|
|
*/
|
|
export interface IApiMovie {
|
|
plexLink : string | null,
|
|
posterPath : string | null,
|
|
releaseDate: string | null,
|
|
ticketId : number | null,
|
|
title : string,
|
|
tmdbId : number
|
|
}
|
|
|
|
/**
|
|
* Movie details returned from the API
|
|
*/
|
|
export interface IApiMovieDetails extends IApiMovie {
|
|
backdropPath: string | null,
|
|
imdbId : string | null,
|
|
overview : string | null,
|
|
runtime : number | null,
|
|
requestedBy : IUser | null
|
|
}
|