speedruncom.js 1.1.0 → 1.2.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.
@@ -6,7 +6,7 @@ export interface Category {
6
6
  /**
7
7
  * ID of the category.
8
8
  */
9
- id: string;
9
+ readonly id: string;
10
10
  /**
11
11
  * Name of the category.
12
12
  */
@@ -16,15 +16,15 @@ export interface Category {
16
16
  * This is never actually used in site pages.
17
17
  * The URL is permanent and can never update, even when changing the category name.
18
18
  */
19
- url: string;
19
+ readonly url: string;
20
20
  /**
21
21
  * A global, site-wide position order number for the category.
22
22
  */
23
- pos: number;
23
+ readonly pos: number;
24
24
  /**
25
25
  * ID of the game the category is on.
26
26
  */
27
- gameId: string;
27
+ readonly gameId: string;
28
28
  /**
29
29
  * Whether or not the category is miscellaneous.
30
30
  */
@@ -70,15 +70,15 @@ export interface ChallengeModerator {
70
70
  /**
71
71
  * ID of the challenge being moderated.
72
72
  */
73
- challengeId: string;
73
+ readonly challengeId: string;
74
74
  /**
75
75
  * ID of the user moderating.
76
76
  */
77
- userId: string;
77
+ readonly userId: string;
78
78
  /**
79
79
  * `GamePowerLevel` of the moderator.
80
80
  */
81
- level: Enums.GamePowerLevel;
81
+ readonly level: Enums.GamePowerLevel;
82
82
  }
83
83
  /**
84
84
  * A current status of a challenge.
@@ -87,27 +87,27 @@ export interface ChallengeStanding {
87
87
  /**
88
88
  * ID of the challenge.
89
89
  */
90
- challengeId: string;
90
+ readonly challengeId: string;
91
91
  /**
92
92
  * todo
93
93
  */
94
- place: number;
94
+ readonly place: number;
95
95
  /**
96
96
  * todo
97
97
  */
98
- registeredPlayerIds: string[];
98
+ readonly registeredPlayerIds: string[];
99
99
  /**
100
100
  * todo
101
101
  */
102
- prizeAmount: number;
102
+ readonly prizeAmount: number;
103
103
  /**
104
104
  * todo
105
105
  */
106
- unregisteredPlayers: string[];
106
+ readonly unregisteredPlayers: string[];
107
107
  /**
108
108
  * todo
109
109
  */
110
- prizeCurrency: string;
110
+ readonly prizeCurrency: string;
111
111
  }
112
112
  /**
113
113
  * A currency reward for getting a certain ranking in a challenge.
@@ -116,123 +116,252 @@ export interface ChallengePrize {
116
116
  /**
117
117
  * The ranking in the challenge for the reward.
118
118
  */
119
- place: number;
119
+ readonly place: number;
120
120
  /**
121
121
  * The amount of money rewarded to the player in the `place`.
122
122
  */
123
- amount: number;
123
+ readonly amount: number;
124
124
  }
125
125
  /**
126
- * todo: is this just unused?
126
+ * Configuration settings of a challenge.
127
127
  */
128
128
  export interface ChallengePrizeConfig {
129
- prizePool: number;
130
- currency: string;
131
- prizes: ChallengePrize[];
129
+ /**
130
+ * TODO
131
+ */
132
+ readonly prizePool: number;
133
+ /**
134
+ * TODO
135
+ */
136
+ readonly currency: string;
137
+ readonly prizes: ChallengePrize[];
132
138
  }
133
- /**Sitewide rank based on all challenges entered.*/
139
+ /**
140
+ * A single user's site-wide ranking details based on all challenges entered.
141
+ */
134
142
  export interface GlobalChallengeRanking {
135
- userId: string;
136
- rank: number;
137
- totalEarnings: number;
138
- firstPlaces: number;
139
- secondPlaces: number;
140
- thirdPlaces: number;
141
- challengesEntered: number;
143
+ /**
144
+ * ID of the user.
145
+ */
146
+ readonly userId: string;
147
+ /**
148
+ * The user's site-wide rank.
149
+ */
150
+ readonly rank: number;
151
+ readonly totalEarnings: number;
152
+ /**
153
+ * The amount of first place ranks the user has achieved in challenges.
154
+ */
155
+ readonly firstPlaces: number;
156
+ /**
157
+ * The amount of second place ranks the user has achieved in challenges.
158
+ */
159
+ readonly secondPlaces: number;
160
+ /**
161
+ * The amount of third place ranks the user has achieved in challenges.
162
+ */
163
+ readonly thirdPlaces: number;
164
+ /**
165
+ * The total amount of challenges the user has entered.
166
+ */
167
+ readonly challengesEntered: number;
142
168
  }
169
+ /**
170
+ * A site challenge.
171
+ */
143
172
  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;
173
+ /**
174
+ * ID of the challenge.
175
+ */
176
+ readonly id: string;
177
+ /**
178
+ * Name of the challenge.
179
+ */
180
+ readonly name: string;
181
+ /**
182
+ * todo
183
+ */
184
+ readonly announcement: string;
185
+ /**
186
+ * Subpath URL of the challenge.
187
+ */
188
+ readonly url: string;
189
+ /**
190
+ * ID of the game the challenge is based on.
191
+ */
192
+ readonly gameId: string;
193
+ /**
194
+ * UNIX timestamp of when the challenge was created.
195
+ */
196
+ readonly createDate: number;
197
+ /**
198
+ * UNIX timestamp of when the challenge settings were last updated.
199
+ */
200
+ readonly updateDate: number;
201
+ /**
202
+ * todo
203
+ */
204
+ readonly startDate: number;
205
+ /**
206
+ * todo
207
+ */
208
+ readonly endDate: number;
209
+ /**
210
+ * `ChallengeState` of the challenge.
211
+ */
212
+ readonly state: Enums.ChallengeState;
213
+ /**
214
+ * Description of the challenge.
215
+ */
216
+ readonly description: string;
217
+ /**
218
+ * Rules of the challenge (not to be confused with `contestRules`).
219
+ */
220
+ readonly rules: string;
221
+ /**
222
+ *
223
+ */
224
+ readonly numPlayers: number;
225
+ readonly exactPlayers: boolean;
226
+ readonly playerMatchMode: Enums.PlayerMatchMode;
227
+ readonly timeDirection: Enums.TimeDirection;
228
+ readonly enforceMs: boolean;
229
+ /**
230
+ * Subpath URL of the challenge's cover image.
231
+ * check if opt todo
232
+ */
233
+ readonly coverImagePath: string;
234
+ readonly contest: boolean;
235
+ readonly contestRules: string;
236
+ readonly runCommentsMode: Enums.ItemPermissionType;
237
+ /**
238
+ * `ChallengePrizeConfig` of the challenge.
239
+ */
240
+ readonly prizeConfig: ChallengePrizeConfig;
166
241
  }
167
- /**User reward for completing a Challenge.*/
242
+ /**
243
+ * Player reward for completing a Challenge.
244
+ */
168
245
  export interface Title {
169
- id: string;
170
- title: string;
171
- comment: string;
172
- referenceUrl: string;
246
+ /**
247
+ * ID of the title.
248
+ */
249
+ readonly id: string;
250
+ /**
251
+ * Title of the challenge.
252
+ */
253
+ readonly title: string;
254
+ /**
255
+ * Description of how the challenge is rewarded to players.
256
+ */
257
+ readonly comment: string;
258
+ /**
259
+ * Subpath URL of the challenge that rewards the title.
260
+ */
261
+ readonly referenceUrl: string;
173
262
  }
263
+ /**
264
+ * Permissions of a comment section.
265
+ */
174
266
  export interface CommentPermissions {
175
- canManage: boolean;
176
- canViewComments: boolean;
177
- canPostComments: boolean;
178
- canEditComments: boolean;
179
- canDeleteComments: boolean;
180
- cannotViewReasons: string[];
181
- cannotPostReasons: string[];
267
+ /**
268
+ * Whether or not
269
+ */
270
+ readonly canManage: boolean;
271
+ /**
272
+ * Whether or
273
+ */
274
+ readonly canViewComments: boolean;
275
+ readonly canPostComments: boolean;
276
+ /**
277
+ * Whether or not editing comments is allowed.
278
+ */
279
+ readonly canEditComments: boolean;
280
+ /**
281
+ * Whether or not deleting comments is allowsed.
282
+ */
283
+ readonly canDeleteComments: boolean;
284
+ /**
285
+ * Reasons for not being able to not view a thread.
286
+ */
287
+ readonly cannotViewReasons: string[];
288
+ /**
289
+ * Reasons for not being able to post a comment.
290
+ */
291
+ readonly cannotPostReasons: string[];
182
292
  }
183
293
  export interface CommentableProperties {
184
- disabled: boolean;
185
- locked: boolean;
294
+ readonly disabled: boolean;
295
+ readonly locked: boolean;
186
296
  }
187
297
  export interface Commentable {
188
- itemType: Enums.ItemType;
189
- itemId: string;
190
- properties: CommentableProperties;
298
+ readonly itemType: Enums.ItemType;
299
+ readonly itemId: string;
300
+ readonly properties: CommentableProperties;
191
301
  /**Permissions of the logged in user. If not logged in; `canPostComments` is `false`.*/
192
- permissions: CommentPermissions;
302
+ readonly permissions: CommentPermissions;
193
303
  }
194
304
  export interface Comment {
195
- id: string;
196
- itemType: Enums.ItemType;
197
- itemId: string;
198
- date: number;
199
- userId: string;
305
+ readonly id: string;
306
+ readonly itemType: Enums.ItemType;
307
+ readonly itemId: string;
308
+ readonly date: number;
309
+ readonly userId: string;
200
310
  /**May be omitted on deleted comments.*/
201
- text?: string;
202
- parentId?: string;
203
- deleted: boolean;
204
- deletedUserId?: string;
311
+ readonly text?: string;
312
+ readonly parentId?: string;
313
+ readonly deleted: boolean;
314
+ readonly deletedUserId?: string;
205
315
  }
206
316
  export interface Like {
207
- itemType: Enums.ItemType;
208
- itemId: string;
209
- userId: string;
210
- date: number;
317
+ readonly itemType: Enums.ItemType;
318
+ readonly itemId: string;
319
+ readonly userId: string;
320
+ readonly date: number;
211
321
  }
212
322
  export interface SocialNetwork {
213
- id: Enums.SocialConnection;
214
- name: string;
215
- major: boolean;
216
- pos: number;
217
- pattern: string;
323
+ /**
324
+ * `SocialConnection` of the social network.
325
+ */
326
+ readonly id: Enums.SocialConnection;
327
+ /**
328
+ * Name of the social network.
329
+ */
330
+ readonly name: string;
331
+ /**
332
+ * Arbitrary and unknown determination of if the platform is popular.
333
+ *
334
+ * This does not have to do with if the platform is depricated or not.
335
+ */
336
+ readonly major: boolean;
337
+ /**
338
+ * Site-wide ordering method of the platform.
339
+ */
340
+ readonly pos: number;
341
+ /**
342
+ * 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.
343
+ *
344
+ * Example: `https://www.youtube.com/user/[id]`
345
+ */
346
+ readonly pattern: string;
218
347
  }
219
348
  export interface Area {
220
- id: string;
221
- name: string;
222
- fullName: string;
223
- label: string;
224
- flagIcon: string;
225
- lbFlagIcon: string;
226
- lbName: string;
349
+ readonly id: string;
350
+ readonly name: string;
351
+ readonly fullName: string;
352
+ readonly label: string;
353
+ readonly flagIcon: string;
354
+ readonly lbFlagIcon: string;
355
+ readonly lbName: string;
227
356
  }
228
357
  export interface Color {
229
- id: string;
230
- name: string;
231
- darkColor: string;
358
+ readonly id: string;
359
+ readonly name: string;
360
+ readonly darkColor: string;
232
361
  /**@deprecated `darkColor` is always used on the site*/
233
- lightColor: string;
362
+ readonly lightColor: string;
234
363
  /**@deprecated colors now seem to be sorted by their name's ascending alphabetical order (A-Z)*/
235
- pos: number;
364
+ readonly pos: number;
236
365
  }
237
366
  /**
238
367
  * A 'category' of threads, being site-wide such as *The Site* and *Supporter* or representing the forum section that every game has.
@@ -241,83 +370,83 @@ export interface Forum {
241
370
  /**
242
371
  * `id` of this forum section.
243
372
  */
244
- id: string;
373
+ readonly id: string;
245
374
  /**
246
375
  * Name of the forum. If this is the game's forum, it is the game name.
247
376
  */
248
- name: string;
377
+ readonly name: string;
249
378
  /**
250
379
  * Page URL of the forum. If this is the game's forum, it is the game's page URL.
251
380
  */
252
- url: string;
381
+ readonly url: string;
253
382
  /**
254
383
  * A description used to describe site-wide forums.
255
384
  */
256
- description?: string;
385
+ readonly description?: string;
257
386
  /**
258
387
  * The `ForumType` the forum is.
259
388
  */
260
- type: Enums.ForumType;
389
+ readonly type: Enums.ForumType;
261
390
  /**
262
391
  * The amount of threads inside of a forum.
263
392
  */
264
- threadCount: number;
393
+ readonly threadCount: number;
265
394
  /**
266
395
  * The amont of combined posts of every thread in the forum.
267
396
  */
268
- postCount: number;
397
+ readonly postCount: number;
269
398
  /**
270
399
  * The ID of the latest post in any thread in the forum.
271
400
  */
272
- lastPostId: string;
401
+ readonly lastPostId: string;
273
402
  /**
274
403
  * The `userId` of the latest post in any thread in the forum.
275
404
  */
276
- lastPostUserId: string;
405
+ readonly lastPostUserId: string;
277
406
  /**
278
407
  * The UNIX timestamp of when the latest post in any thread in the forum was posted.
279
408
  */
280
- lastPostDate: number;
409
+ readonly lastPostDate: number;
281
410
  /**
282
411
  *
283
412
  */
284
- touchDate: number;
413
+ readonly touchDate: number;
285
414
  }
286
415
  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;
416
+ readonly id: string;
417
+ readonly name: string;
418
+ readonly gameId: string;
419
+ readonly forumId: string;
420
+ readonly userId: string;
421
+ readonly replies: number;
422
+ readonly created: number;
423
+ readonly lastCommentId: string;
424
+ readonly lastCommentUserId: string;
425
+ readonly lastCommentDate: number;
426
+ readonly sticky: boolean;
427
+ readonly locked: boolean;
299
428
  }
300
429
  export interface ForumReadStatus {
301
- forumId: string;
302
- date: number;
430
+ readonly forumId: string;
431
+ readonly date: number;
303
432
  }
304
433
  export interface Datatype {
305
- threadId: string;
306
- date: number;
434
+ readonly threadId: string;
435
+ readonly date: number;
307
436
  }
308
437
  export interface Leaderboard {
309
- category: Category;
310
- game: Game;
311
- pagination: Pagination;
312
- platforms: Platform[];
438
+ readonly category: Category;
439
+ readonly game: Game;
440
+ readonly pagination: Pagination;
441
+ readonly platforms: Platform[];
313
442
  /**
314
443
  * Every Player with a run in a game.
315
444
  */
316
- players: Player[];
317
- regions: Region[];
318
- runs: GameRun[];
319
- values: VariableValue[];
320
- variables: Variable[];
445
+ readonly players: Player[];
446
+ readonly regions: Region[];
447
+ readonly runs: GameRun[];
448
+ readonly values: VariableValue[];
449
+ readonly variables: Variable[];
321
450
  }
322
451
  /**
323
452
  * Paramaters for filtering a leaderboard.
@@ -376,159 +505,159 @@ export interface LeaderboardParams {
376
505
  video?: Enums.VideoFilter;
377
506
  }
378
507
  export interface RunCount {
379
- gameId: string;
380
- categoryId: string;
381
- levelId?: string;
382
- variableId?: string;
383
- valueId?: string;
384
- count: number;
508
+ readonly gameId: string;
509
+ readonly categoryId: string;
510
+ readonly levelId?: string;
511
+ readonly variableId?: string;
512
+ readonly valueId?: string;
513
+ readonly count: number;
385
514
  }
386
515
  export interface Platform {
387
- id: string;
388
- name: string;
389
- url: string;
390
- year: number;
516
+ readonly id: string;
517
+ readonly name: string;
518
+ readonly url: string;
519
+ readonly year: number;
391
520
  }
392
521
  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;
522
+ readonly id: string;
523
+ readonly slug: string;
524
+ readonly title: string;
525
+ readonly summary: string;
526
+ readonly body: string;
527
+ readonly createDate: number;
528
+ readonly updateDate: number;
529
+ readonly publishDate?: number;
530
+ readonly rejectDate?: number;
531
+ readonly publishTarget: string;
532
+ readonly publishTags: string[];
533
+ readonly coverImagePath?: string;
534
+ readonly commentsCount: number;
535
+ readonly community?: boolean;
536
+ readonly gameId?: string;
537
+ readonly userId?: string;
538
+ readonly editorId?: string;
410
539
  /**day it was pinned */
411
- stickyDate?: number;
540
+ readonly stickyDate?: number;
412
541
  }
413
542
  export interface Region {
414
- id: string;
415
- name: string;
416
- url: string;
417
- flag: string;
543
+ readonly id: string;
544
+ readonly name: string;
545
+ readonly url: string;
546
+ readonly flag: string;
418
547
  }
419
548
  export interface Pagination {
420
- count: number;
421
- page: number;
422
- pages: number;
423
- per: number;
549
+ readonly count: number;
550
+ readonly page: number;
551
+ readonly pages: number;
552
+ readonly per: number;
424
553
  }
425
554
  export interface Guide {
426
- id: string;
427
- name: string;
428
- text: string;
429
- date: number;
430
- userId: string;
431
- gameId: string;
555
+ readonly id: string;
556
+ readonly name: string;
557
+ readonly text: string;
558
+ readonly date: number;
559
+ readonly userId: string;
560
+ readonly gameId: string;
432
561
  }
433
562
  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;
563
+ readonly id: string;
564
+ readonly type: Enums.ResourceType;
565
+ readonly name: string;
566
+ readonly description: string;
567
+ readonly date: number;
568
+ readonly userId: string;
569
+ readonly gameId: string;
570
+ readonly path?: string;
571
+ readonly link?: string;
572
+ readonly fileName?: string;
573
+ readonly authorNames: string;
445
574
  }
446
575
  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;
576
+ readonly id: string;
577
+ readonly gameId?: string;
578
+ readonly userId?: string;
579
+ readonly areaId?: string;
580
+ readonly url: string;
581
+ readonly title: string;
582
+ readonly previewUrl: string;
583
+ readonly channelName: string;
584
+ readonly viewers: number;
456
585
  /**If the stream has a PB on SRC (and has their account linked) TODO: check*/
457
- hasPb: boolean;
586
+ readonly hasPb: boolean;
458
587
  }
459
588
  export interface AuditLogEntry {
460
- id: string;
461
- date: number;
462
- eventType: Enums.EventType;
463
- actorId: string;
464
- gameId: string;
589
+ readonly id: string;
590
+ readonly date: number;
591
+ readonly eventType: Enums.EventType;
592
+ readonly actorId: string;
593
+ readonly gameId: string;
465
594
  /**A json dict of extra context based on eventType.*/
466
- context: string;
467
- userId?: string;
595
+ readonly context: string;
596
+ readonly userId?: string;
468
597
  }
469
598
  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[];
599
+ readonly signedIn: boolean;
600
+ readonly showAds: boolean;
601
+ readonly user?: User;
602
+ readonly theme?: Theme;
603
+ readonly powerLevel: Enums.SitePowerLevel;
604
+ readonly dateFormat: Enums.DateFormat;
605
+ readonly timeFormat: Enums.TimeFormat;
606
+ readonly timeReference: Enums.TimeReference;
607
+ readonly timeUnits: Enums.TimeDisplayUnits;
608
+ readonly homepageStream: Enums.HomepageStreamType;
609
+ readonly disableThemes: boolean;
610
+ readonly csrfToken: string;
611
+ readonly networkToken?: string;
612
+ readonly gameList: Game[];
613
+ readonly gameFollowerList: GameFollower[];
614
+ readonly gameModeratorList: GameModerator[];
615
+ readonly gameRunnerList: GameRunner[];
616
+ readonly seriesList: Series[];
617
+ readonly seriesModeratorList: SeriesModerator[];
618
+ readonly boostAvailableTokens?: number;
619
+ readonly boostNextTokenDate: number;
620
+ readonly boostNextTokenAmount: number;
621
+ readonly userFollowerList: UserFollower[];
622
+ readonly enabledExperimentIds: string[];
623
+ readonly challengeModeratorList: ChallengeModerator[];
495
624
  }
496
625
  export interface Conversation {
497
- id: string;
498
- participantUserIds: string[];
499
- lastMessageId: string;
500
- lastMessageUser: string;
501
- lastMessageText: string;
502
- lastMessageDate: number;
503
- readDate: number;
626
+ readonly id: string;
627
+ readonly participantUserIds: string[];
628
+ readonly lastMessageId: string;
629
+ readonly lastMessageUser: string;
630
+ readonly lastMessageText: string;
631
+ readonly lastMessageDate: number;
632
+ readonly readDate: number;
504
633
  }
505
634
  export interface ConversationLightweight {
506
- id: string;
635
+ readonly id: string;
507
636
  /**TODO check if empty */
508
- participantUserIds: string[];
509
- lastMessageId: string;
510
- lastMessageDate: number;
637
+ readonly participantUserIds: string[];
638
+ readonly lastMessageId: string;
639
+ readonly lastMessageDate: number;
511
640
  }
512
641
  export interface ConversationParticipant {
513
- conversationId: string;
514
- userId: string;
515
- joinedDate: number;
642
+ readonly conversationId: string;
643
+ readonly userId: string;
644
+ readonly joinedDate: number;
516
645
  /**TODO check if optional*/
517
- leftDate: number;
646
+ readonly leftDate: number;
518
647
  }
519
648
  export interface ConversationMessage {
520
- id: string;
521
- conversationId: string;
522
- userId: string;
523
- text: string;
524
- date: number;
649
+ readonly id: string;
650
+ readonly conversationId: string;
651
+ readonly userId: string;
652
+ readonly text: string;
653
+ readonly date: number;
525
654
  }
526
655
  export interface SystemMessage {
527
- id: string;
528
- userId: string;
529
- text: string;
530
- date: number;
531
- read: boolean;
656
+ readonly id: string;
657
+ readonly userId: string;
658
+ readonly text: string;
659
+ readonly date: number;
660
+ readonly read: boolean;
532
661
  }
533
662
  /**
534
663
  * The basic data of a game.
@@ -537,106 +666,106 @@ export interface Game {
537
666
  /**
538
667
  * ID of the game.
539
668
  */
540
- id: string;
669
+ readonly id: string;
541
670
  /**
542
671
  * Name of the game.
543
672
  */
544
- name: string;
673
+ readonly name: string;
545
674
  /**
546
675
  * Page URL of the game.
547
676
  */
548
- url: string;
677
+ readonly url: string;
549
678
  /**
550
679
  * Unused enum that is always `1`. todo check if gameType is this
551
680
  */
552
- type: 1;
681
+ readonly type: 1;
553
682
  /**
554
683
  * Whether or not a game has Load Removed Time (LRT) as a timing method.
555
684
  */
556
- loadtimes: boolean;
685
+ readonly loadtimes: boolean;
557
686
  /**
558
687
  * Whether or not the game supports entering milliseconds when entering a time into a run.
559
688
  */
560
- milliseconds: boolean;
689
+ readonly milliseconds: boolean;
561
690
  /**
562
691
  * Whether or not a game has In Game Time (IGT) as a timing method.
563
692
  */
564
- igt: boolean;
693
+ readonly igt: boolean;
565
694
  /**
566
695
  * Whether or not runs require moderators to verify them.
567
696
  */
568
- verification: boolean;
697
+ readonly verification: boolean;
569
698
  /**
570
699
  * Whether or not the default option for 'Automatically Verify Run' is true.
571
700
  */
572
- autoVerify?: boolean;
701
+ readonly autoVerify?: boolean;
573
702
  /**
574
703
  * Whether or not videos are required for submission.
575
704
  */
576
- requireVideo: boolean;
705
+ readonly requireVideo: boolean;
577
706
  /**
578
707
  * Emulator allowability in a game.
579
708
  */
580
- emulator: Enums.EmulatorType;
709
+ readonly emulator: Enums.EmulatorType;
581
710
  /**
582
711
  * Default timing method of the game.
583
712
  */
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;
713
+ readonly defaultTimer: Enums.TimingMethod;
714
+ readonly validTimers: Enums.TimingMethod[];
715
+ readonly releaseDate?: number;
716
+ readonly addedDate: number;
717
+ readonly touchDate: number;
718
+ readonly baseGameId?: string;
719
+ readonly coverPath: string;
720
+ readonly trophy1stPath?: string;
721
+ readonly trophy2ndPath?: string;
722
+ readonly trophy3rdPath?: string;
723
+ readonly trophy4thPath?: string;
724
+ readonly runCommentsMode: Enums.ItemPermissionType;
725
+ readonly runCount: number;
726
+ readonly activePlayerCount: number;
727
+ readonly totalPlayerCount: number;
728
+ readonly boostReceivedCount: number;
729
+ readonly boostDistinctDonorsCount: number;
730
+ readonly rules?: string;
731
+ readonly viewPowerLevel: Enums.SitePowerLevel;
732
+ readonly platformIds: string[];
733
+ readonly regionIds: string[];
734
+ readonly gameTypeIds: Enums.GameType[];
735
+ readonly websiteUrl?: string;
736
+ readonly discordUrl?: string;
737
+ readonly defaultView: Enums.DefaultViewType;
738
+ readonly guidePermissionType: Enums.ItemPermissionType;
739
+ readonly resourcePermissionType: Enums.ItemPermissionType;
740
+ readonly staticAssets: StaticAsset[];
741
+ readonly embargoDate?: number;
742
+ readonly embargoText?: string;
614
743
  }
615
744
  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;
745
+ readonly gameId: string;
746
+ readonly totalRuns: number;
747
+ readonly totalRunsFG: number;
748
+ readonly totalRunsIL: number;
749
+ readonly totalRunTime: number;
750
+ readonly recentRuns: number;
751
+ readonly recentRunsFG: number;
752
+ readonly recentRunsIL: number;
753
+ readonly totalPlayers: number;
754
+ readonly activePlayers: number;
755
+ readonly followers: number;
756
+ readonly guides: number;
757
+ readonly resources: number;
629
758
  }
630
759
  export interface GameNews {
631
- id: string;
632
- gameId: string;
633
- userId: string;
634
- title: string;
760
+ readonly id: string;
761
+ readonly gameId: string;
762
+ readonly userId: string;
763
+ readonly title: string;
635
764
  /**
636
765
  * Omitted for all but the first item in `GetGameSummary.newsList[]`.
637
766
  */
638
- body?: string;
639
- dateSubmitted: number;
767
+ readonly body?: string;
768
+ readonly dateSubmitted: number;
640
769
  }
641
770
  export interface GameModerator {
642
771
  gameId: string;
@@ -644,24 +773,24 @@ export interface GameModerator {
644
773
  level: Enums.GamePowerLevel;
645
774
  }
646
775
  export interface GameBoost {
647
- id: string;
648
- createdAt: number;
649
- updatedAt: number;
650
- gameId: string;
651
- donorUserId: string;
652
- anonymous: boolean;
653
- recipientUserIds: [];
776
+ readonly id: string;
777
+ readonly createdAt: number;
778
+ readonly updatedAt: number;
779
+ readonly gameId: string;
780
+ readonly donorUserId: string;
781
+ readonly anonymous: boolean;
782
+ readonly recipientUserIds: [];
654
783
  }
655
784
  export interface GameTypeDetails {
656
- id: Enums.GameType;
657
- name: string;
658
- url: string;
659
- description: string;
660
- allowBaseGame: boolean;
785
+ readonly id: Enums.GameType;
786
+ readonly name: string;
787
+ readonly url: string;
788
+ readonly description: string;
789
+ readonly allowBaseGame: boolean;
661
790
  }
662
791
  /**TODO: Check for optional properties*/
663
792
  export interface GameSettings {
664
- id: string;
793
+ readonly id: string;
665
794
  name: string;
666
795
  url: string;
667
796
  twitchName: string;
@@ -698,56 +827,58 @@ export interface GameSettings {
698
827
  staticAssetUpdates: StaticAssetUpdate[];
699
828
  }
700
829
  export interface GameModerationStats {
701
- gameId: string;
830
+ readonly gameId: string;
702
831
  /**enum? appears to always be 0*/
703
- state: number;
704
- count: number;
705
- minDate?: number;
706
- maxDate?: number;
832
+ readonly state: number;
833
+ readonly count: number;
834
+ readonly minDate?: number;
835
+ readonly maxDate?: number;
707
836
  }
708
837
  export interface GameFollower {
709
- gameId: string;
710
- followerId: string;
711
- pos?: number;
712
- accessCount: number;
713
- lastAccessDate: number;
838
+ readonly gameId: string;
839
+ readonly followerId: string;
840
+ readonly pos?: number;
841
+ readonly accessCount: number;
842
+ readonly lastAccessDate: number;
714
843
  }
715
844
  export interface GameRunner {
716
- gameId: string;
717
- userId: string;
718
- runCount: number;
845
+ readonly gameId: string;
846
+ readonly userId: string;
847
+ readonly runCount: number;
719
848
  }
720
- export interface Level {
721
- id: string;
722
- gameId: string;
849
+ export interface NewLevel {
850
+ readonly gameId: string;
723
851
  name: string;
724
- url: string;
725
- pos: number;
726
852
  rules?: string;
727
853
  archived: boolean;
728
854
  }
855
+ export interface Level extends NewLevel {
856
+ readonly id: string;
857
+ readonly url: string;
858
+ readonly pos: number;
859
+ }
729
860
  export interface Notification {
730
- id: string;
731
- date: number;
732
- title: string;
733
- path: string;
734
- read: boolean;
861
+ readonly id: string;
862
+ readonly date: number;
863
+ readonly title: string;
864
+ readonly path: string;
865
+ readonly read: boolean;
735
866
  }
736
867
  export interface NotificationSetting {
737
- type: number;
738
- gameId?: string;
739
- site: boolean;
740
- email: boolean;
868
+ readonly type: number;
869
+ readonly gameId?: string;
870
+ readonly site: boolean;
871
+ readonly email: boolean;
741
872
  }
742
873
  /**A different type of notification are returned by `GetStaticData` than in other areas.*/
743
874
  export interface NotificationSettingStaticData {
744
- id: number;
745
- group: string;
746
- title: string;
747
- pos: number;
748
- gameSpecific: boolean;
749
- siteDefault: number;
750
- emailDefault: boolean;
875
+ readonly id: number;
876
+ readonly group: string;
877
+ readonly title: string;
878
+ readonly pos: number;
879
+ readonly gameSpecific: boolean;
880
+ readonly siteDefault: number;
881
+ readonly emailDefault: boolean;
751
882
  }
752
883
  export interface GameOrderGroup {
753
884
  id: string;
@@ -758,100 +889,100 @@ export interface GameOrderGroup {
758
889
  editing?: boolean;
759
890
  }
760
891
  export interface GameOrdering {
761
- defaultGroups: GameOrderGroup[];
762
- supporterGroups: GameOrderGroup[];
892
+ readonly defaultGroups: GameOrderGroup[];
893
+ readonly supporterGroups: GameOrderGroup[];
763
894
  }
764
895
  interface Run_Base {
765
896
  /**
766
897
  * Unique identification characters of a run.
767
898
  */
768
- id: string;
899
+ readonly id: string;
769
900
  /**
770
901
  * Unique identification characters of the run's game.
771
902
  */
772
- gameId: string;
903
+ readonly gameId: string;
773
904
  /**
774
905
  * 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
906
  */
776
- time?: number;
907
+ readonly time?: number;
777
908
  /**
778
909
  * 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
910
  */
780
- timeWithLoads?: number;
911
+ readonly timeWithLoads?: number;
781
912
  /**
782
913
  * In Game Time* of the run, in seconds.
783
914
  */
784
- igt?: number;
915
+ readonly igt?: number;
785
916
  /**
786
917
  * Unique identification characters of a platform. Platforms can be accessed with `GetPlatformList`.
787
918
  */
788
- platformId?: string;
919
+ readonly platformId?: string;
789
920
  /**
790
921
  * Whether or not an emulator was used in the run.
791
922
  */
792
- emulator: boolean;
923
+ readonly emulator: boolean;
793
924
  /**
794
925
  * Unique identification characters of a region. Found in older games that vary based on regions.
795
926
  */
796
- regionId?: string;
927
+ readonly regionId?: string;
797
928
  /**
798
929
  * Everything in the 'Video URL' box.
799
930
  */
800
- video?: string;
931
+ readonly video?: string;
801
932
  /**
802
933
  * Description of a run.
803
934
  */
804
- comment?: string;
935
+ readonly comment?: string;
805
936
  /**
806
937
  * Unique user identification of the run submitter. Absent if the submitter is deleted.
807
938
  */
808
- submittedById?: string;
939
+ readonly submittedById?: string;
809
940
  /**
810
941
  * A run's verification status.
811
942
  */
812
- verified: Enums.RunStatus;
943
+ readonly verified: Enums.RunStatus;
813
944
  /**
814
945
  * Unique user identification characters of the run resolver.
815
946
  *
816
947
  * Absent if the resolver is deleted.
817
948
  */
818
- verifiedById?: string;
949
+ readonly verifiedById?: string;
819
950
  /**
820
951
  * Run rejection reason if it was rejected.
821
952
  */
822
- reason?: string;
953
+ readonly reason?: string;
823
954
  /**
824
955
  * UNIX timestamp of a run's (changeable) date.
825
956
  */
826
- date: number;
957
+ readonly date: number;
827
958
  /**
828
959
  * UNIX timestamp of when the run was submitted.
829
960
  */
830
- dateSubmitted?: number;
961
+ readonly dateSubmitted?: number;
831
962
  /**
832
963
  * UNIX timestamp of when the run was resolved.
833
964
  */
834
- dateVerified?: number;
965
+ readonly dateVerified?: number;
835
966
  /**
836
967
  * Whether the run is obsolete or not - absent when false.
837
968
  */
838
- obsolete?: boolean;
969
+ readonly obsolete?: boolean;
839
970
  /**
840
971
  * Leaderboard rank of the run. Absent when obsolete.
841
972
  */
842
- place?: number;
973
+ readonly place?: number;
843
974
  /**
844
975
  * Unique identification characters of players in the run.
845
976
  */
846
- playerIds: string[];
977
+ readonly playerIds: string[];
847
978
  /**
848
979
  * Unused property that used to store reports of bad data for a run.
849
980
  */
850
- issues: null;
981
+ readonly issues: null;
851
982
  /**
852
983
  * Availibility and 'status' of the video of a run.
853
984
  */
854
- VideoState: Enums.VideoState;
985
+ readonly VideoState: Enums.VideoState;
855
986
  }
856
987
  /**
857
988
  * A game speedrun's public data.
@@ -860,30 +991,30 @@ export interface GameRun extends Run_Base {
860
991
  /**
861
992
  * Unique identification characters of the run's category.
862
993
  */
863
- categoryId: string;
994
+ readonly categoryId: string;
864
995
  /**
865
996
  * Unique identification characters of the run's level, if the run is on an individual level (IL).
866
997
  */
867
- levelId?: string;
998
+ readonly levelId?: string;
868
999
  /**
869
1000
  * Whether the run has *splits.io* splits. Splits.io has been shut down; this is `false` on all new runs.
870
1001
  */
871
- hasSplits: boolean;
1002
+ readonly hasSplits: boolean;
872
1003
  /**
873
1004
  * Unique identification characters of values (subcategories and annotations) in the run.
874
1005
  */
875
- valueIds: string[];
1006
+ readonly valueIds: string[];
876
1007
  /**
877
1008
  * Whether or not the run's category or subcategories were archived - absent when false.
878
1009
  */
879
- orphaned?: boolean;
1010
+ readonly orphaned?: boolean;
880
1011
  }
881
1012
  export interface ChallengeRun extends Run_Base {
882
- challengeId: string;
883
- screened: boolean;
884
- screenedById?: string;
885
- dateScreened?: number;
886
- commentsCount: number;
1013
+ readonly challengeId: string;
1014
+ readonly screened: boolean;
1015
+ readonly screenedById?: string;
1016
+ readonly dateScreened?: number;
1017
+ readonly commentsCount: number;
887
1018
  }
888
1019
  export interface ModerationRun extends GameRun {
889
1020
  /**
@@ -891,7 +1022,7 @@ export interface ModerationRun extends GameRun {
891
1022
  *
892
1023
  * Missing when false.
893
1024
  */
894
- estimated?: true;
1025
+ readonly estimated?: true;
895
1026
  }
896
1027
  export interface RunTime {
897
1028
  hour: number;
@@ -903,7 +1034,7 @@ export interface RunSettings {
903
1034
  /**
904
1035
  * Omitted when submitting a new run.
905
1036
  */
906
- runId?: string;
1037
+ readonly runId?: string;
907
1038
  gameId: string;
908
1039
  categoryId: string;
909
1040
  playerNames: string[];
@@ -921,18 +1052,18 @@ export interface RunSettings {
921
1052
  values: VariableValue[];
922
1053
  }
923
1054
  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[];
1055
+ readonly id: string;
1056
+ readonly name: string;
1057
+ readonly url: string;
1058
+ readonly addedDate: number;
1059
+ readonly touchDate: number;
1060
+ readonly websiteUrl?: string;
1061
+ readonly discordUrl?: string;
1062
+ readonly runCount: number;
1063
+ readonly activePlayerCount: number;
1064
+ readonly totalPlayerCount: number;
1065
+ readonly officialGameCount: number;
1066
+ readonly staticAssets: StaticAsset[];
936
1067
  }
937
1068
  export interface SeriesModerator {
938
1069
  seriesId: string;
@@ -959,43 +1090,43 @@ export interface StaticAssetUpdate {
959
1090
  deleteContent?: boolean;
960
1091
  }
961
1092
  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;
1093
+ readonly id: string;
1094
+ readonly userId: string;
1095
+ readonly providerId: number;
1096
+ readonly createdAt: number;
1097
+ readonly updatedAt: number;
1098
+ readonly creditType: number;
1099
+ readonly amount: number;
1100
+ readonly currency: string;
1101
+ readonly receivedAt: number;
1102
+ readonly subscriptionId: string;
1103
+ readonly periodStartsAt: number;
1104
+ readonly periodEndsAt: number;
1105
+ readonly providerItemId: string;
975
1106
  }
976
1107
  export interface SupporterCode {
977
- id: string;
978
- code: string;
979
- description: string;
980
- duration: number;
981
- userId: string;
982
- createdAt: number;
983
- updatedAt: number;
1108
+ readonly id: string;
1109
+ readonly code: string;
1110
+ readonly description: string;
1111
+ readonly duration: number;
1112
+ readonly userId: string;
1113
+ readonly createdAt: number;
1114
+ readonly updatedAt: number;
984
1115
  }
985
1116
  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;
1117
+ readonly id: string;
1118
+ readonly userId: string;
1119
+ readonly providerId: number;
1120
+ readonly createdAt: number;
1121
+ readonly updatedAt: number;
1122
+ readonly expiresAt: number;
1123
+ readonly planId: number;
1124
+ readonly nextPeriodPlanId: number;
1125
+ readonly status: number;
995
1126
  /**Default 0, undocumented but assume timestamp otherwise TODO*/
996
- trialEndsAt: number;
997
- cancelAtPeriodEnd: boolean;
998
- canceledAt: number;
1127
+ readonly trialEndsAt: number;
1128
+ readonly cancelAtPeriodEnd: boolean;
1129
+ readonly canceledAt: number;
999
1130
  }
1000
1131
  export interface Theme {
1001
1132
  id: string;
@@ -1235,10 +1366,7 @@ export interface VariableValues {
1235
1366
  valueIds: string[];
1236
1367
  }
1237
1368
  export interface Variable {
1238
- id: string;
1239
1369
  name: string;
1240
- url: string;
1241
- pos: number;
1242
1370
  gameId: string;
1243
1371
  description?: string;
1244
1372
  categoryScope: Enums.VarCategoryScope;
@@ -1253,6 +1381,11 @@ export interface Variable {
1253
1381
  archived: boolean;
1254
1382
  displayMode?: Enums.VarDisplayMode;
1255
1383
  }
1384
+ export interface Variable {
1385
+ id: string;
1386
+ url: string;
1387
+ pos: number;
1388
+ }
1256
1389
  /**Value of a variable. `VariableValue` is a selector on this type (and the underlying variable)*/
1257
1390
  export interface Value {
1258
1391
  id: string;