enefel 1.2.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avatars.d.ts +102 -0
- package/dist/avatarsDefault.d.ts +115 -0
- package/dist/badge.d.ts +22 -0
- package/dist/block.d.ts +11 -0
- package/dist/calcul.d.ts +3 -0
- package/dist/canUseSkills.d.ts +6 -0
- package/dist/card.d.ts +15 -0
- package/dist/career.d.ts +176 -0
- package/dist/color.d.ts +7 -0
- package/dist/date.d.ts +4 -0
- package/dist/dice.d.ts +5 -0
- package/dist/elo.d.ts +6 -0
- package/dist/game.d.ts +25 -0
- package/dist/improvement.d.ts +19 -0
- package/dist/index.d.ts +246 -0
- package/dist/inducement.d.ts +8 -0
- package/dist/item.d.ts +23 -0
- package/dist/jest.config.d.ts +0 -0
- package/dist/league.d.ts +33 -0
- package/dist/meteo.d.ts +36 -0
- package/dist/moral.d.ts +3 -0
- package/dist/move.d.ts +7 -0
- package/dist/package.json +2 -3
- package/dist/pitch.d.ts +31 -0
- package/dist/player.d.ts +40 -0
- package/dist/position.d.ts +4 -0
- package/dist/race.d.ts +93 -0
- package/dist/random.d.ts +7 -0
- package/dist/right.d.ts +10 -0
- package/dist/skill.d.ts +151 -0
- package/dist/skillCoach.d.ts +17 -0
- package/dist/stadium.d.ts +121 -0
- package/dist/state.d.ts +30 -0
- package/dist/status.d.ts +20 -0
- package/dist/store.d.ts +95 -0
- package/dist/time.d.ts +18 -0
- package/dist/tsconfig.json +2 -1
- package/dist/types/models.d.ts +368 -0
- package/dist/validator.d.ts +24 -0
- package/dist/version.d.ts +2 -0
- package/package.json +2 -3
- package/tsconfig.json +2 -1
- package/.npmrc-example +0 -8
- package/.yarn/plugins/@yarnpkg/plugin-version.cjs +0 -550
- package/dist/package-lock.json +0 -6658
- /package/{.yarn/versions/1a40c070.yml → dist/iconMap.d.ts} +0 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
export interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export interface Inducement {
|
|
6
|
+
key: string;
|
|
7
|
+
isMulti?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface User {
|
|
10
|
+
id: string;
|
|
11
|
+
email: string;
|
|
12
|
+
username: string;
|
|
13
|
+
password: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
loginAt: Date;
|
|
17
|
+
mail_inactive: boolean;
|
|
18
|
+
mail_inactive_sent: boolean;
|
|
19
|
+
pc: number;
|
|
20
|
+
pcTotal: number;
|
|
21
|
+
tooth: number;
|
|
22
|
+
toothTotal: number;
|
|
23
|
+
badges: UserBadge[];
|
|
24
|
+
}
|
|
25
|
+
export interface Team {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
pop: number;
|
|
29
|
+
po: number;
|
|
30
|
+
coach_id: string;
|
|
31
|
+
league_id: string;
|
|
32
|
+
game_id: string;
|
|
33
|
+
date_next_transmission: Date;
|
|
34
|
+
date_next_pass: Date;
|
|
35
|
+
date_next_foul: Date;
|
|
36
|
+
date_next_blitz: Date;
|
|
37
|
+
date_next_reroll: Date;
|
|
38
|
+
color1: string;
|
|
39
|
+
color2: string;
|
|
40
|
+
isOpen: boolean;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
discordId: string;
|
|
44
|
+
stadium_name: string;
|
|
45
|
+
canChampionship: boolean;
|
|
46
|
+
state: number;
|
|
47
|
+
formationId: string;
|
|
48
|
+
rerollCoach: number;
|
|
49
|
+
elo: number;
|
|
50
|
+
stadiumStore: number;
|
|
51
|
+
description: string;
|
|
52
|
+
stadium_type_s: string;
|
|
53
|
+
stadium_state_s: string;
|
|
54
|
+
stadium_type_m: string;
|
|
55
|
+
stadium_state_m: string;
|
|
56
|
+
stadium_type_l: string;
|
|
57
|
+
stadium_state_l: string;
|
|
58
|
+
players: PlayerWithSkill[];
|
|
59
|
+
}
|
|
60
|
+
export interface Player {
|
|
61
|
+
id: string;
|
|
62
|
+
order: number;
|
|
63
|
+
name: string;
|
|
64
|
+
user_id: string;
|
|
65
|
+
createdAt: Date;
|
|
66
|
+
updatedAt: Date;
|
|
67
|
+
connectedAt: Date;
|
|
68
|
+
gameId: string;
|
|
69
|
+
pop: number;
|
|
70
|
+
po: number;
|
|
71
|
+
moral: number;
|
|
72
|
+
active: string;
|
|
73
|
+
experience: number;
|
|
74
|
+
experienceCoach: number;
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
MA: number;
|
|
78
|
+
ST: number;
|
|
79
|
+
AG: number;
|
|
80
|
+
AV: number;
|
|
81
|
+
current_MA: number;
|
|
82
|
+
current_ST: number;
|
|
83
|
+
current_AG: number;
|
|
84
|
+
current_AV: number;
|
|
85
|
+
current_gfi: number;
|
|
86
|
+
date_next_action: Date;
|
|
87
|
+
date_next_block: Date;
|
|
88
|
+
date_last_gfi: Date;
|
|
89
|
+
date_last_move: Date;
|
|
90
|
+
teamId: string;
|
|
91
|
+
status: number;
|
|
92
|
+
race_id: string;
|
|
93
|
+
icon_id: string;
|
|
94
|
+
state: number;
|
|
95
|
+
ni: number;
|
|
96
|
+
date_next_standup: Date;
|
|
97
|
+
can_auto_standup: boolean;
|
|
98
|
+
reroll_counter: number;
|
|
99
|
+
can_reroll: boolean;
|
|
100
|
+
can_reroll_rebound: boolean;
|
|
101
|
+
can_reroll_no_to: boolean;
|
|
102
|
+
has_action: boolean;
|
|
103
|
+
pc: number;
|
|
104
|
+
aging: number;
|
|
105
|
+
n: number;
|
|
106
|
+
tempCarac: string;
|
|
107
|
+
userCreatedAt: Date;
|
|
108
|
+
avatar: string;
|
|
109
|
+
quote: string;
|
|
110
|
+
speak: string;
|
|
111
|
+
raz: boolean;
|
|
112
|
+
last_injury: string;
|
|
113
|
+
can_jump: boolean;
|
|
114
|
+
isCoach: boolean;
|
|
115
|
+
avatarDefault: string;
|
|
116
|
+
}
|
|
117
|
+
export interface PlayerWithSkill extends Player {
|
|
118
|
+
skills: PlayerSkill[];
|
|
119
|
+
coachSkills: CoachSkill[];
|
|
120
|
+
}
|
|
121
|
+
export interface Game {
|
|
122
|
+
id: string;
|
|
123
|
+
team1_id: string;
|
|
124
|
+
team2_id: string;
|
|
125
|
+
score1: number;
|
|
126
|
+
score2: number;
|
|
127
|
+
fan1: number;
|
|
128
|
+
fan2: number;
|
|
129
|
+
reroll1: number;
|
|
130
|
+
reroll2: number;
|
|
131
|
+
ball_x: number;
|
|
132
|
+
ball_y: number;
|
|
133
|
+
ball_player_id: string;
|
|
134
|
+
status: number;
|
|
135
|
+
date_start: Date;
|
|
136
|
+
date_kickoff: Date;
|
|
137
|
+
date_end: Date;
|
|
138
|
+
stadium_zone: string;
|
|
139
|
+
stadium_type: string;
|
|
140
|
+
stadium_state: string;
|
|
141
|
+
stadium_width: number;
|
|
142
|
+
stadium_height: number;
|
|
143
|
+
last_td: number;
|
|
144
|
+
type: string;
|
|
145
|
+
elo1: number;
|
|
146
|
+
elo2: number;
|
|
147
|
+
meteo: number;
|
|
148
|
+
items: string;
|
|
149
|
+
inducements: string;
|
|
150
|
+
hasHalfTime: boolean;
|
|
151
|
+
kickoff: number;
|
|
152
|
+
storeSize: number;
|
|
153
|
+
createdAt: Date;
|
|
154
|
+
updatedAt: Date;
|
|
155
|
+
team1: Team;
|
|
156
|
+
team2: Team;
|
|
157
|
+
}
|
|
158
|
+
export interface League {
|
|
159
|
+
id: string;
|
|
160
|
+
season: number;
|
|
161
|
+
name: string;
|
|
162
|
+
player_min: number;
|
|
163
|
+
player_max: number;
|
|
164
|
+
createdAt: Date;
|
|
165
|
+
updatedAt: Date;
|
|
166
|
+
}
|
|
167
|
+
export interface Card {
|
|
168
|
+
id: string;
|
|
169
|
+
number: number;
|
|
170
|
+
type: string;
|
|
171
|
+
rarity: string;
|
|
172
|
+
serie: string;
|
|
173
|
+
data: string;
|
|
174
|
+
}
|
|
175
|
+
export interface UserCard {
|
|
176
|
+
userId: string;
|
|
177
|
+
cardId: string;
|
|
178
|
+
quantity: number;
|
|
179
|
+
rarity: string;
|
|
180
|
+
createdAt: Date;
|
|
181
|
+
updatedAt: Date;
|
|
182
|
+
}
|
|
183
|
+
export interface Item {
|
|
184
|
+
available: boolean;
|
|
185
|
+
icon: string;
|
|
186
|
+
id: string;
|
|
187
|
+
maxQuantity: number;
|
|
188
|
+
price: number;
|
|
189
|
+
rarity: string;
|
|
190
|
+
x: number;
|
|
191
|
+
y: number;
|
|
192
|
+
type: string;
|
|
193
|
+
forUser?: boolean;
|
|
194
|
+
}
|
|
195
|
+
export interface UserItem {
|
|
196
|
+
id: string;
|
|
197
|
+
user_id: string;
|
|
198
|
+
item_id: string;
|
|
199
|
+
quantity: number;
|
|
200
|
+
info: string;
|
|
201
|
+
state: number;
|
|
202
|
+
createdAt: Date;
|
|
203
|
+
updatedAt: Date;
|
|
204
|
+
}
|
|
205
|
+
export interface PlayerItem {
|
|
206
|
+
id: string;
|
|
207
|
+
player_id: string;
|
|
208
|
+
item_id: string;
|
|
209
|
+
quantity: number;
|
|
210
|
+
info: string;
|
|
211
|
+
equiped: boolean;
|
|
212
|
+
state: number;
|
|
213
|
+
createdAt: Date;
|
|
214
|
+
updatedAt: Date;
|
|
215
|
+
}
|
|
216
|
+
export interface PlayerSkill {
|
|
217
|
+
id: string;
|
|
218
|
+
date_next: Date | null;
|
|
219
|
+
player_id: string;
|
|
220
|
+
skill_id: string;
|
|
221
|
+
info: string;
|
|
222
|
+
active: string;
|
|
223
|
+
duration: number;
|
|
224
|
+
data: string;
|
|
225
|
+
createdAt: Date;
|
|
226
|
+
updatedAt: Date;
|
|
227
|
+
}
|
|
228
|
+
export interface CoachSkill {
|
|
229
|
+
id: string;
|
|
230
|
+
player_id: string;
|
|
231
|
+
skill_id: string;
|
|
232
|
+
max: number;
|
|
233
|
+
available: number;
|
|
234
|
+
info: string;
|
|
235
|
+
date: Date;
|
|
236
|
+
createdAt: Date;
|
|
237
|
+
updatedAt: Date;
|
|
238
|
+
}
|
|
239
|
+
export interface Improvement {
|
|
240
|
+
id: string;
|
|
241
|
+
type: string;
|
|
242
|
+
name: string;
|
|
243
|
+
description: string;
|
|
244
|
+
effect: string;
|
|
245
|
+
createdAt: Date;
|
|
246
|
+
updatedAt: Date;
|
|
247
|
+
}
|
|
248
|
+
export interface PlayerHistory {
|
|
249
|
+
id: string;
|
|
250
|
+
player: string;
|
|
251
|
+
event: string;
|
|
252
|
+
details: Record<string, any>;
|
|
253
|
+
date: Date;
|
|
254
|
+
createdAt: Date;
|
|
255
|
+
updatedAt: Date;
|
|
256
|
+
}
|
|
257
|
+
export interface GameHistory {
|
|
258
|
+
id: string;
|
|
259
|
+
game: string;
|
|
260
|
+
event: string;
|
|
261
|
+
details: Record<string, any>;
|
|
262
|
+
date: Date;
|
|
263
|
+
createdAt: Date;
|
|
264
|
+
updatedAt: Date;
|
|
265
|
+
}
|
|
266
|
+
export interface Stat {
|
|
267
|
+
id: string;
|
|
268
|
+
type: string;
|
|
269
|
+
entity: string;
|
|
270
|
+
value: number;
|
|
271
|
+
date: Date;
|
|
272
|
+
createdAt: Date;
|
|
273
|
+
updatedAt: Date;
|
|
274
|
+
}
|
|
275
|
+
export interface Chat {
|
|
276
|
+
id: string;
|
|
277
|
+
type: string;
|
|
278
|
+
participants: string[];
|
|
279
|
+
createdAt: Date;
|
|
280
|
+
updatedAt: Date;
|
|
281
|
+
}
|
|
282
|
+
export interface ChatMessage {
|
|
283
|
+
id: string;
|
|
284
|
+
chat: string;
|
|
285
|
+
sender: string;
|
|
286
|
+
content: string;
|
|
287
|
+
createdAt: Date;
|
|
288
|
+
updatedAt: Date;
|
|
289
|
+
}
|
|
290
|
+
export interface PlayerChat {
|
|
291
|
+
id: string;
|
|
292
|
+
player: string;
|
|
293
|
+
chat: string;
|
|
294
|
+
createdAt: Date;
|
|
295
|
+
updatedAt: Date;
|
|
296
|
+
}
|
|
297
|
+
export interface Formation {
|
|
298
|
+
id: string;
|
|
299
|
+
team: string;
|
|
300
|
+
name: string;
|
|
301
|
+
positions: {
|
|
302
|
+
x: number;
|
|
303
|
+
y: number;
|
|
304
|
+
player?: string;
|
|
305
|
+
}[];
|
|
306
|
+
createdAt: Date;
|
|
307
|
+
updatedAt: Date;
|
|
308
|
+
}
|
|
309
|
+
export interface Season {
|
|
310
|
+
id: string;
|
|
311
|
+
truceDate: Date;
|
|
312
|
+
playoff: boolean;
|
|
313
|
+
createdAt: Date;
|
|
314
|
+
updatedAt: Date;
|
|
315
|
+
}
|
|
316
|
+
export interface Schedule {
|
|
317
|
+
id: string;
|
|
318
|
+
league: string;
|
|
319
|
+
season: string;
|
|
320
|
+
games: string[];
|
|
321
|
+
createdAt: Date;
|
|
322
|
+
updatedAt: Date;
|
|
323
|
+
}
|
|
324
|
+
export interface TeamPostulation {
|
|
325
|
+
id: string;
|
|
326
|
+
team: string;
|
|
327
|
+
league: string;
|
|
328
|
+
status: string;
|
|
329
|
+
createdAt: Date;
|
|
330
|
+
updatedAt: Date;
|
|
331
|
+
}
|
|
332
|
+
export interface Reward {
|
|
333
|
+
id: string;
|
|
334
|
+
type: string;
|
|
335
|
+
entity: string;
|
|
336
|
+
amount: number;
|
|
337
|
+
status: string;
|
|
338
|
+
createdAt: Date;
|
|
339
|
+
updatedAt: Date;
|
|
340
|
+
}
|
|
341
|
+
export interface Payment {
|
|
342
|
+
id: string;
|
|
343
|
+
user: string;
|
|
344
|
+
amount: number;
|
|
345
|
+
status: string;
|
|
346
|
+
type: string;
|
|
347
|
+
createdAt: Date;
|
|
348
|
+
updatedAt: Date;
|
|
349
|
+
}
|
|
350
|
+
export interface Purchase {
|
|
351
|
+
id: string;
|
|
352
|
+
user: string;
|
|
353
|
+
type: string;
|
|
354
|
+
item: string;
|
|
355
|
+
quantity: number;
|
|
356
|
+
price: number;
|
|
357
|
+
status: string;
|
|
358
|
+
createdAt: Date;
|
|
359
|
+
updatedAt: Date;
|
|
360
|
+
}
|
|
361
|
+
export interface UserBadge {
|
|
362
|
+
user_id: string;
|
|
363
|
+
badge_id: string;
|
|
364
|
+
quantity: number;
|
|
365
|
+
visible: boolean;
|
|
366
|
+
createdAt: Date;
|
|
367
|
+
updatedAt: Date;
|
|
368
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Yup from "yup";
|
|
2
|
+
declare const getValidatorSignup: () => Yup.ObjectSchema<Yup.Shape<object | undefined, {
|
|
3
|
+
username: string;
|
|
4
|
+
password: string;
|
|
5
|
+
confirmPassword: never;
|
|
6
|
+
email: string;
|
|
7
|
+
}>, object>;
|
|
8
|
+
declare const getValidatorPassword: () => Yup.ObjectSchema<Yup.Shape<object | undefined, {
|
|
9
|
+
password: string;
|
|
10
|
+
confirmPassword: never;
|
|
11
|
+
}>, object>;
|
|
12
|
+
declare const getValidatorTeamName: () => Yup.ObjectSchema<Yup.Shape<object | undefined, {
|
|
13
|
+
name: string;
|
|
14
|
+
}>, object>;
|
|
15
|
+
declare const getValidatorPlayerName: () => Yup.ObjectSchema<Yup.Shape<object | undefined, {
|
|
16
|
+
name: string;
|
|
17
|
+
}>, object>;
|
|
18
|
+
declare const getValidatorChatMessage: () => Yup.ObjectSchema<Yup.Shape<object | undefined, {
|
|
19
|
+
name: string | undefined;
|
|
20
|
+
}>, object>;
|
|
21
|
+
declare const getDiscordId: () => Yup.ObjectSchema<Yup.Shape<object | undefined, {
|
|
22
|
+
name: string | undefined;
|
|
23
|
+
}>, object>;
|
|
24
|
+
export { getDiscordId, getValidatorChatMessage, getValidatorPassword, getValidatorPlayerName, getValidatorSignup, getValidatorTeamName, };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enefel",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Blood Bowl
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Blood Bowl 3 game engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"seedrandom": "3.0.5",
|
|
30
30
|
"yup": "^0.29.3"
|
|
31
31
|
},
|
|
32
|
-
"packageManager": "yarn@3.6.4+sha512.e70835d4d6d62c07be76b3c1529cb640c7443f0fe434ef4b6478a5a399218cbaf1511b396b3c56eb03bc86424cff2320f6167ad2fde273aa0df6e60b7754029f",
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@jest/globals": "^29.7.0",
|
|
35
34
|
"@types/jest": "^29.5.14",
|
package/tsconfig.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"resolveJsonModule": true,
|
|
13
13
|
"noImplicitAny": false, // temporary
|
|
14
14
|
"baseUrl": ".",
|
|
15
|
+
"declaration": true,
|
|
15
16
|
"paths": {
|
|
16
17
|
"status": ["./status"],
|
|
17
18
|
"random": ["./random"],
|
|
@@ -20,6 +21,6 @@
|
|
|
20
21
|
"time": ["./time"]
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
|
-
"include": ["./**/*.ts", "./**/*.d.ts", "./**/*.
|
|
24
|
+
"include": ["./**/*.ts", "./**/*.d.ts", "./**/*.json"],
|
|
24
25
|
"exclude": ["node_modules", "dist"]
|
|
25
26
|
}
|
package/.npmrc-example
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Exemple de fichier .npmrc avec un token d'authentification persistant
|
|
2
|
-
# Copiez ce fichier dans ~/.npmrc ou créez-le avec npm login --auth-type=legacy
|
|
3
|
-
|
|
4
|
-
# Configuration pour rester connecté
|
|
5
|
-
//registry.npmjs.org/:_authToken=VOTRE_TOKEN_ICI
|
|
6
|
-
|
|
7
|
-
# Pour éviter de toujours demander l'authentification à deux facteurs
|
|
8
|
-
npm_config_otp=""
|