|
|
@ -1,4 +1,4 @@ |
|
|
|
import { |
|
|
|
import type { |
|
|
|
IMovie as IMovieBase, |
|
|
|
IMovieDetails as IMovieDetailsBase |
|
|
|
} from "@autoplex-api/search"; |
|
|
@ -16,14 +16,15 @@ export interface IUser { |
|
|
|
* The JWT auth token structure |
|
|
|
*/ |
|
|
|
export interface ITokenSchema extends IUser { |
|
|
|
iat : number, |
|
|
|
exp : number |
|
|
|
iat: number, |
|
|
|
exp: number |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* The general API response structure |
|
|
|
*/ |
|
|
|
export interface IApiResponse { |
|
|
|
errors?: any[] |
|
|
|
status: string |
|
|
|
} |
|
|
|
|
|
|
@ -34,13 +35,32 @@ 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, |
|
|
@ -48,10 +68,3 @@ export interface IMovieDetails extends IMovieDetailsBase, IMovieRequestInfo { |
|
|
|
name : string |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export interface IPaginatedResponse<T> { |
|
|
|
page: number, |
|
|
|
results: T[] |
|
|
|
totalPages: number, |
|
|
|
totalResults: number |
|
|
|
} |