speedruncom.js 1.2.8 → 1.2.10

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/src/interfaces.ts CHANGED
@@ -1,1621 +1,1621 @@
1
- import * as Enums from './enums.js';
2
-
3
- /**
4
- * A Category item.
5
- */
6
- export interface Category {
7
-
8
- /**
9
- * ID of the category.
10
- */
11
- readonly id: string;
12
-
13
- /**
14
- * Name of the category.
15
- */
16
- name: string;
17
-
18
- /**
19
- * Page URL of the category.
20
- * This is never actually used in site pages.
21
- * The URL is permanent and can never update, even when changing the category name.
22
- */
23
- readonly url: string;
24
-
25
- /**
26
- * A global, site-wide position order number for the category.
27
- */
28
- readonly pos: number;
29
-
30
- /**
31
- * ID of the game the category is on.
32
- */
33
- readonly gameId: string;
34
-
35
- /**
36
- * Whether or not the category is miscellaneous.
37
- */
38
- isMisc: boolean;
39
-
40
- /**
41
- * Whether or not the category is only for individual levels.
42
- */
43
- isPerLevel: boolean;
44
-
45
- /**
46
- * The maximum amount of players you can choose when submitting a run to the category.
47
- * todo check if the 1 player > infinite player glitch is still patches yet
48
- */
49
- numPlayers: number;
50
-
51
- /**
52
- * todo wtf is this
53
- */
54
- exactPlayers: boolean;
55
-
56
- /**
57
- * `PlayerMatchMode` of the category.
58
- */
59
- playerMatchMode: Enums.PlayerMatchMode;
60
-
61
- /**
62
- * `TimeDirection` of the category.
63
- */
64
- timeDirection: Enums.TimeDirection;
65
-
66
- /**
67
- * Whether or not runs with `.000` milliseconds have their milliseconds shown on leaderboards or not.
68
- */
69
- enforceMs: boolean;
70
-
71
- /**
72
- * Rules for the category.
73
- */
74
- rules: string;
75
-
76
- /**
77
- * Whether or not the category is archived.
78
- */
79
- archived?: boolean;
80
- }
81
-
82
- /**
83
- * A moderator (or verifier) of a challenge.
84
- */
85
- export interface ChallengeModerator {
86
-
87
- /**
88
- * ID of the challenge being moderated.
89
- */
90
- readonly challengeId: string;
91
-
92
- /**
93
- * ID of the user moderating.
94
- */
95
- readonly userId: string;
96
-
97
- /**
98
- * `GamePowerLevel` of the moderator.
99
- */
100
- readonly level: Enums.GamePowerLevel;
101
- }
102
-
103
- /**
104
- * A current status of a challenge.
105
- */
106
- export interface ChallengeStanding {
107
-
108
- /**
109
- * ID of the challenge.
110
- */
111
- readonly challengeId: string;
112
-
113
- /**
114
- * todo
115
- */
116
- readonly place: number;
117
-
118
- /**
119
- * todo
120
- */
121
- readonly registeredPlayerIds: string[];
122
-
123
- /**
124
- * todo
125
- */
126
- readonly prizeAmount: number;
127
-
128
- /**
129
- * todo
130
- */
131
- readonly unregisteredPlayers: string[]
132
-
133
- /**
134
- * todo
135
- */
136
- readonly prizeCurrency: string;
137
- }
138
-
139
- /**
140
- * A currency reward for getting a certain ranking in a challenge.
141
- */
142
- export interface ChallengePrize {
143
-
144
- /**
145
- * The ranking in the challenge for the reward.
146
- */
147
- readonly place: number;
148
-
149
- /**
150
- * The amount of money rewarded to the player in the `place`.
151
- */
152
- readonly amount: number;
153
- }
154
-
155
- /**
156
- * Configuration settings of a challenge.
157
- */
158
- export interface ChallengePrizeConfig {
159
-
160
- /**
161
- * TODO
162
- */
163
- readonly prizePool: number;
164
-
165
- /**
166
- * TODO
167
- */
168
- readonly currency: string;
169
- readonly prizes: ChallengePrize[];
170
- }
171
-
172
- /**
173
- * A single user's site-wide ranking details based on all challenges entered.
174
- */
175
- export interface GlobalChallengeRanking {
176
-
177
- /**
178
- * ID of the user.
179
- */
180
- readonly userId: string;
181
-
182
- /**
183
- * The user's site-wide rank.
184
- */
185
- readonly rank: number;
186
- readonly totalEarnings: number;
187
-
188
- /**
189
- * The amount of first place ranks the user has achieved in challenges.
190
- */
191
- readonly firstPlaces: number;
192
-
193
- /**
194
- * The amount of second place ranks the user has achieved in challenges.
195
- */
196
- readonly secondPlaces: number;
197
-
198
- /**
199
- * The amount of third place ranks the user has achieved in challenges.
200
- */
201
- readonly thirdPlaces: number;
202
-
203
- /**
204
- * The total amount of challenges the user has entered.
205
- */
206
- readonly challengesEntered: number;
207
- }
208
-
209
- /**
210
- * A site challenge.
211
- */
212
- export interface Challenge {
213
-
214
- /**
215
- * ID of the challenge.
216
- */
217
- readonly id: string;
218
-
219
- /**
220
- * Name of the challenge.
221
- */
222
- readonly name: string;
223
-
224
- /**
225
- * todo
226
- */
227
- readonly announcement: string;
228
-
229
- /**
230
- * Subpath URL of the challenge.
231
- */
232
- readonly url: string;
233
-
234
- /**
235
- * ID of the game the challenge is based on.
236
- */
237
- readonly gameId: string;
238
-
239
- /**
240
- * UNIX timestamp of when the challenge was created.
241
- */
242
- readonly createDate: number;
243
-
244
- /**
245
- * UNIX timestamp of when the challenge settings were last updated.
246
- */
247
- readonly updateDate: number;
248
-
249
- /**
250
- * todo
251
- */
252
- readonly startDate: number;
253
-
254
- /**
255
- * todo
256
- */
257
- readonly endDate: number;
258
-
259
- /**
260
- * `ChallengeState` of the challenge.
261
- */
262
- readonly state: Enums.ChallengeState;
263
-
264
- /**
265
- * Description of the challenge.
266
- */
267
- readonly description: string;
268
-
269
- /**
270
- * Rules of the challenge (not to be confused with `contestRules`).
271
- */
272
- readonly rules: string;
273
-
274
- /**
275
- *
276
- */
277
- readonly numPlayers: number;
278
- readonly exactPlayers: boolean;
279
- readonly playerMatchMode: Enums.PlayerMatchMode;
280
- readonly timeDirection: Enums.TimeDirection;
281
- readonly enforceMs: boolean;
282
-
283
- /**
284
- * Subpath URL of the challenge's cover image.
285
- * check if opt todo
286
- */
287
- readonly coverImagePath: string;
288
- readonly contest: boolean;
289
- readonly contestRules: string;
290
- readonly runCommentsMode: Enums.ItemPermissionType;
291
-
292
- /**
293
- * `ChallengePrizeConfig` of the challenge.
294
- */
295
- readonly prizeConfig: ChallengePrizeConfig;
296
- }
297
-
298
- /**
299
- * Player reward for completing a Challenge.
300
- */
301
- export interface Title {
302
-
303
- /**
304
- * ID of the title.
305
- */
306
- readonly id: string;
307
-
308
- /**
309
- * Title of the challenge.
310
- */
311
- readonly title: string;
312
-
313
- /**
314
- * Description of how the challenge is rewarded to players.
315
- */
316
- readonly comment: string;
317
-
318
- /**
319
- * Subpath URL of the challenge that rewards the title.
320
- */
321
- readonly referenceUrl: string;
322
- }
323
-
324
- /**
325
- * Permissions of a comment section.
326
- */
327
- export interface CommentPermissions {
328
-
329
- /**
330
- * Whether or not
331
- */
332
- readonly canManage: boolean;
333
-
334
- /**
335
- * Whether or
336
- */
337
- readonly canViewComments: boolean;
338
- readonly canPostComments: boolean;
339
-
340
- /**
341
- * Whether or not editing comments is allowed.
342
- */
343
- readonly canEditComments: boolean;
344
-
345
- /**
346
- * Whether or not deleting comments is allowsed.
347
- */
348
- readonly canDeleteComments: boolean;
349
-
350
- /**
351
- * Reasons for not being able to not view a thread.
352
- */
353
- readonly cannotViewReasons: string[];
354
-
355
- /**
356
- * Reasons for not being able to post a comment.
357
- */
358
- readonly cannotPostReasons: string[];
359
- }
360
-
361
- export interface CommentableProperties {
362
- readonly disabled: boolean;
363
- readonly locked: boolean;
364
- }
365
-
366
- export interface Commentable {
367
- readonly itemType: Enums.ItemType;
368
- readonly itemId: string;
369
- readonly properties: CommentableProperties;
370
- /**Permissions of the logged in user. If not logged in; `canPostComments` is `false`.*/
371
- readonly permissions: CommentPermissions;
372
- }
373
-
374
- export interface Comment {
375
- readonly id: string;
376
- readonly itemType: Enums.ItemType;
377
- readonly itemId: string;
378
- readonly date: number;
379
- readonly userId: string;
380
- /**May be omitted on deleted comments.*/
381
- readonly text?: string;
382
- readonly parentId?: string;
383
- readonly deleted: boolean;
384
- readonly deletedUserId?: string;
385
- }
386
-
387
- export interface Like {
388
- readonly itemType: Enums.ItemType;
389
- readonly itemId: string;
390
- readonly userId: string;
391
- readonly date: number;
392
- }
393
-
394
- export interface SocialNetwork {
395
-
396
- /**
397
- * `SocialConnection` of the social network.
398
- */
399
- readonly id: Enums.SocialConnection;
400
-
401
- /**
402
- * Name of the social network.
403
- */
404
- readonly name: string;
405
-
406
- /**
407
- * Arbitrary and unknown determination of if the platform is popular.
408
- *
409
- * This does not have to do with if the platform is depricated or not.
410
- */
411
- readonly major: boolean;
412
-
413
- /**
414
- * Site-wide ordering method of the platform.
415
- */
416
- readonly pos: number;
417
-
418
- /**
419
- * Either a URL with a `[id]` placeholder of where the entered value would be stored, `popup` when there is complex authentication of the social network, or an empty string when the value you enter is exactly what the end result will be.
420
- *
421
- * Example: `https://www.youtube.com/user/[id]`
422
- */
423
- readonly pattern: string;
424
- }
425
-
426
- export interface Area {
427
- readonly id: string;
428
- readonly name: string;
429
- readonly fullName: string;
430
- readonly label: string;
431
- readonly flagIcon: string;
432
- readonly lbFlagIcon: string;
433
- readonly lbName: string;
434
- }
435
-
436
- export interface Color {
437
- readonly id: string;
438
- readonly name: string;
439
- readonly darkColor: string;
440
- /**@deprecated `darkColor` is always used on the site*/
441
- readonly lightColor: string;
442
- /**@deprecated colors now seem to be sorted by their name's ascending alphabetical order (A-Z)*/
443
- readonly pos: number;
444
- }
445
-
446
- /**
447
- * A 'category' of threads, being site-wide such as *The Site* and *Supporter* or representing the forum section that every game has.
448
- */
449
- export interface Forum {
450
-
451
- /**
452
- * `id` of this forum section.
453
- */
454
- readonly id: string;
455
-
456
- /**
457
- * Name of the forum. If this is the game's forum, it is the game name.
458
- */
459
- readonly name: string;
460
-
461
- /**
462
- * Page URL of the forum. If this is the game's forum, it is the game's page URL.
463
- */
464
- readonly url: string;
465
-
466
- /**
467
- * A description used to describe site-wide forums.
468
- */
469
- readonly description?: string;
470
-
471
- /**
472
- * The `ForumType` the forum is.
473
- */
474
- readonly type: Enums.ForumType;
475
-
476
- /**
477
- * The amount of threads inside of a forum.
478
- */
479
- readonly threadCount: number;
480
-
481
- /**
482
- * The amont of combined posts of every thread in the forum.
483
- */
484
- readonly postCount: number;
485
-
486
- /**
487
- * The ID of the latest post in any thread in the forum.
488
- */
489
- readonly lastPostId: string;
490
-
491
- /**
492
- * The `userId` of the latest post in any thread in the forum.
493
- */
494
- readonly lastPostUserId: string;
495
-
496
- /**
497
- * The UNIX timestamp of when the latest post in any thread in the forum was posted.
498
- */
499
- readonly lastPostDate: number;
500
-
501
- /**
502
- *
503
- */
504
- readonly touchDate: number;
505
- }
506
-
507
- export interface Thread {
508
- readonly id: string;
509
- readonly name: string;
510
- readonly gameId: string;
511
- readonly forumId: string;
512
- readonly userId: string;
513
- readonly replies: number;
514
- readonly created: number;
515
- readonly lastCommentId: string;
516
- readonly lastCommentUserId: string;
517
- readonly lastCommentDate: number;
518
- readonly sticky: boolean;
519
- readonly locked: boolean;
520
- }
521
-
522
- export interface ForumReadStatus {
523
- readonly forumId: string;
524
- readonly date: number;
525
- }
526
-
527
- export interface Datatype {
528
- readonly threadId: string;
529
- readonly date: number;
530
- }
531
-
532
- export interface Leaderboard {
533
- readonly category: Category;
534
- readonly game: Game;
535
- readonly pagination: Pagination;
536
- readonly platforms: Platform[];
537
-
538
- /**
539
- * Every Player with a run in a game.
540
- */
541
- readonly players: Player[];
542
- readonly regions: Region[];
543
- readonly runs: GameRun[];
544
- readonly values: VariableValue[];
545
- readonly variables: Variable[];
546
- }
547
-
548
- /**
549
- * Paramaters for filtering a leaderboard.
550
- */
551
- export interface LeaderboardParams {
552
-
553
- /**
554
- * ID of the leaderboard's game.
555
- */
556
- gameId: string;
557
-
558
- /**
559
- * ID of the leaderboard's category.
560
- */
561
- categoryId: string;
562
-
563
- /**
564
- * YYYY-MM-DD format of the minimum speedrun date of runs.
565
- */
566
- dateFrom?: string;
567
-
568
- /**
569
- * YYYY-MM-DD format of the maximum speedrun date of runs.
570
- */
571
- dateTo?: string;
572
-
573
- /**
574
- * `EmulatorFilter` determining the emulator inclusivity of runs.
575
- */
576
- emulator?: Enums.EmulatorFilter;
577
-
578
- /**
579
- * ID of the leaderboard's level, if applicable.
580
- */
581
- levelId?: string;
582
-
583
- /**
584
- * `ObsoleteFilter` determining the obsoletion inclusivity of runs.
585
- */
586
- obsolete?: Enums.ObsoleteFilter;
587
-
588
- /**
589
- * IDs of the platforms of runs.
590
- * Platform IDs can be found with `GetPlatformList`.
591
- */
592
- platformIds?: string[];
593
-
594
- /**
595
- * IDs of the regions of runs.
596
- * This is not to be confused with country, you cannot filter runs by country.
597
- */
598
- regionIds?: string[];
599
- timer?: Enums.TimingMethod;
600
-
601
- /**
602
- * `RunStatus` of runs.
603
- */
604
- verified?: Enums.RunStatus;
605
-
606
- /**
607
- * Variable and value pairs of runs.
608
- */
609
- values?: VariableValues[];
610
-
611
- /**
612
- * `VideoFilter` determining video inclusivity of runs.
613
- */
614
- video?: Enums.VideoFilter;
615
- }
616
-
617
- export interface RunCount {
618
- readonly gameId: string;
619
- readonly categoryId: string;
620
- readonly levelId?: string;
621
- readonly variableId?: string;
622
- readonly valueId?: string;
623
- readonly count: number;
624
- }
625
-
626
- export interface Platform {
627
- readonly id: string;
628
- readonly name: string;
629
- readonly url: string;
630
- readonly year: number;
631
- }
632
-
633
- export interface Article {
634
- readonly id: string;
635
- readonly slug: string;
636
- readonly title: string;
637
- readonly summary: string;
638
- readonly body: string;
639
- readonly createDate: number;
640
- readonly updateDate: number;
641
- readonly publishDate?: number;
642
- readonly rejectDate?: number;
643
- readonly publishTarget: string;
644
- readonly publishTags: string[];
645
- readonly coverImagePath?: string;
646
- readonly commentsCount: number;
647
- readonly community?: boolean;
648
- readonly gameId?: string;
649
- readonly userId?: string;
650
- readonly editorId?: string;
651
- /**day it was pinned */
652
- readonly stickyDate?: number;
653
- }
654
-
655
- export interface Region {
656
- readonly id: string;
657
- readonly name: string;
658
- readonly url: string;
659
- readonly flag: string;
660
- }
661
-
662
- export interface Pagination {
663
- readonly count: number;
664
- readonly page: number;
665
- readonly pages: number;
666
- readonly per: number;
667
- }
668
-
669
- export interface Guide {
670
- readonly id: string;
671
- readonly name: string;
672
- readonly text: string;
673
- readonly date: number;
674
- readonly userId: string;
675
- readonly gameId: string;
676
- }
677
-
678
- export interface Resource {
679
- readonly id: string;
680
- readonly type: Enums.ResourceType;
681
- readonly name: string;
682
- readonly description: string;
683
- readonly date: number;
684
- readonly userId: string;
685
- readonly gameId: string;
686
- readonly path?: string;
687
- readonly link?: string;
688
- readonly fileName?: string;
689
- readonly authorNames: string; // TODO: exhaustive check for lists AND CHECK THAT UCHI ARTICLE WITH META??
690
- }
691
-
692
- export interface Stream {
693
- readonly id: string;
694
- readonly gameId?: string;
695
- readonly userId?: string;
696
- readonly areaId?: string;
697
- readonly url: string;
698
- readonly title: string;
699
- readonly previewUrl: string;
700
- readonly channelName: string;
701
- readonly viewers: number;
702
- /**If the stream has a PB on SRC (and has their account linked) TODO: check*/
703
- readonly hasPb: boolean;
704
- }
705
-
706
- export interface AuditLogEntry {
707
- readonly id: string;
708
- readonly date: number;
709
- readonly eventType: Enums.EventType
710
- readonly actorId: string;
711
- readonly gameId: string; // TODO check if optional, prolly is
712
- /**A json dict of extra context based on eventType.*/
713
- readonly context: string;
714
- readonly userId?: string;
715
- }
716
-
717
- export interface Session {
718
- readonly signedIn: boolean;
719
- readonly showAds: boolean;
720
- readonly user?: User;
721
- readonly theme?: Theme;
722
- readonly powerLevel: Enums.SitePowerLevel;
723
- readonly dateFormat: Enums.DateFormat;
724
- readonly timeFormat: Enums.TimeFormat;
725
- readonly timeReference: Enums.TimeReference;
726
- readonly timeUnits: Enums.TimeDisplayUnits;
727
- readonly homepageStream: Enums.HomepageStreamType;
728
- readonly disableThemes: boolean;
729
- readonly csrfToken: string;
730
- readonly networkToken?: string;
731
- readonly gameList: Game[];
732
- readonly gameFollowerList: GameFollower[];
733
- readonly gameModeratorList: GameModerator[];
734
- readonly gameRunnerList: GameRunner[];
735
- readonly seriesList: Series[];
736
- readonly seriesModeratorList: SeriesModerator[];
737
- readonly boostAvailableTokens?: number;
738
- readonly boostNextTokenDate: number;
739
- readonly boostNextTokenAmount: number;
740
- readonly userFollowerList: UserFollower[];
741
- readonly enabledExperimentIds: string[]; // TODO: check
742
- readonly challengeModeratorList: ChallengeModerator[]; // TODO: check
743
- }
744
-
745
- export interface Conversation {
746
- readonly id: string;
747
- readonly participantUserIds: string[];
748
- readonly lastMessageId: string;
749
- readonly lastMessageUser: string;
750
- readonly lastMessageText: string;
751
- readonly lastMessageDate: number;
752
- readonly readDate: number;
753
- }
754
-
755
- export interface ConversationLightweight {
756
- readonly id: string;
757
- /**TODO check if empty */
758
- readonly participantUserIds: string[];
759
- readonly lastMessageId: string;
760
- readonly lastMessageDate: number;
761
- }
762
-
763
- export interface ConversationParticipant {
764
- readonly conversationId: string;
765
- readonly userId: string;
766
- readonly joinedDate: number;
767
- /**TODO check if optional*/
768
- readonly leftDate: number;
769
- }
770
-
771
- export interface ConversationMessage {
772
- readonly id: string;
773
- readonly conversationId: string;
774
- readonly userId: string;
775
- readonly text: string;
776
- readonly date: number;
777
- }
778
-
779
- export interface SystemMessage {
780
- readonly id: string;
781
- readonly userId: string;
782
- readonly text: string;
783
- readonly date: number;
784
- readonly read: boolean;
785
- }
786
-
787
- /**
788
- * The basic data of a game.
789
- */
790
- export interface Game {
791
-
792
- /**
793
- * ID of the game.
794
- */
795
- readonly id: string;
796
-
797
- /**
798
- * Name of the game.
799
- */
800
- readonly name: string;
801
-
802
- /**
803
- * Page URL of the game.
804
- */
805
- readonly url: string;
806
-
807
- /**
808
- * Unused enum that is always `1`. todo check if gameType is this
809
- */
810
- readonly type: 1;
811
-
812
- /**
813
- * Whether or not a game has Load Removed Time (LRT) as a timing method.
814
- */
815
- readonly loadtimes: boolean;
816
-
817
- /**
818
- * Whether or not the game supports entering milliseconds when entering a time into a run.
819
- */
820
- readonly milliseconds: boolean;
821
-
822
- /**
823
- * Whether or not a game has In Game Time (IGT) as a timing method.
824
- */
825
- readonly igt: boolean;
826
-
827
- /**
828
- * Whether or not runs require moderators to verify them.
829
- */
830
- readonly verification: boolean;
831
-
832
- /**
833
- * Whether or not the default option for 'Automatically Verify Run' is true.
834
- */
835
- readonly autoVerify?: boolean;
836
-
837
- /**
838
- * Whether or not videos are required for submission.
839
- */
840
- readonly requireVideo: boolean;
841
-
842
- /**
843
- * Emulator allowability in a game.
844
- */
845
- readonly emulator: Enums.EmulatorType;
846
-
847
- /**
848
- * Default timing method of the game.
849
- */
850
- readonly defaultTimer: Enums.TimingMethod;
851
- readonly validTimers: Enums.TimingMethod[];
852
- readonly releaseDate?: number;
853
- readonly addedDate: number;
854
- readonly touchDate: number;
855
- readonly baseGameId?: string;
856
- readonly coverPath: string; //check if opt
857
- readonly trophy1stPath?: string;
858
- readonly trophy2ndPath?: string;
859
- readonly trophy3rdPath?: string;
860
- readonly trophy4thPath?: string;
861
- readonly runCommentsMode: Enums.ItemPermissionType;
862
- readonly runCount: number;
863
- readonly activePlayerCount: number;
864
- readonly totalPlayerCount: number;
865
- readonly boostReceivedCount: number;
866
- readonly boostDistinctDonorsCount: number;
867
- readonly rules?: string;
868
- readonly viewPowerLevel: Enums.SitePowerLevel;
869
- readonly platformIds: string[];
870
- readonly regionIds: string[];
871
- readonly gameTypeIds: Enums.GameType[];
872
- readonly websiteUrl?: string;
873
- readonly discordUrl?: string;
874
- readonly defaultView: Enums.DefaultViewType
875
- readonly guidePermissionType: Enums.ItemPermissionType;
876
- readonly resourcePermissionType: Enums.ItemPermissionType;
877
- readonly staticAssets: StaticAsset[];
878
- readonly embargoDate?: number;
879
- readonly embargoText?: string;
880
- }
881
-
882
- export interface GameStats {
883
- readonly gameId: string;
884
- readonly totalRuns: number;
885
- readonly totalRunsFG: number;
886
- readonly totalRunsIL: number;
887
- readonly totalRunTime: number;
888
- readonly recentRuns: number;
889
- readonly recentRunsFG: number;
890
- readonly recentRunsIL: number;
891
- readonly totalPlayers: number;
892
- readonly activePlayers: number;
893
- readonly followers: number;
894
- readonly guides: number;
895
- readonly resources: number;
896
- }
897
-
898
- export interface GameNews {
899
- readonly id: string;
900
- readonly gameId: string;
901
- readonly userId: string;
902
- readonly title: string;
903
- /**
904
- * Omitted for all but the first item in `GetGameSummary.newsList[]`.
905
- */
906
- readonly body?: string;
907
- readonly dateSubmitted: number;
908
- }
909
-
910
- export interface GameModerator {
911
- gameId: string;
912
- userId: string;
913
- level: Enums.GamePowerLevel;
914
- }
915
-
916
- export interface GameBoost {
917
- readonly id: string;
918
- readonly createdAt: number;
919
- readonly updatedAt: number;
920
- readonly gameId: string;
921
- readonly donorUserId: string;
922
- readonly anonymous: boolean;
923
- readonly recipientUserIds: [];
924
- }
925
-
926
- export interface GameTypeDetails {
927
- readonly id: Enums.GameType
928
- readonly name: string;
929
- readonly url: string;
930
- readonly description: string;
931
- readonly allowBaseGame: boolean;
932
- }
933
-
934
- /**TODO: Check for optional properties*/
935
- export interface GameSettings {
936
- readonly id: string;
937
- name: string;
938
- url: string;
939
- twitchName: string;
940
- releaseDate: number;
941
- milliseconds: boolean;
942
- defaultView: Enums.DefaultViewType
943
- loadTimes: boolean;
944
- igt: boolean;
945
- defaultTimer: Enums.TimingMethod
946
- showEmptyTimes: boolean;
947
- rulesView: boolean;
948
- emulator: Enums.EmulatorType;
949
- verification: boolean;
950
- requireVideo: boolean;
951
- autoVerify: boolean;
952
- regionsObsolete: boolean;
953
- platformsObsolete: boolean;
954
- discordUrl: string;
955
- websiteUrl: string;
956
- rules: string;
957
- /**TODO: find this ENUM vvv */
958
- showOnStreamsPage: number;
959
- touchDate: number;
960
- noEvents: boolean;
961
- promoted: boolean;
962
- runCommentsMode: Enums.ItemPermissionType;
963
- noPromote: boolean;
964
- platformIds: string[];
965
- regionIds: string[];
966
- gameTypeIds: Enums.GameType[];
967
- guidePermissionType: Enums.ItemPermissionType;
968
- resourcePermissionType: Enums.ItemPermissionType;
969
- staticAssets: StaticAsset[];
970
- staticAssetUpdates: StaticAssetUpdate[];
971
- }
972
-
973
- export interface GameModerationStats {
974
- readonly gameId: string;
975
- /**enum? appears to always be 0*/
976
- readonly state: number;
977
- readonly count: number;
978
- readonly minDate?: number;
979
- readonly maxDate?: number;
980
- }
981
-
982
- export interface GameFollower {
983
- readonly gameId: string;
984
- readonly followerId: string;
985
- readonly pos?: number;
986
- readonly accessCount: number;
987
- readonly lastAccessDate: number;
988
- }
989
-
990
- export interface GameRunner {
991
- readonly gameId: string;
992
- readonly userId: string;
993
- readonly runCount: number;
994
- }
995
-
996
- export interface NewLevel {
997
- readonly gameId: string;
998
- name: string;
999
- rules?: string;
1000
- archived: boolean;
1001
- }
1002
-
1003
- export interface Level extends NewLevel {
1004
- readonly id: string;
1005
- readonly url: string;
1006
- readonly pos: number;
1007
- }
1008
-
1009
- export interface Notification {
1010
- readonly id: string;
1011
- readonly date: number;
1012
- readonly title: string;
1013
- readonly path: string;
1014
- readonly read: boolean;
1015
- }
1016
-
1017
- export interface NotificationSetting {
1018
- readonly type: number; //# enum??
1019
- readonly gameId?: string;
1020
- readonly site: boolean;
1021
- readonly email: boolean;
1022
- }
1023
-
1024
- /**A different type of notification are returned by `GetStaticData` than in other areas.*/
1025
- export interface NotificationSettingStaticData {
1026
- readonly id: number;
1027
- readonly group: string;
1028
- readonly title: string;
1029
- readonly pos: number;
1030
- readonly gameSpecific: boolean;
1031
- readonly siteDefault: number;
1032
- readonly emailDefault: boolean;
1033
- }
1034
-
1035
- export interface GameOrderGroup {
1036
- id: string;
1037
- name: string;
1038
- sortType: Enums.GameSortType;
1039
- gameIds: string[];
1040
- open?: boolean;
1041
- editing?: boolean;
1042
- }
1043
-
1044
- export interface GameOrdering {
1045
- readonly defaultGroups: GameOrderGroup[];
1046
- readonly supporterGroups: GameOrderGroup[];
1047
- }
1048
-
1049
- interface Run_Base {
1050
- /**
1051
- * Unique identification characters of a run.
1052
- */
1053
- readonly id: string;
1054
- /**
1055
- * Unique identification characters of the run's game.
1056
- */
1057
- readonly gameId: string;
1058
-
1059
- /**
1060
- * Timing of the run, in seconds. If the run has an *LRT* (Load Removed Time) **and** an *RTA* (Real Time Attack) time, this property will be the LRT. If there is an RTA and not an LRT, this will be the RTA.
1061
- */
1062
- readonly time?: number;
1063
-
1064
- /**
1065
- * Timing of the run, in seconds. If the run has an *LRT* (Load Removed Time) **and** an *RTA* (Real Time Attack) time, this property will be the RTA. If there is an LRT and not an RTA, this will be the LRT.
1066
- */
1067
- readonly timeWithLoads?: number;
1068
-
1069
- /**
1070
- * In Game Time* of the run, in seconds.
1071
- */
1072
- readonly igt?: number;
1073
-
1074
- /**
1075
- * Unique identification characters of a platform. Platforms can be accessed with `GetPlatformList`.
1076
- */
1077
- readonly platformId?: string;
1078
-
1079
- /**
1080
- * Whether or not an emulator was used in the run.
1081
- */
1082
- readonly emulator: boolean;
1083
-
1084
- /**
1085
- * Unique identification characters of a region. Found in older games that vary based on regions.
1086
- */
1087
- readonly regionId?: string;
1088
-
1089
- /**
1090
- * Everything in the 'Video URL' box.
1091
- */
1092
- readonly video?: string;
1093
-
1094
- /**
1095
- * Description of a run.
1096
- */
1097
- readonly comment?: string;
1098
-
1099
- /**
1100
- * Unique user identification of the run submitter. Absent if the submitter is deleted.
1101
- */
1102
- readonly submittedById?: string;
1103
-
1104
- /**
1105
- * A run's verification status.
1106
- */
1107
- readonly verified: Enums.RunStatus;
1108
-
1109
- /**
1110
- * Unique user identification characters of the run resolver.
1111
- *
1112
- * Absent if the resolver is deleted.
1113
- */
1114
- readonly verifiedById?: string;
1115
-
1116
- /**
1117
- * Run rejection reason if it was rejected.
1118
- */
1119
- readonly reason?: string;
1120
-
1121
- /**
1122
- * UNIX timestamp of a run's (changeable) date.
1123
- */
1124
- readonly date: number;
1125
-
1126
- /**
1127
- * UNIX timestamp of when the run was submitted.
1128
- */
1129
- readonly dateSubmitted?: number;
1130
-
1131
- /**
1132
- * UNIX timestamp of when the run was resolved.
1133
- */
1134
- readonly dateVerified?: number;
1135
-
1136
- /**
1137
- * Whether the run is obsolete or not - absent when false.
1138
- */
1139
- readonly obsolete?: boolean;
1140
-
1141
- /**
1142
- * Leaderboard rank of the run. Absent when obsolete.
1143
- */
1144
- readonly place?: number;
1145
-
1146
- /**
1147
- * Unique identification characters of players in the run.
1148
- */
1149
- readonly playerIds: string[];
1150
-
1151
- /**
1152
- * Unused property that used to store reports of bad data for a run.
1153
- */
1154
- readonly issues: null;
1155
-
1156
- /**
1157
- * Availibility and 'status' of the video of a run.
1158
- */
1159
- readonly VideoState: Enums.VideoState;
1160
- }
1161
-
1162
- /**
1163
- * A game speedrun's public data.
1164
- */
1165
- export interface GameRun extends Run_Base {
1166
-
1167
- /**
1168
- * Unique identification characters of the run's category.
1169
- */
1170
- readonly categoryId: string;
1171
-
1172
- /**
1173
- * Unique identification characters of the run's level, if the run is on an individual level (IL).
1174
- */
1175
- readonly levelId?: string;
1176
-
1177
- /**
1178
- * Whether the run has *splits.io* splits. Splits.io has been shut down; this is `false` on all new runs.
1179
- */
1180
- readonly hasSplits: boolean;
1181
-
1182
- /**
1183
- * Unique identification characters of values (subcategories and annotations) in the run.
1184
- */
1185
- readonly valueIds: string[];
1186
-
1187
- /**
1188
- * Whether or not the run's category or subcategories were archived - absent when false.
1189
- */
1190
- readonly orphaned?: boolean;
1191
- }
1192
-
1193
- export interface ChallengeRun extends Run_Base {
1194
- readonly challengeId: string;
1195
- readonly screened: boolean;
1196
- readonly screenedById?: string;
1197
- readonly dateScreened?: number;
1198
- readonly commentsCount: number;
1199
- }
1200
-
1201
- export interface ModerationRun extends GameRun {
1202
-
1203
- /**
1204
- * Whether or not the run's ranking is estimated.
1205
- *
1206
- * Missing when false.
1207
- */
1208
- readonly estimated?: true;
1209
- }
1210
-
1211
- export interface RunTime {
1212
- hour: number;
1213
- minute: number;
1214
- second: number;
1215
- millisecond: number;
1216
- }
1217
-
1218
- export interface RunSettings {
1219
-
1220
- /**
1221
- * Omitted when submitting a new run.
1222
- */
1223
- readonly runId?: string;
1224
- gameId: string;
1225
- categoryId: string;
1226
- playerNames: string[];
1227
-
1228
- /**
1229
- * whichever timing method is primary to the game is required.
1230
- */
1231
- time?: RunTime;
1232
- timeWithLoads?: RunTime;
1233
- igt?: RunTime;
1234
- platformId?: string;
1235
- emulator: boolean;
1236
- video?: string;
1237
- comment?: string;
1238
- date: number;
1239
- values?: VariableValue[];
1240
- }
1241
-
1242
- export interface Series {
1243
- readonly id: string;
1244
- readonly name: string;
1245
- readonly url: string;
1246
- readonly addedDate: number;
1247
- readonly touchDate: number;
1248
- readonly websiteUrl?: string;
1249
- readonly discordUrl?: string;
1250
- readonly runCount: number;
1251
- readonly activePlayerCount: number;
1252
- readonly totalPlayerCount: number;
1253
- readonly officialGameCount: number;
1254
- readonly staticAssets: StaticAsset[];
1255
- }
1256
-
1257
- export interface SeriesModerator {
1258
- seriesId: string;
1259
- userId: string;
1260
- level: Enums.GamePowerLevel;
1261
- }
1262
-
1263
- export interface SeriesSettings {
1264
- name: string;
1265
- url: string;
1266
- discordUrl: string;
1267
- websiteUrl: string;
1268
- staticAssets: StaticAsset[];
1269
- staticAssetUpdates: StaticAssetUpdate[];
1270
- }
1271
-
1272
- export interface StaticAsset {
1273
- /**TODO: make enum*/
1274
- assetType: string;
1275
- path: string;
1276
- }
1277
-
1278
- export interface StaticAssetUpdate {
1279
- assetType: string;
1280
- /**Example: data:image/png;base64,examplebase64data*/
1281
- updateContent: string;
1282
- deleteContent?: boolean;
1283
- }
1284
-
1285
- export interface SupporterCredit {
1286
- readonly id: string;
1287
- readonly userId: string;
1288
- readonly providerId: number; // enum
1289
- readonly createdAt: number;
1290
- readonly updatedAt: number;
1291
- readonly creditType: number; // enum
1292
- readonly amount: number;
1293
- readonly currency: string;
1294
- readonly receivedAt: number;
1295
- readonly subscriptionId: string;
1296
- readonly periodStartsAt: number;
1297
- readonly periodEndsAt: number;
1298
- readonly providerItemId: string;
1299
- }
1300
-
1301
- export interface SupporterCode {
1302
- readonly id: string;
1303
- readonly code: string;
1304
- readonly description: string;
1305
- readonly duration: number;
1306
- readonly userId: string;
1307
- readonly createdAt: number;
1308
- readonly updatedAt: number;
1309
- }
1310
-
1311
- export interface SupporterSubscription {
1312
- readonly id: string;
1313
- readonly userId: string;
1314
- readonly providerId: number; // enum
1315
- readonly createdAt: number;
1316
- readonly updatedAt: number;
1317
- readonly expiresAt: number;
1318
- readonly planId: number; // enum
1319
- readonly nextPeriodPlanId: number; // enum
1320
- readonly status: number; // enum
1321
- /**Default 0, undocumented but assume timestamp otherwise TODO*/
1322
- readonly trialEndsAt: number;
1323
- readonly cancelAtPeriodEnd: boolean;
1324
- readonly canceledAt: number; // TODO assume timestamp
1325
- }
1326
-
1327
- export interface Theme {
1328
- id: string;
1329
- url: string;
1330
- name?: string; // TODO: check optional
1331
- primaryColor: string;
1332
- panelColor: string;
1333
- panelOpacity: number;
1334
- navbarColor: Enums.NavbarColorType;
1335
- backgroundColor: string;
1336
- backgroundFit: Enums.FitType;
1337
- backgroundPosition: Enums.PositionType;
1338
- backgroundRepeat: Enums.RepeatType;
1339
- backgroundScrolling: Enums.ScrollType;
1340
- foregroundFit: Enums.FitType;
1341
- foregroundPosition: Enums.PositionType;
1342
- foregroundRepeat: Enums.RepeatType;
1343
- foregroundScrolling: Enums.ScrollType;
1344
- touchDate: number;
1345
- staticAssets: StaticAsset[];
1346
- }
1347
-
1348
- export interface ThemeSettings {
1349
- primaryColor: string;
1350
- panelColor: string;
1351
- panelOpacity: number; // TODO: may be an enum of every 5 between 70 and 100
1352
- navbarColor: Enums.NavbarColorType
1353
- backgroundColor: string;
1354
- backgroundFit: Enums.FitType;
1355
- backgroundPosition: Enums.PositionType;
1356
- backgroundRepeat: Enums.RepeatType;
1357
- backgroundScrolling: Enums.ScrollType;
1358
- foregroundFit: Enums.FitType;
1359
- foregroundPosition: Enums.PositionType;
1360
- foregroundRepeat: Enums.RepeatType;
1361
- foregroundScrolling: Enums.ScrollType;
1362
- staticAssets: StaticAsset[];
1363
- staticAssetUpdates: StaticAssetUpdate[];
1364
- }
1365
-
1366
- export interface ThreadReadStatus {
1367
- threadId: string;
1368
- date: number;
1369
- }
1370
-
1371
- export interface Ticket {
1372
- id: string;
1373
- queue: Enums.TicketQueueType;
1374
- type: Enums.TicketType;
1375
- status: Enums.TicketStatus;
1376
- requestorId: string;
1377
- dateSubmitted: number;
1378
- dateResolved?: number;
1379
- /**This is a json object that may be dependent on type*/
1380
- metadata: string;
1381
- }
1382
-
1383
- export interface TicketNote {
1384
- id: string;
1385
- ticketId: string;
1386
- readerId: string;
1387
- dateSubmitted: number;
1388
- note: string;
1389
- isMessage: boolean;
1390
- isRead: boolean;
1391
- }
1392
-
1393
- /**Fields from `User` present in `playerLists`. May also be an unregistered player.*/
1394
- export interface Player {
1395
- id: string;
1396
- name: string;
1397
- url?: string;
1398
- powerLevel?: Enums.SitePowerLevel;
1399
- color1Id?: string;
1400
- /**Optional even on full `player`*/
1401
- color2Id?: string;
1402
- colorAnimate?: number;
1403
- areaId?: string;
1404
- isSupporter?: boolean;
1405
- }
1406
-
1407
- /**Supporter feature for rings around names.*/
1408
- export interface AvatarDecoration {
1409
- enabled: boolean;
1410
- /**If true, see this object's color Ids. If either is absent, inherit from username.*/
1411
- separateColors?: boolean;
1412
- color1Id?: string;
1413
- /**Defaults to username's `color1Id`*/
1414
- color2Id?: string;
1415
- /**Defaults to username's `color2Id`*/
1416
- }
1417
-
1418
- export interface User {
1419
- id: string;
1420
- name: string;
1421
- altname?: string;
1422
- url: string;
1423
- pronouns: string[];
1424
- powerLevel: Enums.SitePowerLevel;
1425
- color1Id: string;
1426
- color2Id?: string;
1427
- colorAnimate?: number;
1428
- areaId: string;
1429
- isSupporter?: boolean;
1430
- avatarDecoration?: AvatarDecoration;
1431
- iconType: Enums.IconType;
1432
- onlineDate: number;
1433
- signupDate: number;
1434
- touchDate: number;
1435
- staticAssets: StaticAsset[];
1436
- supporterIconType?: Enums.IconType;
1437
- supporterIconPosition?: Enums.IconPosition;
1438
- /**ID for a title given for completing a Challenge*/
1439
- titleId?: string;
1440
- }
1441
-
1442
- export interface UserStats {
1443
- userId: string;
1444
- followers: number;
1445
- runs: number;
1446
- runsFg: number;
1447
- runsIl: number;
1448
- runsPending: number;
1449
- runTime: number;
1450
- minRunDate: number;
1451
- maxRunDate: number;
1452
- commentsPosted: number;
1453
- guidesCreated: number;
1454
- resourcesCreated: number;
1455
- threadsCreated: number;
1456
- gamesBoosted: number;
1457
- usersBoosted: number;
1458
- followingGames: number;
1459
- followingUsers: number;
1460
- challengeRuns: number;
1461
- challengeRunsPending: number;
1462
- runVideosAtRisk: number;
1463
- }
1464
-
1465
- export interface UserSocialConnection {
1466
- userId: string;
1467
- networkId: Enums.SocialConnection;
1468
- value: string;
1469
- verified: boolean;
1470
- }
1471
-
1472
- export interface UserModerationStats {
1473
- gameId: string;
1474
- level: Enums.GamePowerLevel;
1475
- totalRuns: number;
1476
- totalTime: number;
1477
- minDate: number;
1478
- maxDate: number;
1479
- }
1480
-
1481
- export interface UserGameFollow {
1482
- gameId: string;
1483
- accessCount: number;
1484
- lastAccessDate: number;
1485
- }
1486
-
1487
- export interface UserGameRunnerStats {
1488
- gameId: string;
1489
- totalRuns: number;
1490
- totalTime: number;
1491
- uniqueLevels: number;
1492
- uniqueCategories: number;
1493
- minDate: number;
1494
- maxDate: number;
1495
- }
1496
-
1497
- /**UserProfile as returned by `GetUserLeaderboard`, `GetUserSummary` & `GetUserPopoverData` - Missing `userStats` and `userSocialConnectionList`.*/
1498
- export interface UserReducedProfile {
1499
- userId: string;
1500
- bio?: string;
1501
- signupDate: number;
1502
- defaultView: Enums.DefaultViewType;
1503
- showMiscByDefault: boolean;
1504
- gameOrdering?: GameOrdering;
1505
- }
1506
-
1507
- export interface UserProfile {
1508
- userId: string;
1509
- bio?: string;
1510
- signupDate: number;
1511
- defaultView: Enums.DefaultViewType;
1512
- showMiscByDefault: boolean;
1513
- gameOrdering: GameOrdering;
1514
- userStats: UserStats;
1515
- userSocialConnectionList: UserSocialConnection[];
1516
- }
1517
-
1518
- export interface UserFollower {
1519
- userId: string;
1520
- followerId: string;
1521
- }
1522
-
1523
- export interface UserCount {
1524
- userId: string;
1525
- count: number;
1526
- }
1527
-
1528
- export interface UserBlock {
1529
- blockerId: string;
1530
- blockeeId: string;
1531
- }
1532
-
1533
- export interface UserSettings {
1534
- id: string;
1535
- name: string;
1536
- url: string;
1537
- email: string;
1538
- bio: string;
1539
- powerLevel: Enums.SitePowerLevel;
1540
- areaId: string;
1541
- /**May be `<gameUrl>`, `user/<userUrl>` or `Default`*/
1542
- theme: string;
1543
- color1Id: string;
1544
- color2Id?: string;
1545
- colorAnimate: number; // enum
1546
- avatarDecoration: AvatarDecoration // TODO: check
1547
- defaultView: Enums.DefaultViewType;
1548
- timeReference: Enums.TimeReference;
1549
- timeUnits: Enums.TimeDisplayUnits;
1550
- dateFormat: Enums.DateFormat;
1551
- timeFormat: Enums.TimeFormat;
1552
- iconType: Enums.IconType;
1553
- disableThemes: boolean;
1554
- emailAuthentication: boolean;
1555
- latestMaxFollowed: number;
1556
- latestMinFollowed: number;
1557
- latestTimeFollowed: number;
1558
- showMiscByDefault: boolean;
1559
- showOnStreamsPage: boolean;
1560
- showUnofficialGameTypes: boolean;
1561
- homepageStream: Enums.HomepageStreamType;
1562
- disableMessages: boolean;
1563
- showAds: boolean;
1564
- pronouns: string[];
1565
- nameChangeDate?: number;
1566
- runCommentsDisabled: boolean;
1567
- followedGamesDisabled: boolean;
1568
- supporterEndDate: number;
1569
- boostEndDate: number;
1570
- supporterIconType: Enums.IconType;
1571
- supporterIconPosition: Enums.IconPosition;
1572
- staticAssets: StaticAsset[];
1573
- staticAssetUpdates: StaticAssetUpdate[];
1574
- }
1575
-
1576
- export interface VariableValue {
1577
- variableId: string;
1578
- valueId: string;
1579
- }
1580
-
1581
- export interface VariableValues {
1582
- variableId: string;
1583
- valueIds: string[];
1584
- }
1585
-
1586
- export interface Variable {
1587
-
1588
- name: string;
1589
-
1590
- gameId: string;
1591
- description?: string;
1592
- categoryScope: Enums.VarCategoryScope;
1593
- categoryId?: string;
1594
- levelScope: Enums.VarLevelScope;
1595
- levelId?: string;
1596
- isMandatory: boolean;
1597
- isSubcategory: boolean;
1598
- isUserDefined: boolean;
1599
- isObsoleting: boolean;
1600
- defaultValue?: string;
1601
- archived: boolean;
1602
- displayMode?: Enums.VarDisplayMode;
1603
- }
1604
-
1605
- export interface Variable {
1606
- id: string;
1607
- url: string;
1608
- pos: number;
1609
- }
1610
-
1611
- /**Value of a variable. `VariableValue` is a selector on this type (and the underlying variable)*/
1612
- export interface Value {
1613
- id: string;
1614
- name: string;
1615
- url: string;
1616
- pos: number;
1617
- variableId: string;
1618
- isMisc?: boolean;
1619
- rules?: string;
1620
- archived: boolean;
1
+ import * as Enums from './enums.js';
2
+
3
+ /**
4
+ * A Category item.
5
+ */
6
+ export interface Category {
7
+
8
+ /**
9
+ * ID of the category.
10
+ */
11
+ readonly id: string;
12
+
13
+ /**
14
+ * Name of the category.
15
+ */
16
+ name: string;
17
+
18
+ /**
19
+ * Page URL of the category.
20
+ * This is never actually used in site pages.
21
+ * The URL is permanent and can never update, even when changing the category name.
22
+ */
23
+ readonly url: string;
24
+
25
+ /**
26
+ * A global, site-wide position order number for the category.
27
+ */
28
+ readonly pos: number;
29
+
30
+ /**
31
+ * ID of the game the category is on.
32
+ */
33
+ readonly gameId: string;
34
+
35
+ /**
36
+ * Whether or not the category is miscellaneous.
37
+ */
38
+ isMisc: boolean;
39
+
40
+ /**
41
+ * Whether or not the category is only for individual levels.
42
+ */
43
+ isPerLevel: boolean;
44
+
45
+ /**
46
+ * The maximum amount of players you can choose when submitting a run to the category.
47
+ * todo check if the 1 player > infinite player glitch is still patches yet
48
+ */
49
+ numPlayers: number;
50
+
51
+ /**
52
+ * todo wtf is this
53
+ */
54
+ exactPlayers: boolean;
55
+
56
+ /**
57
+ * `PlayerMatchMode` of the category.
58
+ */
59
+ playerMatchMode: Enums.PlayerMatchMode;
60
+
61
+ /**
62
+ * `TimeDirection` of the category.
63
+ */
64
+ timeDirection: Enums.TimeDirection;
65
+
66
+ /**
67
+ * Whether or not runs with `.000` milliseconds have their milliseconds shown on leaderboards or not.
68
+ */
69
+ enforceMs: boolean;
70
+
71
+ /**
72
+ * Rules for the category.
73
+ */
74
+ rules: string;
75
+
76
+ /**
77
+ * Whether or not the category is archived.
78
+ */
79
+ archived?: boolean;
80
+ }
81
+
82
+ /**
83
+ * A moderator (or verifier) of a challenge.
84
+ */
85
+ export interface ChallengeModerator {
86
+
87
+ /**
88
+ * ID of the challenge being moderated.
89
+ */
90
+ readonly challengeId: string;
91
+
92
+ /**
93
+ * ID of the user moderating.
94
+ */
95
+ readonly userId: string;
96
+
97
+ /**
98
+ * `GamePowerLevel` of the moderator.
99
+ */
100
+ readonly level: Enums.GamePowerLevel;
101
+ }
102
+
103
+ /**
104
+ * A current status of a challenge.
105
+ */
106
+ export interface ChallengeStanding {
107
+
108
+ /**
109
+ * ID of the challenge.
110
+ */
111
+ readonly challengeId: string;
112
+
113
+ /**
114
+ * todo
115
+ */
116
+ readonly place: number;
117
+
118
+ /**
119
+ * todo
120
+ */
121
+ readonly registeredPlayerIds: string[];
122
+
123
+ /**
124
+ * todo
125
+ */
126
+ readonly prizeAmount: number;
127
+
128
+ /**
129
+ * todo
130
+ */
131
+ readonly unregisteredPlayers: string[]
132
+
133
+ /**
134
+ * todo
135
+ */
136
+ readonly prizeCurrency: string;
137
+ }
138
+
139
+ /**
140
+ * A currency reward for getting a certain ranking in a challenge.
141
+ */
142
+ export interface ChallengePrize {
143
+
144
+ /**
145
+ * The ranking in the challenge for the reward.
146
+ */
147
+ readonly place: number;
148
+
149
+ /**
150
+ * The amount of money rewarded to the player in the `place`.
151
+ */
152
+ readonly amount: number;
153
+ }
154
+
155
+ /**
156
+ * Configuration settings of a challenge.
157
+ */
158
+ export interface ChallengePrizeConfig {
159
+
160
+ /**
161
+ * TODO
162
+ */
163
+ readonly prizePool: number;
164
+
165
+ /**
166
+ * TODO
167
+ */
168
+ readonly currency: string;
169
+ readonly prizes: ChallengePrize[];
170
+ }
171
+
172
+ /**
173
+ * A single user's site-wide ranking details based on all challenges entered.
174
+ */
175
+ export interface GlobalChallengeRanking {
176
+
177
+ /**
178
+ * ID of the user.
179
+ */
180
+ readonly userId: string;
181
+
182
+ /**
183
+ * The user's site-wide rank.
184
+ */
185
+ readonly rank: number;
186
+ readonly totalEarnings: number;
187
+
188
+ /**
189
+ * The amount of first place ranks the user has achieved in challenges.
190
+ */
191
+ readonly firstPlaces: number;
192
+
193
+ /**
194
+ * The amount of second place ranks the user has achieved in challenges.
195
+ */
196
+ readonly secondPlaces: number;
197
+
198
+ /**
199
+ * The amount of third place ranks the user has achieved in challenges.
200
+ */
201
+ readonly thirdPlaces: number;
202
+
203
+ /**
204
+ * The total amount of challenges the user has entered.
205
+ */
206
+ readonly challengesEntered: number;
207
+ }
208
+
209
+ /**
210
+ * A site challenge.
211
+ */
212
+ export interface Challenge {
213
+
214
+ /**
215
+ * ID of the challenge.
216
+ */
217
+ readonly id: string;
218
+
219
+ /**
220
+ * Name of the challenge.
221
+ */
222
+ readonly name: string;
223
+
224
+ /**
225
+ * todo
226
+ */
227
+ readonly announcement: string;
228
+
229
+ /**
230
+ * Subpath URL of the challenge.
231
+ */
232
+ readonly url: string;
233
+
234
+ /**
235
+ * ID of the game the challenge is based on.
236
+ */
237
+ readonly gameId: string;
238
+
239
+ /**
240
+ * UNIX timestamp of when the challenge was created.
241
+ */
242
+ readonly createDate: number;
243
+
244
+ /**
245
+ * UNIX timestamp of when the challenge settings were last updated.
246
+ */
247
+ readonly updateDate: number;
248
+
249
+ /**
250
+ * todo
251
+ */
252
+ readonly startDate: number;
253
+
254
+ /**
255
+ * todo
256
+ */
257
+ readonly endDate: number;
258
+
259
+ /**
260
+ * `ChallengeState` of the challenge.
261
+ */
262
+ readonly state: Enums.ChallengeState;
263
+
264
+ /**
265
+ * Description of the challenge.
266
+ */
267
+ readonly description: string;
268
+
269
+ /**
270
+ * Rules of the challenge (not to be confused with `contestRules`).
271
+ */
272
+ readonly rules: string;
273
+
274
+ /**
275
+ *
276
+ */
277
+ readonly numPlayers: number;
278
+ readonly exactPlayers: boolean;
279
+ readonly playerMatchMode: Enums.PlayerMatchMode;
280
+ readonly timeDirection: Enums.TimeDirection;
281
+ readonly enforceMs: boolean;
282
+
283
+ /**
284
+ * Subpath URL of the challenge's cover image.
285
+ * check if opt todo
286
+ */
287
+ readonly coverImagePath: string;
288
+ readonly contest: boolean;
289
+ readonly contestRules: string;
290
+ readonly runCommentsMode: Enums.ItemPermissionType;
291
+
292
+ /**
293
+ * `ChallengePrizeConfig` of the challenge.
294
+ */
295
+ readonly prizeConfig: ChallengePrizeConfig;
296
+ }
297
+
298
+ /**
299
+ * Player reward for completing a Challenge.
300
+ */
301
+ export interface Title {
302
+
303
+ /**
304
+ * ID of the title.
305
+ */
306
+ readonly id: string;
307
+
308
+ /**
309
+ * Title of the challenge.
310
+ */
311
+ readonly title: string;
312
+
313
+ /**
314
+ * Description of how the challenge is rewarded to players.
315
+ */
316
+ readonly comment: string;
317
+
318
+ /**
319
+ * Subpath URL of the challenge that rewards the title.
320
+ */
321
+ readonly referenceUrl: string;
322
+ }
323
+
324
+ /**
325
+ * Permissions of a comment section.
326
+ */
327
+ export interface CommentPermissions {
328
+
329
+ /**
330
+ * Whether or not
331
+ */
332
+ readonly canManage: boolean;
333
+
334
+ /**
335
+ * Whether or
336
+ */
337
+ readonly canViewComments: boolean;
338
+ readonly canPostComments: boolean;
339
+
340
+ /**
341
+ * Whether or not editing comments is allowed.
342
+ */
343
+ readonly canEditComments: boolean;
344
+
345
+ /**
346
+ * Whether or not deleting comments is allowsed.
347
+ */
348
+ readonly canDeleteComments: boolean;
349
+
350
+ /**
351
+ * Reasons for not being able to not view a thread.
352
+ */
353
+ readonly cannotViewReasons: string[];
354
+
355
+ /**
356
+ * Reasons for not being able to post a comment.
357
+ */
358
+ readonly cannotPostReasons: string[];
359
+ }
360
+
361
+ export interface CommentableProperties {
362
+ readonly disabled: boolean;
363
+ readonly locked: boolean;
364
+ }
365
+
366
+ export interface Commentable {
367
+ readonly itemType: Enums.ItemType;
368
+ readonly itemId: string;
369
+ readonly properties: CommentableProperties;
370
+ /**Permissions of the logged in user. If not logged in; `canPostComments` is `false`.*/
371
+ readonly permissions: CommentPermissions;
372
+ }
373
+
374
+ export interface Comment {
375
+ readonly id: string;
376
+ readonly itemType: Enums.ItemType;
377
+ readonly itemId: string;
378
+ readonly date: number;
379
+ readonly userId: string;
380
+ /**May be omitted on deleted comments.*/
381
+ readonly text?: string;
382
+ readonly parentId?: string;
383
+ readonly deleted: boolean;
384
+ readonly deletedUserId?: string;
385
+ }
386
+
387
+ export interface Like {
388
+ readonly itemType: Enums.ItemType;
389
+ readonly itemId: string;
390
+ readonly userId: string;
391
+ readonly date: number;
392
+ }
393
+
394
+ export interface SocialNetwork {
395
+
396
+ /**
397
+ * `SocialConnection` of the social network.
398
+ */
399
+ readonly id: Enums.SocialConnection;
400
+
401
+ /**
402
+ * Name of the social network.
403
+ */
404
+ readonly name: string;
405
+
406
+ /**
407
+ * Arbitrary and unknown determination of if the platform is popular.
408
+ *
409
+ * This does not have to do with if the platform is depricated or not.
410
+ */
411
+ readonly major: boolean;
412
+
413
+ /**
414
+ * Site-wide ordering method of the platform.
415
+ */
416
+ readonly pos: number;
417
+
418
+ /**
419
+ * Either a URL with a `[id]` placeholder of where the entered value would be stored, `popup` when there is complex authentication of the social network, or an empty string when the value you enter is exactly what the end result will be.
420
+ *
421
+ * Example: `https://www.youtube.com/user/[id]`
422
+ */
423
+ readonly pattern: string;
424
+ }
425
+
426
+ export interface Area {
427
+ readonly id: string;
428
+ readonly name: string;
429
+ readonly fullName: string;
430
+ readonly label: string;
431
+ readonly flagIcon: string;
432
+ readonly lbFlagIcon: string;
433
+ readonly lbName: string;
434
+ }
435
+
436
+ export interface Color {
437
+ readonly id: string;
438
+ readonly name: string;
439
+ readonly darkColor: string;
440
+ /**@deprecated `darkColor` is always used on the site*/
441
+ readonly lightColor: string;
442
+ /**@deprecated colors now seem to be sorted by their name's ascending alphabetical order (A-Z)*/
443
+ readonly pos: number;
444
+ }
445
+
446
+ /**
447
+ * A 'category' of threads, being site-wide such as *The Site* and *Supporter* or representing the forum section that every game has.
448
+ */
449
+ export interface Forum {
450
+
451
+ /**
452
+ * `id` of this forum section.
453
+ */
454
+ readonly id: string;
455
+
456
+ /**
457
+ * Name of the forum. If this is the game's forum, it is the game name.
458
+ */
459
+ readonly name: string;
460
+
461
+ /**
462
+ * Page URL of the forum. If this is the game's forum, it is the game's page URL.
463
+ */
464
+ readonly url: string;
465
+
466
+ /**
467
+ * A description used to describe site-wide forums.
468
+ */
469
+ readonly description?: string;
470
+
471
+ /**
472
+ * The `ForumType` the forum is.
473
+ */
474
+ readonly type: Enums.ForumType;
475
+
476
+ /**
477
+ * The amount of threads inside of a forum.
478
+ */
479
+ readonly threadCount: number;
480
+
481
+ /**
482
+ * The amont of combined posts of every thread in the forum.
483
+ */
484
+ readonly postCount: number;
485
+
486
+ /**
487
+ * The ID of the latest post in any thread in the forum.
488
+ */
489
+ readonly lastPostId: string;
490
+
491
+ /**
492
+ * The `userId` of the latest post in any thread in the forum.
493
+ */
494
+ readonly lastPostUserId: string;
495
+
496
+ /**
497
+ * The UNIX timestamp of when the latest post in any thread in the forum was posted.
498
+ */
499
+ readonly lastPostDate: number;
500
+
501
+ /**
502
+ *
503
+ */
504
+ readonly touchDate: number;
505
+ }
506
+
507
+ export interface Thread {
508
+ readonly id: string;
509
+ readonly name: string;
510
+ readonly gameId: string;
511
+ readonly forumId: string;
512
+ readonly userId: string;
513
+ readonly replies: number;
514
+ readonly created: number;
515
+ readonly lastCommentId: string;
516
+ readonly lastCommentUserId: string;
517
+ readonly lastCommentDate: number;
518
+ readonly sticky: boolean;
519
+ readonly locked: boolean;
520
+ }
521
+
522
+ export interface ForumReadStatus {
523
+ readonly forumId: string;
524
+ readonly date: number;
525
+ }
526
+
527
+ export interface Datatype {
528
+ readonly threadId: string;
529
+ readonly date: number;
530
+ }
531
+
532
+ export interface Leaderboard {
533
+ readonly category: Category;
534
+ readonly game: Game;
535
+ readonly pagination: Pagination;
536
+ readonly platforms: Platform[];
537
+
538
+ /**
539
+ * Every Player with a run in a game.
540
+ */
541
+ readonly players: Player[];
542
+ readonly regions: Region[];
543
+ readonly runs: GameRun[];
544
+ readonly values: VariableValue[];
545
+ readonly variables: Variable[];
546
+ }
547
+
548
+ /**
549
+ * Paramaters for filtering a leaderboard.
550
+ */
551
+ export interface LeaderboardParams {
552
+
553
+ /**
554
+ * ID of the leaderboard's game.
555
+ */
556
+ gameId: string;
557
+
558
+ /**
559
+ * ID of the leaderboard's category.
560
+ */
561
+ categoryId: string;
562
+
563
+ /**
564
+ * YYYY-MM-DD format of the minimum speedrun date of runs.
565
+ */
566
+ dateFrom?: string;
567
+
568
+ /**
569
+ * YYYY-MM-DD format of the maximum speedrun date of runs.
570
+ */
571
+ dateTo?: string;
572
+
573
+ /**
574
+ * `EmulatorFilter` determining the emulator inclusivity of runs.
575
+ */
576
+ emulator?: Enums.EmulatorFilter;
577
+
578
+ /**
579
+ * ID of the leaderboard's level, if applicable.
580
+ */
581
+ levelId?: string;
582
+
583
+ /**
584
+ * `ObsoleteFilter` determining the obsoletion inclusivity of runs.
585
+ */
586
+ obsolete?: Enums.ObsoleteFilter;
587
+
588
+ /**
589
+ * IDs of the platforms of runs.
590
+ * Platform IDs can be found with `GetPlatformList`.
591
+ */
592
+ platformIds?: string[];
593
+
594
+ /**
595
+ * IDs of the regions of runs.
596
+ * This is not to be confused with country, you cannot filter runs by country.
597
+ */
598
+ regionIds?: string[];
599
+ timer?: Enums.TimingMethod;
600
+
601
+ /**
602
+ * `RunStatus` of runs.
603
+ */
604
+ verified?: Enums.RunStatus;
605
+
606
+ /**
607
+ * Variable and value pairs of runs.
608
+ */
609
+ values?: VariableValues[];
610
+
611
+ /**
612
+ * `VideoFilter` determining video inclusivity of runs.
613
+ */
614
+ video?: Enums.VideoFilter;
615
+ }
616
+
617
+ export interface RunCount {
618
+ readonly gameId: string;
619
+ readonly categoryId: string;
620
+ readonly levelId?: string;
621
+ readonly variableId?: string;
622
+ readonly valueId?: string;
623
+ readonly count: number;
624
+ }
625
+
626
+ export interface Platform {
627
+ readonly id: string;
628
+ readonly name: string;
629
+ readonly url: string;
630
+ readonly year: number;
631
+ }
632
+
633
+ export interface Article {
634
+ readonly id: string;
635
+ readonly slug: string;
636
+ readonly title: string;
637
+ readonly summary: string;
638
+ readonly body: string;
639
+ readonly createDate: number;
640
+ readonly updateDate: number;
641
+ readonly publishDate?: number;
642
+ readonly rejectDate?: number;
643
+ readonly publishTarget: string;
644
+ readonly publishTags: string[];
645
+ readonly coverImagePath?: string;
646
+ readonly commentsCount: number;
647
+ readonly community?: boolean;
648
+ readonly gameId?: string;
649
+ readonly userId?: string;
650
+ readonly editorId?: string;
651
+ /**day it was pinned */
652
+ readonly stickyDate?: number;
653
+ }
654
+
655
+ export interface Region {
656
+ readonly id: string;
657
+ readonly name: string;
658
+ readonly url: string;
659
+ readonly flag: string;
660
+ }
661
+
662
+ export interface Pagination {
663
+ readonly count: number;
664
+ readonly page: number;
665
+ readonly pages: number;
666
+ readonly per: number;
667
+ }
668
+
669
+ export interface Guide {
670
+ readonly id: string;
671
+ readonly name: string;
672
+ readonly text: string;
673
+ readonly date: number;
674
+ readonly userId: string;
675
+ readonly gameId: string;
676
+ }
677
+
678
+ export interface Resource {
679
+ readonly id: string;
680
+ readonly type: Enums.ResourceType;
681
+ readonly name: string;
682
+ readonly description: string;
683
+ readonly date: number;
684
+ readonly userId: string;
685
+ readonly gameId: string;
686
+ readonly path?: string;
687
+ readonly link?: string;
688
+ readonly fileName?: string;
689
+ readonly authorNames: string; // TODO: exhaustive check for lists AND CHECK THAT UCHI ARTICLE WITH META??
690
+ }
691
+
692
+ export interface Stream {
693
+ readonly id: string;
694
+ readonly gameId?: string;
695
+ readonly userId?: string;
696
+ readonly areaId?: string;
697
+ readonly url: string;
698
+ readonly title: string;
699
+ readonly previewUrl: string;
700
+ readonly channelName: string;
701
+ readonly viewers: number;
702
+ /**If the stream has a PB on SRC (and has their account linked) TODO: check*/
703
+ readonly hasPb: boolean;
704
+ }
705
+
706
+ export interface AuditLogEntry {
707
+ readonly id: string;
708
+ readonly date: number;
709
+ readonly eventType: Enums.EventType
710
+ readonly actorId: string;
711
+ readonly gameId: string; // TODO check if optional, prolly is
712
+ /**A json dict of extra context based on eventType.*/
713
+ readonly context: string;
714
+ readonly userId?: string;
715
+ }
716
+
717
+ export interface Session {
718
+ readonly signedIn: boolean;
719
+ readonly showAds: boolean;
720
+ readonly user?: User;
721
+ readonly theme?: Theme;
722
+ readonly powerLevel: Enums.SitePowerLevel;
723
+ readonly dateFormat: Enums.DateFormat;
724
+ readonly timeFormat: Enums.TimeFormat;
725
+ readonly timeReference: Enums.TimeReference;
726
+ readonly timeUnits: Enums.TimeDisplayUnits;
727
+ readonly homepageStream: Enums.HomepageStreamType;
728
+ readonly disableThemes: boolean;
729
+ readonly csrfToken: string;
730
+ readonly networkToken?: string;
731
+ readonly gameList: Game[];
732
+ readonly gameFollowerList: GameFollower[];
733
+ readonly gameModeratorList: GameModerator[];
734
+ readonly gameRunnerList: GameRunner[];
735
+ readonly seriesList: Series[];
736
+ readonly seriesModeratorList: SeriesModerator[];
737
+ readonly boostAvailableTokens?: number;
738
+ readonly boostNextTokenDate: number;
739
+ readonly boostNextTokenAmount: number;
740
+ readonly userFollowerList: UserFollower[];
741
+ readonly enabledExperimentIds: string[]; // TODO: check
742
+ readonly challengeModeratorList: ChallengeModerator[]; // TODO: check
743
+ }
744
+
745
+ export interface Conversation {
746
+ readonly id: string;
747
+ readonly participantUserIds: string[];
748
+ readonly lastMessageId: string;
749
+ readonly lastMessageUser: string;
750
+ readonly lastMessageText: string;
751
+ readonly lastMessageDate: number;
752
+ readonly readDate: number;
753
+ }
754
+
755
+ export interface ConversationLightweight {
756
+ readonly id: string;
757
+ /**TODO check if empty */
758
+ readonly participantUserIds: string[];
759
+ readonly lastMessageId: string;
760
+ readonly lastMessageDate: number;
761
+ }
762
+
763
+ export interface ConversationParticipant {
764
+ readonly conversationId: string;
765
+ readonly userId: string;
766
+ readonly joinedDate: number;
767
+ /**TODO check if optional*/
768
+ readonly leftDate: number;
769
+ }
770
+
771
+ export interface ConversationMessage {
772
+ readonly id: string;
773
+ readonly conversationId: string;
774
+ readonly userId: string;
775
+ readonly text: string;
776
+ readonly date: number;
777
+ }
778
+
779
+ export interface SystemMessage {
780
+ readonly id: string;
781
+ readonly userId: string;
782
+ readonly text: string;
783
+ readonly date: number;
784
+ readonly read: boolean;
785
+ }
786
+
787
+ /**
788
+ * The basic data of a game.
789
+ */
790
+ export interface Game {
791
+
792
+ /**
793
+ * ID of the game.
794
+ */
795
+ readonly id: string;
796
+
797
+ /**
798
+ * Name of the game.
799
+ */
800
+ readonly name: string;
801
+
802
+ /**
803
+ * Page URL of the game.
804
+ */
805
+ readonly url: string;
806
+
807
+ /**
808
+ * Unused enum that is always `1`. todo check if gameType is this
809
+ */
810
+ readonly type: 1;
811
+
812
+ /**
813
+ * Whether or not a game has Load Removed Time (LRT) as a timing method.
814
+ */
815
+ readonly loadtimes: boolean;
816
+
817
+ /**
818
+ * Whether or not the game supports entering milliseconds when entering a time into a run.
819
+ */
820
+ readonly milliseconds: boolean;
821
+
822
+ /**
823
+ * Whether or not a game has In Game Time (IGT) as a timing method.
824
+ */
825
+ readonly igt: boolean;
826
+
827
+ /**
828
+ * Whether or not runs require moderators to verify them.
829
+ */
830
+ readonly verification: boolean;
831
+
832
+ /**
833
+ * Whether or not the default option for 'Automatically Verify Run' is true.
834
+ */
835
+ readonly autoVerify?: boolean;
836
+
837
+ /**
838
+ * Whether or not videos are required for submission.
839
+ */
840
+ readonly requireVideo: boolean;
841
+
842
+ /**
843
+ * Emulator allowability in a game.
844
+ */
845
+ readonly emulator: Enums.EmulatorType;
846
+
847
+ /**
848
+ * Default timing method of the game.
849
+ */
850
+ readonly defaultTimer: Enums.TimingMethod;
851
+ readonly validTimers: Enums.TimingMethod[];
852
+ readonly releaseDate?: number;
853
+ readonly addedDate: number;
854
+ readonly touchDate: number;
855
+ readonly baseGameId?: string;
856
+ readonly coverPath: string; //check if opt
857
+ readonly trophy1stPath?: string;
858
+ readonly trophy2ndPath?: string;
859
+ readonly trophy3rdPath?: string;
860
+ readonly trophy4thPath?: string;
861
+ readonly runCommentsMode: Enums.ItemPermissionType;
862
+ readonly runCount: number;
863
+ readonly activePlayerCount: number;
864
+ readonly totalPlayerCount: number;
865
+ readonly boostReceivedCount: number;
866
+ readonly boostDistinctDonorsCount: number;
867
+ readonly rules?: string;
868
+ readonly viewPowerLevel: Enums.SitePowerLevel;
869
+ readonly platformIds: string[];
870
+ readonly regionIds: string[];
871
+ readonly gameTypeIds: Enums.GameType[];
872
+ readonly websiteUrl?: string;
873
+ readonly discordUrl?: string;
874
+ readonly defaultView: Enums.DefaultViewType
875
+ readonly guidePermissionType: Enums.ItemPermissionType;
876
+ readonly resourcePermissionType: Enums.ItemPermissionType;
877
+ readonly staticAssets: StaticAsset[];
878
+ readonly embargoDate?: number;
879
+ readonly embargoText?: string;
880
+ }
881
+
882
+ export interface GameStats {
883
+ readonly gameId: string;
884
+ readonly totalRuns: number;
885
+ readonly totalRunsFG: number;
886
+ readonly totalRunsIL: number;
887
+ readonly totalRunTime: number;
888
+ readonly recentRuns: number;
889
+ readonly recentRunsFG: number;
890
+ readonly recentRunsIL: number;
891
+ readonly totalPlayers: number;
892
+ readonly activePlayers: number;
893
+ readonly followers: number;
894
+ readonly guides: number;
895
+ readonly resources: number;
896
+ }
897
+
898
+ export interface GameNews {
899
+ readonly id: string;
900
+ readonly gameId: string;
901
+ readonly userId: string;
902
+ readonly title: string;
903
+ /**
904
+ * Omitted for all but the first item in `GetGameSummary.newsList[]`.
905
+ */
906
+ readonly body?: string;
907
+ readonly dateSubmitted: number;
908
+ }
909
+
910
+ export interface GameModerator {
911
+ gameId: string;
912
+ userId: string;
913
+ level: Enums.GamePowerLevel;
914
+ }
915
+
916
+ export interface GameBoost {
917
+ readonly id: string;
918
+ readonly createdAt: number;
919
+ readonly updatedAt: number;
920
+ readonly gameId: string;
921
+ readonly donorUserId: string;
922
+ readonly anonymous: boolean;
923
+ readonly recipientUserIds: [];
924
+ }
925
+
926
+ export interface GameTypeDetails {
927
+ readonly id: Enums.GameType
928
+ readonly name: string;
929
+ readonly url: string;
930
+ readonly description: string;
931
+ readonly allowBaseGame: boolean;
932
+ }
933
+
934
+ /**TODO: Check for optional properties*/
935
+ export interface GameSettings {
936
+ readonly id: string;
937
+ name: string;
938
+ url: string;
939
+ twitchName: string;
940
+ releaseDate: number;
941
+ milliseconds: boolean;
942
+ defaultView: Enums.DefaultViewType
943
+ loadTimes: boolean;
944
+ igt: boolean;
945
+ defaultTimer: Enums.TimingMethod
946
+ showEmptyTimes: boolean;
947
+ rulesView: boolean;
948
+ emulator: Enums.EmulatorType;
949
+ verification: boolean;
950
+ requireVideo: boolean;
951
+ autoVerify: boolean;
952
+ regionsObsolete: boolean;
953
+ platformsObsolete: boolean;
954
+ discordUrl: string;
955
+ websiteUrl: string;
956
+ rules: string;
957
+ /**TODO: find this ENUM vvv */
958
+ showOnStreamsPage: number;
959
+ touchDate: number;
960
+ noEvents: boolean;
961
+ promoted: boolean;
962
+ runCommentsMode: Enums.ItemPermissionType;
963
+ noPromote: boolean;
964
+ platformIds: string[];
965
+ regionIds: string[];
966
+ gameTypeIds: Enums.GameType[];
967
+ guidePermissionType: Enums.ItemPermissionType;
968
+ resourcePermissionType: Enums.ItemPermissionType;
969
+ staticAssets: StaticAsset[];
970
+ staticAssetUpdates: StaticAssetUpdate[];
971
+ }
972
+
973
+ export interface GameModerationStats {
974
+ readonly gameId: string;
975
+ /**enum? appears to always be 0*/
976
+ readonly state: number;
977
+ readonly count: number;
978
+ readonly minDate?: number;
979
+ readonly maxDate?: number;
980
+ }
981
+
982
+ export interface GameFollower {
983
+ readonly gameId: string;
984
+ readonly followerId: string;
985
+ readonly pos?: number;
986
+ readonly accessCount: number;
987
+ readonly lastAccessDate: number;
988
+ }
989
+
990
+ export interface GameRunner {
991
+ readonly gameId: string;
992
+ readonly userId: string;
993
+ readonly runCount: number;
994
+ }
995
+
996
+ export interface NewLevel {
997
+ readonly gameId: string;
998
+ name: string;
999
+ rules?: string;
1000
+ archived: boolean;
1001
+ }
1002
+
1003
+ export interface Level extends NewLevel {
1004
+ readonly id: string;
1005
+ readonly url: string;
1006
+ readonly pos: number;
1007
+ }
1008
+
1009
+ export interface Notification {
1010
+ readonly id: string;
1011
+ readonly date: number;
1012
+ readonly title: string;
1013
+ readonly path: string;
1014
+ readonly read: boolean;
1015
+ }
1016
+
1017
+ export interface NotificationSetting {
1018
+ readonly type: number; //# enum??
1019
+ readonly gameId?: string;
1020
+ readonly site: boolean;
1021
+ readonly email: boolean;
1022
+ }
1023
+
1024
+ /**A different type of notification are returned by `GetStaticData` than in other areas.*/
1025
+ export interface NotificationSettingStaticData {
1026
+ readonly id: number;
1027
+ readonly group: string;
1028
+ readonly title: string;
1029
+ readonly pos: number;
1030
+ readonly gameSpecific: boolean;
1031
+ readonly siteDefault: number;
1032
+ readonly emailDefault: boolean;
1033
+ }
1034
+
1035
+ export interface GameOrderGroup {
1036
+ id: string;
1037
+ name: string;
1038
+ sortType: Enums.GameSortType;
1039
+ gameIds: string[];
1040
+ open?: boolean;
1041
+ editing?: boolean;
1042
+ }
1043
+
1044
+ export interface GameOrdering {
1045
+ readonly defaultGroups: GameOrderGroup[];
1046
+ readonly supporterGroups: GameOrderGroup[];
1047
+ }
1048
+
1049
+ interface Run_Base {
1050
+ /**
1051
+ * Unique identification characters of a run.
1052
+ */
1053
+ readonly id: string;
1054
+ /**
1055
+ * Unique identification characters of the run's game.
1056
+ */
1057
+ readonly gameId: string;
1058
+
1059
+ /**
1060
+ * Timing of the run, in seconds. If the run has an *LRT* (Load Removed Time) **and** an *RTA* (Real Time Attack) time, this property will be the LRT. If there is an RTA and not an LRT, this will be the RTA.
1061
+ */
1062
+ readonly time?: number;
1063
+
1064
+ /**
1065
+ * Timing of the run, in seconds. If the run has an *LRT* (Load Removed Time) **and** an *RTA* (Real Time Attack) time, this property will be the RTA. If there is an LRT and not an RTA, this will be the LRT.
1066
+ */
1067
+ readonly timeWithLoads?: number;
1068
+
1069
+ /**
1070
+ * In Game Time* of the run, in seconds.
1071
+ */
1072
+ readonly igt?: number;
1073
+
1074
+ /**
1075
+ * Unique identification characters of a platform. Platforms can be accessed with `GetPlatformList`.
1076
+ */
1077
+ readonly platformId?: string;
1078
+
1079
+ /**
1080
+ * Whether or not an emulator was used in the run.
1081
+ */
1082
+ readonly emulator: boolean;
1083
+
1084
+ /**
1085
+ * Unique identification characters of a region. Found in older games that vary based on regions.
1086
+ */
1087
+ readonly regionId?: string;
1088
+
1089
+ /**
1090
+ * Everything in the 'Video URL' box.
1091
+ */
1092
+ readonly video?: string;
1093
+
1094
+ /**
1095
+ * Description of a run.
1096
+ */
1097
+ readonly comment?: string;
1098
+
1099
+ /**
1100
+ * Unique user identification of the run submitter. Absent if the submitter is deleted.
1101
+ */
1102
+ readonly submittedById?: string;
1103
+
1104
+ /**
1105
+ * A run's verification status.
1106
+ */
1107
+ readonly verified: Enums.RunStatus;
1108
+
1109
+ /**
1110
+ * Unique user identification characters of the run resolver.
1111
+ *
1112
+ * Absent if the resolver is deleted.
1113
+ */
1114
+ readonly verifiedById?: string;
1115
+
1116
+ /**
1117
+ * Run rejection reason if it was rejected.
1118
+ */
1119
+ readonly reason?: string;
1120
+
1121
+ /**
1122
+ * UNIX timestamp of a run's (changeable) date.
1123
+ */
1124
+ readonly date: number;
1125
+
1126
+ /**
1127
+ * UNIX timestamp of when the run was submitted.
1128
+ */
1129
+ readonly dateSubmitted?: number;
1130
+
1131
+ /**
1132
+ * UNIX timestamp of when the run was resolved.
1133
+ */
1134
+ readonly dateVerified?: number;
1135
+
1136
+ /**
1137
+ * Whether the run is obsolete or not - absent when false.
1138
+ */
1139
+ readonly obsolete?: boolean;
1140
+
1141
+ /**
1142
+ * Leaderboard rank of the run. Absent when obsolete.
1143
+ */
1144
+ readonly place?: number;
1145
+
1146
+ /**
1147
+ * Unique identification characters of players in the run.
1148
+ */
1149
+ readonly playerIds: string[];
1150
+
1151
+ /**
1152
+ * Unused property that used to store reports of bad data for a run.
1153
+ */
1154
+ readonly issues: null;
1155
+
1156
+ /**
1157
+ * Availibility and 'status' of the video of a run.
1158
+ */
1159
+ readonly VideoState: Enums.VideoState;
1160
+ }
1161
+
1162
+ /**
1163
+ * A game speedrun's public data.
1164
+ */
1165
+ export interface GameRun extends Run_Base {
1166
+
1167
+ /**
1168
+ * Unique identification characters of the run's category.
1169
+ */
1170
+ readonly categoryId: string;
1171
+
1172
+ /**
1173
+ * Unique identification characters of the run's level, if the run is on an individual level (IL).
1174
+ */
1175
+ readonly levelId?: string;
1176
+
1177
+ /**
1178
+ * Whether the run has *splits.io* splits. Splits.io has been shut down; this is `false` on all new runs.
1179
+ */
1180
+ readonly hasSplits: boolean;
1181
+
1182
+ /**
1183
+ * Unique identification characters of values (subcategories and annotations) in the run.
1184
+ */
1185
+ readonly valueIds: string[];
1186
+
1187
+ /**
1188
+ * Whether or not the run's category or subcategories were archived - absent when false.
1189
+ */
1190
+ readonly orphaned?: boolean;
1191
+ }
1192
+
1193
+ export interface ChallengeRun extends Run_Base {
1194
+ readonly challengeId: string;
1195
+ readonly screened: boolean;
1196
+ readonly screenedById?: string;
1197
+ readonly dateScreened?: number;
1198
+ readonly commentsCount: number;
1199
+ }
1200
+
1201
+ export interface ModerationRun extends GameRun {
1202
+
1203
+ /**
1204
+ * Whether or not the run's ranking is estimated.
1205
+ *
1206
+ * Missing when false.
1207
+ */
1208
+ readonly estimated?: true;
1209
+ }
1210
+
1211
+ export interface RunTime {
1212
+ hour: number;
1213
+ minute: number;
1214
+ second: number;
1215
+ millisecond: number;
1216
+ }
1217
+
1218
+ export interface RunSettings {
1219
+
1220
+ /**
1221
+ * Omitted when submitting a new run.
1222
+ */
1223
+ readonly runId?: string;
1224
+ gameId: string;
1225
+ categoryId: string;
1226
+ playerNames: string[];
1227
+
1228
+ /**
1229
+ * whichever timing method is primary to the game is required.
1230
+ */
1231
+ time?: RunTime;
1232
+ timeWithLoads?: RunTime;
1233
+ igt?: RunTime;
1234
+ platformId?: string;
1235
+ emulator: boolean;
1236
+ video?: string;
1237
+ comment?: string;
1238
+ date: number;
1239
+ values?: VariableValue[];
1240
+ }
1241
+
1242
+ export interface Series {
1243
+ readonly id: string;
1244
+ readonly name: string;
1245
+ readonly url: string;
1246
+ readonly addedDate: number;
1247
+ readonly touchDate: number;
1248
+ readonly websiteUrl?: string;
1249
+ readonly discordUrl?: string;
1250
+ readonly runCount: number;
1251
+ readonly activePlayerCount: number;
1252
+ readonly totalPlayerCount: number;
1253
+ readonly officialGameCount: number;
1254
+ readonly staticAssets: StaticAsset[];
1255
+ }
1256
+
1257
+ export interface SeriesModerator {
1258
+ seriesId: string;
1259
+ userId: string;
1260
+ level: Enums.GamePowerLevel;
1261
+ }
1262
+
1263
+ export interface SeriesSettings {
1264
+ name: string;
1265
+ url: string;
1266
+ discordUrl: string;
1267
+ websiteUrl: string;
1268
+ staticAssets: StaticAsset[];
1269
+ staticAssetUpdates: StaticAssetUpdate[];
1270
+ }
1271
+
1272
+ export interface StaticAsset {
1273
+ /**TODO: make enum*/
1274
+ assetType: string;
1275
+ path: string;
1276
+ }
1277
+
1278
+ export interface StaticAssetUpdate {
1279
+ assetType: string;
1280
+ /**Example: data:image/png;base64,examplebase64data*/
1281
+ updateContent: string;
1282
+ deleteContent?: boolean;
1283
+ }
1284
+
1285
+ export interface SupporterCredit {
1286
+ readonly id: string;
1287
+ readonly userId: string;
1288
+ readonly providerId: number; // enum
1289
+ readonly createdAt: number;
1290
+ readonly updatedAt: number;
1291
+ readonly creditType: number; // enum
1292
+ readonly amount: number;
1293
+ readonly currency: string;
1294
+ readonly receivedAt: number;
1295
+ readonly subscriptionId: string;
1296
+ readonly periodStartsAt: number;
1297
+ readonly periodEndsAt: number;
1298
+ readonly providerItemId: string;
1299
+ }
1300
+
1301
+ export interface SupporterCode {
1302
+ readonly id: string;
1303
+ readonly code: string;
1304
+ readonly description: string;
1305
+ readonly duration: number;
1306
+ readonly userId: string;
1307
+ readonly createdAt: number;
1308
+ readonly updatedAt: number;
1309
+ }
1310
+
1311
+ export interface SupporterSubscription {
1312
+ readonly id: string;
1313
+ readonly userId: string;
1314
+ readonly providerId: number; // enum
1315
+ readonly createdAt: number;
1316
+ readonly updatedAt: number;
1317
+ readonly expiresAt: number;
1318
+ readonly planId: number; // enum
1319
+ readonly nextPeriodPlanId: number; // enum
1320
+ readonly status: number; // enum
1321
+ /**Default 0, undocumented but assume timestamp otherwise TODO*/
1322
+ readonly trialEndsAt: number;
1323
+ readonly cancelAtPeriodEnd: boolean;
1324
+ readonly canceledAt: number; // TODO assume timestamp
1325
+ }
1326
+
1327
+ export interface Theme {
1328
+ id: string;
1329
+ url: string;
1330
+ name?: string; // TODO: check optional
1331
+ primaryColor: string;
1332
+ panelColor: string;
1333
+ panelOpacity: number;
1334
+ navbarColor: Enums.NavbarColorType;
1335
+ backgroundColor: string;
1336
+ backgroundFit: Enums.FitType;
1337
+ backgroundPosition: Enums.PositionType;
1338
+ backgroundRepeat: Enums.RepeatType;
1339
+ backgroundScrolling: Enums.ScrollType;
1340
+ foregroundFit: Enums.FitType;
1341
+ foregroundPosition: Enums.PositionType;
1342
+ foregroundRepeat: Enums.RepeatType;
1343
+ foregroundScrolling: Enums.ScrollType;
1344
+ touchDate: number;
1345
+ staticAssets: StaticAsset[];
1346
+ }
1347
+
1348
+ export interface ThemeSettings {
1349
+ primaryColor: string;
1350
+ panelColor: string;
1351
+ panelOpacity: number; // TODO: may be an enum of every 5 between 70 and 100
1352
+ navbarColor: Enums.NavbarColorType
1353
+ backgroundColor: string;
1354
+ backgroundFit: Enums.FitType;
1355
+ backgroundPosition: Enums.PositionType;
1356
+ backgroundRepeat: Enums.RepeatType;
1357
+ backgroundScrolling: Enums.ScrollType;
1358
+ foregroundFit: Enums.FitType;
1359
+ foregroundPosition: Enums.PositionType;
1360
+ foregroundRepeat: Enums.RepeatType;
1361
+ foregroundScrolling: Enums.ScrollType;
1362
+ staticAssets: StaticAsset[];
1363
+ staticAssetUpdates: StaticAssetUpdate[];
1364
+ }
1365
+
1366
+ export interface ThreadReadStatus {
1367
+ threadId: string;
1368
+ date: number;
1369
+ }
1370
+
1371
+ export interface Ticket {
1372
+ id: string;
1373
+ queue: Enums.TicketQueueType;
1374
+ type: Enums.TicketType;
1375
+ status: Enums.TicketStatus;
1376
+ requestorId: string;
1377
+ dateSubmitted: number;
1378
+ dateResolved?: number;
1379
+ /**This is a json object that may be dependent on type*/
1380
+ metadata: string;
1381
+ }
1382
+
1383
+ export interface TicketNote {
1384
+ id: string;
1385
+ ticketId: string;
1386
+ readerId: string;
1387
+ dateSubmitted: number;
1388
+ note: string;
1389
+ isMessage: boolean;
1390
+ isRead: boolean;
1391
+ }
1392
+
1393
+ /**Fields from `User` present in `playerLists`. May also be an unregistered player.*/
1394
+ export interface Player {
1395
+ id: string;
1396
+ name: string;
1397
+ url?: string;
1398
+ powerLevel?: Enums.SitePowerLevel;
1399
+ color1Id?: string;
1400
+ /**Optional even on full `player`*/
1401
+ color2Id?: string;
1402
+ colorAnimate?: number;
1403
+ areaId?: string;
1404
+ isSupporter?: boolean;
1405
+ }
1406
+
1407
+ /**Supporter feature for rings around names.*/
1408
+ export interface AvatarDecoration {
1409
+ enabled: boolean;
1410
+ /**If true, see this object's color Ids. If either is absent, inherit from username.*/
1411
+ separateColors?: boolean;
1412
+ color1Id?: string;
1413
+ /**Defaults to username's `color1Id`*/
1414
+ color2Id?: string;
1415
+ /**Defaults to username's `color2Id`*/
1416
+ }
1417
+
1418
+ export interface User {
1419
+ id: string;
1420
+ name: string;
1421
+ altname?: string;
1422
+ url: string;
1423
+ pronouns: string[];
1424
+ powerLevel: Enums.SitePowerLevel;
1425
+ color1Id: string;
1426
+ color2Id?: string;
1427
+ colorAnimate?: number;
1428
+ areaId: string;
1429
+ isSupporter?: boolean;
1430
+ avatarDecoration?: AvatarDecoration;
1431
+ iconType: Enums.IconType;
1432
+ onlineDate: number;
1433
+ signupDate: number;
1434
+ touchDate: number;
1435
+ staticAssets: StaticAsset[];
1436
+ supporterIconType?: Enums.IconType;
1437
+ supporterIconPosition?: Enums.IconPosition;
1438
+ /**ID for a title given for completing a Challenge*/
1439
+ titleId?: string;
1440
+ }
1441
+
1442
+ export interface UserStats {
1443
+ userId: string;
1444
+ followers: number;
1445
+ runs: number;
1446
+ runsFg: number;
1447
+ runsIl: number;
1448
+ runsPending: number;
1449
+ runTime: number;
1450
+ minRunDate: number;
1451
+ maxRunDate: number;
1452
+ commentsPosted: number;
1453
+ guidesCreated: number;
1454
+ resourcesCreated: number;
1455
+ threadsCreated: number;
1456
+ gamesBoosted: number;
1457
+ usersBoosted: number;
1458
+ followingGames: number;
1459
+ followingUsers: number;
1460
+ challengeRuns: number;
1461
+ challengeRunsPending: number;
1462
+ runVideosAtRisk: number;
1463
+ }
1464
+
1465
+ export interface UserSocialConnection {
1466
+ userId: string;
1467
+ networkId: Enums.SocialConnection;
1468
+ value: string;
1469
+ verified: boolean;
1470
+ }
1471
+
1472
+ export interface UserModerationStats {
1473
+ gameId: string;
1474
+ level: Enums.GamePowerLevel;
1475
+ totalRuns: number;
1476
+ totalTime: number;
1477
+ minDate: number;
1478
+ maxDate: number;
1479
+ }
1480
+
1481
+ export interface UserGameFollow {
1482
+ gameId: string;
1483
+ accessCount: number;
1484
+ lastAccessDate: number;
1485
+ }
1486
+
1487
+ export interface UserGameRunnerStats {
1488
+ gameId: string;
1489
+ totalRuns: number;
1490
+ totalTime: number;
1491
+ uniqueLevels: number;
1492
+ uniqueCategories: number;
1493
+ minDate: number;
1494
+ maxDate: number;
1495
+ }
1496
+
1497
+ /**UserProfile as returned by `GetUserLeaderboard`, `GetUserSummary` & `GetUserPopoverData` - Missing `userStats` and `userSocialConnectionList`.*/
1498
+ export interface UserReducedProfile {
1499
+ userId: string;
1500
+ bio?: string;
1501
+ signupDate: number;
1502
+ defaultView: Enums.DefaultViewType;
1503
+ showMiscByDefault: boolean;
1504
+ gameOrdering?: GameOrdering;
1505
+ }
1506
+
1507
+ export interface UserProfile {
1508
+ userId: string;
1509
+ bio?: string;
1510
+ signupDate: number;
1511
+ defaultView: Enums.DefaultViewType;
1512
+ showMiscByDefault: boolean;
1513
+ gameOrdering: GameOrdering;
1514
+ userStats: UserStats;
1515
+ userSocialConnectionList: UserSocialConnection[];
1516
+ }
1517
+
1518
+ export interface UserFollower {
1519
+ userId: string;
1520
+ followerId: string;
1521
+ }
1522
+
1523
+ export interface UserCount {
1524
+ userId: string;
1525
+ count: number;
1526
+ }
1527
+
1528
+ export interface UserBlock {
1529
+ blockerId: string;
1530
+ blockeeId: string;
1531
+ }
1532
+
1533
+ export interface UserSettings {
1534
+ id: string;
1535
+ name: string;
1536
+ url: string;
1537
+ email: string;
1538
+ bio: string;
1539
+ powerLevel: Enums.SitePowerLevel;
1540
+ areaId: string;
1541
+ /**May be `<gameUrl>`, `user/<userUrl>` or `Default`*/
1542
+ theme: string;
1543
+ color1Id: string;
1544
+ color2Id?: string;
1545
+ colorAnimate: number; // enum
1546
+ avatarDecoration: AvatarDecoration // TODO: check
1547
+ defaultView: Enums.DefaultViewType;
1548
+ timeReference: Enums.TimeReference;
1549
+ timeUnits: Enums.TimeDisplayUnits;
1550
+ dateFormat: Enums.DateFormat;
1551
+ timeFormat: Enums.TimeFormat;
1552
+ iconType: Enums.IconType;
1553
+ disableThemes: boolean;
1554
+ emailAuthentication: boolean;
1555
+ latestMaxFollowed: number;
1556
+ latestMinFollowed: number;
1557
+ latestTimeFollowed: number;
1558
+ showMiscByDefault: boolean;
1559
+ showOnStreamsPage: boolean;
1560
+ showUnofficialGameTypes: boolean;
1561
+ homepageStream: Enums.HomepageStreamType;
1562
+ disableMessages: boolean;
1563
+ showAds: boolean;
1564
+ pronouns: string[];
1565
+ nameChangeDate?: number;
1566
+ runCommentsDisabled: boolean;
1567
+ followedGamesDisabled: boolean;
1568
+ supporterEndDate: number;
1569
+ boostEndDate: number;
1570
+ supporterIconType: Enums.IconType;
1571
+ supporterIconPosition: Enums.IconPosition;
1572
+ staticAssets: StaticAsset[];
1573
+ staticAssetUpdates: StaticAssetUpdate[];
1574
+ }
1575
+
1576
+ export interface VariableValue {
1577
+ variableId: string;
1578
+ valueId: string;
1579
+ }
1580
+
1581
+ export interface VariableValues {
1582
+ variableId: string;
1583
+ valueIds: string[];
1584
+ }
1585
+
1586
+ export interface Variable {
1587
+
1588
+ name: string;
1589
+
1590
+ gameId: string;
1591
+ description?: string;
1592
+ categoryScope: Enums.VarCategoryScope;
1593
+ categoryId?: string;
1594
+ levelScope: Enums.VarLevelScope;
1595
+ levelId?: string;
1596
+ isMandatory: boolean;
1597
+ isSubcategory: boolean;
1598
+ isUserDefined: boolean;
1599
+ isObsoleting: boolean;
1600
+ defaultValue?: string;
1601
+ archived: boolean;
1602
+ displayMode?: Enums.VarDisplayMode;
1603
+ }
1604
+
1605
+ export interface Variable {
1606
+ id: string;
1607
+ url: string;
1608
+ pos: number;
1609
+ }
1610
+
1611
+ /**Value of a variable. `VariableValue` is a selector on this type (and the underlying variable)*/
1612
+ export interface Value {
1613
+ id: string;
1614
+ name: string;
1615
+ url: string;
1616
+ pos: number;
1617
+ variableId: string;
1618
+ isMisc?: boolean;
1619
+ rules?: string;
1620
+ archived: boolean;
1621
1621
  }