speedruncom.js 2.0.1 → 2.0.2
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/lib/endpoints/endpoints.get.d.ts +81 -2
- package/lib/endpoints/endpoints.post.d.ts +5 -20
- package/lib/enums.d.ts +59 -2
- package/lib/enums.js +59 -1
- package/lib/interfaces.d.ts +3 -3
- package/package.json +1 -1
- package/src/endpoints/endpoints.get.ts +97 -2
- package/src/endpoints/endpoints.post.ts +5 -23
- package/src/enums.ts +65 -2
- package/src/interfaces.ts +3 -3
|
@@ -185,6 +185,17 @@ export default interface GETEndpoints {
|
|
|
185
185
|
* ID of the user.
|
|
186
186
|
*/
|
|
187
187
|
userId: string;
|
|
188
|
+
/**
|
|
189
|
+
* The maximum amount of comments to fetch.
|
|
190
|
+
*
|
|
191
|
+
* @max Unknown - likely around 99999.
|
|
192
|
+
* @default Unknown - likely around 99999.
|
|
193
|
+
*/
|
|
194
|
+
limit?: number;
|
|
195
|
+
/**
|
|
196
|
+
* The comment list page, in relation to `limit`.
|
|
197
|
+
*/
|
|
198
|
+
page?: number;
|
|
188
199
|
};
|
|
189
200
|
/**
|
|
190
201
|
* Gets threads created by a specific user.
|
|
@@ -194,6 +205,17 @@ export default interface GETEndpoints {
|
|
|
194
205
|
* ID of the user.
|
|
195
206
|
*/
|
|
196
207
|
userId: string;
|
|
208
|
+
/**
|
|
209
|
+
* The maximum amount of comments to fetch.
|
|
210
|
+
*
|
|
211
|
+
* @max Unknown - likely around 99999.
|
|
212
|
+
* @default Unknown - likely around 99999.
|
|
213
|
+
*/
|
|
214
|
+
limit?: number;
|
|
215
|
+
/**
|
|
216
|
+
* The thread list page, in relation to `limit`.
|
|
217
|
+
*/
|
|
218
|
+
page?: number;
|
|
197
219
|
};
|
|
198
220
|
/**
|
|
199
221
|
* Gets data for user popovers (when you hover over a username).
|
|
@@ -204,6 +226,63 @@ export default interface GETEndpoints {
|
|
|
204
226
|
*/
|
|
205
227
|
userId: string;
|
|
206
228
|
};
|
|
229
|
+
/**
|
|
230
|
+
* Gets users following a user.
|
|
231
|
+
*/
|
|
232
|
+
GetUserFollowers: {
|
|
233
|
+
/**
|
|
234
|
+
* ID of the user to get followers of.
|
|
235
|
+
*/
|
|
236
|
+
userId: string;
|
|
237
|
+
/**
|
|
238
|
+
* The maximum amount of followers to fetch.
|
|
239
|
+
*
|
|
240
|
+
* @max Unknown - likely around 99999.
|
|
241
|
+
* @default Unknown - likely around 99999.
|
|
242
|
+
*/
|
|
243
|
+
limit?: number;
|
|
244
|
+
/**
|
|
245
|
+
* The follower list page, in relation to `limit`.
|
|
246
|
+
*/
|
|
247
|
+
page?: number;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Gets games that a user follows.
|
|
251
|
+
*/
|
|
252
|
+
GetUserFollowingGames: {
|
|
253
|
+
/**
|
|
254
|
+
* ID of the user to fetch followed games from.
|
|
255
|
+
*/
|
|
256
|
+
userId: string;
|
|
257
|
+
/**
|
|
258
|
+
* The maximum amount of games to fetch.
|
|
259
|
+
*
|
|
260
|
+
* @max Unknown - likely around 99999.
|
|
261
|
+
* @default Unknown - likely around 99999.
|
|
262
|
+
*/
|
|
263
|
+
limit?: number;
|
|
264
|
+
/**
|
|
265
|
+
* The game list page, in relation to `limit`.
|
|
266
|
+
*/
|
|
267
|
+
page?: number;
|
|
268
|
+
};
|
|
269
|
+
GetUserFollowingUsers: {
|
|
270
|
+
/**
|
|
271
|
+
* ID of the user to fetch followed users from.
|
|
272
|
+
*/
|
|
273
|
+
userId: string;
|
|
274
|
+
/**
|
|
275
|
+
* The maximum amount of users to fetch.
|
|
276
|
+
*
|
|
277
|
+
* @max Unknown - likely around 99999.
|
|
278
|
+
* @default Unknown - likely around 99999.
|
|
279
|
+
*/
|
|
280
|
+
limit?: number;
|
|
281
|
+
/**
|
|
282
|
+
* The users list page, in relation to `limit`.
|
|
283
|
+
*/
|
|
284
|
+
page?: number;
|
|
285
|
+
};
|
|
207
286
|
/**
|
|
208
287
|
* Gets all Titles in the site.
|
|
209
288
|
*/
|
|
@@ -497,9 +576,9 @@ export default interface GETEndpoints {
|
|
|
497
576
|
*/
|
|
498
577
|
itemId: string;
|
|
499
578
|
/**
|
|
500
|
-
* `
|
|
579
|
+
* `CommentableItemType` of the item referenced in `itemId`.
|
|
501
580
|
*/
|
|
502
|
-
itemType: Enums.
|
|
581
|
+
itemType: Enums.CommentableItemType;
|
|
503
582
|
/**
|
|
504
583
|
* The maximum amount of `Comment`s per page.
|
|
505
584
|
*
|
|
@@ -605,21 +605,6 @@ export default interface POSTEndpoints {
|
|
|
605
605
|
*/
|
|
606
606
|
regenerate: boolean;
|
|
607
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
608
|
/**
|
|
624
609
|
* Get a list of games that a user has boosted.
|
|
625
610
|
*/
|
|
@@ -657,14 +642,14 @@ export default interface POSTEndpoints {
|
|
|
657
642
|
*/
|
|
658
643
|
GetCommentable: {
|
|
659
644
|
itemId: string;
|
|
660
|
-
itemType: Enums.
|
|
645
|
+
itemType: Enums.CommentableItemType;
|
|
661
646
|
};
|
|
662
647
|
/**
|
|
663
648
|
* Posts a comment on an item.
|
|
664
649
|
*/
|
|
665
650
|
PutComment: {
|
|
666
651
|
itemId: string;
|
|
667
|
-
itemType: Enums.
|
|
652
|
+
itemType: Enums.CommentableItemType;
|
|
668
653
|
text: string;
|
|
669
654
|
};
|
|
670
655
|
/**
|
|
@@ -676,9 +661,9 @@ export default interface POSTEndpoints {
|
|
|
676
661
|
*/
|
|
677
662
|
itemId: string;
|
|
678
663
|
/**
|
|
679
|
-
* `ItemType
|
|
664
|
+
* Comment `ItemType`.
|
|
680
665
|
*/
|
|
681
|
-
itemType: Enums.ItemType;
|
|
666
|
+
itemType: Enums.ItemType.Comment;
|
|
682
667
|
/**
|
|
683
668
|
* Whether you are liking a comment (`true`) or removing your like from a comment (`false`).
|
|
684
669
|
*
|
|
@@ -697,7 +682,7 @@ export default interface POSTEndpoints {
|
|
|
697
682
|
/**
|
|
698
683
|
* `itemType` of the item you are modifying the comment settings on.
|
|
699
684
|
*/
|
|
700
|
-
itemType: Enums.
|
|
685
|
+
itemType: Enums.CommentableItemType;
|
|
701
686
|
disabled: boolean;
|
|
702
687
|
locked: boolean;
|
|
703
688
|
};
|
package/lib/enums.d.ts
CHANGED
|
@@ -32,6 +32,13 @@ export declare enum ItemType {
|
|
|
32
32
|
Challenge = 32,
|
|
33
33
|
ChallengeRun = 33
|
|
34
34
|
}
|
|
35
|
+
export declare enum CommentableItemType {
|
|
36
|
+
Run = 2,
|
|
37
|
+
Thread = 7,
|
|
38
|
+
News = 27,
|
|
39
|
+
Article = 30,
|
|
40
|
+
ChallengeRun = 33
|
|
41
|
+
}
|
|
35
42
|
export declare enum ForumType {
|
|
36
43
|
FrontPage = 1,
|
|
37
44
|
Supporter = 2,
|
|
@@ -65,14 +72,18 @@ export declare enum SitePowerLevel {
|
|
|
65
72
|
}
|
|
66
73
|
export declare enum EventType {
|
|
67
74
|
None = "",
|
|
75
|
+
CategoryArchived = "category-archived",
|
|
68
76
|
CategoryCreated = "category-created",
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated Categories can only be archived as of the site revamp.
|
|
79
|
+
*/
|
|
69
80
|
CategoryRemoved = "category-removed",
|
|
70
81
|
CategoryRestored = "category-restored",
|
|
71
82
|
CategoryUpdated = "category-updated",
|
|
72
83
|
CommentCreated = "comment-created",
|
|
73
84
|
CommentDeleted = "comment-deleted",
|
|
74
85
|
/**
|
|
75
|
-
* New comment updates are not recognized as events as of a few years ago.
|
|
86
|
+
* @deprecated New comment updates are not recognized as events as of a few years ago.
|
|
76
87
|
*/
|
|
77
88
|
CommentUpdated = "comment-updated",
|
|
78
89
|
GameCoversUpdated = "game-covers-updated",
|
|
@@ -86,7 +97,53 @@ export declare enum EventType {
|
|
|
86
97
|
GameRestored = "game-restored",
|
|
87
98
|
GameUpdated = "game-updated",
|
|
88
99
|
GameRequestReviewed = "gamerequest-reviewed",
|
|
89
|
-
|
|
100
|
+
GuideCreated = "guide-created",
|
|
101
|
+
GuideDeleted = "guide-deleted",
|
|
102
|
+
LevelArchived = "level-archived",
|
|
103
|
+
LevelCreated = "level-created",
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated Levels can only be archived as of the site revamp.
|
|
106
|
+
*/
|
|
107
|
+
LevelRemoved = "level-removed",
|
|
108
|
+
LevelUpdated = "level-updated",
|
|
109
|
+
ResourceCreated = "resource-created",
|
|
110
|
+
ResourceDeleted = "resource-deleted",
|
|
111
|
+
ResourceUpdated = "resource-updated",
|
|
112
|
+
RunCommentCreated = "run-comment-created",
|
|
113
|
+
RunCommentDeleted = "run-comment-deleted",
|
|
114
|
+
RunCommentUpdated = "run-comment-updated",
|
|
115
|
+
RunAtRiskUpdated = "run-atrisk-updated",
|
|
116
|
+
RunCreated = "run-created",
|
|
117
|
+
RunDeleted = "run-deleted",
|
|
118
|
+
RunReviewed = "run-reviewed",
|
|
119
|
+
RunUpdated = "run-updated",
|
|
120
|
+
ThemeCreated = "theme-created",
|
|
121
|
+
ThemeDeleted = "theme-deleted",
|
|
122
|
+
ThemeFileDeleted = "theme-file-deleted",
|
|
123
|
+
ThemeFileUpdated = "theme-file-updated",
|
|
124
|
+
ThemeUpdated = "theme-updated",
|
|
125
|
+
ThreadCreated = "thread-created",
|
|
126
|
+
UserApiKeyUpdated = "user-apikey-updated",
|
|
127
|
+
UserBanned = "user-banned",
|
|
128
|
+
UserCommentsWiped = "user-comments-wiped",
|
|
129
|
+
UserDeleted = "user-deleted",
|
|
130
|
+
UserModNote = "user-modnote",
|
|
131
|
+
UserRestored = "user-restored",
|
|
132
|
+
UserUnbanned = "user-unbanned",
|
|
133
|
+
UserUpdated = "user-updated",
|
|
134
|
+
ValueCreated = "value-created",
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Variables can only be archived as of the site revamp.
|
|
137
|
+
*/
|
|
138
|
+
ValueRemoved = "value-removed",
|
|
139
|
+
ValueUpdated = "value-updated",
|
|
140
|
+
VariableArchived = "variable-archived",
|
|
141
|
+
VariableCreated = "variable-created",
|
|
142
|
+
/**
|
|
143
|
+
* @deprecated Variables can only be archived as of the site revamp.
|
|
144
|
+
*/
|
|
145
|
+
VariableRemoved = "variable-removed",
|
|
146
|
+
VariableUpdated = "variable-updated"
|
|
90
147
|
}
|
|
91
148
|
export declare enum ChallengeState {
|
|
92
149
|
Draft = 0,
|
package/lib/enums.js
CHANGED
|
@@ -35,6 +35,14 @@ export var ItemType;
|
|
|
35
35
|
ItemType[ItemType["Challenge"] = 32] = "Challenge";
|
|
36
36
|
ItemType[ItemType["ChallengeRun"] = 33] = "ChallengeRun";
|
|
37
37
|
})(ItemType || (ItemType = {}));
|
|
38
|
+
export var CommentableItemType;
|
|
39
|
+
(function (CommentableItemType) {
|
|
40
|
+
CommentableItemType[CommentableItemType["Run"] = 2] = "Run";
|
|
41
|
+
CommentableItemType[CommentableItemType["Thread"] = 7] = "Thread";
|
|
42
|
+
CommentableItemType[CommentableItemType["News"] = 27] = "News";
|
|
43
|
+
CommentableItemType[CommentableItemType["Article"] = 30] = "Article";
|
|
44
|
+
CommentableItemType[CommentableItemType["ChallengeRun"] = 33] = "ChallengeRun";
|
|
45
|
+
})(CommentableItemType || (CommentableItemType = {}));
|
|
38
46
|
export var ForumType;
|
|
39
47
|
(function (ForumType) {
|
|
40
48
|
ForumType[ForumType["FrontPage"] = 1] = "FrontPage";
|
|
@@ -73,14 +81,18 @@ export var SitePowerLevel;
|
|
|
73
81
|
export var EventType;
|
|
74
82
|
(function (EventType) {
|
|
75
83
|
EventType["None"] = "";
|
|
84
|
+
EventType["CategoryArchived"] = "category-archived";
|
|
76
85
|
EventType["CategoryCreated"] = "category-created";
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Categories can only be archived as of the site revamp.
|
|
88
|
+
*/
|
|
77
89
|
EventType["CategoryRemoved"] = "category-removed";
|
|
78
90
|
EventType["CategoryRestored"] = "category-restored";
|
|
79
91
|
EventType["CategoryUpdated"] = "category-updated";
|
|
80
92
|
EventType["CommentCreated"] = "comment-created";
|
|
81
93
|
EventType["CommentDeleted"] = "comment-deleted";
|
|
82
94
|
/**
|
|
83
|
-
* New comment updates are not recognized as events as of a few years ago.
|
|
95
|
+
* @deprecated New comment updates are not recognized as events as of a few years ago.
|
|
84
96
|
*/
|
|
85
97
|
EventType["CommentUpdated"] = "comment-updated";
|
|
86
98
|
EventType["GameCoversUpdated"] = "game-covers-updated";
|
|
@@ -94,7 +106,53 @@ export var EventType;
|
|
|
94
106
|
EventType["GameRestored"] = "game-restored";
|
|
95
107
|
EventType["GameUpdated"] = "game-updated";
|
|
96
108
|
EventType["GameRequestReviewed"] = "gamerequest-reviewed";
|
|
109
|
+
EventType["GuideCreated"] = "guide-created";
|
|
110
|
+
EventType["GuideDeleted"] = "guide-deleted";
|
|
111
|
+
EventType["LevelArchived"] = "level-archived";
|
|
97
112
|
EventType["LevelCreated"] = "level-created";
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated Levels can only be archived as of the site revamp.
|
|
115
|
+
*/
|
|
116
|
+
EventType["LevelRemoved"] = "level-removed";
|
|
117
|
+
EventType["LevelUpdated"] = "level-updated";
|
|
118
|
+
EventType["ResourceCreated"] = "resource-created";
|
|
119
|
+
EventType["ResourceDeleted"] = "resource-deleted";
|
|
120
|
+
EventType["ResourceUpdated"] = "resource-updated";
|
|
121
|
+
EventType["RunCommentCreated"] = "run-comment-created";
|
|
122
|
+
EventType["RunCommentDeleted"] = "run-comment-deleted";
|
|
123
|
+
EventType["RunCommentUpdated"] = "run-comment-updated";
|
|
124
|
+
EventType["RunAtRiskUpdated"] = "run-atrisk-updated";
|
|
125
|
+
EventType["RunCreated"] = "run-created";
|
|
126
|
+
EventType["RunDeleted"] = "run-deleted";
|
|
127
|
+
EventType["RunReviewed"] = "run-reviewed";
|
|
128
|
+
EventType["RunUpdated"] = "run-updated";
|
|
129
|
+
EventType["ThemeCreated"] = "theme-created";
|
|
130
|
+
EventType["ThemeDeleted"] = "theme-deleted";
|
|
131
|
+
EventType["ThemeFileDeleted"] = "theme-file-deleted";
|
|
132
|
+
EventType["ThemeFileUpdated"] = "theme-file-updated";
|
|
133
|
+
EventType["ThemeUpdated"] = "theme-updated";
|
|
134
|
+
EventType["ThreadCreated"] = "thread-created";
|
|
135
|
+
EventType["UserApiKeyUpdated"] = "user-apikey-updated";
|
|
136
|
+
EventType["UserBanned"] = "user-banned";
|
|
137
|
+
EventType["UserCommentsWiped"] = "user-comments-wiped";
|
|
138
|
+
EventType["UserDeleted"] = "user-deleted";
|
|
139
|
+
EventType["UserModNote"] = "user-modnote";
|
|
140
|
+
EventType["UserRestored"] = "user-restored";
|
|
141
|
+
EventType["UserUnbanned"] = "user-unbanned";
|
|
142
|
+
EventType["UserUpdated"] = "user-updated";
|
|
143
|
+
EventType["ValueCreated"] = "value-created";
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated Variables can only be archived as of the site revamp.
|
|
146
|
+
*/
|
|
147
|
+
EventType["ValueRemoved"] = "value-removed";
|
|
148
|
+
EventType["ValueUpdated"] = "value-updated";
|
|
149
|
+
EventType["VariableArchived"] = "variable-archived";
|
|
150
|
+
EventType["VariableCreated"] = "variable-created";
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated Variables can only be archived as of the site revamp.
|
|
153
|
+
*/
|
|
154
|
+
EventType["VariableRemoved"] = "variable-removed";
|
|
155
|
+
EventType["VariableUpdated"] = "variable-updated";
|
|
98
156
|
})(EventType || (EventType = {}));
|
|
99
157
|
export var ChallengeState;
|
|
100
158
|
(function (ChallengeState) {
|
package/lib/interfaces.d.ts
CHANGED
|
@@ -295,7 +295,7 @@ export interface CommentableProperties {
|
|
|
295
295
|
readonly locked: boolean;
|
|
296
296
|
}
|
|
297
297
|
export interface Commentable {
|
|
298
|
-
readonly itemType: Enums.
|
|
298
|
+
readonly itemType: Enums.CommentableItemType;
|
|
299
299
|
readonly itemId: string;
|
|
300
300
|
readonly properties: CommentableProperties;
|
|
301
301
|
/**Permissions of the logged in user. If not logged in; `canPostComments` is `false`.*/
|
|
@@ -303,7 +303,7 @@ export interface Commentable {
|
|
|
303
303
|
}
|
|
304
304
|
export interface Comment {
|
|
305
305
|
readonly id: string;
|
|
306
|
-
readonly itemType: Enums.ItemType;
|
|
306
|
+
readonly itemType: Enums.ItemType.Comment;
|
|
307
307
|
readonly itemId: string;
|
|
308
308
|
readonly date: number;
|
|
309
309
|
readonly userId: string;
|
|
@@ -314,7 +314,7 @@ export interface Comment {
|
|
|
314
314
|
readonly deletedUserId?: string;
|
|
315
315
|
}
|
|
316
316
|
export interface Like {
|
|
317
|
-
readonly itemType: Enums.ItemType;
|
|
317
|
+
readonly itemType: Enums.ItemType.Comment;
|
|
318
318
|
readonly itemId: string;
|
|
319
319
|
readonly userId: string;
|
|
320
320
|
readonly date: number;
|
package/package.json
CHANGED
|
@@ -225,6 +225,19 @@ export default interface GETEndpoints {
|
|
|
225
225
|
* ID of the user.
|
|
226
226
|
*/
|
|
227
227
|
userId: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The maximum amount of comments to fetch.
|
|
231
|
+
*
|
|
232
|
+
* @max Unknown - likely around 99999.
|
|
233
|
+
* @default Unknown - likely around 99999.
|
|
234
|
+
*/
|
|
235
|
+
limit?: number;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The comment list page, in relation to `limit`.
|
|
239
|
+
*/
|
|
240
|
+
page?: number;
|
|
228
241
|
};
|
|
229
242
|
|
|
230
243
|
/**
|
|
@@ -236,6 +249,19 @@ export default interface GETEndpoints {
|
|
|
236
249
|
* ID of the user.
|
|
237
250
|
*/
|
|
238
251
|
userId: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* The maximum amount of comments to fetch.
|
|
255
|
+
*
|
|
256
|
+
* @max Unknown - likely around 99999.
|
|
257
|
+
* @default Unknown - likely around 99999.
|
|
258
|
+
*/
|
|
259
|
+
limit?: number;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The thread list page, in relation to `limit`.
|
|
263
|
+
*/
|
|
264
|
+
page?: number;
|
|
239
265
|
};
|
|
240
266
|
|
|
241
267
|
/**
|
|
@@ -249,6 +275,75 @@ export default interface GETEndpoints {
|
|
|
249
275
|
userId: string;
|
|
250
276
|
};
|
|
251
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Gets users following a user.
|
|
280
|
+
*/
|
|
281
|
+
GetUserFollowers: {
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* ID of the user to get followers of.
|
|
285
|
+
*/
|
|
286
|
+
userId: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* The maximum amount of followers to fetch.
|
|
290
|
+
*
|
|
291
|
+
* @max Unknown - likely around 99999.
|
|
292
|
+
* @default Unknown - likely around 99999.
|
|
293
|
+
*/
|
|
294
|
+
limit?: number;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The follower list page, in relation to `limit`.
|
|
298
|
+
*/
|
|
299
|
+
page?: number;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Gets games that a user follows.
|
|
304
|
+
*/
|
|
305
|
+
GetUserFollowingGames: {
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* ID of the user to fetch followed games from.
|
|
309
|
+
*/
|
|
310
|
+
userId: string;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* The maximum amount of games to fetch.
|
|
314
|
+
*
|
|
315
|
+
* @max Unknown - likely around 99999.
|
|
316
|
+
* @default Unknown - likely around 99999.
|
|
317
|
+
*/
|
|
318
|
+
limit?: number;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The game list page, in relation to `limit`.
|
|
322
|
+
*/
|
|
323
|
+
page?: number;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
GetUserFollowingUsers: {
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* ID of the user to fetch followed users from.
|
|
330
|
+
*/
|
|
331
|
+
userId: string;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* The maximum amount of users to fetch.
|
|
335
|
+
*
|
|
336
|
+
* @max Unknown - likely around 99999.
|
|
337
|
+
* @default Unknown - likely around 99999.
|
|
338
|
+
*/
|
|
339
|
+
limit?: number;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The users list page, in relation to `limit`.
|
|
343
|
+
*/
|
|
344
|
+
page?: number;
|
|
345
|
+
};
|
|
346
|
+
|
|
252
347
|
/**
|
|
253
348
|
* Gets all Titles in the site.
|
|
254
349
|
*/
|
|
@@ -606,9 +701,9 @@ export default interface GETEndpoints {
|
|
|
606
701
|
itemId: string;
|
|
607
702
|
|
|
608
703
|
/**
|
|
609
|
-
* `
|
|
704
|
+
* `CommentableItemType` of the item referenced in `itemId`.
|
|
610
705
|
*/
|
|
611
|
-
itemType: Enums.
|
|
706
|
+
itemType: Enums.CommentableItemType;
|
|
612
707
|
|
|
613
708
|
/**
|
|
614
709
|
* The maximum amount of `Comment`s per page.
|
|
@@ -732,24 +732,6 @@ export default interface POSTEndpoints {
|
|
|
732
732
|
regenerate: boolean;
|
|
733
733
|
};
|
|
734
734
|
|
|
735
|
-
GetUserFollowers: {
|
|
736
|
-
userId: string;
|
|
737
|
-
limit?: number;
|
|
738
|
-
page?: number;
|
|
739
|
-
};
|
|
740
|
-
|
|
741
|
-
GetUserFollowingGames: {
|
|
742
|
-
userId: string;
|
|
743
|
-
limit?: number;
|
|
744
|
-
page?: number;
|
|
745
|
-
};
|
|
746
|
-
|
|
747
|
-
GetUserFollowingUsers: {
|
|
748
|
-
userId: string;
|
|
749
|
-
limit?: number;
|
|
750
|
-
page?: number;
|
|
751
|
-
};
|
|
752
|
-
|
|
753
735
|
/**
|
|
754
736
|
* Get a list of games that a user has boosted.
|
|
755
737
|
*/
|
|
@@ -792,7 +774,7 @@ export default interface POSTEndpoints {
|
|
|
792
774
|
*/
|
|
793
775
|
GetCommentable: {
|
|
794
776
|
itemId: string;
|
|
795
|
-
itemType: Enums.
|
|
777
|
+
itemType: Enums.CommentableItemType;
|
|
796
778
|
};
|
|
797
779
|
|
|
798
780
|
/**
|
|
@@ -800,7 +782,7 @@ export default interface POSTEndpoints {
|
|
|
800
782
|
*/
|
|
801
783
|
PutComment: {
|
|
802
784
|
itemId: string;
|
|
803
|
-
itemType: Enums.
|
|
785
|
+
itemType: Enums.CommentableItemType;
|
|
804
786
|
text: string;
|
|
805
787
|
};
|
|
806
788
|
|
|
@@ -815,9 +797,9 @@ export default interface POSTEndpoints {
|
|
|
815
797
|
itemId: string;
|
|
816
798
|
|
|
817
799
|
/**
|
|
818
|
-
* `ItemType
|
|
800
|
+
* Comment `ItemType`.
|
|
819
801
|
*/
|
|
820
|
-
itemType: Enums.ItemType;
|
|
802
|
+
itemType: Enums.ItemType.Comment;
|
|
821
803
|
|
|
822
804
|
/**
|
|
823
805
|
* Whether you are liking a comment (`true`) or removing your like from a comment (`false`).
|
|
@@ -840,7 +822,7 @@ export default interface POSTEndpoints {
|
|
|
840
822
|
/**
|
|
841
823
|
* `itemType` of the item you are modifying the comment settings on.
|
|
842
824
|
*/
|
|
843
|
-
itemType: Enums.
|
|
825
|
+
itemType: Enums.CommentableItemType;
|
|
844
826
|
disabled: boolean;
|
|
845
827
|
locked: boolean;
|
|
846
828
|
};
|
package/src/enums.ts
CHANGED
|
@@ -35,6 +35,14 @@ export enum ItemType {
|
|
|
35
35
|
ChallengeRun
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export enum CommentableItemType {
|
|
39
|
+
Run = 2,
|
|
40
|
+
Thread = 7,
|
|
41
|
+
News = 27,
|
|
42
|
+
Article = 30,
|
|
43
|
+
ChallengeRun = 33
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
export enum ForumType {
|
|
39
47
|
FrontPage = 1,
|
|
40
48
|
Supporter,
|
|
@@ -73,14 +81,20 @@ export enum SitePowerLevel {
|
|
|
73
81
|
|
|
74
82
|
export enum EventType {
|
|
75
83
|
None = "",
|
|
84
|
+
CategoryArchived = "category-archived",
|
|
76
85
|
CategoryCreated = "category-created",
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated Categories can only be archived as of the site revamp.
|
|
89
|
+
*/
|
|
77
90
|
CategoryRemoved = "category-removed",
|
|
78
91
|
CategoryRestored = "category-restored",
|
|
79
92
|
CategoryUpdated = "category-updated",
|
|
80
93
|
CommentCreated = "comment-created",
|
|
81
94
|
CommentDeleted = "comment-deleted",
|
|
95
|
+
|
|
82
96
|
/**
|
|
83
|
-
* New comment updates are not recognized as events as of a few years ago.
|
|
97
|
+
* @deprecated New comment updates are not recognized as events as of a few years ago.
|
|
84
98
|
*/
|
|
85
99
|
CommentUpdated = "comment-updated",
|
|
86
100
|
GameCoversUpdated = "game-covers-updated",
|
|
@@ -94,7 +108,56 @@ export enum EventType {
|
|
|
94
108
|
GameRestored = "game-restored",
|
|
95
109
|
GameUpdated = "game-updated",
|
|
96
110
|
GameRequestReviewed = "gamerequest-reviewed",
|
|
97
|
-
|
|
111
|
+
GuideCreated = 'guide-created',
|
|
112
|
+
GuideDeleted = 'guide-deleted',
|
|
113
|
+
LevelArchived = 'level-archived',
|
|
114
|
+
LevelCreated = 'level-created',
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @deprecated Levels can only be archived as of the site revamp.
|
|
118
|
+
*/
|
|
119
|
+
LevelRemoved = 'level-removed',
|
|
120
|
+
LevelUpdated = 'level-updated',
|
|
121
|
+
ResourceCreated = 'resource-created',
|
|
122
|
+
ResourceDeleted = 'resource-deleted',
|
|
123
|
+
ResourceUpdated = 'resource-updated',
|
|
124
|
+
RunCommentCreated = 'run-comment-created',
|
|
125
|
+
RunCommentDeleted = 'run-comment-deleted',
|
|
126
|
+
RunCommentUpdated = 'run-comment-updated',
|
|
127
|
+
RunAtRiskUpdated = 'run-atrisk-updated',
|
|
128
|
+
RunCreated = 'run-created',
|
|
129
|
+
RunDeleted = 'run-deleted',
|
|
130
|
+
RunReviewed = 'run-reviewed',
|
|
131
|
+
RunUpdated = 'run-updated',
|
|
132
|
+
ThemeCreated = 'theme-created',
|
|
133
|
+
ThemeDeleted = 'theme-deleted',
|
|
134
|
+
ThemeFileDeleted = 'theme-file-deleted',
|
|
135
|
+
ThemeFileUpdated = 'theme-file-updated',
|
|
136
|
+
ThemeUpdated = 'theme-updated',
|
|
137
|
+
ThreadCreated = 'thread-created',
|
|
138
|
+
UserApiKeyUpdated = 'user-apikey-updated',
|
|
139
|
+
UserBanned = 'user-banned',
|
|
140
|
+
UserCommentsWiped = 'user-comments-wiped',
|
|
141
|
+
UserDeleted = 'user-deleted',
|
|
142
|
+
UserModNote = 'user-modnote',
|
|
143
|
+
UserRestored = 'user-restored',
|
|
144
|
+
UserUnbanned = 'user-unbanned',
|
|
145
|
+
UserUpdated = 'user-updated',
|
|
146
|
+
ValueCreated = 'value-created',
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Variables can only be archived as of the site revamp.
|
|
150
|
+
*/
|
|
151
|
+
ValueRemoved = 'value-removed',
|
|
152
|
+
ValueUpdated = 'value-updated',
|
|
153
|
+
VariableArchived = 'variable-archived',
|
|
154
|
+
VariableCreated = 'variable-created',
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @deprecated Variables can only be archived as of the site revamp.
|
|
158
|
+
*/
|
|
159
|
+
VariableRemoved = 'variable-removed',
|
|
160
|
+
VariableUpdated = 'variable-updated'
|
|
98
161
|
}
|
|
99
162
|
|
|
100
163
|
export enum ChallengeState {
|
package/src/interfaces.ts
CHANGED
|
@@ -364,7 +364,7 @@ export interface CommentableProperties {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
export interface Commentable {
|
|
367
|
-
readonly itemType: Enums.
|
|
367
|
+
readonly itemType: Enums.CommentableItemType;
|
|
368
368
|
readonly itemId: string;
|
|
369
369
|
readonly properties: CommentableProperties;
|
|
370
370
|
/**Permissions of the logged in user. If not logged in; `canPostComments` is `false`.*/
|
|
@@ -373,7 +373,7 @@ export interface Commentable {
|
|
|
373
373
|
|
|
374
374
|
export interface Comment {
|
|
375
375
|
readonly id: string;
|
|
376
|
-
readonly itemType: Enums.ItemType;
|
|
376
|
+
readonly itemType: Enums.ItemType.Comment;
|
|
377
377
|
readonly itemId: string;
|
|
378
378
|
readonly date: number;
|
|
379
379
|
readonly userId: string;
|
|
@@ -385,7 +385,7 @@ export interface Comment {
|
|
|
385
385
|
}
|
|
386
386
|
|
|
387
387
|
export interface Like {
|
|
388
|
-
readonly itemType: Enums.ItemType;
|
|
388
|
+
readonly itemType: Enums.ItemType.Comment;
|
|
389
389
|
readonly itemId: string;
|
|
390
390
|
readonly userId: string;
|
|
391
391
|
readonly date: number;
|