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