xpt-shared-types 1.0.4 → 1.3.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.
Files changed (39) hide show
  1. package/README.md +121 -38
  2. package/dist/bracket.d.ts +56 -0
  3. package/dist/bracket.js +144 -0
  4. package/dist/contracts/index.d.ts +139 -0
  5. package/dist/contracts/index.js +8 -0
  6. package/dist/data/countriesList.d.ts +1 -1
  7. package/dist/data/countriesList.js +1 -1
  8. package/dist/generated/enums.d.ts +48 -0
  9. package/dist/generated/enums.js +5 -0
  10. package/dist/generated/index.d.ts +3 -0
  11. package/dist/generated/index.js +22 -0
  12. package/dist/generated/inputs.d.ts +420 -0
  13. package/dist/generated/inputs.js +5 -0
  14. package/dist/generated/models.d.ts +420 -0
  15. package/dist/generated/models.js +5 -0
  16. package/dist/index.d.ts +4 -3
  17. package/dist/index.js +9 -5
  18. package/dist/manual/index.d.ts +4 -0
  19. package/dist/manual/index.js +20 -0
  20. package/package.json +26 -23
  21. package/scripts/sync-from-strapi.js +281 -0
  22. package/src/bracket.ts +193 -0
  23. package/src/contracts/index.ts +158 -0
  24. package/src/data/countriesList.ts +1156 -1156
  25. package/src/generated/enums.ts +175 -0
  26. package/src/generated/index.ts +7 -0
  27. package/src/generated/inputs.ts +496 -0
  28. package/src/generated/models.ts +497 -0
  29. package/src/index.ts +14 -7
  30. package/src/manual/index.ts +4 -0
  31. package/dist/types/match.d.ts +0 -1
  32. package/dist/types/match.js +0 -2
  33. package/dist/types/tournament.d.ts +0 -1
  34. package/dist/types/tournament.js +0 -2
  35. package/src/types/match.ts +0 -8
  36. package/src/types/tournament.ts +0 -4
  37. /package/dist/{types → manual}/country.d.ts +0 -0
  38. /package/dist/{types → manual}/country.js +0 -0
  39. /package/src/{types → manual}/country.ts +0 -0
@@ -0,0 +1,420 @@
1
+ import type { BlocksContent, MediaInput, RelationInput } from '../contracts';
2
+ import type { FriendshipStatus, GameRequestCustomLobbies, GameRequestGenre, GameRequestTeamPlay, MatchLobbyStatus, MatchRound, MatchStreamPlatform, MatchWinnerSlot, PrizeRank, ReferralStatus, TeamCurrentStatus, TeamInviteStatus, TeamInviteTeamRole, TeamPlayerTeamRole, TournamentCurrentStatus, TournamentParticipantEntryType, TournamentParticipantStatus, TournamentRoleRole, TournamentStageStageName, TournamentTeamSize, TournamentType, UserTransactionStripeStatus, UserTransactionType } from './enums';
3
+ /** Write payload for `about`. */
4
+ export interface AboutInput {
5
+ heroTitle?: string;
6
+ summary?: BlocksContent;
7
+ aboutInfo?: unknown;
8
+ gameIcons?: MediaInput[];
9
+ }
10
+ /** Write payload for `dm-message`. */
11
+ export interface DmMessageInput {
12
+ conversationId?: string;
13
+ content?: string;
14
+ sender?: RelationInput;
15
+ readBy?: unknown;
16
+ }
17
+ /** Write payload for `faq`. */
18
+ export interface FaqInput {
19
+ question?: string;
20
+ answer?: BlocksContent;
21
+ }
22
+ /** Write payload for `featured-game`. */
23
+ export interface FeaturedGameInput {
24
+ featuredHeading?: string;
25
+ featuredSubheading?: string;
26
+ game?: RelationInput;
27
+ }
28
+ /** Write payload for `featured-tournament`. */
29
+ export interface FeaturedTournamentInput {
30
+ featuredHeading?: string;
31
+ featuredSubheading?: string;
32
+ tournament?: RelationInput;
33
+ }
34
+ /** Write payload for `friendship`. */
35
+ export interface FriendshipInput {
36
+ requester?: RelationInput;
37
+ receiver?: RelationInput;
38
+ status?: FriendshipStatus;
39
+ }
40
+ /** Write payload for `game`. */
41
+ export interface GameInput {
42
+ title?: string;
43
+ slug?: string;
44
+ imgThumb?: MediaInput;
45
+ imgMain?: MediaInput;
46
+ tournaments?: RelationInput | RelationInput[];
47
+ isTrending?: boolean;
48
+ user_game_stats?: RelationInput | RelationInput[];
49
+ team_game_stats?: RelationInput | RelationInput[];
50
+ imgMainPosition?: string;
51
+ }
52
+ /** Write payload for `game-account`. */
53
+ export interface GameAccountInput {
54
+ name?: string;
55
+ tournaments?: RelationInput | RelationInput[];
56
+ user_game_accounts?: RelationInput | RelationInput[];
57
+ imgThumb?: MediaInput;
58
+ }
59
+ /** Write payload for `game-request`. */
60
+ export interface GameRequestInput {
61
+ gameTitle?: string;
62
+ genre?: GameRequestGenre;
63
+ developer?: string;
64
+ platforms?: unknown;
65
+ gameIds?: unknown;
66
+ platformOther?: string;
67
+ gameIdOther?: string;
68
+ teamPlay?: GameRequestTeamPlay;
69
+ customLobbies?: GameRequestCustomLobbies;
70
+ whyAdd?: string;
71
+ notifyWhenAdded?: boolean;
72
+ submittedByEmail?: string;
73
+ submittedByUserId?: string;
74
+ }
75
+ /** Write payload for `group`. */
76
+ export interface GroupInput {
77
+ title?: string;
78
+ slug?: string;
79
+ members?: string;
80
+ imgThumb?: MediaInput;
81
+ followers?: number;
82
+ tournaments?: RelationInput | RelationInput[];
83
+ }
84
+ /** Write payload for `host-summary-stat`. */
85
+ export interface HostSummaryStatInput {
86
+ users_permissions_user?: RelationInput;
87
+ total_tournaments_hosted?: number;
88
+ total_participants_hosted?: number;
89
+ host_exp_earned?: number;
90
+ }
91
+ /** Write payload for `league-table`. */
92
+ export interface LeagueTableInput {
93
+ playerId?: RelationInput;
94
+ wins?: number;
95
+ losses?: number;
96
+ points?: number;
97
+ tournament?: RelationInput;
98
+ }
99
+ /** Write payload for `match`. */
100
+ export interface MatchInput {
101
+ tournament?: RelationInput;
102
+ matchNumber?: number;
103
+ homeId?: RelationInput;
104
+ awayId?: RelationInput;
105
+ dateTime?: string;
106
+ homeScore?: number;
107
+ awayScore?: number;
108
+ round?: MatchRound;
109
+ streamLink?: string;
110
+ comments?: string;
111
+ nextMatchNumber?: number;
112
+ winnerSlot?: MatchWinnerSlot;
113
+ lobbyStatus?: MatchLobbyStatus;
114
+ homeReady?: boolean;
115
+ awayReady?: boolean;
116
+ homeScreenshot?: MediaInput;
117
+ awayScreenshot?: MediaInput;
118
+ homeReportedHome?: number;
119
+ homeReportedAway?: number;
120
+ awayReportedHome?: number;
121
+ awayReportedAway?: number;
122
+ homeTeam?: RelationInput;
123
+ homeParticipant?: RelationInput;
124
+ awayTeam?: RelationInput;
125
+ awayParticipant?: RelationInput;
126
+ isStreaming?: boolean;
127
+ streamHandle?: string;
128
+ streamPlatform?: MatchStreamPlatform;
129
+ }
130
+ /** Write payload for `match-message`. */
131
+ export interface MatchMessageInput {
132
+ match?: RelationInput;
133
+ author?: RelationInput;
134
+ content?: string;
135
+ isSystemLog?: boolean;
136
+ isAdminMessage?: boolean;
137
+ }
138
+ /** Write payload for `notification`. */
139
+ export interface NotificationInput {
140
+ type?: string;
141
+ message?: string;
142
+ slug?: string;
143
+ read?: boolean;
144
+ metadata?: unknown;
145
+ actor?: RelationInput;
146
+ user?: RelationInput;
147
+ }
148
+ /** Write payload for `platform`. */
149
+ export interface PlatformInput {
150
+ name?: string;
151
+ tournaments?: RelationInput | RelationInput[];
152
+ }
153
+ /** Write payload for `preset-avatar`. */
154
+ export interface PresetAvatarInput {
155
+ image?: MediaInput;
156
+ }
157
+ /** Write payload for `preset-profile-banner`. */
158
+ export interface PresetProfileBannerInput {
159
+ image?: MediaInput;
160
+ }
161
+ /** Write payload for `preset-team-avatar`. */
162
+ export interface PresetTeamAvatarInput {
163
+ image?: MediaInput;
164
+ }
165
+ /** Write payload for `preset-team-profile-banner`. */
166
+ export interface PresetTeamProfileBannerInput {
167
+ image?: MediaInput;
168
+ }
169
+ /** Write payload for `privacy`. */
170
+ export interface PrivacyInput {
171
+ content?: BlocksContent;
172
+ title?: string;
173
+ }
174
+ /** Write payload for `prize`. */
175
+ export interface PrizeInput {
176
+ description?: string;
177
+ value?: number;
178
+ tournament?: RelationInput;
179
+ rank?: PrizeRank;
180
+ }
181
+ /** Write payload for `referral`. */
182
+ export interface ReferralInput {
183
+ referrer?: RelationInput;
184
+ referred?: RelationInput;
185
+ code?: string;
186
+ status?: ReferralStatus;
187
+ referrerXpt?: number;
188
+ referredXpt?: number;
189
+ }
190
+ /** Write payload for `region`. */
191
+ export interface RegionInput {
192
+ name?: string;
193
+ tournaments?: RelationInput | RelationInput[];
194
+ code?: string;
195
+ }
196
+ /** Write payload for `social-account`. */
197
+ export interface SocialAccountInput {
198
+ name?: string;
199
+ baseUrl?: string;
200
+ user_socials?: RelationInput | RelationInput[];
201
+ imgThumb?: MediaInput;
202
+ }
203
+ /** Write payload for `team`. */
204
+ export interface TeamInput {
205
+ name?: string;
206
+ slug?: string;
207
+ bio?: string;
208
+ avatar?: MediaInput;
209
+ inviteCode?: string;
210
+ team_players?: RelationInput | RelationInput[];
211
+ team_game_stats?: RelationInput | RelationInput[];
212
+ banner_image?: MediaInput;
213
+ current_status?: TeamCurrentStatus;
214
+ }
215
+ /** Write payload for `team-game-stat`. */
216
+ export interface TeamGameStatInput {
217
+ team?: RelationInput;
218
+ game?: RelationInput;
219
+ match_wins?: number;
220
+ match_losses?: number;
221
+ tournaments_played?: number;
222
+ trophies_gold?: number;
223
+ trophies_silver?: number;
224
+ trophies_bronze?: number;
225
+ exp_earned?: number;
226
+ prize_earned?: number;
227
+ }
228
+ /** Write payload for `team-invite`. */
229
+ export interface TeamInviteInput {
230
+ inviter?: RelationInput;
231
+ invitee?: RelationInput;
232
+ team?: RelationInput;
233
+ game?: RelationInput;
234
+ status?: TeamInviteStatus;
235
+ team_role?: TeamInviteTeamRole;
236
+ }
237
+ /** Write payload for `team-player`. */
238
+ export interface TeamPlayerInput {
239
+ team?: RelationInput;
240
+ users_permissions_user?: RelationInput;
241
+ joinedAt?: string;
242
+ team_role?: TeamPlayerTeamRole;
243
+ }
244
+ /** Write payload for `team-summary-stat`. */
245
+ export interface TeamSummaryStatInput {
246
+ team?: RelationInput;
247
+ total_match_wins?: number;
248
+ total_match_losses?: number;
249
+ total_tournaments_played?: number;
250
+ total_trophies_gold?: number;
251
+ total_trophies_silver?: number;
252
+ total_trophies_bronze?: number;
253
+ total_registrations?: number;
254
+ total_no_shows?: number;
255
+ total_disputes_caused?: number;
256
+ total_exp_earned?: number;
257
+ total_prize_earned?: number;
258
+ }
259
+ /** Write payload for `term`. */
260
+ export interface TermInput {
261
+ title?: string;
262
+ content?: BlocksContent;
263
+ }
264
+ /** Write payload for `tournament`. */
265
+ export interface TournamentInput {
266
+ title?: string;
267
+ slug?: string;
268
+ imgMain?: MediaInput;
269
+ dateTime?: string;
270
+ entryFee?: number;
271
+ type?: TournamentType;
272
+ participants?: number;
273
+ detail?: string;
274
+ users_permissions_user?: RelationInput;
275
+ matches?: RelationInput | RelationInput[];
276
+ teamSize?: TournamentTeamSize;
277
+ game?: RelationInput;
278
+ currentStatus?: TournamentCurrentStatus;
279
+ group?: RelationInput;
280
+ prizes?: RelationInput | RelationInput[];
281
+ tournament_participants?: RelationInput | RelationInput[];
282
+ tournament_roles?: RelationInput | RelationInput[];
283
+ league_tables?: RelationInput | RelationInput[];
284
+ rules?: string;
285
+ hasThirdPlace?: boolean;
286
+ isPrivate?: boolean;
287
+ checkInTime?: number;
288
+ region?: RelationInput;
289
+ platform?: RelationInput;
290
+ gameAccount?: RelationInput;
291
+ tournament_stages?: RelationInput | RelationInput[];
292
+ prizesDistributed?: boolean;
293
+ discordUrl?: string;
294
+ twitterUrl?: string;
295
+ twitchUrl?: string;
296
+ websiteUrl?: string;
297
+ }
298
+ /** Write payload for `tournament-participant`. */
299
+ export interface TournamentParticipantInput {
300
+ tournament?: RelationInput;
301
+ entryType?: TournamentParticipantEntryType;
302
+ registrationDate?: string;
303
+ team?: RelationInput;
304
+ coveredBy?: RelationInput;
305
+ displayName?: string;
306
+ seed?: number;
307
+ finalPlacement?: number;
308
+ checkedIn?: boolean;
309
+ status?: TournamentParticipantStatus;
310
+ captainUser?: RelationInput;
311
+ membersSnapshot?: unknown;
312
+ }
313
+ /** Write payload for `tournament-preset-banner`. */
314
+ export interface TournamentPresetBannerInput {
315
+ banner?: MediaInput;
316
+ }
317
+ /** Write payload for `tournament-role`. */
318
+ export interface TournamentRoleInput {
319
+ role?: TournamentRoleRole;
320
+ users_permissions_user?: RelationInput;
321
+ tournament?: RelationInput;
322
+ }
323
+ /** Write payload for `tournament-stage`. */
324
+ export interface TournamentStageInput {
325
+ stageName?: TournamentStageStageName;
326
+ bestOf?: number;
327
+ tournament?: RelationInput;
328
+ isThirdPlace?: boolean;
329
+ }
330
+ /** Write payload for `user`. */
331
+ export interface UserInput {
332
+ username?: string;
333
+ email?: string;
334
+ provider?: string;
335
+ confirmed?: boolean;
336
+ blocked?: boolean;
337
+ role?: RelationInput;
338
+ image?: MediaInput;
339
+ matches?: RelationInput | RelationInput[];
340
+ userRating?: number;
341
+ tournament_roles?: RelationInput | RelationInput[];
342
+ user_socials?: RelationInput | RelationInput[];
343
+ user_game_accounts?: RelationInput | RelationInput[];
344
+ banner_image?: MediaInput;
345
+ information?: string;
346
+ countryCode?: string;
347
+ dob?: string;
348
+ notifyUpdates?: boolean;
349
+ xptCoins?: number;
350
+ user_transactions?: RelationInput | RelationInput[];
351
+ dailyRewardStreak?: number;
352
+ dailyRewardLastClaimed?: string;
353
+ user_game_stats?: RelationInput | RelationInput[];
354
+ notificationPreferences?: unknown;
355
+ referralCode?: string;
356
+ referralRewardClaimed?: boolean;
357
+ }
358
+ /** Write payload for `user-game-account`. */
359
+ export interface UserGameAccountInput {
360
+ accountId?: string;
361
+ isPrivate?: boolean;
362
+ users_permissions_user?: RelationInput;
363
+ game_account?: RelationInput;
364
+ }
365
+ /** Write payload for `user-game-stat`. */
366
+ export interface UserGameStatInput {
367
+ users_permissions_user?: RelationInput;
368
+ game?: RelationInput;
369
+ exp_earned?: number;
370
+ prize_earned?: number;
371
+ tournaments_played?: number;
372
+ match_wins?: number;
373
+ match_losses?: number;
374
+ trophies_gold?: number;
375
+ trophies_silver?: number;
376
+ trophies_bronze?: number;
377
+ }
378
+ /** Write payload for `user-social`. */
379
+ export interface UserSocialInput {
380
+ socialId?: string;
381
+ isPrivate?: boolean;
382
+ users_permissions_user?: RelationInput;
383
+ social_account?: RelationInput;
384
+ }
385
+ /** Write payload for `user-summary-stat`. */
386
+ export interface UserSummaryStatInput {
387
+ users_permissions_user?: RelationInput;
388
+ total_exp_earned?: number;
389
+ total_prize_earned?: number;
390
+ total_tournaments_played?: number;
391
+ total_wins?: number;
392
+ total_losses?: number;
393
+ total_trophies_gold?: number;
394
+ total_trophies_silver?: number;
395
+ total_trophies_bronze?: number;
396
+ total_registrations?: number;
397
+ total_no_shows?: number;
398
+ total_disputes_caused?: number;
399
+ }
400
+ /** Write payload for `user-transaction`. */
401
+ export interface UserTransactionInput {
402
+ users_permissions_user?: RelationInput;
403
+ xptAmount?: number;
404
+ priceAmount?: number;
405
+ type?: UserTransactionType;
406
+ stripeStatus?: UserTransactionStripeStatus;
407
+ description?: string;
408
+ stripePaymentIntentId?: string;
409
+ metadata?: unknown;
410
+ }
411
+ /** Write payload for `xpt-team`. */
412
+ export interface XptTeamInput {
413
+ name?: string;
414
+ role?: string;
415
+ linkedIn?: string;
416
+ portfolio?: string;
417
+ avatar?: MediaInput;
418
+ isTeam?: boolean;
419
+ isFemale?: boolean;
420
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // AUTO-GENERATED by scripts/sync-from-strapi.js — DO NOT EDIT MANUALLY.
3
+ // Source: xpt-strapi/src/**/content-types/**/schema.json
4
+ // Regenerate with: yarn sync
5
+ Object.defineProperty(exports, "__esModule", { value: true });