speedruncom.js 1.3.1 → 2.0.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,1277 +1,1268 @@
1
1
  //Endpoints that would give the "Method Not Allowed" error when called with GET.
2
2
 
3
- import * as Enums from '../enums.js';
4
- import * as Interfaces from '../interfaces.js';
5
- import { AtLeastOne } from '../types.js';
6
- /**
7
- * Logs in by giving a `set-cookie` header in a response with a `PHPSESSID` cookie.
8
- *
9
- * The first (or only) call only must have only the `name` and `password` params.
10
- *
11
- * If the account has 2 factor authentication (indicated by `loggedIn = false` and `tokenChallengeSent = true`), a 5-digit code will be sent to the account's email. Then a second call with `name`, `password`, and `token` (the token provided in the email) will authenticate.
12
- */
13
- export interface PutAuthLogin {
3
+ import * as Enums from '../enums';
4
+ import * as Interfaces from '../interfaces';
5
+ import { AtLeastOne } from '../types';
14
6
 
15
- /**
16
- * The username of the account.
17
- */
18
- name: string;
19
-
20
- /**
21
- * The password of the account.
22
- */
23
- password: string;
7
+ export default interface POSTEndpoints {
24
8
 
25
9
  /**
26
- * Five-digit token sent to the account's email after a call to an account that has 2 factor authentication.
10
+ * Logs in by giving a `set-cookie` header in a response with a `PHPSESSID` cookie.
11
+ *
12
+ * The first (or only) call only must have only the `name` and `password` params.
13
+ *
14
+ * If the account has 2 factor authentication (indicated by `loggedIn = false` and `tokenChallengeSent = true`), a 5-digit code will be sent to the account's email. Then a second call with `name`, `password`, and `token` (the token provided in the email) will authenticate.
27
15
  */
28
- token?: string;
29
- }
16
+ PutAuthLogin: {
30
17
 
31
- // TODO PutAuthSignup
18
+ /**
19
+ * The username of the account.
20
+ */
21
+ name: string;
32
22
 
33
- /**
34
- * Gets information about the current user's session.
35
- * Most notably `csrfToken`, required for `PutRunSettings`, `PutConversation`, `PutConversationMessage`, `PutConversationLeave` and `PutConversationReport.
36
- */
37
- export interface GetSession {}
23
+ /**
24
+ * The password of the account.
25
+ */
26
+ password: string;
38
27
 
39
- /**
40
- * todo test which credentials this is for
41
- */
42
- export interface PutSessionPing {}
28
+ /**
29
+ * Five-digit token sent to the account's email after a call to an account that has 2 factor authentication.
30
+ */
31
+ token?: string;
32
+ };
43
33
 
44
- /**
45
- * Gets a game, series, or your account's audit log.
46
- *
47
- * If getting a game or series audit log, you must be a Super Moderator for it.
48
- *
49
- * If getting your account's audit log, your account must not be banned.
50
- *
51
- * If multiple item ID parameters are called, it will fetch events concurrent to the items (ex. getting added as a moderator to the game).
52
- */
53
- interface GetAuditLogList_Base {
34
+ // TODO PutAuthSignup
54
35
 
55
36
  /**
56
- * An `EventType` of an event.
37
+ * Gets information about the current user's session.
38
+ * Most notably `csrfToken`, required for `PutRunSettings`, `PutConversation`, `PutConversationMessage`, `PutConversationLeave` and `PutConversationReport.
57
39
  */
58
- eventType?: Enums.EventType;
40
+ GetSession: {};
59
41
 
60
42
  /**
61
- * ID of a game.
43
+ * todo test which credentials this is for
62
44
  */
63
- gameId?: string;
45
+ PutSessionPing: {};
64
46
 
65
47
  /**
66
- * ID of a series.
48
+ * Gets a game's settings.
49
+ *
50
+ * You must be a verifier, moderator, or super moderator in the game.
67
51
  */
68
- seriesId?: string;
52
+ GetGameSettings: {
53
+
54
+ /**
55
+ * ID of the game.
56
+ */
57
+ gameId: string;
58
+ };
69
59
 
70
60
  /**
71
- * ID of the user.
61
+ * Set a game's settings.
62
+ *
63
+ * You must be a moderator or super moderator in a game.
72
64
  */
73
- userId?: string;
65
+ PutGameSettings: {
66
+
67
+ /**
68
+ * ID of the game.
69
+ */
70
+ gameId: string;
71
+
72
+ /**
73
+ * New game settings.
74
+ */
75
+ settings: Interfaces.GameSettings;
76
+ };
74
77
 
75
78
  /**
76
- * The maximum amount of `AuditLogEntry`s to fetch.
79
+ * Creates a new category.
77
80
  */
78
- limit?: number;
81
+ PutCategory: {
82
+
83
+ /**
84
+ * ID of the game.
85
+ */
86
+ gameId: string;
87
+
88
+ /**
89
+ * Settings for the new category.
90
+ */
91
+ category: Interfaces.Category;
92
+ };
79
93
 
80
94
  /**
81
- * The audit log page, in relation to `limit`.
95
+ * Updates an existing category.
82
96
  */
83
- page?: number;
84
- }
97
+ PutCategoryUpdate: {
85
98
 
86
- export type GetAuditLogList = AtLeastOne<GetAuditLogList_Base, 'gameId' | 'seriesId' | 'userId'>;
99
+ /**
100
+ * ID of the game the category is on.
101
+ */
102
+ gameId: string;
87
103
 
88
- /**
89
- * Gets a game's settings.
90
- *
91
- * You must be a verifier, moderator, or super moderator in the game.
92
- */
93
- export interface GetGameSettings {
104
+ /**
105
+ * ID of the category.
106
+ */
107
+ categoryId: string;
108
+
109
+ /**
110
+ * New settings for the category.
111
+ */
112
+ category: Interfaces.Category;
113
+ };
94
114
 
95
115
  /**
96
- * ID of the game.
116
+ * Archives a category.
97
117
  */
98
- gameId: string;
99
- }
118
+ PutCategoryArchive: {
119
+
120
+ /**
121
+ * ID of the game the category is on.
122
+ */
123
+ gameId: string;
100
124
 
101
- /**
102
- * Set a game's settings.
103
- *
104
- * You must be a moderator or super moderator in a game.
105
- */
106
- export interface PutGameSettings {
125
+ /**
126
+ * ID of the category to archive.
127
+ */
128
+ categoryId: string;
129
+ };
107
130
 
108
131
  /**
109
- * ID of the game.
132
+ * Restores an archived category.
110
133
  */
111
- gameId: string;
134
+ PutCategoryRestore: {
135
+
136
+ /**
137
+ * ID of the game that the category to restore is on.
138
+ */
139
+ gameId: string;
140
+
141
+ /**
142
+ * ID of the category to restore.
143
+ */
144
+ categoryId: string;
145
+ };
112
146
 
113
147
  /**
114
- * New game settings.
148
+ * Re-orders game categories.
149
+ *
150
+ * You must be a moderator or super moderator of the game.
115
151
  */
116
- settings: Interfaces.GameSettings;
117
- }
152
+ PutCategoryOrder: {
153
+
154
+ /**
155
+ * ID of the game to order categories on.
156
+ */
157
+ gameId: string;
118
158
 
119
- /**
120
- * Creates a new category.
121
- */
122
- export interface PutCategory {
159
+ /**
160
+ * The new order of categories.
161
+ */
162
+ categoryIds: string[];
163
+ };
123
164
 
124
165
  /**
125
- * ID of the game.
166
+ * Creates a new game Level.
167
+ *
168
+ * You must be a moderator or super moderator of the game.
126
169
  */
127
- gameId: string;
170
+ PutLevel: {
171
+
172
+ /**
173
+ * ID of the game to put the level on.
174
+ */
175
+ gameId: string;
176
+
177
+ /**
178
+ * Settings for the new level.
179
+ */
180
+ level: Interfaces.NewLevel;
181
+ };
128
182
 
129
183
  /**
130
- * Settings for the new category.
184
+ * Updates an existing level.
185
+ *
186
+ * You must be a moderator or super moderator of the level's game.
131
187
  */
132
- category: Interfaces.Category;
133
- }
188
+ PutLevelUpdate: {
189
+
190
+ /**
191
+ * ID of the game that the level to update is on.
192
+ */
193
+ gameId: string;
134
194
 
135
- /**
136
- * Updates an existing category.
137
- */
138
- export interface PutCategoryUpdate {
195
+ /**
196
+ * ID of the level to update.
197
+ */
198
+ levelId: string;
199
+
200
+ /**
201
+ * New settings for the level.
202
+ */
203
+ level: Interfaces.Level;
204
+ };
139
205
 
140
206
  /**
141
- * ID of the game the category is on.
207
+ * Archives a level.
208
+ *
209
+ * You must be a moderator or super moderator of the level's game.
142
210
  */
143
- gameId: string;
211
+ PutLevelArchive: {
212
+
213
+ /**
214
+ * ID of the game that the level to archive is on.
215
+ */
216
+ gameId: string;
217
+
218
+ /**
219
+ * ID of the level to archive.
220
+ */
221
+ levelId: string;
222
+ };
144
223
 
145
224
  /**
146
- * ID of the category.
225
+ * Restores an archived level.
147
226
  */
148
- categoryId: string;
227
+ PutLevelRestore: {
228
+
229
+ /**
230
+ * ID of the game that the level to restore is on.
231
+ *
232
+ * You must be a moderator or super moderator of the level's game.
233
+ */
234
+ gameId: string;
235
+
236
+ /**
237
+ * ID of the level to restore.
238
+ */
239
+ levelId: string;
240
+ };
149
241
 
150
242
  /**
151
- * New settings for the category.
243
+ * Re-orders levels in a game.
244
+ *
245
+ * You must be a moderator or super moderator of the level's game.
152
246
  */
153
- category: Interfaces.Category;
154
- }
247
+ PutLevelOrder: {
248
+
249
+ /**
250
+ * ID of the game to order levels on.
251
+ */
252
+ gameId: string;
155
253
 
156
- /**
157
- * Archives a category.
158
- */
159
- export interface PutCategoryArchive {
254
+ /**
255
+ * The new order of levels.
256
+ */
257
+ levelIds: string[];
258
+ };
160
259
 
161
260
  /**
162
- * ID of the game the category is on.
261
+ * Creates a new variable.
262
+ *
263
+ * You must be a moderator or super moderator of the variables's game.
163
264
  */
164
- gameId: string;
265
+ PutVariable: {
266
+
267
+ /**
268
+ * ID of the game that the variable to create is on.
269
+ */
270
+ gameId: string;
271
+
272
+ /**
273
+ * Settings for the new variable.
274
+ */
275
+ variable: Interfaces.Variable;
276
+
277
+ /**
278
+ * Values for the new variable.
279
+ */
280
+ values: Interfaces.Value[];
281
+ };
165
282
 
166
283
  /**
167
- * ID of the category to archive.
284
+ * Updates an existing variable.
168
285
  */
169
- categoryId: string;
170
- }
286
+ PutVariableUpdate: {
287
+ gameId: string;
288
+ variableId: string;
171
289
 
172
- /**
173
- * Restores an archived category.
174
- */
175
- export interface PutCategoryRestore {
290
+ /**
291
+ * The new variable settings for the variable you are updating.
292
+ */
293
+ variable: Interfaces.Variable;
294
+ values: Interfaces.Value[];
295
+ };
176
296
 
177
297
  /**
178
- * ID of the game that the category to restore is on.
298
+ * Archives a variable.
179
299
  */
180
- gameId: string;
300
+ PutVariableArchive: {
301
+ gameId: string;
302
+ variableId: string;
303
+ };
181
304
 
182
305
  /**
183
- * ID of the category to restore.
306
+ * Restores an archived variable.
184
307
  */
185
- categoryId: string;
186
- }
187
-
188
- /**
189
- * Re-orders game categories.
190
- *
191
- * You must be a moderator or super moderator of the game.
192
- */
193
- export interface PutCategoryOrder {
308
+ PutVariableRestore: {
309
+ gameId: string;
310
+ variableId: string;
311
+ };
194
312
 
195
313
  /**
196
- * ID of the game to order categories on.
314
+ * Re-orders variables. NOTE: only all subcategories OR all annotations are taken at once.
197
315
  */
198
- gameId: string;
316
+ PutVariableOrder: {
317
+ gameId: string;
318
+ variableId: string;
319
+ };
199
320
 
200
321
  /**
201
- * The new order of categories.
322
+ * Puts a variable's default value on all runs in the variable's scope.
202
323
  */
203
- categoryIds: string[];
204
- }
324
+ PutVariableApplyDefault: {
325
+ gameId: string;
326
+ variableId: string;
327
+ };
205
328
 
206
- /**
207
- * Creates a new game Level.
208
- *
209
- * You must be a moderator or super moderator of the game.
210
- */
211
- export interface PutLevel {
329
+ /**
330
+ * Posts a news item to a game.
331
+ */
332
+ PutNews: {
333
+ // TODO: check all
334
+ gameId: string;
335
+ userId: string;
336
+ title: string;
337
+ body: string;
338
+ date: number;
339
+ };
212
340
 
213
341
  /**
214
- * ID of the game to put the level on.
342
+ * Updates a news item.
215
343
  */
216
- gameId: string;
344
+ PutNewsUpdate: {
345
+ // TODO: check all
346
+ newsId: string;
347
+ userId: string;
348
+ title: string;
349
+ body: string;
350
+ date: number;
351
+ };
217
352
 
218
353
  /**
219
- * Settings for the new level.
354
+ * Deletes a news item.
220
355
  */
221
- level: Interfaces.NewLevel;
222
- }
356
+ PutNewsDelete: {
357
+ newsId: string;
358
+ };
223
359
 
224
- /**
225
- * Updates an existing level.
226
- *
227
- * You must be a moderator or super moderator of the level's game.
228
- */
229
- export interface PutLevelUpdate {
360
+ /**
361
+ * Posts a guide item to a game.
362
+ */
363
+ PutGuide: {
364
+ // TODO: check all
365
+ gameId: string;
366
+ userId: string;
367
+ name: string;
368
+ text: string;
369
+ date: number;
370
+ };
230
371
 
231
372
  /**
232
- * ID of the game that the level to update is on.
373
+ * Updates a guide item.
233
374
  */
234
- gameId: string;
375
+ PutGuideUpdate: {
376
+ // TODO: check all
377
+ guideId: string;
378
+ userId: string;
379
+ name: string;
380
+ text: string;
381
+ date: number;
382
+ };
235
383
 
236
384
  /**
237
- * ID of the level to update.
385
+ * Deletes a guide item.
238
386
  */
239
- levelId: string;
387
+ PutGuideDelete: {
388
+ guideId: string;
389
+ };
240
390
 
241
391
  /**
242
- * New settings for the level.
392
+ * Posts a resource item to a game.
243
393
  */
244
- level: Interfaces.Level;
245
- }
394
+ PutResource: {
395
+ // todo check all check base64 encoding of content and also test priority and make aliases
396
+ gameId: string;
397
+
398
+ /**
399
+ * Manager ID
400
+ */
401
+ userId: string;
246
402
 
247
- /**
248
- * Archives a level.
249
- *
250
- * You must be a moderator or super moderator of the level's game.
251
- */
252
- export interface PutLevelArchive {
403
+ /**
404
+ * Comma-separated list of usernames
405
+ */
406
+ authorNames: string;
407
+ date: number;
408
+ name: string;
409
+ description: string;
410
+ type: Enums.ResourceType;
411
+ link?: string;
412
+ uploadFilename?: string;
413
+
414
+ /**
415
+ * Ex. data:application/json;base64examplebase64data
416
+ */
417
+ uploadContent?: string;
418
+ };
253
419
 
254
420
  /**
255
- * ID of the game that the level to archive is on.
421
+ * Updates a resource item.
256
422
  */
257
- gameId: string;
423
+ PutResourceUpdate: {
424
+ // check all check base64 encoding of content probably a `resourceId`
425
+
426
+ /**
427
+ * ID of the resource to update.
428
+ */
429
+ resourceId: string;
430
+
431
+ gameId: string;
432
+
433
+ /**
434
+ * Manager ID
435
+ */
436
+ userId: string;
437
+
438
+ /**
439
+ * Comma-separated list of usernames
440
+ */
441
+ authorNames: string;
442
+ date: number;
443
+ name: string;
444
+ description: string;
445
+ type: Enums.ResourceType;
446
+ link?: string;
447
+ uploadFilename?: string;
448
+
449
+ /**
450
+ * Ex. data:application/json;base64examplebase64data
451
+ */
452
+ uploadContent?: string;
453
+ };
258
454
 
259
455
  /**
260
- * ID of the level to archive.
456
+ * Deletes a resource item.
261
457
  */
262
- levelId: string;
263
- }
458
+ PutResourceDelete: {
459
+ resourceId: string;
460
+ };
264
461
 
265
- /**
266
- * Restores an archived level.
267
- */
268
- export interface PutLevelRestore {
462
+ /**
463
+ * Get moderation games and stats for the logged in user.
464
+ * If the user is not logged in, the response is void.
465
+ */
466
+ GetModerationGames: {};
269
467
 
270
468
  /**
271
- * ID of the game that the level to restore is on.
272
- *
273
- * You must be a moderator or super moderator of the level's game.
469
+ * Get data for runs waiting in the moderation queue for a game.
274
470
  */
275
- gameId: string;
471
+ GetModerationRuns: {
472
+ gameId: string;
473
+ search?: string;
474
+ verified?: Enums.RunStatus;
475
+ verifiedById?: string;
476
+ videoState?: Enums.VideoState;
477
+ limit: number;
478
+ page: number;
479
+ };
276
480
 
277
481
  /**
278
- * ID of the level to restore.
482
+ * Assigns a verifier to a run.
279
483
  */
280
- levelId: string;
281
- }
484
+ PutRunAssignee: {
485
+ assigneeId: string;
486
+ runId: string;
487
+ };
282
488
 
283
- /**
284
- * Re-orders levels in a game.
285
- *
286
- * You must be a moderator or super moderator of the level's game.
287
- */
288
- export interface PutLevelOrder {
489
+ PutRunDelete: {
490
+ gameId: string;
491
+ runId: string;
492
+ };
289
493
 
290
494
  /**
291
- * ID of the game to order levels on.
495
+ * Assigns a verification level `RunStatus` to a run.
292
496
  */
293
- gameId: string;
497
+ //TODO
498
+ PutRunVerification: {
499
+ runId: string;
500
+ verified: Enums.RunStatus;
501
+ reason?: string;
502
+ };
294
503
 
295
504
  /**
296
- * The new order of levels.
505
+ * Assigns a video-at-risk state to a run.
297
506
  */
298
- levelIds: string[];
299
- }
300
-
301
- /**
302
- * Creates a new variable.
303
- *
304
- * You must be a moderator or super moderator of the variables's game.
305
- */
306
- export interface PutVariable {
507
+ PutRunVideoState: {
508
+ runId: string;
509
+ videoState: Enums.VideoState;
510
+ };
307
511
 
308
512
  /**
309
- * ID of the game that the variable to create is on.
310
- */
311
- gameId: string;
312
-
313
- /**
314
- * Settings for the new variable.
315
- */
316
- variable: Interfaces.Variable;
317
-
318
- /**
319
- * Values for the new variable.
320
- */
321
- values: Interfaces.Value[];
322
- }
323
-
324
- /**
325
- * Updates an existing variable.
326
- */
327
- export interface PutVariableUpdate {
328
- gameId: string;
329
- variableId: string;
330
-
331
- /**
332
- * The new variable settings for the variable you are updating.
333
- */
334
- variable: Interfaces.Variable;
335
- values: Interfaces.Value[];
336
- }
337
-
338
- /**
339
- * Archives a variable.
340
- */
341
- export interface PutVariableArchive {
342
- gameId: string;
343
- variableId: string;
344
- }
345
-
346
- /**
347
- * Restores an archived variable.
348
- */
349
- export interface PutVariableRestore {
350
- gameId: string;
351
- variableId: string;
352
- }
353
-
354
- /**
355
- * Re-orders variables. NOTE: only all subcategories OR all annotations are taken at once.
356
- */
357
- export interface PutVariableOrder {
358
- gameId: string;
359
- variableId: string;
360
- }
361
-
362
- /**
363
- * Puts a variable's default value on all runs in the variable's scope.
364
- */
365
- export interface PutVariableApplyDefault {
366
- gameId: string;
367
- variableId: string;
368
- }
513
+ * Gets a run's settings.
514
+ * TODO: check specific details on who can use
515
+ */
516
+ GetRunSettings: {
517
+ runId: string;
518
+ };
369
519
 
370
- /**
371
- * Posts a news item to a game.
372
- */
373
- export interface PutNews {
374
- // TODO: check all
375
- gameId: string;
376
- userId: string;
377
- title: string;
378
- body: string;
379
- date: number;
380
- }
520
+ /**
521
+ * Sets a run's settings or submit a new run if `settings.runId` is exempted.
522
+ */
523
+ PutRunSettings: {
381
524
 
382
- /**
383
- * Updates a news item.
384
- */
385
- export interface PutNewsUpdate {
386
- // TODO: check all
387
- newsId: string;
388
- userId: string;
389
- title: string;
390
- body: string;
391
- date: number;
392
- }
525
+ /**
526
+ * May be retrieved by `GetSession`.
527
+ */
528
+ csrfToken: string;
393
529
 
394
- /**
395
- * Deletes a news item.
396
- */
397
- export interface PutNewsDelete {
398
- newsId: string;
399
- }
400
-
401
- /**
402
- * Posts a guide item to a game.
403
- */
404
- export interface PutGuide {
405
- // TODO: check all
406
- gameId: string;
407
- userId: string;
408
- name: string;
409
- text: string;
410
- date: number;
411
- }
412
-
413
- /**
414
- * Updates a guide item.
415
- */
416
- export interface PutGuideUpdate {
417
- // TODO: check all
418
- guideId: string;
419
- userId: string;
420
- name: string;
421
- text: string;
422
- date: number;
423
- }
424
-
425
- /**
426
- * Deletes a guide item.
427
- */
428
- export interface PutGuideDelete {
429
- guideId: string;
430
- }
431
-
432
- /**
433
- * Posts a resource item to a game.
434
- */
435
- export interface PutResource {
436
- // todo check all check base64 encoding of content and also test priority and make aliases
437
- gameId: string;
438
-
439
- /**
440
- * Manager ID
441
- */
442
- userId: string;
443
-
444
- /**
445
- * Comma-separated list of usernames
446
- */
447
- authorNames: string;
448
- date: number;
449
- name: string;
450
- description: string;
451
- type: Enums.ResourceType;
452
- link?: string;
453
- uploadFilename?: string;
454
-
455
- /**
456
- * Ex. data:application/json;base64examplebase64data
457
- */
458
- uploadContent?: string;
459
- }
460
-
461
- /**
462
- * Updates a resource item.
463
- */
464
- export interface PutResourceUpdate {
465
- // check all check base64 encoding of content probably a `resourceId`
466
-
467
- /**
468
- * ID of the resource to update.
469
- */
470
- resourceId: string;
471
-
472
- gameId: string;
473
-
474
- /**
475
- * Manager ID
476
- */
477
- userId: string;
478
-
479
- /**
480
- * Comma-separated list of usernames
481
- */
482
- authorNames: string;
483
- date: number;
484
- name: string;
485
- description: string;
486
- type: Enums.ResourceType;
487
- link?: string;
488
- uploadFilename?: string;
489
-
490
- /**
491
- * Ex. data:application/json;base64examplebase64data
492
- */
493
- uploadContent?: string;
494
- }
495
-
496
- /**
497
- * Deletes a resource item.
498
- */
499
- export interface PutResourceDelete {
500
- resourceId: string;
501
- }
502
-
503
- /**
504
- * Get moderation games and stats for the logged in user.
505
- * If the user is not logged in, the response is void.
506
- */
507
- export interface GetModerationGames {}
530
+ /**
531
+ * Existing run settings if `runId: string; is not None` otherwise new run's settings.
532
+ */
533
+ settings: Interfaces.RunSettings;
508
534
 
509
- /**
510
- * Get data for runs waiting in the moderation queue for a game.
511
- */
512
- export interface GetModerationRuns {
513
- gameId: string;
514
- search?: string;
515
- verified?: Enums.RunStatus;
516
- verifiedById?: string;
517
- videoState?: Enums.VideoState;
518
- limit?: number;
519
- page?: number;
520
- }
535
+ /**
536
+ * If the run should be automatically verified after editing or not. - only works for game moderators.
537
+ */
538
+ autoverify: boolean;
539
+ };
521
540
 
522
- /**
523
- * Assigns a verifier to a run.
524
- */
525
- export interface PutRunAssignee {
526
- assigneeId: string;
527
- runId: string;
528
- }
541
+ /**
542
+ * Gets conversations the user is involved in.
543
+ */
544
+ GetConversations: {};
529
545
 
530
- export interface PutRunDelete {
531
- gameId: string;
532
- runId: string;
533
- }
546
+ /**
547
+ * Gets messages from a given conversation.
548
+ */
549
+ GetConversationMessages: {
550
+ conversationId: string;
551
+ };
534
552
 
535
- /**
536
- * Assigns a verification level `RunStatus` to a run.
537
- */
538
- //TODO
539
- export interface PutRunVerification {
540
- runId: string;
541
- verified: Enums.RunStatus;
542
- reason?: string;
543
- }
553
+ /**
554
+ * Creates a new conversation. May include several users.
555
+ * If the conversation already exists the message is sent to the existing conversation.
556
+ * NOTE: if the conversation exists but the user has left it they will _not_ rejoin the conversation.
557
+ */
558
+ PutConversation: {
544
559
 
545
- /**
546
- * Assigns a video-at-risk state to a run.
547
- */
548
- export interface PutRunVideoState {
549
- runId: string;
550
- videoState: Enums.VideoState;
551
- }
560
+ /**
561
+ * May be retrieved by `GetSession`.
562
+ */
563
+ csrfToken: string;
552
564
 
553
- /**
554
- * Gets a run's settings.
555
- * TODO: check specific details on who can use
556
- */
557
- export interface GetRunSettings {
558
- runId: string;
559
- }
565
+ /**
566
+ * A list of other users to add to the conversation.
567
+ */
568
+ recipientIds: string[];
560
569
 
561
- /**
562
- * Sets a run's settings or submit a new run if `settings.runId` is exempted.
563
- */
564
- export interface PutRunSettings {
570
+ /**
571
+ * Content of the initial message.
572
+ */
573
+ text: string;
574
+ };
565
575
 
566
576
  /**
567
- * May be retrieved by `GetSession`.
577
+ * Sends a message to a conversation.
568
578
  */
569
- csrfToken: string;
579
+ PutConversationMessage: {
580
+
581
+ /**
582
+ * May be retrieved by `GetSession`.
583
+ */
584
+ csrfToken: string;
585
+ conversationId: string;
586
+ text: string;
587
+ };
570
588
 
571
589
  /**
572
- * Existing run settings if `runId: string; is not None` otherwise new run's settings.
590
+ * Leaves a conversation.
573
591
  */
574
- settings: Interfaces.RunSettings;
592
+ PutConversationLeave: {
593
+
594
+ /**
595
+ * May be retrieved by `GetSession`.
596
+ */
597
+ csrfToken: string;
598
+ conversationId: string;
599
+ };
575
600
 
576
601
  /**
577
- * If the run should be automatically verified after editing or not. - only works for game moderators.
602
+ * Reports a conversation.
578
603
  */
579
- autoverify: boolean;
580
- }
581
-
582
- /**
583
- * Gets conversations the user is involved in.
584
- */
585
- export interface GetConversations {}
604
+ PutConversationReport: {
586
605
 
587
- /**
588
- * Gets messages from a given conversation.
589
- */
590
- export interface GetConversationMessages {
591
- conversationId: string;
592
- }
606
+ /**
607
+ * May be retrieved by `GetSession`.
608
+ */
609
+ csrfToken: string;
610
+ conversationId: string;
593
611
 
594
- /**
595
- * Creates a new conversation. May include several users.
596
- * If the conversation already exists the message is sent to the existing conversation.
597
- * NOTE: if the conversation exists but the user has left it they will _not_ rejoin the conversation.
598
- */
599
- export interface PutConversation {
612
+ /**
613
+ * User description of the report
614
+ */
615
+ text: string;
616
+ };
600
617
 
601
618
  /**
602
- * May be retrieved by `GetSession`.
619
+ * Gets your notifications.
603
620
  */
604
- csrfToken: string;
621
+ GetNotifications: {};
622
+
605
623
  /**
606
- * A list of other users to add to the conversation.
624
+ * Marks all notifications as read.
607
625
  */
608
- recipientIds: string[];
626
+ PutNotificationsRead: {};
609
627
 
610
628
  /**
611
- * Content of the initial message.
629
+ * Follow a game.
612
630
  */
613
- text: string;
614
- }
631
+ PutGameFollower: {
632
+ gameId: string;
615
633
 
616
- /**
617
- * Sends a message to a conversation.
618
- */
619
- export interface PutConversationMessage {
634
+ /**
635
+ * Your `userId`.
636
+ */
637
+ userId: string;
638
+ };
620
639
 
621
640
  /**
622
- * May be retrieved by `GetSession`.
641
+ * Unfollow a game.
623
642
  */
624
- csrfToken: string;
625
- conversationId: string;
626
- text: string;
627
- }
643
+ PutGameFollowerDelete: {
644
+ gameId: string;
628
645
 
629
- /**
630
- * Leaves a conversation.
631
- */
632
- export interface PutConversationLeave {
646
+ /**
647
+ * Your `userId`.
648
+ */
649
+ userId: string;
650
+ };
633
651
 
634
652
  /**
635
- * May be retrieved by `GetSession`.
653
+ * Follow a user.
636
654
  */
637
- csrfToken: string;
638
- conversationId: string;
639
- }
640
-
641
- /**
642
- * Reports a conversation.
643
- */
644
- export interface PutConversationReport {
655
+ PutUserFollower: {
656
+ userId: string;
657
+ };
645
658
 
646
659
  /**
647
- * May be retrieved by `GetSession`.
660
+ * Unfollow a user.
648
661
  */
649
- csrfToken: string;
650
- conversationId: string;
662
+ PutUserFollowerDelete: {
663
+ userId: string;
664
+ };
651
665
 
652
666
  /**
653
- * User description of the report
667
+ * Gets a user's settings.
654
668
  */
655
- text: string;
656
- }
669
+ GetUserSettings: {
657
670
 
658
- // User notifications & follows
659
-
660
- /**
661
- * Gets your notifications.
662
- */
663
- export interface GetNotifications {}
664
-
665
- /**
666
- * Marks all notifications as read.
667
- */
668
- export interface PutNotificationsRead {}
669
-
670
- /**
671
- * Follow a game.
672
- */
673
- export interface PutGameFollower {
674
- gameId: string;
671
+ /**
672
+ * Your user page URL for your account.
673
+ */
674
+ userUrl: string;
675
+ };
675
676
 
676
677
  /**
677
- * Your `userId`.
678
+ * Sets a user's settings.
678
679
  */
679
- userId: string;
680
- }
680
+ PutUserSettings: {
681
681
 
682
- /**
683
- * Unfollow a game.
684
- */
685
- export interface PutGameFollowerDelete {
686
- gameId: string;
682
+ /**
683
+ * Your user page URL for your account.
684
+ */
685
+ userUrl: string;
686
+ settings: Interfaces.UserSettings;
687
+ };
687
688
 
688
689
  /**
689
- * Your `userId`.
690
+ * Sets the run featured on a user's profile.
690
691
  */
691
- userId: string;
692
- }
693
-
694
- /**
695
- * Follow a user.
696
- */
697
- export interface PutUserFollower {
698
- userId: string;
699
- }
692
+ PutUserUpdateFeaturedRun: {
700
693
 
701
- /**
702
- * Unfollow a user.
703
- */
704
- export interface PutUserFollowerDelete {
705
- userId: string;
706
- }
694
+ /**
695
+ * Your user page URL for your account.
696
+ */
697
+ userUrl: string;
707
698
 
708
- // User settings
699
+ /**
700
+ * If omitted clears the full game featured run.
701
+ */
702
+ fullRunId?: string;
709
703
 
710
- /**
711
- * Gets a user's settings.
712
- */
713
- export interface GetUserSettings {
704
+ /**
705
+ * If omitted clears the level featured run.
706
+ */
707
+ levelRunId?: string;
708
+ };
714
709
 
715
710
  /**
716
- * Your user page URL for your account.
711
+ * Updates the order of games displayed on your profile.
712
+ * Note that having multiple GameOrderGroups is a Supporter-only feature. The default group has fixed id of `default`.
717
713
  */
718
- userUrl: string;
719
- }
714
+ PutUserUpdateGameOrdering: {
720
715
 
721
- /**
722
- * Sets a user's settings.
723
- */
724
- export interface PutUserSettings {
716
+ /**
717
+ * Your user page URL for your account.
718
+ */
719
+ userUrl: string;
720
+ groups: Interfaces.GameOrderGroup;
721
+ };
725
722
 
726
723
  /**
727
- * Your user page URL for your account.
724
+ * Get a user's API key (the authorization method for API version 1).
728
725
  */
729
- userUrl: string;
730
- settings: Interfaces.UserSettings;
731
- }
726
+ GetUserApiKey: {
727
+ userId: string;
732
728
 
733
- /**
734
- * Sets the run featured on a user's profile.
735
- */
736
- export interface PutUserUpdateFeaturedRun {
729
+ /**
730
+ * Returns a new API key if `true`.
731
+ */
732
+ regenerate: boolean;
733
+ };
734
+
735
+ GetUserFollowers: {
736
+ userId: string;
737
+ limit?: number;
738
+ page?: number;
739
+ };
740
+
741
+ GetUserFollowingGames: {
742
+ userId: string;
743
+ limit?: number;
744
+ page?: number;
745
+ };
746
+
747
+ GetUserFollowingUsers: {
748
+ userId: string;
749
+ limit?: number;
750
+ page?: number;
751
+ };
737
752
 
738
753
  /**
739
- * Your user page URL for your account.
754
+ * Get a list of games that a user has boosted.
740
755
  */
741
- userUrl: string;
756
+ GetUserGameBoostData: {
757
+ userId: string;
758
+ };
742
759
 
743
760
  /**
744
- * If omitted clears the full game featured run.
761
+ * Get a user's exported data.
745
762
  */
746
- fullRunId?: string;
763
+ GetUserDataExport: {
764
+ userId: string;
765
+ };
747
766
 
748
767
  /**
749
- * If omitted clears the level featured run.
768
+ * Reorder a your account's followed games.
750
769
  */
751
- levelRunId?: string;
752
- }
770
+ PutGameFollowerOrder: {
753
771
 
754
- /**
755
- * Updates the order of games displayed on your profile.
756
- * Note that having multiple GameOrderGroups is a Supporter-only feature. The default group has fixed id of `default`.
757
- */
758
- export interface PutUserUpdateGameOrdering {
772
+ /**
773
+ * List of `gameId`s in the order they should be in
774
+ */
775
+ gameId: string[];
776
+ userId: string;
777
+ };
759
778
 
760
779
  /**
761
- * Your user page URL for your account.
780
+ * Submits a site article.
762
781
  */
763
- userUrl: string;
764
- groups: Interfaces.GameOrderGroup;
765
- }
766
-
767
- /**
768
- * Get a user's API key (the authorization method for API version 1).
769
- */
770
- export interface GetUserApiKey {
771
- userId: string;
782
+ PutArticleSubmission: {
783
+ title: string;
784
+ summary: string;
785
+ body: string;
786
+ game?: string;
787
+ publishTags?: string[];
788
+ }; // todo coverImagePath?: string;
772
789
 
773
790
  /**
774
- * Returns a new API key if `true`.
791
+ * Checks the comment permissions on an item.
775
792
  */
776
- regenerate: boolean;
777
- }
793
+ GetCommentable: {
794
+ itemId: string;
795
+ itemType: Enums.ItemType;
796
+ };
778
797
 
779
- export interface GetUserFollowers {
780
- userId: string;
781
- limit?: number;
782
- page?: number;
783
- }
784
-
785
- export interface GetUserFollowingGames {
786
- userId: string;
787
- limit?: number;
788
- page?: number;
789
- }
798
+ /**
799
+ * Posts a comment on an item.
800
+ */
801
+ PutComment: {
802
+ itemId: string;
803
+ itemType: Enums.ItemType;
804
+ text: string;
805
+ };
790
806
 
791
- export interface GetUserFollowingUsers {
792
- userId: string;
793
- limit?: number;
794
- page?: number;
795
- }
807
+ /**
808
+ * Adds or removes a like to a comment.
809
+ */
810
+ PutLike: {
796
811
 
797
- /**
798
- * Get a list of games that a user has boosted.
799
- */
800
- export interface GetUserGameBoostData {
801
- userId: string;
802
- }
812
+ /**
813
+ * ID 0f the item you are liking or removing your like from.
814
+ */
815
+ itemId: string;
803
816
 
804
- /**
805
- * Get a user's exported data.
806
- */
807
- export interface GetUserDataExport {
808
- userId: string;
809
- }
817
+ /**
818
+ * `ItemType` of the item you are liking or removing your like from.
819
+ */
820
+ itemType: Enums.ItemType;
810
821
 
811
- /**
812
- * Reorder a your account's followed games.
813
- */
814
- export interface PutGameFollowerOrder {
822
+ /**
823
+ * Whether you are liking a comment (`true`) or removing your like from a comment (`false`).
824
+ *
825
+ * `false` when exempted.
826
+ */
827
+ like?: boolean;
828
+ };
815
829
 
816
830
  /**
817
- * List of `gameId`s in the order they should be in
831
+ * Updates commentable settings on an item.
818
832
  */
819
- gameId: string[];
820
- userId: string;
821
- }
833
+ PutCommentableSettings: {
822
834
 
823
- /**
824
- * Submits a site article.
825
- */
826
- export interface PutArticleSubmission {
827
- title: string;
828
- summary: string;
829
- body: string;
830
- game?: string;
831
- publishTags?: string[];
832
- } // todo coverImagePath?: string;
835
+ /**
836
+ * ID of the item you are modifying the comment settings on.
837
+ */
838
+ itemId: string;
833
839
 
834
- /**
835
- * Checks the comment permissions on an item.
836
- */
837
- export interface GetCommentable {
838
- itemId: string;
839
- itemType: Enums.ItemType;
840
- }
840
+ /**
841
+ * `itemType` of the item you are modifying the comment settings on.
842
+ */
843
+ itemType: Enums.ItemType;
844
+ disabled: boolean;
845
+ locked: boolean;
846
+ };
841
847
 
842
- /**
843
- * Posts a comment on an item.
844
- */
845
- export interface PutComment {
846
- itemId: string;
847
- itemType: Enums.ItemType;
848
- text: string;
849
- }
848
+ /**
849
+ * Gets whether a set of threads have been read by the user.
850
+ */
851
+ GetThreadReadStatus: {
850
852
 
851
- /**
852
- * Adds or removes a like to a comment.
853
- */
854
- export interface PutLike {
853
+ /**
854
+ * List of thread IDs to get read status from.
855
+ */
856
+ threadIds: string[];
857
+ };
855
858
 
856
859
  /**
857
- * ID 0f the item you are liking or removing your like from.
860
+ * Sets a thread as read by the user.
858
861
  */
859
- itemId: string;
862
+ PutThreadRead: {
863
+ threadId: string;
864
+ };
860
865
 
861
866
  /**
862
- * `ItemType` of the item you are liking or removing your like from.
863
- */
864
- itemType: Enums.ItemType;
867
+ * Gets whether a set of forums have been read by the user.
868
+ */
869
+ GetForumReadStatus: {
870
+
871
+ /**
872
+ * List of forum IDs to get read status from.
873
+ */
874
+ forumIds: string[];
875
+ };
865
876
 
866
877
  /**
867
- * Whether you are liking a comment (`true`) or removing your like from a comment (`false`).
868
- *
869
- * `false` when exempted.
878
+ * Gets a user game or series' theme. # TODO: check noargs & series
870
879
  */
871
- like?: boolean;
872
- }
880
+ GetThemeSettings: {
873
881
 
874
- /**
875
- * Updates commentable settings on an item.
876
- */
877
- export interface PutCommentableSettings {
882
+ // One of:
883
+ userId?: string;
884
+ gameId?: string;
885
+ seriesId?: string;
886
+ };
878
887
 
879
888
  /**
880
- * ID of the item you are modifying the comment settings on.
889
+ * Sets a user, game, or series' theme.
881
890
  */
882
- itemId: string;
891
+ PutThemeSettings: {
892
+ // One of:
893
+ userId?: string;
894
+ gameId?: string;
895
+ seriesId?: string;
896
+ settings: Interfaces.ThemeSettings;
897
+ };
883
898
 
884
899
  /**
885
- * `itemType` of the item you are modifying the comment settings on.
900
+ * Gets supporter data for your account.
886
901
  */
887
- itemType: Enums.ItemType;
888
- disabled: boolean;
889
- locked: boolean;
890
- }
902
+ GetUserSupporterData: {
891
903
 
892
- /**
893
- * Gets whether a set of threads have been read by the user.
894
- */
895
- export interface GetThreadReadStatus {
904
+ /**
905
+ * Your user page URL for your account.
906
+ */
907
+ userUrl: string;
908
+ };
896
909
 
897
910
  /**
898
- * List of thread IDs to get read status from.
911
+ * Get data used to construct a payment form.
899
912
  */
900
- threadIds: string[];
901
- }
913
+ PutUserSupporterNewSubscription: {
914
+ planKey?: Enums.SupportPlanPeriod
915
+ userUrl?: string;
916
+ };
902
917
 
903
- /**
904
- * Sets a thread as read by the user.
905
- */
906
- export interface PutThreadRead {
907
- threadId: string;
908
- }
909
-
910
- // Forum actions
918
+ /**
919
+ * Adds a boost to a game.
920
+ */
921
+ PutGameBoostGrant: {
922
+ gameId: string;
923
+ anonymous: boolean;
924
+ };
911
925
 
912
- /**
913
- * Gets whether a set of forums have been read by the user.
914
- */
915
- export interface GetForumReadStatus {
926
+ /**
927
+ * Sends a request for contact to SRC for collaboration.
928
+ */
929
+ PutAdvertiseContact: {
930
+ name: string;
931
+ company: string;
932
+ email: string;
933
+ message: string;
934
+ };
916
935
 
917
936
  /**
918
- * List of forum IDs to get read status from.
937
+ * Gets tickets submitted by you.
919
938
  */
920
- forumIds: string[];
921
- }
939
+ GetTickets: {
922
940
 
923
- /**
924
- * Gets a user game or series' theme. # TODO: check noargs & series
925
- */
926
- export interface GetThemeSettings {
941
+ /**
942
+ * list of ticket IDs to fetch
943
+ */
944
+ ticketIds: string[];
927
945
 
928
- // One of:
929
- userId?: string;
930
- gameId?: string;
931
- seriesId?: string;
932
- }
946
+ /**
947
+ * list of `TicketQueueType` to filter by
948
+ */
949
+ queues: Enums.TicketQueueType[];
933
950
 
934
- /**
935
- * Sets a user, game, or series' theme.
936
- */
937
- export interface PutThemeSettings {
938
- // One of:
939
- userId?: string;
940
- gameId?: string;
941
- seriesId?: string;
942
- settings: Interfaces.ThemeSettings;
943
- }
951
+ /**
952
+ * list of `TicketType`
953
+ */
954
+ types: Enums.TicketType[];
944
955
 
945
- // Supporter
956
+ /**
957
+ * list of `TicketStatus`
958
+ */
959
+ statuses: Enums.TicketStatus[];
946
960
 
947
- /**
948
- * Gets supporter data for your account.
949
- */
950
- export interface GetUserSupporterData {
961
+ /**
962
+ * List of `userId`s. Must only have your `userId`.
963
+ */
964
+ requestorIds: string[];
965
+ search: string;
966
+ };
951
967
 
952
968
  /**
953
- * Your user page URL for your account.
969
+ * Gets settings of a series.
954
970
  */
955
- userUrl: string;
956
- }
957
-
958
- /**
959
- * Get data used to construct a payment form.
960
- */
961
- export interface PutUserSupporterNewSubscription {
962
- planKey?: Enums.SupportPlanPeriod
963
- userUrl?: string;
964
- }
971
+ GetSeriesSettings: {
972
+ seriesId: string;
973
+ };
965
974
 
966
- /**
967
- * Adds a boost to a game.
968
- */
969
- export interface PutGameBoostGrant {
970
- gameId: string;
971
- anonymous: boolean;
972
- }
975
+ /**
976
+ * Gets blocks of you blocking a user and users blocking you.
977
+ */
978
+ GetUserBlocks: {};
973
979
 
974
- // To Be Sorted
980
+ /**
981
+ * Blocks or unblocks a user on your account.
982
+ */
983
+ PutUserBlock: {
975
984
 
976
- /**
977
- * Sends a request for contact to SRC for collaboration.
978
- */
979
- export interface PutAdvertiseContact {
980
- name: string;
981
- company: string;
982
- email: string;
983
- message: string;
984
- }
985
+ /**
986
+ * Whether or not you are blocking (`true`) or unblocking (`false`) the user.
987
+ */
988
+ block: boolean;
985
989
 
986
- /**
987
- * Gets tickets submitted by you.
988
- */
989
- export interface GetTickets {
990
+ /**
991
+ * `userId` of you are blocking.
992
+ */
993
+ blockeeId: string;
994
+ };
990
995
 
991
996
  /**
992
- * list of ticket IDs to fetch
997
+ * Add a new game.
993
998
  */
994
- ticketIds: string[];
999
+ PutGame: { // TODO: needs param testing
1000
+ name: string;
1001
+ releaseDate: number;
1002
+
1003
+ /**
1004
+ * list of `GameType`
1005
+ */
1006
+ gameTypeIds: string[];
1007
+
1008
+ /**
1009
+ * If one of the GameTypes supports a baseGame then this can be included with a game id.
1010
+ */
1011
+ baseGame: string;
1012
+ seriesId: string;
1013
+ };
995
1014
 
996
1015
  /**
997
- * list of `TicketQueueType` to filter by
1016
+ * Add a moderator to a game.
998
1017
  */
999
- queues: Enums.TicketQueueType[];
1018
+ PutGameModerator: Interfaces.GameModerator;
1000
1019
 
1001
1020
  /**
1002
- * list of `TicketType`
1021
+ * Remove a moderator from a game.
1022
+ * TODO: test `level` necessity & enum type
1003
1023
  */
1004
- types: Enums.TicketType[];
1024
+ PutGameModeratorDelete: {
1025
+ gameId: string;
1026
+ userId: string;
1027
+ };
1005
1028
 
1006
1029
  /**
1007
- * list of `TicketStatus`
1030
+ * Add an existing game to a series.
1008
1031
  */
1009
- statuses: Enums.TicketStatus[];
1032
+ PutSeriesGame: {
1033
+ seriesId: string;
1034
+ gameId: string;
1035
+ };
1010
1036
 
1011
1037
  /**
1012
- * List of `userId`s. Must only have your `userId`.
1038
+ * Remove a game from a series.
1039
+ *
1040
+ * Does not delete the game.
1013
1041
  */
1014
- requestorIds: string[];
1015
- search: string;
1016
- }
1042
+ PutSeriesGameDelete: {
1043
+ seriesId: string;
1044
+ gameId: string;
1045
+ };
1017
1046
 
1018
- /**
1019
- * Gets settings of a series.
1020
- */
1047
+ PutSeriesModerator: Interfaces.SeriesModerator;
1021
1048
 
1022
- export interface GetSeriesSettings {
1023
- seriesId: string;
1024
- }
1049
+ PutSeriesModeratorUpdate: Interfaces.SeriesModerator;
1025
1050
 
1026
- /**
1027
- * Gets blocks of you blocking a user and users blocking you.
1028
- */
1029
- export interface GetUserBlocks {}
1051
+ PutSeriesModeratorDelete: Interfaces.SeriesModerator;
1030
1052
 
1031
- /**
1032
- * Blocks or unblocks a user on your account.
1033
- */
1034
- export interface PutUserBlock {
1053
+ PutSeriesSettings: {
1054
+ seriesId: string;
1055
+ settings: Interfaces.SeriesSettings;
1056
+ };
1035
1057
 
1036
1058
  /**
1037
- * Whether or not you are blocking (`true`) or unblocking (`false`) the user.
1059
+ * Submits support tickets.
1038
1060
  */
1039
- block: boolean;
1061
+ PutTicket: {
1062
+
1063
+ /**
1064
+ * a JSON string of ticket data
1065
+ */
1066
+ metadata: string;
1067
+
1068
+ /**
1069
+ * TODO: check TicketType vs TicketQueue Type
1070
+ */
1071
+ type: Enums.TicketType;
1072
+ };
1073
+
1074
+ PutTicketNote: {
1075
+ ticketId: string;
1076
+ note: string;
1077
+
1078
+ /**
1079
+ * Whether the note is a message to the user. `false` only permitted for admins.
1080
+ */
1081
+ isMessage: string;
1082
+ };
1040
1083
 
1041
1084
  /**
1042
- * `userId` of you are blocking.
1085
+ * Modifies a user's social connection.
1086
+ * todo verification?
1043
1087
  */
1044
- blockeeId: string;
1045
- }
1088
+ PutUserSocialConnection: {
1089
+ userId: string;
1090
+ networkId: Enums.SocialConnection;
1091
+ value: string;
1092
+ };
1046
1093
 
1047
- /**
1048
- * Add a new game.
1049
- */
1050
- export interface PutGame { // TODO: needs param testing
1051
- name: string;
1052
- releaseDate: number;
1094
+ /**
1095
+ * Remove a user's social connection.
1096
+ */
1097
+ PutUserSocialConnectionDelete: {
1098
+ userId: string;
1099
+ networkId: Enums.SocialConnection;
1100
+ };
1053
1101
 
1102
+ /**
1103
+ * Undocumented.
1104
+ */
1105
+ PutUserSocialConnectionSsoExchange: {
1106
+ userId: string;
1107
+ provider: string;
1108
+ state: string;
1109
+ code: string;
1110
+ };
1054
1111
 
1055
1112
  /**
1056
- * list of `GameType`
1113
+ * Update a user's password.
1057
1114
  */
1058
- gameTypeIds: string[];
1115
+ PutUserUpdatePassword: {
1116
+ userUrl: string;
1117
+ oldPassword: string;
1118
+ newPassword: string;
1119
+ };
1059
1120
 
1060
1121
  /**
1061
- * If one of the GameTypes supports a baseGame then this can be included with a game id.
1122
+ * Update a user's email.
1123
+ * First you send userUrl email and password. SRC will respond with `tokenChallengeSent: true`
1124
+ * Afterwards you send the above data again but this time with `token` set.
1062
1125
  */
1063
- baseGame: string;
1064
- seriesId: string;
1065
- }
1126
+ PutUserUpdateEmail: {
1066
1127
 
1067
- /**
1068
- * Add a moderator to a game.
1069
- */
1070
- export interface PutGameModerator extends Interfaces.GameModerator {}
1128
+ /**
1129
+ * Your user page URL for your account.
1130
+ */
1131
+ userUrl: string;
1071
1132
 
1072
- /**
1073
- * Remove a moderator from a game.
1074
- * TODO: test `level` necessity & enum type
1075
- */
1076
- export interface PutGameModeratorDelete {
1077
- gameId: string;
1078
- userId: string;
1079
- }
1133
+ /**
1134
+ * The **new** email you want to have for the account.
1135
+ */
1136
+ email: string;
1137
+ token?: string;
1138
+ password: string;
1139
+ };
1080
1140
 
1081
- /**
1082
- * Add an existing game to a series.
1083
- */
1084
- export interface PutSeriesGame {
1085
- seriesId: string;
1086
- gameId: string;
1087
- }
1141
+ /**
1142
+ * Updates your name.
1143
+ * You must wait 60 days after changing your name to change it again.
1144
+ */
1145
+ PutUserUpdateName: {
1088
1146
 
1089
- /**
1090
- * Remove a game from a series.
1091
- *
1092
- * Does not delete the game.
1093
- */
1094
- export interface PutSeriesGameDelete {
1095
- seriesId: string;
1096
- gameId: string;
1097
- }
1147
+ /**
1148
+ * Your user page URL for your account.
1149
+ */
1150
+ userUrl: string;
1151
+ newName: string;
1098
1152
 
1099
- export interface PutSeriesModerator extends Interfaces.SeriesModerator {}
1153
+ /**
1154
+ * Whether or not
1155
+ */
1156
+ acceptTerms: boolean;
1157
+ // TODO: check if these are mandatory
1158
+ };
1100
1159
 
1101
- export interface PutSeriesModeratorUpdate extends Interfaces.SeriesModerator {}
1160
+ PutUserDelete: {
1161
+ userUrl: string;
1162
+ password: string;
1163
+ };
1102
1164
 
1103
- export interface PutSeriesModeratorDelete extends Interfaces.SeriesModerator {}
1165
+ /**
1166
+ * Updates a comment.
1167
+ */
1168
+ PutCommentUpdate: {
1104
1169
 
1105
- export interface PutSeriesSettings {
1106
- seriesId: string;
1107
- settings: Interfaces.SeriesSettings;
1108
- }
1170
+ /**
1171
+ * ID of the comment to update.
1172
+ */
1173
+ commentId: string;
1109
1174
 
1110
- /**
1111
- * Submits support tickets.
1112
- */
1113
- export interface PutTicket {
1175
+ /**
1176
+ * New text of the comment.
1177
+ */
1178
+ text: string;
1179
+ };
1114
1180
 
1115
1181
  /**
1116
- * a JSON string of ticket data
1182
+ * Deletes a comment.
1117
1183
  */
1118
- metadata: string;
1184
+ PutCommentDelete: {
1185
+ commentId: string;
1186
+ };
1119
1187
 
1120
1188
  /**
1121
- * TODO: check TicketType vs TicketQueue Type
1189
+ * Restores a deleted comment
1122
1190
  */
1123
- type: Enums.TicketType;
1124
- }
1125
-
1126
- export interface PutTicketNote {
1127
- ticketId: string;
1128
- note: string;
1191
+ PutCommentRestore: {
1192
+ commentId: string;
1193
+ };
1129
1194
 
1130
1195
  /**
1131
- * Whether the note is a message to the user. `false` only permitted for admins.
1196
+ * Create a new thread on a forum.
1132
1197
  */
1133
- isMessage: string;
1134
- }
1198
+ PutThread: {
1199
+ forumId: string;
1200
+ name: string;
1201
+ body: string;
1202
+ };
1135
1203
 
1136
- /**
1137
- * Modifies a user's social connection.
1138
- * todo verification?
1139
- */
1140
- export interface PutUserSocialConnection {
1141
- userId: string;
1142
- networkId: Enums.SocialConnection;
1143
- value: string;
1144
- }
1145
-
1146
- /**
1147
- * Remove a user's social connection.
1148
- */
1149
- export interface PutUserSocialConnectionDelete {
1150
- userId: string;
1151
- networkId: Enums.SocialConnection;
1152
- }
1153
-
1154
- /**
1155
- * Undocumented.
1156
- */
1157
- export interface PutUserSocialConnectionSsoExchange {
1158
- userId: string;
1159
- provider: string;
1160
- state: string;
1161
- code: string;
1162
- }
1163
-
1164
- /**
1165
- * Update a user's password.
1166
- */
1167
- export interface PutUserUpdatePassword {
1168
- userUrl: string;
1169
- oldPassword: string;
1170
- newPassword: string;
1171
- }
1172
-
1173
- /**
1174
- * Update a user's email.
1175
- * First you send userUrl email and password. SRC will respond with `tokenChallengeSent: true`
1176
- * Afterwards you send the above data again but this time with `token` set.
1177
- */
1178
- export interface PutUserUpdateEmail {
1179
-
1180
- /**
1181
- * Your user page URL for your account.
1182
- */
1183
- userUrl: string;
1184
-
1185
- /**
1186
- * The **new** email you want to have for the account.
1204
+ /**
1205
+ * Locks or unlocks a thread.
1187
1206
  */
1188
- email: string;
1189
- token?: string;
1190
- password: string;
1191
- }
1192
-
1193
- /**
1194
- * Updates your name.
1195
- * You must wait 60 days after changing your name to change it again.
1196
- */
1197
- export interface PutUserUpdateName {
1207
+ PutThreadLocked: {
1208
+ threadId: string;
1209
+ locked: boolean;
1210
+ };
1198
1211
 
1199
1212
  /**
1200
- * Your user page URL for your account.
1213
+ * Pins or un-pins a thread.
1201
1214
  */
1202
- userUrl: string;
1203
- newName: string;
1215
+ PutThreadSticky: {
1216
+ threadId: string;
1217
+ sticky: boolean;
1218
+ };
1204
1219
 
1205
- /**
1206
- * Whether or not
1220
+ /**
1221
+ * Delete a thread.
1207
1222
  */
1208
- acceptTerms: boolean;
1209
- // TODO: check if these are mandatory
1210
- }
1211
-
1212
- export interface PutUserDelete {
1213
- userUrl: string;
1214
- password: string;
1215
- }
1216
-
1217
- /**
1218
- * Updates a comment.
1219
- */
1220
- export interface PutCommentUpdate {
1221
-
1222
- /**
1223
- * ID of the comment to update.
1224
- */
1225
- commentId: string;
1226
-
1227
- /**
1228
- * New text of the comment.
1229
- */
1230
- text: string;
1231
- }
1232
-
1233
- /**
1234
- * Deletes a comment.
1235
- */
1236
- export interface PutCommentDelete {
1237
- commentId: string;
1238
- }
1239
-
1240
- /**
1241
- * Restores a deleted comment
1242
- */
1243
- export interface PutCommentRestore {
1244
- commentId: string;
1245
- }
1246
-
1247
- /**
1248
- * Create a new thread on a forum.
1249
- */
1250
- export interface PutThread {
1251
- forumId: string;
1252
- name: string;
1253
- body: string;
1254
- }
1255
-
1256
- /**
1257
- * Locks or unlocks a thread.
1258
- */
1259
- export interface PutThreadLocked {
1260
- threadId: string;
1261
- locked: boolean;
1262
- }
1223
+ PutThreadDelete: {
1224
+ threadId: string;
1225
+ };
1263
1226
 
1264
- /**
1265
- * Pins or un-pins a thread.
1266
- */
1267
- export interface PutThreadSticky {
1268
- threadId: string;
1269
- sticky: boolean;
1270
- }
1271
-
1272
- /**
1273
- * Delete a thread.
1274
- */
1275
- export interface PutThreadDelete {
1276
- threadId: string;
1227
+ /**
1228
+ * Gets a game, series, or your account's audit log.
1229
+ *
1230
+ * If getting a game or series audit log, you must be a Super Moderator for it.
1231
+ *
1232
+ * If getting your account's audit log, your account must not be banned.
1233
+ *
1234
+ * If multiple item ID parameters are called, it will fetch events concurrent to the items (ex. getting added as a moderator to the game).
1235
+ */
1236
+ GetAuditLogList: AtLeastOne<{
1237
+
1238
+ /**
1239
+ * An `EventType` of an event.
1240
+ */
1241
+ eventType?: Enums.EventType;
1242
+
1243
+ /**
1244
+ * ID of a game.
1245
+ */
1246
+ gameId?: string;
1247
+
1248
+ /**
1249
+ * ID of a series.
1250
+ */
1251
+ seriesId?: string;
1252
+
1253
+ /**
1254
+ * ID of the user.
1255
+ */
1256
+ userId?: string;
1257
+
1258
+ /**
1259
+ * The maximum amount of `AuditLogEntry`s to fetch.
1260
+ */
1261
+ limit?: number;
1262
+
1263
+ /**
1264
+ * The audit log page, in relation to `limit`.
1265
+ */
1266
+ page?: number;
1267
+ }, 'gameId' | 'seriesId' | 'userId'>;
1277
1268
  }