This repository was archived by the owner on Jan 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathflowTypes.js
More file actions
173 lines (151 loc) · 2.82 KB
/
flowTypes.js
File metadata and controls
173 lines (151 loc) · 2.82 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// @flow
type Query = {
where?: { [string]: any },
};
type Data = {
[string]: any,
};
export type Sequelize = {
upsert: (Data) => Promise<>,
update: (Data, Query) => Promise<>,
findOne: (?Query) => Promise<>,
findAll: (?Query) => Promise<>,
create: (Data) => Promise<>,
destroy: (Query) => Promise<>,
findAndCount: (Query) => Promise<>,
count: (?Query) => Promise<number>,
};
export type Models = {
PvpStandings: Sequelize,
Gw2ApiToken: Sequelize,
User: Sequelize,
Gw2Character: Sequelize,
Gw2Guild: Sequelize,
UserReset: Sequelize,
PvpStandingsHistory: Sequelize,
sequelize: any,
};
export type Pagination = {
limit?: number,
offset?: number,
};
export type Params = Pagination & {
lang?: string,
};
export type PaginatedResponse<T> = {
rows: Array<T>,
count: number,
limit: number,
offset: number,
}
type Gw2Standing = {
total_points: number,
division: number,
tier: number,
points: number,
repeats: number,
rating?: number,
};
export type Gw2PvpStanding = {
current: Gw2Standing,
best: Gw2Standing,
season_id: string,
};
export type PvpStandingModel = {
seasonId: string,
apiTokenId: number,
ratingCurrent: number,
decayCurrent: number,
};
export type PvpSeason = {
id: string,
name: string,
};
export type User = {
id: string,
email: string,
passwordHash: string,
alias: string,
};
export type DbUser = {
id: number,
};
export type UserModel = {
id: string,
alias: string,
passwordHash: string,
email: string,
privacy: ?string,
// ApiKey values
tokenId: number,
token?: string,
accountName?: string,
guilds?: string,
dailyAp?: number,
fractalLevel?: number,
monthlyAp?: number,
world?: number,
wvwRank?: number,
};
export type ApiToken = {
id: number,
token: string,
accountName: string,
accountId: string,
permissions: string,
world: number,
guilds: string,
User: User,
UserId: string,
};
export type Guild = {
id: string,
tag: string,
name: string,
favor: number,
resonance: number,
aetherium: number,
influence: number,
level: number,
motd: string,
claimed: boolean,
apiToken?: ?string,
};
export type CharacterSimple = {
accountName: string,
userAlias: string,
name: string,
race: string,
gender: 'Female' | 'Male',
profession: string,
level: number,
world: string,
};
export type Character = {
name: string,
race: string,
gender: 'Female' | 'Male',
profession: string,
level: number,
created: string,
age: number,
deaths: number,
guild: string,
Gw2ApiTokenToken: string,
Gw2ApiToken: ApiToken,
};
export type PasswordReset = {
expires: Date,
used: boolean,
UserId: string,
};
type Gw2StandingScore = {
id: string,
value: number,
};
export type Gw2LadderStanding = {
name: string,
rank: number,
date: string,
scores: Array<Gw2StandingScore>,
};