expanded the single and watchlist types

This commit is contained in:
John O'Keefe 2024-07-25 09:17:58 -04:00
parent 530a4bc3ff
commit d99f71e18c
2 changed files with 74 additions and 113 deletions

View File

@ -1,88 +1,70 @@
export interface AniListCurrentUserWatchList {
data: Data
data: {
Page: {
pageInfo: {
total: number
perPage: number
currentPage: number
lastPage: number
hasNextPage: boolean
},
mediaList: MediaList[]
}
}
}
export interface Data {
Page: Page
}
export interface Page {
pageInfo: PageInfo
mediaList: MediaList[]
}
export interface PageInfo {
total: number
perPage: number
currentPage: number
lastPage: number
hasNextPage: boolean
export interface AniListGetSingleAnime {
data: {
MediaList: MediaList
}
}
export interface MediaList {
id: number
mediaId: number
userId: number
media: Media
media: {
id: number
idMal: number
title: {
romaji: string
english?: string
native: string
}
description: string
coverImage: {
large: string
}
season: string
seasonYear: number
status: string
episodes?: number
nextAiringEpisode?: {
airingAt: number
timeUntilAiring: number
episode: number
}
}
status: string
notes?: string
progress: number
score: number
repeat: number
user: User
}
export interface Media {
id: number
idMal: number
title: Title
description: string
coverImage: CoverImage
season: string
seasonYear: number
status: string
episodes?: number
nextAiringEpisode?: NextAiringEpisode
}
export interface Title {
romaji: string
english?: string
native: string
}
export interface CoverImage {
large: string
}
export interface NextAiringEpisode {
airingAt: number
timeUntilAiring: number
episode: number
}
export interface User {
id: number
name: string
avatar: Avatar
statistics: Statistics
}
export interface Avatar {
large: string
medium: string
}
export interface Statistics {
anime: Anime
}
export interface Anime {
count: number
statuses: Status[]
}
export interface Status {
status: string
count: number
}
user: {
id: number
name: string
avatar: {
large: string
medium: string
}
statistics: {
anime: {
count: number
statuses: [{
status: string
count: number
}]
}
}
}
}

View File

@ -1,33 +1,3 @@
export interface AniListItem {
data: {
Media: {
id: number,
idMal: number,
title: {
romaji: string,
english: string,
},
description: string,
coverImage: {
medium: string,
large: string,
extraLarge: string,
color: string,
},
tags: [{
id: number,
name: string,
description: string,
category: string,
rank: number,
isGeneralSpoiler: boolean,
isMediaSpoiler: boolean,
isAdult: boolean
}]
}
}
}
export interface AniSearchList {
data: {
Page: {
@ -39,17 +9,26 @@ export interface AniSearchList {
perPage: number
},
media: [{
id: number,
idMal: number,
id: number
idMal: number
title: {
romaji: string,
english: string,
native: string,
},
romaji: string
english?: string
native: string
}
description: string
coverImage: {
extraLarge: string,
color: string,
},
large: string
}
season: string
seasonYear: number
status: string
episodes?: number
nextAiringEpisode?: {
airingAt: number
timeUntilAiring: number
episode: number
}
}],
},
}