speedruncom.js 1.0.0 → 1.1.1

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