Socialify

Folder ..

Viewing userInfoTypes.ts
119 lines (103 loc) • 2.3 KB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// Enums or types for sorting, assuming sorting options are known
type UserStatisticsSort =
  | 'COUNT_ASC'
  | 'COUNT_DESC'
  | 'SCORE_ASC'
  | 'SCORE_DESC';
export interface UserData {
  name: string;
  avatar: {
    large: string;
  };
  statistics: UserStatistics;
}

export enum MediaListStatus {
  CURRENT = 'CURRENT',
  PLANNING = 'PLANNING',
  COMPLETED = 'COMPLETED',
  REPEATING = 'REPEATING',
  PAUSED = 'PAUSED',
  DROPPED = 'DROPPED',
}

export interface UserStatistics {
  anime: AnimeMangaStatistics;
  manga: AnimeMangaStatistics;
}

export interface AnimeMangaStatistics {
  count: number;
  meanScore: number;
  standardDeviation: number;
  minutesWatched: number; // For anime
  episodesWatched: number; // For anime
  chaptersRead: number; // For manga
  volumesRead: number; // For manga
  formats: UserFormatStatistic[];
  statuses: UserStatusStatistic[];
  scores: UserScoreStatistic[];
  lengths: UserLengthStatistic[];
  releaseYears: UserReleaseYearStatistic[];
  startYears: UserStartYearStatistic[];
  genres: UserGenreStatistic[];
  tags: UserTagStatistic[];
  countries: UserCountryStatistic[];
  voiceActors: UserVoiceActorStatistic[];
  staff: UserStaffStatistic[];
  studios: UserStudioStatistic[];
}

export interface StatisticLimitSort {
  limit: number;
  sort: UserStatisticsSort[];
}

export interface UserFormatStatistic {
  format: string;
  count: number;
}

export interface UserStatusStatistic {
  status: string;
  count: number;
}

export interface UserScoreStatistic {
  score: number;
  count: number;
}

export interface UserLengthStatistic {
  length: string;
  count: number;
}

export interface UserReleaseYearStatistic {
  year: number;
  count: number;
}

export interface UserStartYearStatistic {
  year: number;
  count: number;
}

export interface UserGenreStatistic {
  genre: string;
  count: number;
}

export interface UserTagStatistic {
  tag: string;
  count: number;
}

export interface UserCountryStatistic {
  country: string;
  count: number;
}

export interface UserVoiceActorStatistic {
  voiceActorId: number;
  name: string;
  count: number;
  language: string;
}

export interface UserStaffStatistic {
  staffId: number;
  name: string;
  role: string;
  count: number;
}

export interface UserStudioStatistic {
  studioId: number;
  name: string;
  count: number;
}