speedruncom.js 1.2.9 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +30 -0
- package/LICENSE +504 -504
- package/README.md +49 -49
- package/dist/endpoints/endpoints.post.d.ts +1 -0
- package/package.json +30 -30
- package/src/BaseClient.ts +107 -107
- package/src/build-client.ts +79 -79
- package/src/endpoints/endpoints.get.ts +665 -665
- package/src/endpoints/endpoints.post.ts +1276 -1274
- package/src/enums.ts +404 -404
- package/src/index.ts +5 -5
- package/src/interfaces.ts +1620 -1620
- package/src/responses.ts +713 -713
- package/src/types.ts +4 -4
- package/tsconfig.json +16 -16
|
@@ -1,1275 +1,1277 @@
|
|
|
1
|
-
//Endpoints that would give the "Method Not Allowed" error when called with GET.
|
|
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 {
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* The username of the account.
|
|
17
|
-
*/
|
|
18
|
-
name: string;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* The password of the account.
|
|
22
|
-
*/
|
|
23
|
-
password: string;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Five-digit token sent to the account's email after a call to an account that has 2 factor authentication.
|
|
27
|
-
*/
|
|
28
|
-
token?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// TODO PutAuthSignup
|
|
32
|
-
|
|
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 {}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* todo test which credentials this is for
|
|
41
|
-
*/
|
|
42
|
-
export interface PutSessionPing {}
|
|
43
|
-
|
|
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 {
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* An `EventType` of an event.
|
|
57
|
-
*/
|
|
58
|
-
eventType?: Enums.EventType;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* ID of a game.
|
|
62
|
-
*/
|
|
63
|
-
gameId?: string;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* ID of a series.
|
|
67
|
-
*/
|
|
68
|
-
seriesId?: string;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* ID of the user.
|
|
72
|
-
*/
|
|
73
|
-
userId?: string;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The maximum amount of `AuditLogEntry`s to fetch.
|
|
77
|
-
*/
|
|
78
|
-
limit?: number;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The audit log page, in relation to `limit`.
|
|
82
|
-
*/
|
|
83
|
-
page?: number;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export type GetAuditLogList = AtLeastOne<GetAuditLogList_Base, 'gameId' | 'seriesId' | 'userId'>;
|
|
87
|
-
|
|
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 {
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* ID of the game.
|
|
97
|
-
*/
|
|
98
|
-
gameId: string;
|
|
99
|
-
}
|
|
100
|
-
|
|
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 {
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* ID of the game.
|
|
110
|
-
*/
|
|
111
|
-
gameId: string;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* New game settings.
|
|
115
|
-
*/
|
|
116
|
-
settings: Interfaces.GameSettings;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Creates a new category.
|
|
121
|
-
*/
|
|
122
|
-
export interface PutCategory {
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* ID of the game.
|
|
126
|
-
*/
|
|
127
|
-
gameId: string;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Settings for the new category.
|
|
131
|
-
*/
|
|
132
|
-
category: Interfaces.Category;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Updates an existing category.
|
|
137
|
-
*/
|
|
138
|
-
export interface PutCategoryUpdate {
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* ID of the game the category is on.
|
|
142
|
-
*/
|
|
143
|
-
gameId: string;
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* ID of the category.
|
|
147
|
-
*/
|
|
148
|
-
categoryId: string;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* New settings for the category.
|
|
152
|
-
*/
|
|
153
|
-
category: Interfaces.Category;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Archives a category.
|
|
158
|
-
*/
|
|
159
|
-
export interface PutCategoryArchive {
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* ID of the game the category is on.
|
|
163
|
-
*/
|
|
164
|
-
gameId: string;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* ID of the category to archive.
|
|
168
|
-
*/
|
|
169
|
-
categoryId: string;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Restores an archived category.
|
|
174
|
-
*/
|
|
175
|
-
export interface PutCategoryRestore {
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* ID of the game that the category to restore is on.
|
|
179
|
-
*/
|
|
180
|
-
gameId: string;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* ID of the category to restore.
|
|
184
|
-
*/
|
|
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 {
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* ID of the game to order categories on.
|
|
197
|
-
*/
|
|
198
|
-
gameId: string;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* The new order of categories.
|
|
202
|
-
*/
|
|
203
|
-
categoryIds: string[];
|
|
204
|
-
}
|
|
205
|
-
|
|
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 {
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* ID of the game to put the level on.
|
|
215
|
-
*/
|
|
216
|
-
gameId: string;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Settings for the new level.
|
|
220
|
-
*/
|
|
221
|
-
level: Interfaces.NewLevel;
|
|
222
|
-
}
|
|
223
|
-
|
|
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 {
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* ID of the game that the level to update is on.
|
|
233
|
-
*/
|
|
234
|
-
gameId: string;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* ID of the level to update.
|
|
238
|
-
*/
|
|
239
|
-
levelId: string;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* New settings for the level.
|
|
243
|
-
*/
|
|
244
|
-
level: Interfaces.Level;
|
|
245
|
-
}
|
|
246
|
-
|
|
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 {
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* ID of the game that the level to archive is on.
|
|
256
|
-
*/
|
|
257
|
-
gameId: string;
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* ID of the level to archive.
|
|
261
|
-
*/
|
|
262
|
-
levelId: string;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Restores an archived level.
|
|
267
|
-
*/
|
|
268
|
-
export interface PutLevelRestore {
|
|
269
|
-
|
|
270
|
-
/**
|
|
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.
|
|
274
|
-
*/
|
|
275
|
-
gameId: string;
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* ID of the level to restore.
|
|
279
|
-
*/
|
|
280
|
-
levelId: string;
|
|
281
|
-
}
|
|
282
|
-
|
|
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 {
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* ID of the game to order levels on.
|
|
292
|
-
*/
|
|
293
|
-
gameId: string;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* The new order of levels.
|
|
297
|
-
*/
|
|
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 {
|
|
307
|
-
|
|
308
|
-
/**
|
|
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
|
-
}
|
|
369
|
-
|
|
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
|
-
}
|
|
381
|
-
|
|
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
|
-
}
|
|
393
|
-
|
|
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 {}
|
|
508
|
-
|
|
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
|
-
}
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* Assigns a verifier to a run.
|
|
524
|
-
*/
|
|
525
|
-
export interface PutRunAssignee {
|
|
526
|
-
assigneeId: string;
|
|
527
|
-
runId: string;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
export interface PutRunDelete {
|
|
531
|
-
gameId: string;
|
|
532
|
-
runId: string;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* Assigns a verification level `RunStatus` to a run.
|
|
537
|
-
*/
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
*
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
* `
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
*
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
export interface
|
|
1100
|
-
|
|
1101
|
-
export interface
|
|
1102
|
-
|
|
1103
|
-
export interface
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
*
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1
|
+
//Endpoints that would give the "Method Not Allowed" error when called with GET.
|
|
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 {
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The username of the account.
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The password of the account.
|
|
22
|
+
*/
|
|
23
|
+
password: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Five-digit token sent to the account's email after a call to an account that has 2 factor authentication.
|
|
27
|
+
*/
|
|
28
|
+
token?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// TODO PutAuthSignup
|
|
32
|
+
|
|
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 {}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* todo test which credentials this is for
|
|
41
|
+
*/
|
|
42
|
+
export interface PutSessionPing {}
|
|
43
|
+
|
|
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 {
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* An `EventType` of an event.
|
|
57
|
+
*/
|
|
58
|
+
eventType?: Enums.EventType;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* ID of a game.
|
|
62
|
+
*/
|
|
63
|
+
gameId?: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* ID of a series.
|
|
67
|
+
*/
|
|
68
|
+
seriesId?: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* ID of the user.
|
|
72
|
+
*/
|
|
73
|
+
userId?: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The maximum amount of `AuditLogEntry`s to fetch.
|
|
77
|
+
*/
|
|
78
|
+
limit?: number;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The audit log page, in relation to `limit`.
|
|
82
|
+
*/
|
|
83
|
+
page?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type GetAuditLogList = AtLeastOne<GetAuditLogList_Base, 'gameId' | 'seriesId' | 'userId'>;
|
|
87
|
+
|
|
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 {
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* ID of the game.
|
|
97
|
+
*/
|
|
98
|
+
gameId: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
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 {
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* ID of the game.
|
|
110
|
+
*/
|
|
111
|
+
gameId: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* New game settings.
|
|
115
|
+
*/
|
|
116
|
+
settings: Interfaces.GameSettings;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Creates a new category.
|
|
121
|
+
*/
|
|
122
|
+
export interface PutCategory {
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* ID of the game.
|
|
126
|
+
*/
|
|
127
|
+
gameId: string;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Settings for the new category.
|
|
131
|
+
*/
|
|
132
|
+
category: Interfaces.Category;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Updates an existing category.
|
|
137
|
+
*/
|
|
138
|
+
export interface PutCategoryUpdate {
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* ID of the game the category is on.
|
|
142
|
+
*/
|
|
143
|
+
gameId: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* ID of the category.
|
|
147
|
+
*/
|
|
148
|
+
categoryId: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* New settings for the category.
|
|
152
|
+
*/
|
|
153
|
+
category: Interfaces.Category;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Archives a category.
|
|
158
|
+
*/
|
|
159
|
+
export interface PutCategoryArchive {
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* ID of the game the category is on.
|
|
163
|
+
*/
|
|
164
|
+
gameId: string;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* ID of the category to archive.
|
|
168
|
+
*/
|
|
169
|
+
categoryId: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Restores an archived category.
|
|
174
|
+
*/
|
|
175
|
+
export interface PutCategoryRestore {
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* ID of the game that the category to restore is on.
|
|
179
|
+
*/
|
|
180
|
+
gameId: string;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* ID of the category to restore.
|
|
184
|
+
*/
|
|
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 {
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* ID of the game to order categories on.
|
|
197
|
+
*/
|
|
198
|
+
gameId: string;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The new order of categories.
|
|
202
|
+
*/
|
|
203
|
+
categoryIds: string[];
|
|
204
|
+
}
|
|
205
|
+
|
|
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 {
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* ID of the game to put the level on.
|
|
215
|
+
*/
|
|
216
|
+
gameId: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Settings for the new level.
|
|
220
|
+
*/
|
|
221
|
+
level: Interfaces.NewLevel;
|
|
222
|
+
}
|
|
223
|
+
|
|
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 {
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* ID of the game that the level to update is on.
|
|
233
|
+
*/
|
|
234
|
+
gameId: string;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* ID of the level to update.
|
|
238
|
+
*/
|
|
239
|
+
levelId: string;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* New settings for the level.
|
|
243
|
+
*/
|
|
244
|
+
level: Interfaces.Level;
|
|
245
|
+
}
|
|
246
|
+
|
|
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 {
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* ID of the game that the level to archive is on.
|
|
256
|
+
*/
|
|
257
|
+
gameId: string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* ID of the level to archive.
|
|
261
|
+
*/
|
|
262
|
+
levelId: string;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Restores an archived level.
|
|
267
|
+
*/
|
|
268
|
+
export interface PutLevelRestore {
|
|
269
|
+
|
|
270
|
+
/**
|
|
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.
|
|
274
|
+
*/
|
|
275
|
+
gameId: string;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* ID of the level to restore.
|
|
279
|
+
*/
|
|
280
|
+
levelId: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
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 {
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* ID of the game to order levels on.
|
|
292
|
+
*/
|
|
293
|
+
gameId: string;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The new order of levels.
|
|
297
|
+
*/
|
|
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 {
|
|
307
|
+
|
|
308
|
+
/**
|
|
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
|
+
}
|
|
369
|
+
|
|
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
|
+
}
|
|
381
|
+
|
|
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
|
+
}
|
|
393
|
+
|
|
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 {}
|
|
508
|
+
|
|
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
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Assigns a verifier to a run.
|
|
524
|
+
*/
|
|
525
|
+
export interface PutRunAssignee {
|
|
526
|
+
assigneeId: string;
|
|
527
|
+
runId: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export interface PutRunDelete {
|
|
531
|
+
gameId: string;
|
|
532
|
+
runId: string;
|
|
533
|
+
}
|
|
534
|
+
|
|
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
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Assigns a video-at-risk state to a run.
|
|
547
|
+
*/
|
|
548
|
+
export interface PutRunVideoState {
|
|
549
|
+
runId: string;
|
|
550
|
+
videoState: Enums.VideoState;
|
|
551
|
+
}
|
|
552
|
+
|
|
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
|
+
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Sets a run's settings or submit a new run if `settings.runId` is exempted.
|
|
563
|
+
*/
|
|
564
|
+
export interface PutRunSettings {
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* May be retrieved by `GetSession`.
|
|
568
|
+
*/
|
|
569
|
+
csrfToken: string;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Existing run settings if `runId: string; is not None` otherwise new run's settings.
|
|
573
|
+
*/
|
|
574
|
+
settings: Interfaces.RunSettings;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* If the run should be automatically verified after editing or not. - only works for game moderators.
|
|
578
|
+
*/
|
|
579
|
+
autoverify: boolean;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Gets conversations the user is involved in.
|
|
584
|
+
*/
|
|
585
|
+
export interface GetConversations {}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Gets messages from a given conversation.
|
|
589
|
+
*/
|
|
590
|
+
export interface GetConversationMessages {
|
|
591
|
+
conversationId: string;
|
|
592
|
+
}
|
|
593
|
+
|
|
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 {
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* May be retrieved by `GetSession`.
|
|
603
|
+
*/
|
|
604
|
+
csrfToken: string;
|
|
605
|
+
/**
|
|
606
|
+
* A list of other users to add to the conversation.
|
|
607
|
+
*/
|
|
608
|
+
recipientIds: string[];
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* Content of the initial message.
|
|
612
|
+
*/
|
|
613
|
+
text: string;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Sends a message to a conversation.
|
|
618
|
+
*/
|
|
619
|
+
export interface PutConversationMessage {
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* May be retrieved by `GetSession`.
|
|
623
|
+
*/
|
|
624
|
+
csrfToken: string;
|
|
625
|
+
conversationId: string;
|
|
626
|
+
text: string;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Leaves a conversation.
|
|
631
|
+
*/
|
|
632
|
+
export interface PutConversationLeave {
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* May be retrieved by `GetSession`.
|
|
636
|
+
*/
|
|
637
|
+
csrfToken: string;
|
|
638
|
+
conversationId: string;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Reports a conversation.
|
|
643
|
+
*/
|
|
644
|
+
export interface PutConversationReport {
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* May be retrieved by `GetSession`.
|
|
648
|
+
*/
|
|
649
|
+
csrfToken: string;
|
|
650
|
+
conversationId: string;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* User description of the report
|
|
654
|
+
*/
|
|
655
|
+
text: string;
|
|
656
|
+
}
|
|
657
|
+
|
|
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;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Your `userId`.
|
|
678
|
+
*/
|
|
679
|
+
userId: string;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Unfollow a game.
|
|
684
|
+
*/
|
|
685
|
+
export interface PutGameFollowerDelete {
|
|
686
|
+
gameId: string;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Your `userId`.
|
|
690
|
+
*/
|
|
691
|
+
userId: string;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Follow a user.
|
|
696
|
+
*/
|
|
697
|
+
export interface PutUserFollower {
|
|
698
|
+
userId: string;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Unfollow a user.
|
|
703
|
+
*/
|
|
704
|
+
export interface PutUserFollowerDelete {
|
|
705
|
+
userId: string;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// User settings
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Gets a user's settings.
|
|
712
|
+
*/
|
|
713
|
+
export interface GetUserSettings {
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Your user page URL for your account.
|
|
717
|
+
*/
|
|
718
|
+
userUrl: string;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Sets a user's settings.
|
|
723
|
+
*/
|
|
724
|
+
export interface PutUserSettings {
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Your user page URL for your account.
|
|
728
|
+
*/
|
|
729
|
+
userUrl: string;
|
|
730
|
+
settings: Interfaces.UserSettings;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Sets the run featured on a user's profile.
|
|
735
|
+
*/
|
|
736
|
+
export interface PutUserUpdateFeaturedRun {
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Your user page URL for your account.
|
|
740
|
+
*/
|
|
741
|
+
userUrl: string;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* If omitted clears the full game featured run.
|
|
745
|
+
*/
|
|
746
|
+
fullRunId?: string;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* If omitted clears the level featured run.
|
|
750
|
+
*/
|
|
751
|
+
levelRunId?: string;
|
|
752
|
+
}
|
|
753
|
+
|
|
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 {
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Your user page URL for your account.
|
|
762
|
+
*/
|
|
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;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Returns a new API key if `true`.
|
|
775
|
+
*/
|
|
776
|
+
regenerate: boolean;
|
|
777
|
+
}
|
|
778
|
+
|
|
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
|
+
}
|
|
790
|
+
|
|
791
|
+
export interface GetUserFollowingUsers {
|
|
792
|
+
userId: string;
|
|
793
|
+
limit?: number;
|
|
794
|
+
page?: number;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Get a list of games that a user has boosted.
|
|
799
|
+
*/
|
|
800
|
+
export interface GetUserGameBoostData {
|
|
801
|
+
userId: string;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Get a user's exported data.
|
|
806
|
+
*/
|
|
807
|
+
export interface GetUserDataExport {
|
|
808
|
+
userId: string;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Reorder a your account's followed games.
|
|
813
|
+
*/
|
|
814
|
+
export interface PutGameFollowerOrder {
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* List of `gameId`s in the order they should be in
|
|
818
|
+
*/
|
|
819
|
+
gameId: string[];
|
|
820
|
+
userId: string;
|
|
821
|
+
}
|
|
822
|
+
|
|
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;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Checks the comment permissions on an item.
|
|
836
|
+
*/
|
|
837
|
+
export interface GetCommentable {
|
|
838
|
+
itemId: string;
|
|
839
|
+
itemType: Enums.ItemType;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Posts a comment on an item.
|
|
844
|
+
*/
|
|
845
|
+
export interface PutComment {
|
|
846
|
+
itemId: string;
|
|
847
|
+
itemType: Enums.ItemType;
|
|
848
|
+
text: string;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Adds or removes a like to a comment.
|
|
853
|
+
*/
|
|
854
|
+
export interface PutLike {
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* ID 0f the item you are liking or removing your like from.
|
|
858
|
+
*/
|
|
859
|
+
itemId: string;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* `ItemType` of the item you are liking or removing your like from.
|
|
863
|
+
*/
|
|
864
|
+
itemType: Enums.ItemType;
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Whether you are liking a comment (`true`) or removing your like from a comment (`false`).
|
|
868
|
+
*
|
|
869
|
+
* `false` when exempted.
|
|
870
|
+
*/
|
|
871
|
+
like?: boolean;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Updates commentable settings on an item.
|
|
876
|
+
*/
|
|
877
|
+
export interface PutCommentableSettings {
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* ID of the item you are modifying the comment settings on.
|
|
881
|
+
*/
|
|
882
|
+
itemId: string;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* `itemType` of the item you are modifying the comment settings on.
|
|
886
|
+
*/
|
|
887
|
+
itemType: Enums.ItemType;
|
|
888
|
+
disabled: boolean;
|
|
889
|
+
locked: boolean;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Gets whether a set of threads have been read by the user.
|
|
894
|
+
*/
|
|
895
|
+
export interface GetThreadReadStatus {
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* List of thread IDs to get read status from.
|
|
899
|
+
*/
|
|
900
|
+
threadIds: string[];
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Sets a thread as read by the user.
|
|
905
|
+
*/
|
|
906
|
+
export interface PutThreadRead {
|
|
907
|
+
threadId: string;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
// Forum actions
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Gets whether a set of forums have been read by the user.
|
|
914
|
+
*/
|
|
915
|
+
export interface GetForumReadStatus {
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* List of forum IDs to get read status from.
|
|
919
|
+
*/
|
|
920
|
+
forumIds: string[];
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Gets a user game or series' theme. # TODO: check noargs & series
|
|
925
|
+
*/
|
|
926
|
+
export interface GetThemeSettings {
|
|
927
|
+
|
|
928
|
+
// One of:
|
|
929
|
+
userId?: string;
|
|
930
|
+
gameId?: string;
|
|
931
|
+
seriesId?: string;
|
|
932
|
+
}
|
|
933
|
+
|
|
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
|
+
}
|
|
944
|
+
|
|
945
|
+
// Supporter
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Gets supporter data for your account.
|
|
949
|
+
*/
|
|
950
|
+
export interface GetUserSupporterData {
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Your user page URL for your account.
|
|
954
|
+
*/
|
|
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
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Adds a boost to a game.
|
|
968
|
+
*/
|
|
969
|
+
export interface PutGameBoostGrant {
|
|
970
|
+
gameId: string;
|
|
971
|
+
anonymous: boolean;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
// To Be Sorted
|
|
975
|
+
|
|
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
|
+
/**
|
|
987
|
+
* Gets tickets submitted by you.
|
|
988
|
+
*/
|
|
989
|
+
export interface GetTickets {
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* list of ticket IDs to fetch
|
|
993
|
+
*/
|
|
994
|
+
ticketIds: string[];
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* list of `TicketQueueType` to filter by
|
|
998
|
+
*/
|
|
999
|
+
queues: Enums.TicketQueueType[];
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* list of `TicketType`
|
|
1003
|
+
*/
|
|
1004
|
+
types: Enums.TicketType[];
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* list of `TicketStatus`
|
|
1008
|
+
*/
|
|
1009
|
+
statuses: Enums.TicketStatus[];
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* List of `userId`s. Must only have your `userId`.
|
|
1013
|
+
*/
|
|
1014
|
+
requestorIds: string[];
|
|
1015
|
+
search: string;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* Gets settings of a series.
|
|
1020
|
+
*/
|
|
1021
|
+
|
|
1022
|
+
export interface GetSeriesSettings {
|
|
1023
|
+
seriesId: string;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* Gets blocks of you blocking a user and users blocking you.
|
|
1028
|
+
*/
|
|
1029
|
+
export interface GetUserBlocks {}
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Blocks or unblocks a user on your account.
|
|
1033
|
+
*/
|
|
1034
|
+
export interface PutUserBlock {
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Whether or not you are blocking (`true`) or unblocking (`false`) the user.
|
|
1038
|
+
*/
|
|
1039
|
+
block: boolean;
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* `userId` of you are blocking.
|
|
1043
|
+
*/
|
|
1044
|
+
blockeeId: string;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* Add a new game.
|
|
1049
|
+
*/
|
|
1050
|
+
export interface PutGame { // TODO: needs param testing
|
|
1051
|
+
name: string;
|
|
1052
|
+
releaseDate: number;
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* list of `GameType`
|
|
1057
|
+
*/
|
|
1058
|
+
gameTypeIds: string[];
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* If one of the GameTypes supports a baseGame then this can be included with a game id.
|
|
1062
|
+
*/
|
|
1063
|
+
baseGame: string;
|
|
1064
|
+
seriesId: string;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Add a moderator to a game.
|
|
1069
|
+
*/
|
|
1070
|
+
export interface PutGameModerator extends Interfaces.GameModerator {}
|
|
1071
|
+
|
|
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
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* Add an existing game to a series.
|
|
1083
|
+
*/
|
|
1084
|
+
export interface PutSeriesGame {
|
|
1085
|
+
seriesId: string;
|
|
1086
|
+
gameId: string;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
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
|
+
}
|
|
1098
|
+
|
|
1099
|
+
export interface PutSeriesModerator extends Interfaces.SeriesModerator {}
|
|
1100
|
+
|
|
1101
|
+
export interface PutSeriesModeratorUpdate extends Interfaces.SeriesModerator {}
|
|
1102
|
+
|
|
1103
|
+
export interface PutSeriesModeratorDelete extends Interfaces.SeriesModerator {}
|
|
1104
|
+
|
|
1105
|
+
export interface PutSeriesSettings {
|
|
1106
|
+
seriesId: string;
|
|
1107
|
+
settings: Interfaces.SeriesSettings;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Submits support tickets.
|
|
1112
|
+
*/
|
|
1113
|
+
export interface PutTicket {
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* a JSON string of ticket data
|
|
1117
|
+
*/
|
|
1118
|
+
metadata: string;
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* TODO: check TicketType vs TicketQueue Type
|
|
1122
|
+
*/
|
|
1123
|
+
type: Enums.TicketType;
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export interface PutTicketNote {
|
|
1127
|
+
ticketId: string;
|
|
1128
|
+
note: string;
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Whether the note is a message to the user. `false` only permitted for admins.
|
|
1132
|
+
*/
|
|
1133
|
+
isMessage: string;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
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.
|
|
1187
|
+
*/
|
|
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 {
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Your user page URL for your account.
|
|
1201
|
+
*/
|
|
1202
|
+
userUrl: string;
|
|
1203
|
+
newName: string;
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Whether or not
|
|
1207
|
+
*/
|
|
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
|
+
}
|
|
1263
|
+
|
|
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;
|
|
1275
1277
|
}
|