e621 3.2.2 → 3.3.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.
Files changed (90) hide show
  1. package/dist/browser/e621.js +4503 -2319
  2. package/dist/browser/e621.js.map +4 -4
  3. package/dist/lib/generated/schemas.d.ts +2375 -1553
  4. package/dist/lib/generated/schemas.js +3267 -2183
  5. package/dist/lib/generated/sdk.d.ts +191 -3
  6. package/dist/lib/generated/sdk.js +373 -10
  7. package/dist/lib/generated/types.d.ts +1824 -623
  8. package/dist/lib/models/APIKey.d.ts +14 -0
  9. package/dist/lib/models/{ApiKey.js → APIKey.js} +8 -8
  10. package/dist/lib/models/Artist.d.ts +2 -2
  11. package/dist/lib/models/ArtistURL.d.ts +14 -0
  12. package/dist/lib/models/{ArtistUrl.js → ArtistURL.js} +8 -8
  13. package/dist/lib/models/{DbExport.d.ts → DBExport.d.ts} +1 -1
  14. package/dist/lib/models/{DbExport.js → DBExport.js} +1 -1
  15. package/dist/lib/models/{IpBan.d.ts → IPBan.d.ts} +6 -6
  16. package/dist/lib/models/{IpBan.js → IPBan.js} +9 -9
  17. package/dist/lib/models/IQDBPost.d.ts +14 -0
  18. package/dist/lib/models/{IqdbPost.js → IQDBPost.js} +8 -8
  19. package/dist/lib/models/SearchTrendHourly.d.ts +14 -0
  20. package/dist/lib/models/SearchTrendHourly.js +17 -0
  21. package/dist/lib/models/User.d.ts +4 -4
  22. package/dist/lib/models/User.js +6 -6
  23. package/dist/lib/models/UserAlt.d.ts +14 -0
  24. package/dist/lib/models/UserAlt.js +17 -0
  25. package/dist/lib/models/index.d.ts +7 -5
  26. package/dist/lib/models/index.js +8 -6
  27. package/dist/lib/modules/Appeals.js +1 -1
  28. package/dist/lib/modules/ArtistUrls.d.ts +2 -2
  29. package/dist/lib/modules/ArtistUrls.js +2 -2
  30. package/dist/lib/modules/Comments.d.ts +11 -1
  31. package/dist/lib/modules/Comments.js +21 -3
  32. package/dist/lib/modules/DbExports.d.ts +1 -1
  33. package/dist/lib/modules/DbExports.js +1 -1
  34. package/dist/lib/modules/DoorkeeperOpenidConnectDiscovery.d.ts +40 -0
  35. package/dist/lib/modules/DoorkeeperOpenidConnectDiscovery.js +56 -0
  36. package/dist/lib/modules/DoorkeeperOpenidConnectUserinfo.d.ts +26 -0
  37. package/dist/lib/modules/DoorkeeperOpenidConnectUserinfo.js +35 -0
  38. package/dist/lib/modules/DoorkeeperTokenInfo.d.ts +24 -0
  39. package/dist/lib/modules/DoorkeeperTokenInfo.js +33 -0
  40. package/dist/lib/modules/DoorkeeperTokens.d.ts +65 -0
  41. package/dist/lib/modules/DoorkeeperTokens.js +82 -0
  42. package/dist/lib/modules/IpBans.d.ts +3 -3
  43. package/dist/lib/modules/IpBans.js +3 -3
  44. package/dist/lib/modules/IqdbQueries.js +4 -4
  45. package/dist/lib/modules/PostReplacements.d.ts +11 -0
  46. package/dist/lib/modules/PostReplacements.js +25 -2
  47. package/dist/lib/modules/PostSets.d.ts +9 -0
  48. package/dist/lib/modules/PostSets.js +22 -2
  49. package/dist/lib/modules/Posts.d.ts +12 -2
  50. package/dist/lib/modules/Posts.js +20 -2
  51. package/dist/lib/modules/RailsHealth.d.ts +17 -0
  52. package/dist/lib/modules/RailsHealth.js +26 -0
  53. package/dist/lib/modules/SearchTrendBlacklists.d.ts +15 -1
  54. package/dist/lib/modules/SearchTrendBlacklists.js +25 -2
  55. package/dist/lib/modules/SearchTrendHourlies.d.ts +22 -0
  56. package/dist/lib/modules/SearchTrendHourlies.js +32 -0
  57. package/dist/lib/modules/SearchTrends.d.ts +11 -1
  58. package/dist/lib/modules/SearchTrends.js +20 -2
  59. package/dist/lib/modules/Sessions.d.ts +46 -0
  60. package/dist/lib/modules/Sessions.js +69 -0
  61. package/dist/lib/modules/StaffIpAddrs.d.ts +41 -0
  62. package/dist/lib/modules/StaffIpAddrs.js +53 -0
  63. package/dist/lib/modules/StaffReowner.d.ts +19 -0
  64. package/dist/lib/modules/StaffReowner.js +29 -0
  65. package/dist/lib/modules/StaffStuckDnp.d.ts +14 -0
  66. package/dist/lib/modules/StaffStuckDnp.js +29 -0
  67. package/dist/lib/modules/StaffUserAlts.d.ts +17 -0
  68. package/dist/lib/modules/StaffUserAlts.js +32 -0
  69. package/dist/lib/modules/StaffUsers.d.ts +26 -6
  70. package/dist/lib/modules/StaffUsers.js +51 -8
  71. package/dist/lib/modules/StaffWikiRefs.d.ts +43 -0
  72. package/dist/lib/modules/StaffWikiRefs.js +77 -0
  73. package/dist/lib/modules/StaffWikis.d.ts +9 -0
  74. package/dist/lib/modules/StaffWikis.js +23 -2
  75. package/dist/lib/modules/Stats.d.ts +17 -0
  76. package/dist/lib/modules/Stats.js +26 -0
  77. package/dist/lib/modules/UserReverts.d.ts +16 -0
  78. package/dist/lib/modules/UserReverts.js +31 -0
  79. package/dist/lib/modules/Users.d.ts +39 -2
  80. package/dist/lib/modules/Users.js +69 -5
  81. package/dist/lib/modules/index.d.ts +42 -0
  82. package/dist/lib/modules/index.js +29 -1
  83. package/dist/lib/util.d.ts +30 -3
  84. package/dist/lib/util.js +1 -1
  85. package/dist/lib/version.d.ts +1 -1
  86. package/dist/lib/version.js +1 -1
  87. package/package.json +6 -6
  88. package/dist/lib/models/ApiKey.d.ts +0 -14
  89. package/dist/lib/models/ArtistUrl.d.ts +0 -14
  90. package/dist/lib/models/IqdbPost.d.ts +0 -14
@@ -1,27 +1,67 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: 'https://e621.net' | 'https://e926.net' | 'http://localhost:3000' | (string & {});
3
3
  };
4
- export type AccessDeniedResponse = {
5
- success: boolean;
6
- reason: 'Access Denied';
7
- };
8
- export type NotFoundResponse = {
9
- success: boolean;
10
- reason: 'not found';
4
+ export type AppealStatus = 'pending' | 'partial' | 'approved' | 'rejected';
5
+ export type AppealType = 'flag';
6
+ export type DBExportName = 'artists' | 'bulk_update_requests' | 'pools' | 'post_replacements' | 'posts' | 'post_versions' | 'tag_aliases' | 'tag_implications' | 'tags' | 'wiki_pages';
7
+ export type EditHistoryVersionableType = 'Blip' | 'Comment' | 'ForumPost';
8
+ export type JWKSAlgorithm = 'RS256';
9
+ export type ModActionAction = 'admin_user_delete' | 'artist_delete' | 'artist_page_rename' | 'artist_page_lock' | 'artist_page_unlock' | 'artist_user_linked' | 'artist_user_unlinked' | 'avoid_posting_create' | 'avoid_posting_update' | 'avoid_posting_delete' | 'avoid_posting_undelete' | 'avoid_posting_destroy' | 'staff_note_create' | 'staff_note_update' | 'staff_note_delete' | 'staff_note_undelete' | 'blip_destroy' | 'blip_delete' | 'blip_undelete' | 'blip_update' | 'comment_delete' | 'comment_hide' | 'comment_unhide' | 'comment_update' | 'forum_category_create' | 'forum_category_delete' | 'forum_category_update' | 'forum_post_delete' | 'forum_post_hide' | 'forum_post_unhide' | 'forum_post_update' | 'forum_topic_delete' | 'forum_topic_hide' | 'forum_topic_unhide' | 'forum_topic_lock' | 'forum_topic_unlock' | 'forum_topic_stick' | 'forum_topic_unstick' | 'forum_topic_update' | 'help_create' | 'help_delete' | 'help_update' | 'ip_ban_create' | 'ip_ban_delete' | 'search_trend_blacklist_create' | 'search_trend_blacklist_update' | 'search_trend_blacklist_delete' | 'search_trend_blacklist_purge' | 'mascot_create' | 'mascot_update' | 'mascot_delete' | 'staff_file_create' | 'staff_file_update' | 'staff_file_delete' | 'pool_delete' | 'report_reason_create' | 'report_reason_delete' | 'report_reason_update' | 'set_update' | 'set_delete' | 'set_change_visibility' | 'tag_destroy' | 'tag_alias_create' | 'tag_alias_update' | 'tag_implication_create' | 'tag_implication_update' | 'ticket_claim' | 'ticket_unclaim' | 'ticket_update' | 'appeal_claim' | 'appeal_unclaim' | 'appeal_update' | 'upload_whitelist_create' | 'upload_whitelist_update' | 'upload_whitelist_delete' | 'user_avatar_clear' | 'user_profile_clear' | 'user_comments_hide' | 'user_forum_posts_hide' | 'user_blips_delete' | 'user_blacklist_changed' | 'totp_reset' | 'password_reset' | 'user_text_change' | 'user_custom_title_change' | 'user_upload_limit_change' | 'user_karma_change' | 'user_karma_free_toggle' | 'user_uploads_toggle' | 'user_flags_change' | 'user_level_change' | 'user_name_change' | 'user_delete' | 'user_ban' | 'user_ban_update' | 'user_unban' | 'user_feedback_create' | 'user_feedback_update' | 'user_feedback_delete' | 'user_feedback_undelete' | 'user_feedback_destroy' | 'user_flush_favorites' | 'wiki_page_rename' | 'wiki_page_delete' | 'wiki_page_lock' | 'wiki_page_unlock' | 'mass_update' | 'nuke_tag' | 'takedown_delete' | 'takedown_process' | 'post_version_hide' | 'post_version_unhide' | 'created_positive_record' | 'created_neutral_record' | 'created_negative_record' | 'created_flag_reason' | 'edited_flag_reason' | 'deleted_flag_reason' | 'post_move_favorites' | 'post_delete' | 'post_undelete' | 'post_destroy' | 'post_rating_lock' | 'post_unapprove' | 'post_replacement_accept' | 'post_replacement_reject' | 'post_replacement_delete';
10
+ export type OAuthClaim = 'iss' | 'sub' | 'aud' | 'exp' | 'iat' | 'preferred_username' | 'name' | 'picture' | 'updated_at' | 'e621_level' | 'e621_level_string' | 'e621_avatar_id' | 'e621_permissions' | 'email' | 'email_verified';
11
+ export type OAuthClaimType = 'normal';
12
+ export type OAuthCodeChallengeMethod = 'S256';
13
+ export type OAuthGrantType = 'authorization_code' | 'refresh_token';
14
+ export type OAuthIDTokenSigningAlgValue = 'RS256';
15
+ export type OAuthPermission = 'can_approve_posts' | 'can_upload_free' | 'is_bd_staff' | 'is_bd_auditor' | 'can_view_staff_notes' | 'can_handle_takedowns' | 'can_edit_avoid_posting_entries' | 'is_blocked' | 'is_member' | 'is_privileged' | 'is_former_staff' | 'is_staff' | 'is_janitor' | 'is_moderator' | 'is_admin';
16
+ export type OAuthResponseMode = 'query' | 'fragment' | 'form_post';
17
+ export type OAuthResponseType = 'code';
18
+ export type OAuthScope = 'openid' | 'profile' | 'email' | 'full';
19
+ export type OAuthSubjectType = 'public';
20
+ export type OAuthTokenEndpointAuthMethod = 'client_secret_basic' | 'client_secret_post';
21
+ export type PoolCategory = 'collection' | 'series';
22
+ export type PostEventAction = 'deleted' | 'undeleted' | 'approved' | 'unapproved' | 'flag_created' | 'flag_removed' | 'favorites_moved' | 'favorites_received' | 'rating_locked' | 'rating_unlocked' | 'status_locked' | 'status_unlocked' | 'note_locked' | 'note_unlocked' | 'comment_locked' | 'comment_unlocked' | 'replacement_accepted' | 'replacement_rejected' | 'replacement_promoted' | 'replacement_deleted' | 'expunged' | 'changed_bg_color' | 'replacement_penalty_changed' | 'owner_changed' | 'replacement_moved';
23
+ export type PostReplacementStatus = 'promoted' | 'approved' | 'rejected' | 'pending' | 'original';
24
+ export type Rating = 's' | 'q' | 'e';
25
+ export type StaffWikiRefRelatedType = 'User' | 'Artist' | 'StaffWiki';
26
+ export type TagCategory = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
27
+ export type TagCategoryNames = 'general' | 'artist' | 'contributor' | 'copyright' | 'character' | 'species' | 'invalid' | 'meta' | 'lore';
28
+ export type TagRequestStatus = 'active' | 'deleted' | 'processing' | 'queued' | 'retired' | 'pending' | `error: ${string}`;
29
+ export type TicketStatus = 'pending' | 'partial' | 'approved';
30
+ export type TicketType = 'blip' | 'comment' | 'dmail' | 'forum' | 'pool' | 'post' | 'set' | 'user' | 'wiki' | 'replacement';
31
+ export type UpDownMehFlipVote = 2 | 1 | 0 | -1;
32
+ export type UpDownMehVote = 1 | 0 | -1;
33
+ export type UpDownVote = 1 | -1;
34
+ export type UserFeedbackCategory = 'negative' | 'neutral' | 'positive';
35
+ export type UserLevel = 0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80;
36
+ export type UserLevelName = 'Anonymous' | 'Blocked' | 'Member' | 'Privileged' | 'Former Staff' | 'Staff' | 'Janitor' | 'Moderator' | 'Admin';
37
+ export type WarningType = 'warning' | 'record' | 'ban';
38
+ export type APIKey = {
39
+ id: number;
40
+ updated_at: string;
41
+ created_at: string;
42
+ user_id: number;
43
+ key: string;
44
+ name: string;
45
+ last_used_at: string | null;
46
+ last_used_ip_address: string | null | string;
47
+ last_user_agent: string | null;
48
+ expires_at: string | null;
49
+ notified_at: string | null;
11
50
  };
12
- export type WarningRecordType = {
13
- record_type: 'unmark' | 'ban' | 'record' | 'warning';
51
+ export type Appeal = {
52
+ id: number;
53
+ creator_id?: number;
54
+ disp_id: string;
55
+ qtype: AppealType;
56
+ status: AppealStatus;
57
+ reason?: string;
58
+ response?: string;
59
+ claimant_id?: number | null;
60
+ handler_id: number | null;
61
+ accused_id?: number;
62
+ created_at: string;
63
+ updated_at: string;
14
64
  };
15
- export type ModActionActions = 'admin_user_delete' | 'artist_page_rename' | 'artist_page_lock' | 'artist_page_unlock' | 'artist_user_linked' | 'artist_user_unlinked' | 'avoid_posting_create' | 'avoid_posting_update' | 'avoid_posting_delete' | 'avoid_posting_undelete' | 'avoid_posting_destroy' | 'staff_note_create' | 'staff_note_update' | 'staff_note_delete' | 'staff_note_undelete' | 'blip_destroy' | 'blip_delete' | 'blip_undelete' | 'blip_update' | 'comment_delete' | 'comment_hide' | 'comment_unhide' | 'comment_update' | 'forum_category_create' | 'forum_category_delete' | 'forum_category_update' | 'forum_post_delete' | 'forum_post_hide' | 'forum_post_unhide' | 'forum_post_update' | 'forum_topic_delete' | 'forum_topic_hide' | 'forum_topic_unhide' | 'forum_topic_lock' | 'forum_topic_unlock' | 'forum_topic_stick' | 'forum_topic_unstick' | 'forum_topic_update' | 'help_create' | 'help_delete' | 'help_update' | 'ip_ban_create' | 'ip_ban_delete' | 'search_trend_blacklist_create' | 'search_trend_blacklist_update' | 'search_trend_blacklist_delete' | 'search_trend_blacklist_purge' | 'mascot_create' | 'mascot_update' | 'mascot_delete' | 'staff_file_create' | 'staff_file_update' | 'staff_file_delete' | 'pool_delete' | 'report_reason_create' | 'report_reason_delete' | 'report_reason_update' | 'set_update' | 'set_delete' | 'set_change_visibility' | 'tag_destroy' | 'tag_alias_create' | 'tag_alias_update' | 'tag_implication_create' | 'tag_implication_update' | 'ticket_claim' | 'ticket_unclaim' | 'ticket_update' | 'appeal_claim' | 'appeal_unclaim' | 'appeal_update' | 'upload_whitelist_create' | 'upload_whitelist_update' | 'upload_whitelist_delete' | 'user_avatar_clear' | 'user_profile_clear' | 'user_comments_hide' | 'user_forum_posts_hide' | 'user_blips_delete' | 'user_blacklist_changed' | 'user_text_change' | 'user_custom_title_change' | 'user_upload_limit_change' | 'user_uploads_toggle' | 'user_flags_change' | 'user_level_change' | 'user_name_change' | 'user_delete' | 'user_ban' | 'user_ban_update' | 'user_unban' | 'user_feedback_create' | 'user_feedback_update' | 'user_feedback_delete' | 'user_feedback_undelete' | 'user_feedback_destroy' | 'user_flush_favorites' | 'wiki_page_rename' | 'wiki_page_delete' | 'wiki_page_lock' | 'wiki_page_unlock' | 'mass_update' | 'nuke_tag' | 'takedown_delete' | 'takedown_process' | 'post_version_hide' | 'post_version_unhide' | 'created_positive_record' | 'created_neutral_record' | 'created_negative_record' | 'created_flag_reason' | 'edited_flag_reason' | 'deleted_flag_reason' | 'post_move_favorites' | 'post_delete' | 'post_undelete' | 'post_destroy' | 'post_rating_lock' | 'post_unapprove' | 'post_replacement_accept' | 'post_replacement_reject' | 'post_replacement_delete';
16
- export type PostEventActions = 'deleted' | 'undeleted' | 'approved' | 'unapproved' | 'flag_created' | 'flag_removed' | 'favorites_moved' | 'favorites_received' | 'rating_locked' | 'rating_unlocked' | 'status_locked' | 'status_unlocked' | 'note_locked' | 'note_unlocked' | 'comment_locked' | 'comment_unlocked' | 'replacement_accepted' | 'replacement_rejected' | 'replacement_promoted' | 'replacement_deleted' | 'expunged' | 'changed_bg_color' | 'replacement_penalty_changed' | 'owner_changed';
17
- export type Ratings = 's' | 'q' | 'e';
18
- export type TagCategories = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
19
- export type FeedbackCategories = 'negative' | 'neutral' | 'positive';
20
- export type TagRequestStatuses = 'active' | 'deleted' | 'processing' | 'queued' | 'retired' | 'pending' | `error: ${string}`;
21
- export type WarningTypes = 'warning' | 'record' | 'ban';
22
- export type PoolCategories = 'collection' | 'series';
23
- export type TicketTypes = 'blip' | 'comment' | 'dmail' | 'forum' | 'pool' | 'post' | 'set' | 'user' | 'wiki' | 'replacement';
24
- export type TicketStatuses = 'pending' | 'partial' | 'approved';
25
65
  export type Artist = {
26
66
  id: number;
27
67
  name: string;
@@ -35,7 +75,7 @@ export type Artist = {
35
75
  is_locked: boolean;
36
76
  notes: string | null;
37
77
  };
38
- export type ArtistUrl = {
78
+ export type ArtistURL = {
39
79
  id: number;
40
80
  artist_id: number;
41
81
  url: string;
@@ -86,11 +126,14 @@ export type Ban = {
86
126
  id: number;
87
127
  user_id: number;
88
128
  reason: string;
89
- expires_at: string | null;
90
129
  banner_id: number;
130
+ expires_at: string | null;
91
131
  created_at: string;
92
132
  updated_at: string;
93
133
  };
134
+ export type BasicPost = Post & {
135
+ tags: Array<string>;
136
+ };
94
137
  export type Blip = {
95
138
  id: number;
96
139
  creator_id: number;
@@ -99,7 +142,7 @@ export type Blip = {
99
142
  created_at: string;
100
143
  updated_at: string;
101
144
  is_deleted: boolean;
102
- warning_type: WarningTypes;
145
+ warning_type: WarningType;
103
146
  warning_user_id: number;
104
147
  updater_id: number;
105
148
  creator_name: string;
@@ -134,11 +177,19 @@ export type Comment = {
134
177
  do_not_bump_post: boolean;
135
178
  is_hidden: boolean;
136
179
  is_sticky: boolean;
137
- warning_type: WarningTypes;
180
+ warning_type: WarningType;
138
181
  warning_user_id: number | null;
139
182
  creator_name: string;
140
183
  updater_name: string;
141
- vote: -1 | 0 | 1;
184
+ vote: UpDownMehVote;
185
+ };
186
+ export type CommentVote = {
187
+ id: number;
188
+ comment_id: number;
189
+ user_id: number;
190
+ score: UpDownVote;
191
+ created_at: string;
192
+ updated_at: string;
142
193
  };
143
194
  export type CurrentUser = User & {
144
195
  blacklist_users: boolean;
@@ -181,6 +232,17 @@ export type CurrentUser = User & {
181
232
  has_mail: boolean;
182
233
  forum_notification_dot: boolean;
183
234
  };
235
+ export type DBExport = {
236
+ name: DBExportName;
237
+ file_name: string;
238
+ file_size: number;
239
+ updated_at: string;
240
+ url: string;
241
+ /**
242
+ * SHA-256
243
+ */
244
+ checksum: string;
245
+ };
184
246
  export type DMail = {
185
247
  id: number;
186
248
  owner_id: number;
@@ -199,7 +261,7 @@ export type DeferredPost = {
199
261
  id: number;
200
262
  flags: string;
201
263
  tags: string;
202
- rating: Ratings;
264
+ rating: Rating;
203
265
  file_ext: string;
204
266
  width: number;
205
267
  height: number;
@@ -218,9 +280,16 @@ export type DeferredPost = {
218
280
  preview_width: number;
219
281
  preview_height: number;
220
282
  };
221
- export type DTextResponse = {
222
- html: string;
223
- posts: DeferredPost;
283
+ export type EditHistory = {
284
+ id: number;
285
+ created_at: string;
286
+ updated_at: string;
287
+ body: string;
288
+ subject: string | null;
289
+ versionable_type: EditHistoryVersionableType;
290
+ versionable_id: number;
291
+ version: number;
292
+ user_id: number;
224
293
  };
225
294
  export type EmailBlacklist = {
226
295
  id: number;
@@ -230,6 +299,33 @@ export type EmailBlacklist = {
230
299
  creator_id: string;
231
300
  reason: string;
232
301
  };
302
+ export type ExceptionLog = {
303
+ id: number;
304
+ created_at: string;
305
+ updated_at: string;
306
+ class_name: string;
307
+ version: string;
308
+ extra_params: {
309
+ [key: string]: unknown;
310
+ };
311
+ message: string;
312
+ trace: string;
313
+ code: string;
314
+ user_id: number;
315
+ };
316
+ export type ExtendedPost = Post & {
317
+ tags: {
318
+ general: Array<string>;
319
+ artist: Array<string>;
320
+ contributor: Array<string>;
321
+ copyright: Array<string>;
322
+ character: Array<string>;
323
+ species: Array<string>;
324
+ invalid: Array<string>;
325
+ meta: Array<string>;
326
+ lore: Array<string>;
327
+ };
328
+ };
233
329
  export type ForumPost = {
234
330
  id: number;
235
331
  topic_id: number;
@@ -239,14 +335,14 @@ export type ForumPost = {
239
335
  is_hidden: boolean;
240
336
  created_at: string;
241
337
  updated_at: string;
242
- warning_type: WarningTypes;
338
+ warning_type: WarningType;
243
339
  warning_user_id: number | null;
244
340
  };
245
341
  export type ForumPostVote = {
246
342
  id: number;
247
343
  forum_post_id: number;
248
344
  creator_id: number;
249
- score: number;
345
+ score: UpDownMehFlipVote;
250
346
  created_at: string;
251
347
  updated_at: string;
252
348
  creator_name: string;
@@ -276,7 +372,7 @@ export type FullUser = User & {
276
372
  positive_feedback_count: number;
277
373
  neutral_feedback_count: number;
278
374
  negative_feedback_count: number;
279
- upload_limit: number;
375
+ upload_slots: number;
280
376
  profile_about: string;
281
377
  profile_artinfo: string;
282
378
  };
@@ -292,14 +388,14 @@ export type HelpPage = {
292
388
  /**
293
389
  * Due to a global filter, the ip_addr is not present no matter your user level.
294
390
  */
295
- export type IpBan = {
391
+ export type IPBan = {
296
392
  id: number;
297
393
  creator_id: number;
298
394
  reason: string;
299
395
  created_at: string;
300
396
  updated_at: string;
301
397
  };
302
- export type IqdbPost = {
398
+ export type IQDBPost = {
303
399
  id: number;
304
400
  created_at: string;
305
401
  updated_at: string;
@@ -308,7 +404,7 @@ export type IqdbPost = {
308
404
  score: number;
309
405
  source: string;
310
406
  md5: string;
311
- rating: Ratings;
407
+ rating: Rating;
312
408
  is_note_locked: boolean;
313
409
  is_rating_locked: boolean;
314
410
  is_status_locked: boolean;
@@ -357,71 +453,106 @@ export type IqdbPost = {
357
453
  large_file_url?: string;
358
454
  preview_file_url?: string;
359
455
  };
360
- export type RawPost = {
456
+ export type JWKS = {
457
+ keys: Array<JWKSKey>;
458
+ };
459
+ export type JWKSKey = {
460
+ kty: 'RSA';
461
+ use: 'sig';
462
+ alg: JWKSAlgorithm;
463
+ /**
464
+ * Key ID, matched against the `kid` header of a signed JWT to select the key that verifies it.
465
+ */
466
+ kid: string;
467
+ /**
468
+ * RSA modulus, base64url-encoded.
469
+ */
470
+ n: string;
471
+ /**
472
+ * RSA public exponent, base64url-encoded.
473
+ */
474
+ e: string;
475
+ };
476
+ export type LegacyPost = {
361
477
  id: number;
362
478
  created_at: string;
363
479
  updated_at: string;
364
- up_score: number;
365
- down_score: number;
366
- score: number;
367
- source: string;
368
- md5: string;
369
- rating: Ratings;
370
- is_note_locked: boolean;
371
- is_rating_locked: boolean;
372
- is_status_locked: boolean;
373
- is_pending: boolean;
374
- is_flagged: boolean;
375
- is_deleted: boolean;
376
- uploader_id: number;
377
- approver_id: number;
378
- last_noted_at: string | null;
379
- last_comment_bumped_at: string | null;
480
+ file: {
481
+ width: number;
482
+ height: number;
483
+ ext: string;
484
+ size: number;
485
+ md5: string;
486
+ url: string | null;
487
+ };
488
+ preview: {
489
+ width: number;
490
+ height: number;
491
+ url: string | null;
492
+ };
493
+ sample: {
494
+ has: boolean;
495
+ height: number | null;
496
+ width: number | null;
497
+ url: string | null;
498
+ alternates: {
499
+ has?: boolean;
500
+ original?: PostSampleAlternate;
501
+ variants?: {
502
+ webm?: PostSampleAlternate;
503
+ mp4?: PostSampleAlternate;
504
+ };
505
+ samples?: {
506
+ '480p'?: PostSampleAlternate;
507
+ '720p'?: PostSampleAlternate;
508
+ };
509
+ };
510
+ };
511
+ score: {
512
+ up: number;
513
+ down: number;
514
+ total: number;
515
+ };
516
+ tags: {
517
+ general: Array<string>;
518
+ artist: Array<string>;
519
+ copyright: Array<string>;
520
+ character: Array<string>;
521
+ species: Array<string>;
522
+ invalid: Array<string>;
523
+ meta: Array<string>;
524
+ lore: Array<string>;
525
+ contributor: Array<string>;
526
+ };
527
+ locked_tags: Array<string> | null;
528
+ change_seq: number;
529
+ flags: {
530
+ pending: boolean;
531
+ flagged: boolean;
532
+ note_locked: boolean;
533
+ status_locked: boolean;
534
+ rating_locked: boolean;
535
+ deleted: boolean;
536
+ };
537
+ rating: Rating;
380
538
  fav_count: number;
381
- tag_string: string;
382
- tag_count: number;
383
- tag_count_general: number;
384
- tag_count_artist: number;
385
- tag_count_character: number;
386
- tag_count_copyright: number;
387
- file_ext: string;
388
- file_size: number;
389
- image_width: number;
390
- image_height: number;
391
- parent_id: number | null;
392
- has_children: boolean;
393
- last_commented_at: string | null;
394
- has_active_children: boolean;
395
- bit_flags: number;
396
- tag_count_meta: number;
397
- locked_tags: string | null;
398
- tag_count_species: number;
399
- tag_count_invalid: number;
539
+ sources: Array<string>;
540
+ pools: Array<number>;
541
+ relationships: {
542
+ parent_id: number | null;
543
+ has_children: boolean;
544
+ has_active_children: boolean;
545
+ children: Array<number>;
546
+ };
547
+ approver_id: number | null;
548
+ uploader_id: number;
400
549
  description: string;
401
550
  comment_count: number;
402
- change_seq: number;
403
- tag_count_lore: number;
404
- bg_color: string | null;
405
- generated_samples: Array<'720p' | '480p' | 'original'> | null;
406
- duration: string | null;
407
- is_comment_disabled: boolean;
408
- is_comment_locked: boolean;
409
- has_large: boolean;
410
- has_visible_children: boolean;
411
- children_ids: string | null;
412
- pool_ids: Array<number>;
413
551
  is_favorited: boolean;
414
- file_url?: string;
415
- large_file_url?: string;
416
- preview_file_url?: string;
417
- };
418
- export type IqdbResponse = {
419
- hash: string;
420
- post_id: number;
421
- score: number;
422
- post: {
423
- posts: IqdbPost;
424
- };
552
+ has_notes: boolean;
553
+ duration: number | null;
554
+ uploader_name: string;
555
+ vote: UpDownMehVote;
425
556
  };
426
557
  export type Mascot = {
427
558
  id: number;
@@ -438,12 +569,18 @@ export type Mascot = {
438
569
  available_on: Array<string>;
439
570
  url_path: string;
440
571
  };
572
+ export type MinimalUser = {
573
+ id: number;
574
+ name: string;
575
+ level_string: UserLevelName;
576
+ favorite_count: number;
577
+ };
441
578
  export type ModAction = {
442
579
  id: number;
443
580
  creator_id: number;
444
581
  created_at: string;
445
582
  updated_at: string;
446
- action: ModActionActions;
583
+ action: ModActionAction;
447
584
  };
448
585
  export type NewsUpdate = {
449
586
  id: number;
@@ -483,18 +620,112 @@ export type NoteVersion = {
483
620
  post_id: number;
484
621
  updater_id: number;
485
622
  };
486
- export type Pool = {
487
- id: number;
488
- name: string;
489
- updated_at: string;
490
- creator_id: number;
491
- description: string;
492
- is_active: boolean;
493
- category: PoolCategories;
494
- post_ids: Array<number>;
495
- created_at: string;
496
- creator_name: string;
497
- post_count: number;
623
+ /**
624
+ * Only `active` is present when the token is inactive/unknown - the other fields are omitted entirely.
625
+ */
626
+ export type OAuthIntrospection = {
627
+ active: boolean;
628
+ /**
629
+ * Space-separated list of the token's granted scopes.
630
+ */
631
+ scope?: string;
632
+ /**
633
+ * The `uid` of the OAuth application the token was issued to.
634
+ */
635
+ client_id?: string;
636
+ token_type?: 'Bearer';
637
+ /**
638
+ * Unix timestamp of when the token was issued.
639
+ */
640
+ iat?: number;
641
+ /**
642
+ * Unix timestamp of when the token expires. Omitted for tokens that don't expire.
643
+ */
644
+ exp?: number;
645
+ };
646
+ export type OAuthToken = {
647
+ access_token: string;
648
+ token_type: 'Bearer';
649
+ /**
650
+ * Seconds until `access_token` expires.
651
+ */
652
+ expires_in: number;
653
+ refresh_token: string;
654
+ /**
655
+ * Space-separated list of granted scopes.
656
+ */
657
+ scope: string;
658
+ /**
659
+ * Unix timestamp of when the token was issued.
660
+ */
661
+ created_at: number;
662
+ /**
663
+ * A signed JWT containing the user's ID token claims. Present only when the `openid` scope was granted.
664
+ */
665
+ id_token?: string;
666
+ };
667
+ export type OAuthTokenInfo = {
668
+ resource_owner_id: number;
669
+ scope: Array<OAuthScope>;
670
+ expires_in: number;
671
+ application: {
672
+ uid: string;
673
+ };
674
+ created_at: number;
675
+ };
676
+ /**
677
+ * null properties are entriely absent
678
+ */
679
+ export type OAuthUserInfo = {
680
+ preferred_username: string;
681
+ name: string;
682
+ picture?: string;
683
+ updated_at: number;
684
+ e621_level: UserLevel;
685
+ e621_level_string: UserLevelName;
686
+ e621_avatar_id?: number;
687
+ e621_permissions: OAuthPermission;
688
+ /**
689
+ * Requires `email` scope.
690
+ */
691
+ email?: string;
692
+ /**
693
+ * Requires `email` scope.
694
+ */
695
+ email_verified?: boolean;
696
+ sub: string;
697
+ };
698
+ export type OpenIDConfiguration = {
699
+ issuer: string;
700
+ authorization_endpoint: string;
701
+ token_endpoint: string;
702
+ revocation_endpoint: string;
703
+ introspection_endpoint: string;
704
+ userinfo_endpoint: string;
705
+ jwks_uri: string;
706
+ scopes_supported: Array<OAuthScope>;
707
+ response_types_supported: Array<OAuthResponseType>;
708
+ response_modes_supported: Array<OAuthResponseMode>;
709
+ grant_types_supported: Array<OAuthGrantType>;
710
+ token_endpoint_auth_methods_supported: Array<OAuthTokenEndpointAuthMethod>;
711
+ subject_types_supported: Array<OAuthSubjectType>;
712
+ id_token_signing_alg_values_supported: Array<OAuthIDTokenSigningAlgValue>;
713
+ claim_types_supported: Array<OAuthClaimType>;
714
+ claims_supported: Array<OAuthClaim>;
715
+ code_challenge_methods_supported: Array<OAuthCodeChallengeMethod>;
716
+ };
717
+ export type Pool = {
718
+ id: number;
719
+ name: string;
720
+ updated_at: string;
721
+ creator_id: number;
722
+ description: string;
723
+ is_active: boolean;
724
+ category: PoolCategory;
725
+ post_ids: Array<number>;
726
+ created_at: string;
727
+ creator_name: string;
728
+ post_count: number;
498
729
  };
499
730
  export type PoolVersion = {
500
731
  id: number;
@@ -509,7 +740,7 @@ export type PoolVersion = {
509
740
  description_changed: boolean;
510
741
  is_active: boolean;
511
742
  is_locked: boolean;
512
- category: PoolCategories;
743
+ category: PoolCategory;
513
744
  version: number;
514
745
  added_post_ids: Array<number>;
515
746
  removed_post_ids: Array<number>;
@@ -519,67 +750,16 @@ export type Post = {
519
750
  created_at: string;
520
751
  updated_at: string;
521
752
  change_seq: number;
522
- files: {
523
- meta: {
524
- md5: string;
525
- ext: string;
526
- size: number;
527
- duration: number | null;
528
- has_sample: boolean;
529
- };
530
- original: {
531
- width: number;
532
- height: number;
533
- url: string | null;
534
- };
535
- preview: {
536
- width: number;
537
- height: number;
538
- jpg: string | null;
539
- webp: string | null;
540
- };
541
- sample: {
542
- width: number;
543
- height: number;
544
- jpg: string | null;
545
- webp: string | null;
546
- };
547
- };
753
+ files: PostFiles;
548
754
  uploader_id: number;
549
755
  uploader_name: string;
550
756
  approver_id: number | null;
551
- stats: {
552
- score: {
553
- up: number;
554
- down: number;
555
- total: number;
556
- };
557
- fav_count: number;
558
- is_favorited: boolean;
559
- vote: -1 | 0 | 1;
560
- comment_count: number;
561
- };
562
- flags: {
563
- pending: boolean;
564
- flagged: boolean;
565
- note_locked: boolean;
566
- status_locked: boolean;
567
- rating_locked: boolean;
568
- deleted: boolean;
569
- };
570
- has: {
571
- parent: boolean;
572
- children: boolean;
573
- active_children: boolean;
574
- notes: boolean;
575
- sample: boolean;
576
- };
577
- relationships: {
578
- parent_id: number | null;
579
- children: Array<number>;
580
- };
757
+ stats: PostStats;
758
+ flags: PostFlags;
759
+ has: PostHas;
760
+ relationships: PostRelationships;
581
761
  pools: Array<number>;
582
- rating: Ratings;
762
+ rating: Rating;
583
763
  locked_tags: Array<string>;
584
764
  sources: Array<string>;
585
765
  description: string;
@@ -591,6 +771,9 @@ export type PostApproval = {
591
771
  created_at: string;
592
772
  updated_at: string;
593
773
  };
774
+ export type PostData = {
775
+ post_data: Array<ThumbnailPost>;
776
+ };
594
777
  export type PostDisapproval = {
595
778
  id: number;
596
779
  user_id: number;
@@ -604,9 +787,39 @@ export type PostEvent = {
604
787
  id: number;
605
788
  creator_id: number | null;
606
789
  post_id: number;
607
- action: PostEventActions;
790
+ action: PostEventAction;
608
791
  created_at: string;
609
792
  };
793
+ export type PostFiles = {
794
+ meta: PostFilesMeta;
795
+ original: PostFilesOriginal;
796
+ preview: PostFilesPreview;
797
+ sample: PostFilesSample;
798
+ };
799
+ export type PostFilesMeta = {
800
+ md5: string;
801
+ ext: string;
802
+ size: number;
803
+ duration: number | null;
804
+ has_sample: boolean;
805
+ };
806
+ export type PostFilesOriginal = {
807
+ width: number;
808
+ height: number;
809
+ url: string | null;
810
+ };
811
+ export type PostFilesPreview = {
812
+ width: number;
813
+ height: number;
814
+ jpg: string | null;
815
+ webp: string | null;
816
+ };
817
+ export type PostFilesSample = {
818
+ width: number;
819
+ height: number;
820
+ jpg: string | null;
821
+ webp: string | null;
822
+ };
610
823
  export type PostFlag = {
611
824
  id: number;
612
825
  created_at: string;
@@ -625,6 +838,30 @@ export type PostFlag = {
625
838
  */
626
839
  note?: string | null;
627
840
  };
841
+ export type PostFlags = {
842
+ pending: boolean;
843
+ flagged: boolean;
844
+ note_locked: boolean;
845
+ status_locked: boolean;
846
+ rating_locked: boolean;
847
+ deleted: boolean;
848
+ };
849
+ export type PostHas = {
850
+ parent: boolean;
851
+ children: boolean;
852
+ active_children: boolean;
853
+ notes: boolean;
854
+ sample: boolean;
855
+ };
856
+ export type PostRecommendation = {
857
+ post_id: number;
858
+ score: number;
859
+ explanation: string | null;
860
+ };
861
+ export type PostRelationships = {
862
+ parent_id: number | null;
863
+ children: Array<number>;
864
+ };
628
865
  export type PostReplacement = {
629
866
  id: number;
630
867
  created_at: string;
@@ -639,8 +876,9 @@ export type PostReplacement = {
639
876
  md5: string;
640
877
  source: string;
641
878
  file_name: string;
642
- status: 'prompted' | 'approved' | 'rejected' | 'pending' | 'original';
879
+ status: PostReplacementStatus;
643
880
  reason: string;
881
+ sequence_number: number;
644
882
  };
645
883
  export type PostSampleAlternate = {
646
884
  fps: number;
@@ -663,13 +901,25 @@ export type PostSet = {
663
901
  transfer_on_delete: boolean;
664
902
  post_ids: Array<number>;
665
903
  };
904
+ export type PostStats = {
905
+ score: PostStatsScore;
906
+ fav_count: number;
907
+ is_favorited: boolean;
908
+ vote: UpDownMehVote;
909
+ comment_count: number;
910
+ };
911
+ export type PostStatsScore = {
912
+ up: number;
913
+ down: number;
914
+ total: number;
915
+ };
666
916
  export type PostVersion = {
667
917
  id: number;
668
918
  post_id: number;
669
919
  tags: string;
670
920
  updater_id: number;
671
921
  updated_at: string;
672
- rating: Ratings;
922
+ rating: Rating;
673
923
  parent_id: number | null;
674
924
  source: string;
675
925
  description: string;
@@ -690,9 +940,144 @@ export type PostVersion = {
690
940
  updater_name: string;
691
941
  is_hidden: boolean;
692
942
  };
943
+ export type PostVote = {
944
+ id: number;
945
+ post_id: number;
946
+ user_id: number;
947
+ score: UpDownVote;
948
+ created_at: string;
949
+ updated_at: string;
950
+ };
951
+ export type RawPost = {
952
+ id: number;
953
+ created_at: string;
954
+ updated_at: string;
955
+ up_score: number;
956
+ down_score: number;
957
+ score: number;
958
+ source: string;
959
+ md5: string;
960
+ rating: Rating;
961
+ is_note_locked: boolean;
962
+ is_rating_locked: boolean;
963
+ is_status_locked: boolean;
964
+ is_pending: boolean;
965
+ is_flagged: boolean;
966
+ is_deleted: boolean;
967
+ uploader_id: number;
968
+ approver_id: number;
969
+ last_noted_at: string | null;
970
+ last_comment_bumped_at: string | null;
971
+ fav_count: number;
972
+ tag_string: string;
973
+ tag_count: number;
974
+ tag_count_general: number;
975
+ tag_count_artist: number;
976
+ tag_count_character: number;
977
+ tag_count_copyright: number;
978
+ file_ext: string;
979
+ file_size: number;
980
+ image_width: number;
981
+ image_height: number;
982
+ parent_id: number | null;
983
+ has_children: boolean;
984
+ last_commented_at: string | null;
985
+ has_active_children: boolean;
986
+ bit_flags: number;
987
+ tag_count_meta: number;
988
+ locked_tags: string | null;
989
+ tag_count_species: number;
990
+ tag_count_invalid: number;
991
+ description: string;
992
+ comment_count: number;
993
+ change_seq: number;
994
+ tag_count_lore: number;
995
+ bg_color: string | null;
996
+ generated_samples: Array<'720p' | '480p' | 'original'> | null;
997
+ duration: string | null;
998
+ is_comment_disabled: boolean;
999
+ is_comment_locked: boolean;
1000
+ has_large: boolean;
1001
+ has_visible_children: boolean;
1002
+ children_ids: string | null;
1003
+ pool_ids: Array<number>;
1004
+ is_favorited: boolean;
1005
+ file_url?: string;
1006
+ large_file_url?: string;
1007
+ preview_file_url?: string;
1008
+ };
1009
+ export type RecommendedPosts = {
1010
+ post_id: number;
1011
+ model_version: string;
1012
+ results: Array<PostRecommendation>;
1013
+ };
693
1014
  export type RelatedTag = {
694
1015
  name: string;
695
- category_id: TagCategories;
1016
+ category_id: TagCategory;
1017
+ };
1018
+ export type RisingSearchTrend = {
1019
+ name: string;
1020
+ pretty_name: string;
1021
+ post_count: number;
1022
+ category: TagCategory;
1023
+ };
1024
+ export type SearchTrend = {
1025
+ tag: string;
1026
+ count: number;
1027
+ day: string;
1028
+ };
1029
+ export type SearchTrendBlacklist = {
1030
+ id: number;
1031
+ tag: string;
1032
+ reason: string;
1033
+ creator_id: number;
1034
+ created_at: string;
1035
+ updated_at: string;
1036
+ };
1037
+ export type SearchTrendHourly = {
1038
+ tag: string;
1039
+ count: number;
1040
+ hour: string;
1041
+ processed: boolean;
1042
+ };
1043
+ export type StaffFile = {
1044
+ id: number;
1045
+ creator_id: number;
1046
+ storage_id: string;
1047
+ md5: string;
1048
+ file_ext: string;
1049
+ file_size: number;
1050
+ original_filename: string;
1051
+ title: string;
1052
+ description: string | null;
1053
+ created_at: string;
1054
+ updated_at: string;
1055
+ };
1056
+ export type StaffIPAddrIPListing = StaffIPAddrSums & {
1057
+ last_login: unknown;
1058
+ };
1059
+ /**
1060
+ * Dictionary of ip address to count.
1061
+ */
1062
+ export type StaffIPAddrSum = {
1063
+ [key: string]: number;
1064
+ };
1065
+ export type StaffIPAddrSums = {
1066
+ comment: StaffIPAddrSum;
1067
+ blip: StaffIPAddrSum;
1068
+ dmail: StaffIPAddrSum;
1069
+ post_flag: StaffIPAddrSum;
1070
+ posts: StaffIPAddrSum;
1071
+ users: StaffIPAddrSum;
1072
+ artist_version?: StaffIPAddrSum;
1073
+ note_version?: StaffIPAddrSum;
1074
+ pool_version?: StaffIPAddrSum;
1075
+ post_version?: StaffIPAddrSum;
1076
+ wiki_page_version?: StaffIPAddrSum;
1077
+ };
1078
+ export type StaffIPAddrUserListing = {
1079
+ sums: StaffIPAddrSums;
1080
+ ip_addrs: Array<string>;
696
1081
  };
697
1082
  export type StaffNote = {
698
1083
  id: number;
@@ -704,13 +1089,111 @@ export type StaffNote = {
704
1089
  is_deleted: boolean;
705
1090
  updater_id: number;
706
1091
  };
1092
+ export type StaffWiki = {
1093
+ id: number;
1094
+ creator_id: number;
1095
+ updater_id: number;
1096
+ claimant_id: number | null;
1097
+ title: string;
1098
+ body: string;
1099
+ created_at: string;
1100
+ updated_at: string;
1101
+ };
1102
+ export type StaffWikiVersion = {
1103
+ id: number;
1104
+ staff_wiki_id: number;
1105
+ updater_id: number;
1106
+ claimant_id: number | null;
1107
+ title: string;
1108
+ body: string;
1109
+ created_at: string;
1110
+ updated_at: string;
1111
+ };
1112
+ export type Stats = {
1113
+ /**
1114
+ * When the first post was created.
1115
+ */
1116
+ started: string;
1117
+ total_posts: number;
1118
+ active_posts: number;
1119
+ deleted_posts: number;
1120
+ /**
1121
+ * `active_posts + deleted_posts`
1122
+ */
1123
+ existing_posts: number;
1124
+ destroyed_posts: number;
1125
+ total_votes: number;
1126
+ total_notes: number;
1127
+ total_favorites: number;
1128
+ total_pools: number;
1129
+ public_sets: number;
1130
+ private_sets: number;
1131
+ total_sets: number;
1132
+ average_posts_per_pool: number;
1133
+ average_posts_per_set: number;
1134
+ safe_posts: number;
1135
+ questionable_posts: number;
1136
+ explicit_posts: number;
1137
+ jpg_posts: number;
1138
+ png_posts: number;
1139
+ webp_posts: number;
1140
+ gif_posts: number;
1141
+ swf_posts: number;
1142
+ webm_posts: number;
1143
+ mp4_posts: number;
1144
+ average_file_size: number;
1145
+ total_file_size: number;
1146
+ average_posts_per_day: number;
1147
+ total_users: number;
1148
+ anonymous_users: number;
1149
+ blocked_users: number;
1150
+ member_users: number;
1151
+ privileged_users: number;
1152
+ 'former staff_users': number;
1153
+ staff_users: number;
1154
+ janitor_users: number;
1155
+ moderator_users: number;
1156
+ admin_users: number;
1157
+ unactivated_users: number;
1158
+ total_dmails: number;
1159
+ average_registrations_per_day: number;
1160
+ /**
1161
+ * Users who have logged in within the last 3 months.
1162
+ */
1163
+ active_users: number;
1164
+ total_comments: number;
1165
+ active_comments: number;
1166
+ hidden_comments: number;
1167
+ deleted_comments: number;
1168
+ average_comments_per_day: number;
1169
+ total_forum_threads: number;
1170
+ total_forum_posts: number;
1171
+ average_posts_per_thread: number;
1172
+ average_forum_posts_per_day: number;
1173
+ total_blips: number;
1174
+ active_blips: number;
1175
+ deleted_blips: number;
1176
+ destroyed_blips: number;
1177
+ average_blips_per_day: number;
1178
+ total_tags: number;
1179
+ general_tags: number;
1180
+ species_tags: number;
1181
+ character_tags: number;
1182
+ copyright_tags: number;
1183
+ artist_tags: number;
1184
+ contributor_tags: number;
1185
+ invalid_tags: number;
1186
+ lore_tags: number;
1187
+ meta_tags: number;
1188
+ updated_at: string;
1189
+ };
707
1190
  export type Tag = {
708
1191
  id: number;
709
1192
  name: string;
710
1193
  post_count: number;
711
1194
  related_tags: string;
712
1195
  related_tags_updated_at: string | null;
713
- category: TagCategories;
1196
+ category: TagCategory;
714
1197
  is_locked: boolean;
715
1198
  created_at: string;
716
1199
  updated_at: string;
@@ -725,10 +1208,17 @@ export type TagAlias = {
725
1208
  updated_at: string | null;
726
1209
  forum_topic_id: number | null;
727
1210
  consequent_name: string;
728
- status: TagRequestStatuses;
1211
+ status: TagRequestStatus;
729
1212
  post_count: number;
730
1213
  approver_id: number | null;
731
1214
  };
1215
+ export type TagCorrection = {
1216
+ post_count: number;
1217
+ real_post_count: number;
1218
+ category: TagCategory;
1219
+ category_cache: TagCategory;
1220
+ tag: Tag;
1221
+ };
732
1222
  export type TagImplication = {
733
1223
  id: number;
734
1224
  reason: string;
@@ -737,7 +1227,7 @@ export type TagImplication = {
737
1227
  forum_post_id: number | null;
738
1228
  antecedent_name: string;
739
1229
  consequent_name: string;
740
- status: TagRequestStatuses;
1230
+ status: TagRequestStatus;
741
1231
  forum_topic_id: number | null;
742
1232
  updated_at: string;
743
1233
  descendant_names: Array<string>;
@@ -747,7 +1237,7 @@ export type TagPreview = {
747
1237
  id?: number;
748
1238
  name: string;
749
1239
  resolved?: string;
750
- category?: TagCategories;
1240
+ category?: TagCategory;
751
1241
  post_count?: number;
752
1242
  alias?: string;
753
1243
  implies?: Array<string>;
@@ -756,8 +1246,8 @@ export type TagTypeVersion = {
756
1246
  id: number;
757
1247
  created_at: string;
758
1248
  updated_at: string;
759
- old_type: TagCategories;
760
- new_type: TagCategories;
1249
+ old_type: TagCategory;
1250
+ new_type: TagCategory;
761
1251
  is_locked: boolean;
762
1252
  tag_id: number;
763
1253
  creator_id: number;
@@ -771,13 +1261,49 @@ export type Takedown = {
771
1261
  updated_at: string;
772
1262
  post_count: number;
773
1263
  };
1264
+ export type ThumbnailPost = {
1265
+ id: number;
1266
+ created_at: string;
1267
+ md5: string;
1268
+ file_ext: string;
1269
+ width: number;
1270
+ height: number;
1271
+ size: number;
1272
+ preview_url: string | null;
1273
+ preview_webp: string | null;
1274
+ sample_url: string | null;
1275
+ file_url: string | null;
1276
+ preview_width: number;
1277
+ preview_height: number;
1278
+ uploader_id: number;
1279
+ uploader: string;
1280
+ score: number;
1281
+ fav_count: number;
1282
+ is_favorited: boolean;
1283
+ vote: UpDownMehVote;
1284
+ comment_count: number;
1285
+ /**
1286
+ * space separated list of flags:
1287
+ * - pending
1288
+ * - flagged
1289
+ * - deleted
1290
+ *
1291
+ */
1292
+ flags: string;
1293
+ /**
1294
+ * space separated list of ids
1295
+ */
1296
+ pools: string;
1297
+ rating: Rating;
1298
+ tags: string;
1299
+ };
774
1300
  export type Ticket = {
775
1301
  id: number;
776
1302
  creator_id: number;
777
1303
  reason: string;
778
1304
  disp_id: number;
779
- qtype: TicketTypes;
780
- status: TicketStatuses;
1305
+ qtype: TicketType;
1306
+ status: TicketStatus;
781
1307
  created_at: string;
782
1308
  updated_at: string;
783
1309
  response: string;
@@ -789,22 +1315,14 @@ export type Ticket = {
789
1315
  report_reason: string | null;
790
1316
  accused_id: number | null;
791
1317
  };
792
- export type UploadWhitelist = {
793
- id: number;
794
- created_at: string;
795
- updated_at: string;
796
- pattern: string;
797
- note: string;
798
- hidden: boolean;
799
- allowed: boolean;
800
- reason: string;
801
- domain: string;
802
- path: string;
803
- };
804
- export type Upload = {
1318
+ export type TrackedSearchTrend = {
1319
+ count: number;
1320
+ day: string;
1321
+ };
1322
+ export type Upload = {
805
1323
  id: number;
806
1324
  source: string;
807
- rating: Ratings;
1325
+ rating: Rating;
808
1326
  uploader_id: number;
809
1327
  tag_string: string;
810
1328
  /**
@@ -829,19 +1347,33 @@ export type Upload = {
829
1347
  description: string;
830
1348
  uploader_name: string;
831
1349
  };
1350
+ export type UploadWhitelist = {
1351
+ id: number;
1352
+ created_at: string;
1353
+ updated_at: string;
1354
+ pattern: string;
1355
+ note: string;
1356
+ hidden: boolean;
1357
+ allowed: boolean;
1358
+ reason: string;
1359
+ domain: string;
1360
+ path: string;
1361
+ };
832
1362
  export type User = {
833
1363
  id: number;
834
1364
  created_at: string;
835
1365
  name: string;
836
- level: UserLevels;
1366
+ level: UserLevel;
837
1367
  base_upload_limit: number;
1368
+ upload_karma: number;
1369
+ upload_karma_free: boolean;
838
1370
  post_upload_count: number;
839
1371
  post_update_count: number;
840
1372
  note_update_count: number;
841
1373
  is_banned: boolean;
842
1374
  can_approve_posts: boolean;
843
1375
  can_upload_free: boolean;
844
- level_string: UserLevelsNames;
1376
+ level_string: UserLevelName;
845
1377
  avatar_id: number | null;
846
1378
  is_verified?: boolean;
847
1379
  has_cropped_avatar: boolean;
@@ -850,369 +1382,57 @@ export type User = {
850
1382
  */
851
1383
  last_logged_in_at?: string;
852
1384
  };
853
- export type UserFeedback = {
854
- id: number;
1385
+ export type UserAlt = {
855
1386
  user_id: number;
856
- creator_id: number;
857
- category: FeedbackCategories;
858
- body: string;
859
- created_at: string;
860
- updated_at: string;
861
- updater_id: number;
862
- is_deleted: boolean;
863
- };
864
- export type UserNameChangeRequest = {
865
- id: number;
866
- approver_id: number;
867
- user_id: number;
868
- original_name: string;
869
- desired_name: string;
870
- change_reason?: string;
871
- created_at: string;
872
- updated_at: string;
873
- status: 'approved';
874
- };
875
- export type WikiPage = {
876
- id: number;
877
- created_at: string;
878
- updated_at: string;
879
- title: string;
880
- body: string;
881
- creator_id: number;
882
- is_locked: boolean;
883
- updater_id: number;
884
- is_deleted: boolean;
885
- other_names: Array<string>;
886
- parent: string | null;
887
- creator_name: string;
888
- category_id: TagCategories;
889
- featured_posts?: Array<number>;
890
- };
891
- export type WikiPageVersion = {
892
- id: number;
893
- created_at: string;
894
- updated_at: string;
895
- title: string;
896
- body: string;
897
- updater_id: number;
898
- wiki_page_id: number;
899
- is_locked: boolean;
900
- other_names: Array<string>;
901
- is_deleted: boolean;
902
- reason: string | null;
903
- parent: string | null;
904
- featured_posts?: Array<number>;
905
- };
906
- export type ApiKey = {
907
- id: number;
908
- updated_at: string;
909
- created_at: string;
910
- user_id: number;
911
- key: string;
912
- name: string;
913
- last_used_at: string | null;
914
- last_used_ip_address: string | null | string;
915
- last_user_agent: string | null;
916
- expires_at: string | null;
917
- notified_at: string | null;
918
- };
919
- export type EditHistory = {
920
- id: number;
921
- created_at: string;
922
- updated_at: string;
923
- body: string;
924
- subject: string | null;
925
- versionable_type: 'Blip' | 'Comment' | 'ForumPost';
926
- versionable_id: number;
927
- version: number;
928
- user_id: number;
929
- };
930
- export type UserAvatarMenu = {
931
- has_uploads: boolean;
932
- has_favorites: boolean;
933
- has_sets: boolean;
934
- has_comments: boolean;
935
- has_forums: boolean;
936
- };
937
- export type TagCorrection = {
938
- post_count: number;
939
- real_post_count: number;
940
- category: TagCategories;
941
- category_cache: TagCategories;
942
- tag: Tag;
943
- };
944
- export type SearchTrend = {
945
- tag: string;
946
- count: number;
947
- day: string;
948
- };
949
- export type RisingSearchTrend = {
950
- name: string;
951
- pretty_name: string;
952
- post_count: number;
953
- category: TagCategories;
954
- };
955
- export type SearchTrendBlacklist = {
956
- id: number;
957
- tag: string;
958
- reason: string;
959
- creator_id: number;
960
- created_at: string;
961
- updated_at: string;
962
- };
963
- export type MessageErrorResponse = {
964
- success: boolean;
965
- message: string;
966
- code?: string | null;
967
- };
968
- export type MessageSuccessResponse = {
969
- success: true;
970
- message: string;
971
- };
972
- export type PostRecommendation = {
973
- post_id: number;
974
1387
  score: number;
975
- explanation: string | null;
976
- };
977
- export type RecommendedPosts = {
978
- post_id: number;
979
- model_version: string;
980
- results: Array<PostRecommendation>;
981
- };
982
- export type PostVote = {
983
- id: number;
984
- post_id: number;
985
- user_id: number;
986
- score: UpDownVote;
987
- created_at: string;
988
- updated_at: string;
989
- };
990
- export type UpDownVote = 1 | -1;
991
- export type UpDownMehVote = 1 | 0 | -1;
992
- export type MinimalUser = {
1388
+ handoff: boolean;
1389
+ handoff_users: number | null;
1390
+ shared_exact: number;
1391
+ shared_subnet: number;
1392
+ total_ips: number;
1393
+ ratio: number;
1394
+ rarest_users: number;
1395
+ overlap_first: string;
1396
+ overlap_last: string;
1397
+ last_co_seen: string;
1398
+ concurrent: boolean;
1399
+ deleted: boolean;
1400
+ user: UserAltUser;
1401
+ };
1402
+ export type UserAltUser = {
993
1403
  id: number;
994
1404
  name: string;
995
- level_string: UserLevelsNames;
996
- favorite_count: number;
997
- };
998
- export type ThumbnailPost = {
999
- id: number;
1000
- created_at: string;
1001
- md5: string;
1002
- file_ext: string;
1003
- width: number;
1004
- height: number;
1005
- size: number;
1006
- preview_url: string | null;
1007
- preview_webp: string | null;
1008
- sample_url: string | null;
1009
- file_url: string | null;
1010
- preview_width: number;
1011
- preview_height: number;
1012
- uploader_id: number;
1013
- uploader: string;
1014
- score: number;
1015
- fav_count: number;
1016
- is_favorited: boolean;
1017
- vote: -1 | 0 | 1;
1018
- comment_count: number;
1019
- /**
1020
- * space separated list of flags:
1021
- * - pending
1022
- * - flagged
1023
- * - deleted
1024
- *
1025
- */
1026
- flags: string;
1027
- /**
1028
- * space separated list of ids
1029
- */
1030
- pools: string;
1031
- rating: Ratings;
1032
- tags: string;
1033
- };
1034
- export type PostData = {
1035
- post_data: Array<ThumbnailPost>;
1036
- };
1037
- export type CommentVote = {
1038
- id: number;
1039
- comment_id: number;
1040
- user_id: number;
1041
- score: UpDownVote;
1405
+ level_string: string;
1042
1406
  created_at: string;
1043
- updated_at: string;
1044
1407
  };
1045
- export type LegacyPost = {
1046
- id: number;
1047
- created_at: string;
1048
- updated_at: string;
1049
- file: {
1050
- width: number;
1051
- height: number;
1052
- ext: string;
1053
- size: number;
1054
- md5: string;
1055
- url: string | null;
1056
- };
1057
- preview: {
1058
- width: number;
1059
- height: number;
1060
- url: string | null;
1061
- };
1062
- sample: {
1063
- has: boolean;
1064
- height: number | null;
1065
- width: number | null;
1066
- url: string | null;
1067
- alternates: {
1068
- has?: boolean;
1069
- original?: PostSampleAlternate;
1070
- variants?: {
1071
- webm?: PostSampleAlternate;
1072
- mp4?: PostSampleAlternate;
1073
- };
1074
- samples?: {
1075
- '480p'?: PostSampleAlternate;
1076
- '720p'?: PostSampleAlternate;
1077
- };
1078
- };
1079
- };
1080
- score: {
1081
- up: number;
1082
- down: number;
1083
- total: number;
1084
- };
1085
- tags: {
1086
- general: Array<string>;
1087
- artist: Array<string>;
1088
- copyright: Array<string>;
1089
- character: Array<string>;
1090
- species: Array<string>;
1091
- invalid: Array<string>;
1092
- meta: Array<string>;
1093
- lore: Array<string>;
1094
- contributor: Array<string>;
1095
- };
1096
- locked_tags: Array<string> | null;
1097
- change_seq: number;
1098
- flags: {
1099
- pending: boolean;
1100
- flagged: boolean;
1101
- note_locked: boolean;
1102
- status_locked: boolean;
1103
- rating_locked: boolean;
1104
- deleted: boolean;
1105
- };
1106
- rating: Ratings;
1107
- fav_count: number;
1108
- sources: Array<string>;
1109
- pools: Array<number>;
1110
- relationships: {
1111
- parent_id: number | null;
1112
- has_children: boolean;
1113
- has_active_children: boolean;
1114
- children: Array<number>;
1115
- };
1116
- approver_id: number | null;
1117
- uploader_id: number;
1118
- description: string;
1119
- comment_count: number;
1120
- is_favorited: boolean;
1121
- has_notes: boolean;
1122
- duration: number | null;
1123
- uploader_name: string;
1124
- vote: -1 | 0 | 1;
1125
- };
1126
- export type BasicPost = Post & {
1127
- tags: Array<string>;
1128
- };
1129
- export type ExtendedPost = Post & {
1130
- tags: {
1131
- general: Array<string>;
1132
- artist: Array<string>;
1133
- contributor: Array<string>;
1134
- copyright: Array<string>;
1135
- character: Array<string>;
1136
- species: Array<string>;
1137
- invalid: Array<string>;
1138
- meta: Array<string>;
1139
- lore: Array<string>;
1140
- };
1141
- };
1142
- export type ExceptionLog = {
1143
- id: number;
1144
- created_at: string;
1145
- updated_at: string;
1146
- class_name: string;
1147
- version: string;
1148
- extra_params: {
1149
- [key: string]: unknown;
1150
- };
1151
- message: string;
1152
- trace: string;
1153
- code: string;
1154
- user_id: number;
1155
- };
1156
- export type Appeal = {
1157
- id: number;
1158
- creator_id?: number;
1159
- disp_id: string;
1160
- qtype: 'flag';
1161
- status: 'pending' | 'partial' | 'approved' | 'rejected';
1162
- reason?: string;
1163
- response?: string;
1164
- claimant_id?: number | null;
1165
- handler_id: number | null;
1166
- accused_id?: number;
1167
- created_at: string;
1168
- updated_at: string;
1169
- };
1170
- export type DbExport = {
1171
- name: DbExportNames;
1172
- file_name: string;
1173
- file_size: number;
1174
- updated_at: string;
1175
- url: string;
1176
- /**
1177
- * SHA-256
1178
- */
1179
- checksum: string;
1180
- };
1181
- export type DbExportNames = 'artists' | 'bulk_update_requests' | 'pools' | 'post_replacements' | 'posts' | 'post_versions' | 'tag_aliases' | 'tag_implications' | 'tags' | 'wiki_pages';
1182
- export type UserLevels = 0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80;
1183
- export type UserLevelsNames = 'Anonymous' | 'Blocked' | 'Member' | 'Privileged' | 'Former Staff' | 'Staff' | 'Janitor' | 'Moderator' | 'Admin';
1184
- export type StaffFile = {
1185
- id: number;
1186
- creator_id: number;
1187
- storage_id: string;
1188
- md5: string;
1189
- file_ext: string;
1190
- file_size: number;
1191
- original_filename: string;
1192
- title: string;
1193
- description: string | null;
1194
- created_at: string;
1195
- updated_at: string;
1408
+ export type UserAvatarMenu = {
1409
+ has_uploads: boolean;
1410
+ has_favorites: boolean;
1411
+ has_sets: boolean;
1412
+ has_comments: boolean;
1413
+ has_forums: boolean;
1196
1414
  };
1197
- export type StaffWiki = {
1415
+ export type UserFeedback = {
1198
1416
  id: number;
1417
+ user_id: number;
1199
1418
  creator_id: number;
1200
- updater_id: number;
1201
- claimant_id: number | null;
1202
- title: string;
1419
+ category: UserFeedbackCategory;
1203
1420
  body: string;
1204
1421
  created_at: string;
1205
1422
  updated_at: string;
1423
+ updater_id: number;
1424
+ is_deleted: boolean;
1206
1425
  };
1207
- export type StaffWikiVersion = {
1426
+ export type UserNameChangeRequest = {
1208
1427
  id: number;
1209
- staff_wiki_id: number;
1210
- updater_id: number;
1211
- claimant_id: number | null;
1212
- title: string;
1213
- body: string;
1428
+ approver_id: number;
1429
+ user_id: number;
1430
+ original_name: string;
1431
+ desired_name: string;
1432
+ change_reason?: string;
1214
1433
  created_at: string;
1215
1434
  updated_at: string;
1435
+ status: 'approved';
1216
1436
  };
1217
1437
  export type VoteTrend = Tag | VoteTrendMetatag | VoteTrendUploader;
1218
1438
  export type VoteTrendMetatag = {
@@ -1227,43 +1447,120 @@ export type VoteTrendUploader = {
1227
1447
  uploader_id: number;
1228
1448
  uploader: User;
1229
1449
  };
1450
+ export type WarningRecordType = {
1451
+ record_type: 'unmark' | 'ban' | 'record' | 'warning';
1452
+ };
1453
+ export type WikiPage = {
1454
+ id: number;
1455
+ created_at: string;
1456
+ updated_at: string;
1457
+ title: string;
1458
+ body: string;
1459
+ creator_id: number;
1460
+ is_locked: boolean;
1461
+ updater_id: number;
1462
+ is_deleted: boolean;
1463
+ other_names: Array<string>;
1464
+ parent: string | null;
1465
+ creator_name: string;
1466
+ category_id: TagCategory;
1467
+ featured_posts?: Array<number>;
1468
+ };
1469
+ export type WikiPageVersion = {
1470
+ id: number;
1471
+ created_at: string;
1472
+ updated_at: string;
1473
+ title: string;
1474
+ body: string;
1475
+ updater_id: number;
1476
+ wiki_page_id: number;
1477
+ is_locked: boolean;
1478
+ other_names: Array<string>;
1479
+ is_deleted: boolean;
1480
+ reason: string | null;
1481
+ parent: string | null;
1482
+ featured_posts?: Array<number>;
1483
+ };
1484
+ export type AccessDeniedResponse = {
1485
+ success: boolean;
1486
+ reason: 'Access Denied';
1487
+ };
1488
+ export type DTextResponse = {
1489
+ html: string;
1490
+ posts: DeferredPost;
1491
+ };
1492
+ export type IQDBResponse = {
1493
+ hash: string;
1494
+ post_id: number;
1495
+ score: number;
1496
+ post: {
1497
+ posts: IQDBPost;
1498
+ };
1499
+ };
1500
+ export type IQDBResponseV2 = {
1501
+ hash: string;
1502
+ post_id: number;
1503
+ score: number;
1504
+ post: BasicPost;
1505
+ };
1506
+ export type MessageErrorResponse = {
1507
+ success: boolean;
1508
+ message: string;
1509
+ code?: string | null;
1510
+ };
1511
+ export type MessageSuccessResponse = {
1512
+ success: true;
1513
+ message: string;
1514
+ };
1515
+ export type NotFoundResponse = {
1516
+ success: boolean;
1517
+ reason: 'not found';
1518
+ };
1519
+ export type OAuthError = {
1520
+ /**
1521
+ * OAuth 2.0 error code (RFC 6749 §5.2 / RFC 6750 §3), e.g. `invalid_token`.
1522
+ */
1523
+ error: string;
1524
+ error_description?: string;
1525
+ state?: string;
1526
+ };
1230
1527
  /**
1231
1528
  * Search for a specific id. Multiple can be separated by commas, up to 320.
1232
1529
  */
1233
- export type IdQuery = string | number;
1530
+ export type idQuery = string | number;
1234
1531
  /**
1235
1532
  * The maximum number of results to return. Between 0 and 320.
1236
1533
  */
1237
- export type LimitQuery = number;
1534
+ export type limitQuery = number;
1238
1535
  /**
1239
1536
  * The page number of results to get. Between 1 and 750.
1240
1537
  */
1241
- export type PageQuery = number;
1538
+ export type pageQuery = number;
1242
1539
  /**
1243
1540
  * Must be Admin+ to use. See [the PostgreSQL documentation](https://www.postgresql.org/docs/9.3/functions-net.html) for information on how this is parsed. Specifically, "is contained within or equals" (`<<=`).
1244
1541
  */
1245
- export type IpAddrQuery = string;
1542
+ export type ipAddrQuery = string;
1246
1543
  /**
1247
1544
  * The order of the results.
1248
1545
  */
1249
- export type OrderQuery = 'id_asc' | 'id_desc';
1546
+ export type orderQuery = 'id_asc' | 'id_desc';
1250
1547
  /**
1251
1548
  * Use the new V2 format. See the `v2=true` responses.
1252
1549
  */
1253
- export type V2Query = boolean;
1550
+ export type v2Query = boolean;
1254
1551
  /**
1255
1552
  * Set the mode for the V2 format. Ignored if `v2` is not set or false. See the `v2=true` responses.
1256
1553
  */
1257
- export type ModeQuery = 'basic' | 'extended' | 'thumbnail';
1554
+ export type modeQuery = 'basic' | 'extended' | 'thumbnail';
1258
1555
  /**
1259
1556
  * The ID of the item.
1260
1557
  */
1261
- export type IdPath = number;
1558
+ export type idPath = number;
1262
1559
  /**
1263
1560
  * An ID that can be either an integer or a name.
1264
1561
  */
1265
- export type IdOrNamePath = number | string;
1266
- export type Warning = WarningRecordType;
1562
+ export type idOrNamePath = number | string;
1563
+ export type warning = WarningRecordType;
1267
1564
  export type ApiKeysIndexData = {
1268
1565
  body?: never;
1269
1566
  path?: never;
@@ -1301,7 +1598,7 @@ export type ApiKeysIndexResponses = {
1301
1598
  /**
1302
1599
  * Success
1303
1600
  */
1304
- 200: Array<ApiKey>;
1601
+ 200: Array<APIKey>;
1305
1602
  };
1306
1603
  export type ApiKeysIndexResponse = ApiKeysIndexResponses[keyof ApiKeysIndexResponses];
1307
1604
  export type ApiKeysCreateData = {
@@ -1335,7 +1632,7 @@ export type ApiKeysCreateResponses = {
1335
1632
  /**
1336
1633
  * Success
1337
1634
  */
1338
- 201: ApiKey;
1635
+ 201: APIKey;
1339
1636
  };
1340
1637
  export type ApiKeysCreateResponse = ApiKeysCreateResponses[keyof ApiKeysCreateResponses];
1341
1638
  export type ApiKeysDestroyData = {
@@ -1400,7 +1697,7 @@ export type ApiKeysRegenerateResponses = {
1400
1697
  /**
1401
1698
  * Success
1402
1699
  */
1403
- 201: ApiKey;
1700
+ 201: APIKey;
1404
1701
  };
1405
1702
  export type ApiKeysRegenerateResponse = ApiKeysRegenerateResponses[keyof ApiKeysRegenerateResponses];
1406
1703
  export type AppealsIndexData = {
@@ -1447,8 +1744,8 @@ export type AppealsIndexData = {
1447
1744
  * Must be Janitor+.
1448
1745
  */
1449
1746
  'search[accused_name]'?: string;
1450
- 'search[qtype]'?: 'flag';
1451
- 'search[status]'?: ('pending' | 'partial' | 'approved' | 'rejected') & ('pending_claimed' | 'pending_unclaimed');
1747
+ 'search[qtype]'?: AppealType;
1748
+ 'search[status]'?: AppealStatus & ('pending_claimed' | 'pending_unclaimed');
1452
1749
  };
1453
1750
  url: '/appeals.json';
1454
1751
  };
@@ -1467,7 +1764,7 @@ export type AppealsIndexResponses = {
1467
1764
  /**
1468
1765
  * Success
1469
1766
  */
1470
- 200: Array<ApiKey>;
1767
+ 200: Array<APIKey>;
1471
1768
  };
1472
1769
  export type AppealsIndexResponse = AppealsIndexResponses[keyof AppealsIndexResponses];
1473
1770
  export type AppealsShowData = {
@@ -1630,7 +1927,7 @@ export type ArtistsIndexResponses = {
1630
1927
  * Success
1631
1928
  */
1632
1929
  200: Array<Artist & {
1633
- urls: Array<ArtistUrl>;
1930
+ urls: Array<ArtistURL>;
1634
1931
  }>;
1635
1932
  };
1636
1933
  export type ArtistsIndexResponse = ArtistsIndexResponses[keyof ArtistsIndexResponses];
@@ -1728,7 +2025,7 @@ export type ArtistsShowResponses = {
1728
2025
  */
1729
2026
  200: Artist & {
1730
2027
  domains: Array<Array<string | number>>;
1731
- urls: Array<ArtistUrl>;
2028
+ urls: Array<ArtistURL>;
1732
2029
  };
1733
2030
  };
1734
2031
  export type ArtistsShowResponse = ArtistsShowResponses[keyof ArtistsShowResponses];
@@ -1940,7 +2237,7 @@ export type ArtistUrlsIndexResponses = {
1940
2237
  /**
1941
2238
  * Success
1942
2239
  */
1943
- 200: Array<ArtistUrl & {
2240
+ 200: Array<ArtistURL & {
1944
2241
  artist: Artist;
1945
2242
  }>;
1946
2243
  };
@@ -2563,7 +2860,7 @@ export type BlipsUndeleteErrors = {
2563
2860
  };
2564
2861
  export type BlipsUndeleteError = BlipsUndeleteErrors[keyof BlipsUndeleteErrors];
2565
2862
  export type BlipsWarningData = {
2566
- body?: Warning;
2863
+ body?: warning;
2567
2864
  path: {
2568
2865
  /**
2569
2866
  * The ID of the item.
@@ -2823,6 +3120,9 @@ export type CommentsIndexData = {
2823
3120
  * Accepts a comma separated list.
2824
3121
  */
2825
3122
  'search[post_id]'?: string;
3123
+ /**
3124
+ * Only usable by Member+
3125
+ */
2826
3126
  'search[post_tags_match]'?: string;
2827
3127
  'search[post_note_updater_name]'?: string;
2828
3128
  'search[post_note_updater_id]'?: number;
@@ -2985,6 +3285,31 @@ export type CommentsUpdateResponses = {
2985
3285
  204: void;
2986
3286
  };
2987
3287
  export type CommentsUpdateResponse = CommentsUpdateResponses[keyof CommentsUpdateResponses];
3288
+ export type CommentsForPostData = {
3289
+ body?: never;
3290
+ path: {
3291
+ /**
3292
+ * The ID of the item.
3293
+ */
3294
+ id: number;
3295
+ };
3296
+ query?: never;
3297
+ url: '/comments/{id}/for_post.json';
3298
+ };
3299
+ export type CommentsForPostErrors = {
3300
+ /**
3301
+ * Not Found
3302
+ */
3303
+ 404: NotFoundResponse;
3304
+ };
3305
+ export type CommentsForPostError = CommentsForPostErrors[keyof CommentsForPostErrors];
3306
+ export type CommentsForPostResponses = {
3307
+ /**
3308
+ * Success
3309
+ */
3310
+ 200: DTextResponse;
3311
+ };
3312
+ export type CommentsForPostResponse = CommentsForPostResponses[keyof CommentsForPostResponses];
2988
3313
  export type CommentsHideData = {
2989
3314
  body?: never;
2990
3315
  path: {
@@ -3044,7 +3369,7 @@ export type CommentsUnhideResponses = {
3044
3369
  };
3045
3370
  export type CommentsUnhideResponse = CommentsUnhideResponses[keyof CommentsUnhideResponses];
3046
3371
  export type CommentsWarningData = {
3047
- body?: Warning;
3372
+ body?: warning;
3048
3373
  path: {
3049
3374
  /**
3050
3375
  * The ID of the item.
@@ -3271,7 +3596,7 @@ export type DbExportsIndexResponses = {
3271
3596
  /**
3272
3597
  * Success
3273
3598
  */
3274
- 200: Array<DbExport>;
3599
+ 200: Array<DBExport>;
3275
3600
  };
3276
3601
  export type DbExportsIndexResponse = DbExportsIndexResponses[keyof DbExportsIndexResponses];
3277
3602
  export type HealthIndexData = {
@@ -3287,6 +3612,206 @@ export type HealthIndexResponses = {
3287
3612
  200: string;
3288
3613
  };
3289
3614
  export type HealthIndexResponse = HealthIndexResponses[keyof HealthIndexResponses];
3615
+ export type RailsHealthShowData = {
3616
+ body?: never;
3617
+ path?: never;
3618
+ query?: never;
3619
+ url: '/status.json';
3620
+ };
3621
+ export type RailsHealthShowResponses = {
3622
+ /**
3623
+ * Success
3624
+ */
3625
+ 200: {
3626
+ status: 'up';
3627
+ timestamp: string;
3628
+ };
3629
+ };
3630
+ export type RailsHealthShowResponse = RailsHealthShowResponses[keyof RailsHealthShowResponses];
3631
+ export type DoorkeeperOpenidConnectDiscoveryProviderData = {
3632
+ body?: never;
3633
+ path?: never;
3634
+ query?: never;
3635
+ url: '/.well-known/openid-configuration';
3636
+ };
3637
+ export type DoorkeeperOpenidConnectDiscoveryProviderResponses = {
3638
+ /**
3639
+ * Success
3640
+ */
3641
+ 200: OpenIDConfiguration;
3642
+ };
3643
+ export type DoorkeeperOpenidConnectDiscoveryProviderResponse = DoorkeeperOpenidConnectDiscoveryProviderResponses[keyof DoorkeeperOpenidConnectDiscoveryProviderResponses];
3644
+ export type DoorkeeperOpenidConnectDiscoveryKeysData = {
3645
+ body?: never;
3646
+ path?: never;
3647
+ query?: never;
3648
+ url: '/oauth/discovery/keys';
3649
+ };
3650
+ export type DoorkeeperOpenidConnectDiscoveryKeysResponses = {
3651
+ /**
3652
+ * Success
3653
+ */
3654
+ 200: JWKS;
3655
+ };
3656
+ export type DoorkeeperOpenidConnectDiscoveryKeysResponse = DoorkeeperOpenidConnectDiscoveryKeysResponses[keyof DoorkeeperOpenidConnectDiscoveryKeysResponses];
3657
+ export type DoorkeeperOpenidConnectUserinfoShowData = {
3658
+ body?: never;
3659
+ path?: never;
3660
+ query?: never;
3661
+ url: '/oauth/userinfo';
3662
+ };
3663
+ export type DoorkeeperOpenidConnectUserinfoShowErrors = {
3664
+ /**
3665
+ * The access token is missing, expired, or revoked.
3666
+ */
3667
+ 401: OAuthError;
3668
+ };
3669
+ export type DoorkeeperOpenidConnectUserinfoShowError = DoorkeeperOpenidConnectUserinfoShowErrors[keyof DoorkeeperOpenidConnectUserinfoShowErrors];
3670
+ export type DoorkeeperOpenidConnectUserinfoShowResponses = {
3671
+ /**
3672
+ * Success
3673
+ */
3674
+ 200: OAuthUserInfo;
3675
+ };
3676
+ export type DoorkeeperOpenidConnectUserinfoShowResponse = DoorkeeperOpenidConnectUserinfoShowResponses[keyof DoorkeeperOpenidConnectUserinfoShowResponses];
3677
+ export type DoorkeeperTokensCreateData = {
3678
+ body?: {
3679
+ grant_type: 'authorization_code' | 'refresh_token';
3680
+ /**
3681
+ * Required for the `authorization_code` grant type.
3682
+ */
3683
+ code?: string;
3684
+ /**
3685
+ * Required for the `authorization_code` grant type. Must match the `redirect_uri` used to obtain `code`.
3686
+ */
3687
+ redirect_uri?: string;
3688
+ /**
3689
+ * Required for the `authorization_code` grant type (PKCE is enforced).
3690
+ */
3691
+ code_verifier?: string;
3692
+ /**
3693
+ * Required for the `refresh_token` grant type.
3694
+ */
3695
+ refresh_token?: string;
3696
+ /**
3697
+ * Space-separated list of scopes to narrow the token to. Only used by the `refresh_token` grant type.
3698
+ */
3699
+ scope?: string;
3700
+ /**
3701
+ * Required unless authenticating via HTTP Basic Auth instead.
3702
+ */
3703
+ client_id?: string;
3704
+ /**
3705
+ * Required unless authenticating via HTTP Basic Auth instead, or the client is public.
3706
+ */
3707
+ client_secret?: string;
3708
+ };
3709
+ path?: never;
3710
+ query?: never;
3711
+ url: '/oauth/token';
3712
+ };
3713
+ export type DoorkeeperTokensCreateErrors = {
3714
+ /**
3715
+ * Invalid request, client, grant, or scope.
3716
+ */
3717
+ 400: OAuthError;
3718
+ /**
3719
+ * Client authentication failed.
3720
+ */
3721
+ 401: OAuthError;
3722
+ };
3723
+ export type DoorkeeperTokensCreateError = DoorkeeperTokensCreateErrors[keyof DoorkeeperTokensCreateErrors];
3724
+ export type DoorkeeperTokensCreateResponses = {
3725
+ /**
3726
+ * Success
3727
+ */
3728
+ 200: OAuthToken;
3729
+ };
3730
+ export type DoorkeeperTokensCreateResponse = DoorkeeperTokensCreateResponses[keyof DoorkeeperTokensCreateResponses];
3731
+ export type DoorkeeperTokensRevokeData = {
3732
+ body?: {
3733
+ /**
3734
+ * The access or refresh token to revoke.
3735
+ */
3736
+ token: string;
3737
+ token_type_hint?: 'access_token' | 'refresh_token';
3738
+ /**
3739
+ * Required unless authenticating via HTTP Basic Auth instead, or the token was issued without a client.
3740
+ */
3741
+ client_id?: string;
3742
+ /**
3743
+ * Required unless authenticating via HTTP Basic Auth instead, or the token was issued without a client.
3744
+ */
3745
+ client_secret?: string;
3746
+ };
3747
+ path?: never;
3748
+ query?: never;
3749
+ url: '/oauth/revoke';
3750
+ };
3751
+ export type DoorkeeperTokensRevokeErrors = {
3752
+ /**
3753
+ * The token was issued to a different client than the one making this request.
3754
+ */
3755
+ 403: OAuthError;
3756
+ };
3757
+ export type DoorkeeperTokensRevokeError = DoorkeeperTokensRevokeErrors[keyof DoorkeeperTokensRevokeErrors];
3758
+ export type DoorkeeperTokensRevokeResponses = {
3759
+ /**
3760
+ * Success
3761
+ */
3762
+ 200: {
3763
+ [key: string]: unknown;
3764
+ };
3765
+ };
3766
+ export type DoorkeeperTokensRevokeResponse = DoorkeeperTokensRevokeResponses[keyof DoorkeeperTokensRevokeResponses];
3767
+ export type DoorkeeperTokensIntrospectData = {
3768
+ body?: {
3769
+ /**
3770
+ * The access or refresh token to introspect.
3771
+ */
3772
+ token: string;
3773
+ token_type_hint?: 'access_token' | 'refresh_token';
3774
+ client_id?: string;
3775
+ client_secret?: string;
3776
+ };
3777
+ path?: never;
3778
+ query?: never;
3779
+ url: '/oauth/introspect';
3780
+ };
3781
+ export type DoorkeeperTokensIntrospectErrors = {
3782
+ /**
3783
+ * Client or bearer token authentication failed.
3784
+ */
3785
+ 401: OAuthError;
3786
+ };
3787
+ export type DoorkeeperTokensIntrospectError = DoorkeeperTokensIntrospectErrors[keyof DoorkeeperTokensIntrospectErrors];
3788
+ export type DoorkeeperTokensIntrospectResponses = {
3789
+ /**
3790
+ * Success. Note that an unrecognized, expired, or revoked token is reported as `{"active": false}`, not an error.
3791
+ */
3792
+ 200: OAuthIntrospection;
3793
+ };
3794
+ export type DoorkeeperTokensIntrospectResponse = DoorkeeperTokensIntrospectResponses[keyof DoorkeeperTokensIntrospectResponses];
3795
+ export type DoorkeeperTokenInfoShowData = {
3796
+ body?: never;
3797
+ path?: never;
3798
+ query?: never;
3799
+ url: '/oauth/token/info';
3800
+ };
3801
+ export type DoorkeeperTokenInfoShowErrors = {
3802
+ /**
3803
+ * The access token is missing, expired, or revoked.
3804
+ */
3805
+ 401: OAuthError;
3806
+ };
3807
+ export type DoorkeeperTokenInfoShowError = DoorkeeperTokenInfoShowErrors[keyof DoorkeeperTokenInfoShowErrors];
3808
+ export type DoorkeeperTokenInfoShowResponses = {
3809
+ /**
3810
+ * Success
3811
+ */
3812
+ 200: OAuthTokenInfo;
3813
+ };
3814
+ export type DoorkeeperTokenInfoShowResponse = DoorkeeperTokenInfoShowResponses[keyof DoorkeeperTokenInfoShowResponses];
3290
3815
  export type DmailsIndexData = {
3291
3816
  body?: never;
3292
3817
  path?: never;
@@ -3977,7 +4502,7 @@ export type ForumPostsUnhideResponses = {
3977
4502
  };
3978
4503
  export type ForumPostsUnhideResponse = ForumPostsUnhideResponses[keyof ForumPostsUnhideResponses];
3979
4504
  export type ForumPostsWarningData = {
3980
- body?: Warning;
4505
+ body?: warning;
3981
4506
  path: {
3982
4507
  /**
3983
4508
  * The ID of the item.
@@ -4077,7 +4602,7 @@ export type ForumPostVotesShowResponses = {
4077
4602
  export type ForumPostVotesShowResponse = ForumPostVotesShowResponses[keyof ForumPostVotesShowResponses];
4078
4603
  export type ForumPostVotesCreateData = {
4079
4604
  body?: {
4080
- score: UpDownMehVote;
4605
+ score: UpDownMehFlipVote;
4081
4606
  };
4082
4607
  path: {
4083
4608
  /**
@@ -4646,7 +5171,7 @@ export type IpBansIndexResponses = {
4646
5171
  /**
4647
5172
  * Success
4648
5173
  */
4649
- 200: Array<IpBan>;
5174
+ 200: Array<IPBan>;
4650
5175
  };
4651
5176
  export type IpBansIndexResponse = IpBansIndexResponses[keyof IpBansIndexResponses];
4652
5177
  export type IpBansCreateData = {
@@ -4675,7 +5200,7 @@ export type IpBansCreateResponses = {
4675
5200
  /**
4676
5201
  * Success
4677
5202
  */
4678
- 201: IpBan;
5203
+ 201: IPBan;
4679
5204
  };
4680
5205
  export type IpBansCreateResponse = IpBansCreateResponses[keyof IpBansCreateResponses];
4681
5206
  export type IpBansDestroyData = {
@@ -4733,12 +5258,7 @@ export type IqdbQueriesShowResponses = {
4733
5258
  /**
4734
5259
  * Success
4735
5260
  */
4736
- 200: Array<IqdbResponse> | Array<{
4737
- hash: string;
4738
- post_id: number;
4739
- score: number;
4740
- post: BasicPost;
4741
- }>;
5261
+ 200: Array<IQDBResponse> | Array<IQDBResponseV2>;
4742
5262
  };
4743
5263
  export type IqdbQueriesShowResponse = IqdbQueriesShowResponses[keyof IqdbQueriesShowResponses];
4744
5264
  export type IqdbQueriesShowPostData = {
@@ -4768,12 +5288,7 @@ export type IqdbQueriesShowPostResponses = {
4768
5288
  /**
4769
5289
  * Success
4770
5290
  */
4771
- 200: Array<IqdbResponse> | Array<{
4772
- hash: string;
4773
- post_id: number;
4774
- score: number;
4775
- post: BasicPost;
4776
- }>;
5291
+ 200: Array<IQDBResponse> | Array<IQDBResponseV2>;
4777
5292
  };
4778
5293
  export type IqdbQueriesShowPostResponse = IqdbQueriesShowPostResponses[keyof IqdbQueriesShowPostResponses];
4779
5294
  export type MascotsIndexData = {
@@ -4935,7 +5450,7 @@ export type ModActionsIndexData = {
4935
5450
  'search[order]'?: 'id_asc' | 'id_desc';
4936
5451
  'search[creator_id]'?: number;
4937
5452
  'search[creator_name]'?: string;
4938
- 'search[action]'?: ModActionActions;
5453
+ 'search[action]'?: ModActionAction;
4939
5454
  };
4940
5455
  url: '/mod_actions.json';
4941
5456
  };
@@ -5114,6 +5629,9 @@ export type NotesIndexData = {
5114
5629
  'search[body_matches]'?: string;
5115
5630
  'search[is_active]'?: boolean;
5116
5631
  'search[post_id]'?: number;
5632
+ /**
5633
+ * Only usable by Member+
5634
+ */
5117
5635
  'search[post_tags_match]'?: string;
5118
5636
  'search[post_note_updater_id]'?: number;
5119
5637
  'search[post_note_updater_name]'?: string;
@@ -5367,7 +5885,7 @@ export type PoolsIndexData = {
5367
5885
  'search[description_matches]'?: string;
5368
5886
  'search[creator_id]'?: number;
5369
5887
  'search[creator_name]'?: string;
5370
- 'search[category]'?: PoolCategories;
5888
+ 'search[category]'?: PoolCategory;
5371
5889
  'search[is_active]'?: boolean;
5372
5890
  };
5373
5891
  url: '/pools.json';
@@ -5383,7 +5901,7 @@ export type PoolsCreateData = {
5383
5901
  body?: {
5384
5902
  name: string;
5385
5903
  description?: string;
5386
- category?: PoolCategories;
5904
+ category?: PoolCategory;
5387
5905
  is_active?: boolean;
5388
5906
  /**
5389
5907
  * Space separated list of post IDs. Mutually exclusive with post_ids.
@@ -5477,7 +5995,7 @@ export type PoolsUpdateData = {
5477
5995
  name?: string;
5478
5996
  description?: string;
5479
5997
  is_active?: boolean;
5480
- category?: PoolCategories;
5998
+ category?: PoolCategory;
5481
5999
  /**
5482
6000
  * Space separated list of post IDs. Mutually exclusive with post_ids.
5483
6001
  */
@@ -5781,24 +6299,49 @@ export type PostsRandomData = {
5781
6299
  };
5782
6300
  url: '/posts/random.json';
5783
6301
  };
5784
- export type PostsRandomErrors = {
6302
+ export type PostsRandomErrors = {
6303
+ /**
6304
+ * Not Found
6305
+ */
6306
+ 404: NotFoundResponse;
6307
+ };
6308
+ export type PostsRandomError = PostsRandomErrors[keyof PostsRandomErrors];
6309
+ export type PostsRandomResponses = {
6310
+ /**
6311
+ * Success
6312
+ * if `v2=true`, open the schema and find the schema for the mode being used.
6313
+ *
6314
+ */
6315
+ 200: {
6316
+ post: LegacyPost;
6317
+ } | (BasicPost & unknown) | (ExtendedPost & unknown) | (ThumbnailPost & unknown);
6318
+ };
6319
+ export type PostsRandomResponse = PostsRandomResponses[keyof PostsRandomResponses];
6320
+ export type PostsCountData = {
6321
+ body?: never;
6322
+ path?: never;
6323
+ query: {
6324
+ tags: string;
6325
+ };
6326
+ url: '/posts/count.json';
6327
+ };
6328
+ export type PostsCountErrors = {
5785
6329
  /**
5786
- * Not Found
6330
+ * Error
5787
6331
  */
5788
- 404: NotFoundResponse;
6332
+ 400: MessageErrorResponse;
5789
6333
  };
5790
- export type PostsRandomError = PostsRandomErrors[keyof PostsRandomErrors];
5791
- export type PostsRandomResponses = {
6334
+ export type PostsCountError = PostsCountErrors[keyof PostsCountErrors];
6335
+ export type PostsCountResponses = {
5792
6336
  /**
5793
6337
  * Success
5794
- * if `v2=true`, open the schema and find the schema for the mode being used.
5795
- *
5796
6338
  */
5797
6339
  200: {
5798
- post: LegacyPost;
5799
- } | (BasicPost & unknown) | (ExtendedPost & unknown) | (ThumbnailPost & unknown);
6340
+ count: number;
6341
+ capped: boolean;
6342
+ };
5800
6343
  };
5801
- export type PostsRandomResponse = PostsRandomResponses[keyof PostsRandomResponses];
6344
+ export type PostsCountResponse = PostsCountResponses[keyof PostsCountResponses];
5802
6345
  export type PostsShowData = {
5803
6346
  body?: never;
5804
6347
  path: {
@@ -5867,8 +6410,8 @@ export type PostsUpdateData = {
5867
6410
  old_parent_id?: number;
5868
6411
  description?: string;
5869
6412
  old_description?: string;
5870
- rating?: Ratings;
5871
- old_rating?: Ratings;
6413
+ rating?: Rating;
6414
+ old_rating?: Rating;
5872
6415
  edit_reason?: string;
5873
6416
  /**
5874
6417
  * You must be Privileged+.
@@ -6565,6 +7108,35 @@ export type PostSetsUpdateResponses = {
6565
7108
  204: void;
6566
7109
  };
6567
7110
  export type PostSetsUpdateResponse = PostSetsUpdateResponses[keyof PostSetsUpdateResponses];
7111
+ export type PostSetsPostListData = {
7112
+ body?: never;
7113
+ path: {
7114
+ /**
7115
+ * The ID of the item.
7116
+ */
7117
+ id: number;
7118
+ };
7119
+ query?: never;
7120
+ url: '/post_sets/{id}/post_list.json';
7121
+ };
7122
+ export type PostSetsPostListErrors = {
7123
+ /**
7124
+ * Access Denied
7125
+ */
7126
+ 403: AccessDeniedResponse;
7127
+ /**
7128
+ * Not Found
7129
+ */
7130
+ 404: NotFoundResponse;
7131
+ };
7132
+ export type PostSetsPostListError = PostSetsPostListErrors[keyof PostSetsPostListErrors];
7133
+ export type PostSetsPostListResponses = {
7134
+ /**
7135
+ * Success
7136
+ */
7137
+ 200: PostSet;
7138
+ };
7139
+ export type PostSetsPostListResponse = PostSetsPostListResponses[keyof PostSetsPostListResponses];
6568
7140
  export type PostSetsUpdatePostsData = {
6569
7141
  body?: {
6570
7142
  post_ids_string: string;
@@ -6731,6 +7303,9 @@ export type PostApprovalsIndexData = {
6731
7303
  * The order of the results.
6732
7304
  */
6733
7305
  'search[order]'?: 'id_asc' | 'id_desc';
7306
+ /**
7307
+ * Only usable by Member+
7308
+ */
6734
7309
  'search[post_tags_match]'?: string;
6735
7310
  'search[user_id]'?: number;
6736
7311
  'search[user_name]'?: string;
@@ -6772,7 +7347,7 @@ export type PostEventsIndexData = {
6772
7347
  'search[post_id]'?: number;
6773
7348
  'search[creator_id]'?: number;
6774
7349
  'search[creator_name]'?: string;
6775
- 'search[action]'?: PostEventActions;
7350
+ 'search[action]'?: PostEventAction;
6776
7351
  };
6777
7352
  url: '/post_events.json';
6778
7353
  };
@@ -6813,6 +7388,9 @@ export type PostFlagsIndexData = {
6813
7388
  'search[creator_id]'?: number;
6814
7389
  'search[creator_name]'?: string;
6815
7390
  'search[post_id]'?: number;
7391
+ /**
7392
+ * Only usable by Member+
7393
+ */
6816
7394
  'search[post_tags_match]'?: string;
6817
7395
  'search[type]'?: string;
6818
7396
  'search[is_resolved]'?: boolean;
@@ -7174,6 +7752,41 @@ export type PostReplacementsTogglePenalizeResponses = {
7174
7752
  204: void;
7175
7753
  };
7176
7754
  export type PostReplacementsTogglePenalizeResponse = PostReplacementsTogglePenalizeResponses[keyof PostReplacementsTogglePenalizeResponses];
7755
+ export type PostReplacementsTransferData = {
7756
+ body?: {
7757
+ new_post_id: number;
7758
+ };
7759
+ path: {
7760
+ /**
7761
+ * The ID of the item.
7762
+ */
7763
+ id: number;
7764
+ };
7765
+ query?: never;
7766
+ url: '/post_replacements/{id}/transfer.json';
7767
+ };
7768
+ export type PostReplacementsTransferErrors = {
7769
+ /**
7770
+ * Access Denied
7771
+ */
7772
+ 403: AccessDeniedResponse;
7773
+ /**
7774
+ * Not Found
7775
+ */
7776
+ 404: NotFoundResponse;
7777
+ /**
7778
+ * Error
7779
+ */
7780
+ 412: MessageErrorResponse;
7781
+ };
7782
+ export type PostReplacementsTransferError = PostReplacementsTransferErrors[keyof PostReplacementsTransferErrors];
7783
+ export type PostReplacementsTransferResponses = {
7784
+ /**
7785
+ * Success
7786
+ */
7787
+ 204: void;
7788
+ };
7789
+ export type PostReplacementsTransferResponse = PostReplacementsTransferResponses[keyof PostReplacementsTransferResponses];
7177
7790
  export type PostVersionsIndexData = {
7178
7791
  body?: never;
7179
7792
  path?: never;
@@ -7194,7 +7807,7 @@ export type PostVersionsIndexData = {
7194
7807
  'search[updater_id]'?: number;
7195
7808
  'search[post_id]'?: number;
7196
7809
  'search[start_id]'?: number;
7197
- 'search[rating]'?: Ratings;
7810
+ 'search[rating]'?: Rating;
7198
7811
  'search[rating_changed]'?: 'e' | 'q' | 's' | 'any';
7199
7812
  'search[parent_id]'?: number;
7200
7813
  'search[parent_id_changed]'?: boolean;
@@ -7425,7 +8038,7 @@ export type TagsIndexData = {
7425
8038
  'search[fuzzy_name_matches]'?: string;
7426
8039
  'search[name_matches]'?: string;
7427
8040
  'search[name]'?: string;
7428
- 'search[category]'?: TagCategories;
8041
+ 'search[category]'?: TagCategory;
7429
8042
  'search[hide_empty]'?: boolean;
7430
8043
  'search[has_wiki]'?: boolean;
7431
8044
  'search[has_artist]'?: boolean;
@@ -7495,7 +8108,7 @@ export type TagsShowResponses = {
7495
8108
  export type TagsShowResponse = TagsShowResponses[keyof TagsShowResponses];
7496
8109
  export type TagsUpdateData = {
7497
8110
  body?: {
7498
- category?: TagCategories;
8111
+ category?: TagCategory;
7499
8112
  /**
7500
8113
  * Must be Admin+.
7501
8114
  */
@@ -7660,9 +8273,9 @@ export type TagAliasesIndexData = {
7660
8273
  'search[name_matches]'?: string;
7661
8274
  'search[antecedent_name]'?: string;
7662
8275
  'search[consequent_name]'?: string;
7663
- 'search[status]'?: TagRequestStatuses;
7664
- 'search[antecedent_tag_category]'?: TagCategories;
7665
- 'search[consequent_tag_category]'?: TagCategories;
8276
+ 'search[status]'?: TagRequestStatus;
8277
+ 'search[antecedent_tag_category]'?: TagCategory;
8278
+ 'search[consequent_tag_category]'?: TagCategory;
7666
8279
  'search[creator_id]'?: number;
7667
8280
  'search[creator_name]'?: string;
7668
8281
  'search[approver_id]'?: number;
@@ -7850,9 +8463,9 @@ export type TagImplicationsIndexData = {
7850
8463
  'search[name_matches]'?: string;
7851
8464
  'search[antecedent_name]'?: string;
7852
8465
  'search[consequent_name]'?: string;
7853
- 'search[status]'?: TagRequestStatuses;
7854
- 'search[antecedent_tag_category]'?: TagCategories;
7855
- 'search[consequent_tag_category]'?: TagCategories;
8466
+ 'search[status]'?: TagRequestStatus;
8467
+ 'search[antecedent_tag_category]'?: TagCategory;
8468
+ 'search[consequent_tag_category]'?: TagCategory;
7856
8469
  'search[creator_id]'?: number;
7857
8470
  'search[creator_name]'?: string;
7858
8471
  'search[approver_id]'?: number;
@@ -8023,7 +8636,7 @@ export type TagImplicationRequestsCreateError = TagImplicationRequestsCreateErro
8023
8636
  export type RelatedTagsBulkData = {
8024
8637
  body?: {
8025
8638
  query?: string;
8026
- category_id?: TagCategories;
8639
+ category_id?: TagCategory;
8027
8640
  };
8028
8641
  path?: never;
8029
8642
  query?: never;
@@ -8079,6 +8692,26 @@ export type SearchTrendsRisingResponses = {
8079
8692
  200: Array<RisingSearchTrend>;
8080
8693
  };
8081
8694
  export type SearchTrendsRisingResponse = SearchTrendsRisingResponses[keyof SearchTrendsRisingResponses];
8695
+ export type SearchTrendsTrackData = {
8696
+ body?: never;
8697
+ path?: never;
8698
+ query?: {
8699
+ /**
8700
+ * Up to 10 comma separated values.
8701
+ */
8702
+ tag?: string;
8703
+ };
8704
+ url: '/search_trends/track.json';
8705
+ };
8706
+ export type SearchTrendsTrackResponses = {
8707
+ /**
8708
+ * Dictionary of tag to trends.
8709
+ */
8710
+ 200: {
8711
+ [key: string]: Array<TrackedSearchTrend>;
8712
+ };
8713
+ };
8714
+ export type SearchTrendsTrackResponse = SearchTrendsTrackResponses[keyof SearchTrendsTrackResponses];
8082
8715
  export type SearchTrendsClearCacheData = {
8083
8716
  body?: never;
8084
8717
  path?: never;
@@ -8253,6 +8886,93 @@ export type SearchTrendBlacklistsDestroyResponses = {
8253
8886
  204: void;
8254
8887
  };
8255
8888
  export type SearchTrendBlacklistsDestroyResponse = SearchTrendBlacklistsDestroyResponses[keyof SearchTrendBlacklistsDestroyResponses];
8889
+ export type SearchTrendBlacklistsUpdateData = {
8890
+ body?: {
8891
+ tag?: string;
8892
+ reason?: string;
8893
+ };
8894
+ path: {
8895
+ /**
8896
+ * The ID of the item.
8897
+ */
8898
+ id: number;
8899
+ };
8900
+ query?: never;
8901
+ url: '/search_trend_blacklists/{id}.json';
8902
+ };
8903
+ export type SearchTrendBlacklistsUpdateErrors = {
8904
+ /**
8905
+ * Access Denied
8906
+ */
8907
+ 403: AccessDeniedResponse;
8908
+ /**
8909
+ * Invalid Input Data
8910
+ */
8911
+ 422: {
8912
+ errors: Array<string>;
8913
+ };
8914
+ };
8915
+ export type SearchTrendBlacklistsUpdateError = SearchTrendBlacklistsUpdateErrors[keyof SearchTrendBlacklistsUpdateErrors];
8916
+ export type SearchTrendBlacklistsUpdateResponses = {
8917
+ /**
8918
+ * Success
8919
+ */
8920
+ 204: void;
8921
+ };
8922
+ export type SearchTrendBlacklistsUpdateResponse = SearchTrendBlacklistsUpdateResponses[keyof SearchTrendBlacklistsUpdateResponses];
8923
+ export type SearchTrendHourliesIndexData = {
8924
+ body?: never;
8925
+ path?: never;
8926
+ query?: {
8927
+ /**
8928
+ * The maximum number of results to return. Between 0 and 320.
8929
+ */
8930
+ limit?: number;
8931
+ /**
8932
+ * The page number of results to get. Between 1 and 750.
8933
+ */
8934
+ page?: number;
8935
+ 'search[name_matches]'?: string;
8936
+ hour?: string;
8937
+ };
8938
+ url: '/search_trend_hourlies.json';
8939
+ };
8940
+ export type SearchTrendHourliesIndexErrors = {
8941
+ /**
8942
+ * Access Denied
8943
+ */
8944
+ 403: AccessDeniedResponse;
8945
+ };
8946
+ export type SearchTrendHourliesIndexError = SearchTrendHourliesIndexErrors[keyof SearchTrendHourliesIndexErrors];
8947
+ export type SearchTrendHourliesIndexResponses = {
8948
+ /**
8949
+ * Success
8950
+ */
8951
+ 200: Array<SearchTrendHourly>;
8952
+ };
8953
+ export type SearchTrendHourliesIndexResponse = SearchTrendHourliesIndexResponses[keyof SearchTrendHourliesIndexResponses];
8954
+ export type SessionsDestroyData = {
8955
+ body?: {
8956
+ /**
8957
+ * CSRF Token
8958
+ */
8959
+ authenticity_token: string;
8960
+ };
8961
+ path?: never;
8962
+ query?: never;
8963
+ url: '/session.json';
8964
+ };
8965
+ export type SessionsDestroyErrors = {
8966
+ /**
8967
+ * Access Denied
8968
+ */
8969
+ 403: AccessDeniedResponse;
8970
+ /**
8971
+ * Failure
8972
+ */
8973
+ 406: unknown;
8974
+ };
8975
+ export type SessionsDestroyError = SessionsDestroyErrors[keyof SessionsDestroyErrors];
8256
8976
  export type SessionsCreateData = {
8257
8977
  body?: {
8258
8978
  /**
@@ -8271,6 +8991,14 @@ export type SessionsCreateData = {
8271
8991
  url: '/session.json';
8272
8992
  };
8273
8993
  export type SessionsCreateErrors = {
8994
+ /**
8995
+ * Two-factor authentication required - verification required within 5 minutes
8996
+ */
8997
+ 401: {
8998
+ error: string;
8999
+ code: 'totp_required';
9000
+ url: string;
9001
+ };
8274
9002
  /**
8275
9003
  * Access Denied
8276
9004
  */
@@ -8281,6 +9009,61 @@ export type SessionsCreateErrors = {
8281
9009
  406: unknown;
8282
9010
  };
8283
9011
  export type SessionsCreateError = SessionsCreateErrors[keyof SessionsCreateErrors];
9012
+ export type SessionsCreateResponses = {
9013
+ /**
9014
+ * Success
9015
+ */
9016
+ 200: {
9017
+ error: string;
9018
+ code: 'totp_required';
9019
+ url: string;
9020
+ };
9021
+ };
9022
+ export type SessionsCreateResponse = SessionsCreateResponses[keyof SessionsCreateResponses];
9023
+ export type SessionsVerifyTotpData = {
9024
+ body?: {
9025
+ /**
9026
+ * CSRF Token
9027
+ */
9028
+ authenticity_token: string;
9029
+ /**
9030
+ * Code or backup code
9031
+ */
9032
+ 'totp[code]': string;
9033
+ };
9034
+ path?: never;
9035
+ query?: never;
9036
+ url: '/session/verify_totp.json';
9037
+ };
9038
+ export type SessionsVerifyTotpErrors = {
9039
+ /**
9040
+ * Challenge expired or code incorrect
9041
+ */
9042
+ 401: {
9043
+ error: string;
9044
+ code?: 'challenge_expired';
9045
+ };
9046
+ /**
9047
+ * Access Denied
9048
+ */
9049
+ 403: AccessDeniedResponse;
9050
+ /**
9051
+ * Ratelimited
9052
+ */
9053
+ 429: {
9054
+ error: string;
9055
+ };
9056
+ };
9057
+ export type SessionsVerifyTotpError = SessionsVerifyTotpErrors[keyof SessionsVerifyTotpErrors];
9058
+ export type SessionsVerifyTotpResponses = {
9059
+ /**
9060
+ * Success
9061
+ */
9062
+ 200: {
9063
+ url: string;
9064
+ };
9065
+ };
9066
+ export type SessionsVerifyTotpResponse = SessionsVerifyTotpResponses[keyof SessionsVerifyTotpResponses];
8284
9067
  export type StaffNotesIndexData = {
8285
9068
  body?: never;
8286
9069
  path?: never;
@@ -8879,7 +9662,7 @@ export type TicketsIndexData = {
8879
9662
  * You must be Staff+.
8880
9663
  */
8881
9664
  'search[disp_id]'?: number;
8882
- 'search[qtype]'?: TicketTypes;
9665
+ 'search[qtype]'?: TicketType;
8883
9666
  /**
8884
9667
  * You must be Staff+.
8885
9668
  */
@@ -8935,7 +9718,7 @@ export type TicketsUpdateData = {
8935
9718
  body?: {
8936
9719
  status?: 'partial' | 'approved';
8937
9720
  response: string;
8938
- record_type?: WarningTypes;
9721
+ record_type?: WarningType;
8939
9722
  /**
8940
9723
  * An update dmail will always be sent when the status is changed.
8941
9724
  */
@@ -9050,7 +9833,7 @@ export type UploadsIndexData = {
9050
9833
  'search[uploader_name]'?: string;
9051
9834
  'search[source]'?: string;
9052
9835
  'search[source_matches]'?: string;
9053
- 'search[rating]'?: Ratings;
9836
+ 'search[rating]'?: Rating;
9054
9837
  'search[parent_id]'?: number;
9055
9838
  'search[post_id]'?: number;
9056
9839
  'search[has_post]'?: boolean;
@@ -9084,7 +9867,7 @@ export type UploadsCreateData = {
9084
9867
  'upload[direct_url]'?: string;
9085
9868
  'upload[source]'?: string;
9086
9869
  'upload[tag_string]': string;
9087
- 'upload[rating]': Ratings;
9870
+ 'upload[rating]': Rating;
9088
9871
  'upload[parent_id]'?: number;
9089
9872
  'upload[description]'?: string;
9090
9873
  /**
@@ -9346,14 +10129,20 @@ export type UsersIndexData = {
9346
10129
  * Must be Admin+ to use. See [the PostgreSQL documentation](https://www.postgresql.org/docs/9.3/functions-net.html) for information on how this is parsed. Specifically, "is contained within or equals" (`<<=`).
9347
10130
  */
9348
10131
  'search[ip_addr]'?: string;
9349
- 'search[order]'?: 'id_asc' | 'id_desc' | 'name' | 'post_upload_count' | 'note_count' | 'post_update_count';
10132
+ 'search[order]'?: 'id_asc' | 'id_desc' | 'name' | 'post_upload_count' | 'note_count' | 'post_update_count' | 'upload_karma';
9350
10133
  'search[name_matches]'?: string;
9351
10134
  'search[about_me]'?: string;
9352
10135
  'search[avatar_id]'?: number;
9353
- 'search[level]'?: UserLevels;
9354
- 'search[min_level]'?: UserLevels;
9355
- 'search[max_level]'?: UserLevels;
10136
+ 'search[level]'?: UserLevel;
10137
+ 'search[min_level]'?: UserLevel;
10138
+ 'search[max_level]'?: UserLevel;
9356
10139
  'search[can_upload_free]'?: boolean;
10140
+ /**
10141
+ * Only permitted if `upload_karma_free_threshold` != nil
10142
+ * Always true in prod.
10143
+ *
10144
+ */
10145
+ 'search[can_karma_free]'?: boolean;
9357
10146
  'search[can_approve_posts]'?: boolean;
9358
10147
  /**
9359
10148
  * You must be Admin+.
@@ -9402,6 +10191,24 @@ export type UsersAvatarMenuResponses = {
9402
10191
  200: UserAvatarMenu;
9403
10192
  };
9404
10193
  export type UsersAvatarMenuResponse = UsersAvatarMenuResponses[keyof UsersAvatarMenuResponses];
10194
+ export type UsersCustomStyleData = {
10195
+ body?: never;
10196
+ path?: never;
10197
+ query?: never;
10198
+ url: '/users/custom_style.css';
10199
+ };
10200
+ export type UsersCustomStyleErrors = {
10201
+ /**
10202
+ * Not Logged In
10203
+ */
10204
+ 406: unknown;
10205
+ };
10206
+ export type UsersCustomStyleResponses = {
10207
+ /**
10208
+ * Success
10209
+ */
10210
+ 200: unknown;
10211
+ };
9405
10212
  export type UsersShowData = {
9406
10213
  body?: never;
9407
10214
  path: {
@@ -9571,7 +10378,7 @@ export type UsersToggleUploadsData = {
9571
10378
  idOrName: number | string;
9572
10379
  };
9573
10380
  query?: never;
9574
- url: '/users/{idOrName}/toggle_uploads.json';
10381
+ url: '/users/{idOrName}/toggle_uploads';
9575
10382
  };
9576
10383
  export type UsersToggleUploadsErrors = {
9577
10384
  /**
@@ -9584,9 +10391,55 @@ export type UsersToggleUploadsErrors = {
9584
10391
  404: NotFoundResponse;
9585
10392
  };
9586
10393
  export type UsersToggleUploadsError = UsersToggleUploadsErrors[keyof UsersToggleUploadsErrors];
10394
+ export type UsersToggleKarmaFreeData = {
10395
+ body?: never;
10396
+ path: {
10397
+ /**
10398
+ * An ID that can be either an integer or a name.
10399
+ */
10400
+ idOrName: number | string;
10401
+ };
10402
+ query?: never;
10403
+ url: '/users/{idOrName}/toggle_karma_free';
10404
+ };
10405
+ export type UsersToggleKarmaFreeErrors = {
10406
+ /**
10407
+ * Access Denied
10408
+ */
10409
+ 403: AccessDeniedResponse;
10410
+ /**
10411
+ * Not Found
10412
+ */
10413
+ 404: NotFoundResponse;
10414
+ };
10415
+ export type UsersToggleKarmaFreeError = UsersToggleKarmaFreeErrors[keyof UsersToggleKarmaFreeErrors];
9587
10416
  export type UsersDisableUploadsData = {
9588
10417
  body?: {
9589
- body: string;
10418
+ 'staff_note[body]': string;
10419
+ };
10420
+ path: {
10421
+ /**
10422
+ * An ID that can be either an integer or a name.
10423
+ */
10424
+ idOrName: number | string;
10425
+ };
10426
+ query?: never;
10427
+ url: '/users/{idOrName}/disable_uploads';
10428
+ };
10429
+ export type UsersDisableUploadsErrors = {
10430
+ /**
10431
+ * Access Denied
10432
+ */
10433
+ 403: AccessDeniedResponse;
10434
+ /**
10435
+ * Not Found
10436
+ */
10437
+ 404: NotFoundResponse;
10438
+ };
10439
+ export type UsersDisableUploadsError = UsersDisableUploadsErrors[keyof UsersDisableUploadsErrors];
10440
+ export type UsersDisableKarmaFreeData = {
10441
+ body?: {
10442
+ 'staff_note[body]': string;
9590
10443
  };
9591
10444
  path: {
9592
10445
  /**
@@ -9595,9 +10448,28 @@ export type UsersDisableUploadsData = {
9595
10448
  idOrName: number | string;
9596
10449
  };
9597
10450
  query?: never;
9598
- url: '/users/{idOrName}/disable_uploads.json';
10451
+ url: '/users/{idOrName}/disable_karma_free';
10452
+ };
10453
+ export type UsersDisableKarmaFreeErrors = {
10454
+ /**
10455
+ * Access Denied
10456
+ */
10457
+ 403: AccessDeniedResponse;
10458
+ /**
10459
+ * Not Found
10460
+ */
10461
+ 404: NotFoundResponse;
10462
+ };
10463
+ export type UsersDisableKarmaFreeError = UsersDisableKarmaFreeErrors[keyof UsersDisableKarmaFreeErrors];
10464
+ export type UserRevertsCreateData = {
10465
+ body?: {
10466
+ user_id: number;
10467
+ };
10468
+ path?: never;
10469
+ query?: never;
10470
+ url: '/user_reverts';
9599
10471
  };
9600
- export type UsersDisableUploadsErrors = {
10472
+ export type UserRevertsCreateErrors = {
9601
10473
  /**
9602
10474
  * Access Denied
9603
10475
  */
@@ -9607,7 +10479,7 @@ export type UsersDisableUploadsErrors = {
9607
10479
  */
9608
10480
  404: NotFoundResponse;
9609
10481
  };
9610
- export type UsersDisableUploadsError = UsersDisableUploadsErrors[keyof UsersDisableUploadsErrors];
10482
+ export type UserRevertsCreateError = UserRevertsCreateErrors[keyof UserRevertsCreateErrors];
9611
10483
  export type MaintenanceUserCountFixesCreateData = {
9612
10484
  body?: never;
9613
10485
  path?: never;
@@ -9703,7 +10575,7 @@ export type UserFeedbacksIndexData = {
9703
10575
  'search[user_name]'?: string;
9704
10576
  'search[creator_id]'?: number;
9705
10577
  'search[creator_name]'?: string;
9706
- 'search[category]'?: FeedbackCategories;
10578
+ 'search[category]'?: UserFeedbackCategory;
9707
10579
  };
9708
10580
  url: '/user_feedbacks.json';
9709
10581
  };
@@ -9719,7 +10591,7 @@ export type UserFeedbacksCreateData = {
9719
10591
  user_id?: number;
9720
10592
  user_name?: string;
9721
10593
  body: string;
9722
- category: FeedbackCategories;
10594
+ category: UserFeedbackCategory;
9723
10595
  };
9724
10596
  path?: never;
9725
10597
  query?: never;
@@ -9806,7 +10678,7 @@ export type UserFeedbacksShowResponse = UserFeedbacksShowResponses[keyof UserFee
9806
10678
  export type UserFeedbacksUpdateData = {
9807
10679
  body?: {
9808
10680
  body?: string;
9809
- category?: FeedbackCategories;
10681
+ category?: UserFeedbackCategory;
9810
10682
  };
9811
10683
  path: {
9812
10684
  /**
@@ -10167,7 +11039,7 @@ export type WikiPagesUpdateData = {
10167
11039
  * Must be Staff+ to use.
10168
11040
  */
10169
11041
  skip_secondary_validations?: boolean;
10170
- category_id?: TagCategories;
11042
+ category_id?: TagCategory;
10171
11043
  /**
10172
11044
  * Must be Admin+ to use.
10173
11045
  */
@@ -10340,7 +11212,7 @@ export type StaffUsersUpdateData = {
10340
11212
  * Must have the bd staff user flag to use.
10341
11213
  */
10342
11214
  verified?: boolean;
10343
- level?: UserLevels;
11215
+ level?: UserLevel;
10344
11216
  name?: string;
10345
11217
  profile_about?: string;
10346
11218
  profile_artinfo?: string;
@@ -10355,6 +11227,8 @@ export type StaffUsersUpdateData = {
10355
11227
  no_flagging?: boolean;
10356
11228
  replacements_beta?: boolean;
10357
11229
  custom_title?: string;
11230
+ tag_warden?: boolean;
11231
+ raised_favorite_limit?: boolean;
10358
11232
  };
10359
11233
  path: {
10360
11234
  /**
@@ -10401,7 +11275,7 @@ export type StaffUsersAnonymizeConfirmData = {
10401
11275
  id: number;
10402
11276
  };
10403
11277
  query?: never;
10404
- url: '/staff/users/{id}/anonymize.json';
11278
+ url: '/staff/users/{id}/anonymize_confirm';
10405
11279
  };
10406
11280
  export type StaffUsersAnonymizeConfirmErrors = {
10407
11281
  /**
@@ -10410,6 +11284,50 @@ export type StaffUsersAnonymizeConfirmErrors = {
10410
11284
  404: NotFoundResponse;
10411
11285
  };
10412
11286
  export type StaffUsersAnonymizeConfirmError = StaffUsersAnonymizeConfirmErrors[keyof StaffUsersAnonymizeConfirmErrors];
11287
+ export type StaffUsersTotpResetData = {
11288
+ body?: never;
11289
+ path: {
11290
+ /**
11291
+ * The ID of the item.
11292
+ */
11293
+ id: number;
11294
+ };
11295
+ query?: never;
11296
+ url: '/staff/users/{id}/totp_reset';
11297
+ };
11298
+ export type StaffUsersTotpResetErrors = {
11299
+ /**
11300
+ * Not Found
11301
+ */
11302
+ 404: NotFoundResponse;
11303
+ };
11304
+ export type StaffUsersTotpResetError = StaffUsersTotpResetErrors[keyof StaffUsersTotpResetErrors];
11305
+ export type StaffUsersUpdateBlacklistData = {
11306
+ body?: {
11307
+ user: {
11308
+ blacklisted_tags: string;
11309
+ };
11310
+ };
11311
+ path: {
11312
+ /**
11313
+ * The ID of the item.
11314
+ */
11315
+ id: number;
11316
+ };
11317
+ query?: never;
11318
+ url: '/staff/users/{id}/update_blacklist';
11319
+ };
11320
+ export type StaffUsersUpdateBlacklistErrors = {
11321
+ /**
11322
+ * Access Denied
11323
+ */
11324
+ 403: AccessDeniedResponse;
11325
+ /**
11326
+ * Not Found
11327
+ */
11328
+ 404: NotFoundResponse;
11329
+ };
11330
+ export type StaffUsersUpdateBlacklistError = StaffUsersUpdateBlacklistErrors[keyof StaffUsersUpdateBlacklistErrors];
10413
11331
  export type StaffDmailsIndexData = {
10414
11332
  body?: never;
10415
11333
  path: {
@@ -10989,7 +11907,7 @@ export type StaffPostPostsReownerData = {
10989
11907
  id: number;
10990
11908
  };
10991
11909
  query?: never;
10992
- url: '/staff/post/posts/{id}/reowner.json';
11910
+ url: '/staff/post/posts/{id}/reowner';
10993
11911
  };
10994
11912
  export type StaffPostPostsReownerErrors = {
10995
11913
  /**
@@ -11071,6 +11989,32 @@ export type StaffPostApprovalsCreateResponses = {
11071
11989
  204: void;
11072
11990
  };
11073
11991
  export type StaffPostApprovalsCreateResponse = StaffPostApprovalsCreateResponses[keyof StaffPostApprovalsCreateResponses];
11992
+ export type StaffUserAltsShowData = {
11993
+ body?: never;
11994
+ path?: never;
11995
+ query: {
11996
+ user_id: number;
11997
+ };
11998
+ url: '/staff/user_alts.json';
11999
+ };
12000
+ export type StaffUserAltsShowErrors = {
12001
+ /**
12002
+ * Access Denied
12003
+ */
12004
+ 403: AccessDeniedResponse;
12005
+ /**
12006
+ * Not Found
12007
+ */
12008
+ 404: NotFoundResponse;
12009
+ };
12010
+ export type StaffUserAltsShowError = StaffUserAltsShowErrors[keyof StaffUserAltsShowErrors];
12011
+ export type StaffUserAltsShowResponses = {
12012
+ /**
12013
+ * Success
12014
+ */
12015
+ 200: Array<UserAlt>;
12016
+ };
12017
+ export type StaffUserAltsShowResponse = StaffUserAltsShowResponses[keyof StaffUserAltsShowResponses];
11074
12018
  export type StaffUserCleanupsClearAvatarData = {
11075
12019
  body?: never;
11076
12020
  path: {
@@ -11637,6 +12581,124 @@ export type StaffWikisUnclaimResponses = {
11637
12581
  201: StaffWiki;
11638
12582
  };
11639
12583
  export type StaffWikisUnclaimResponse = StaffWikisUnclaimResponses[keyof StaffWikisUnclaimResponses];
12584
+ export type StaffWikisRevertData = {
12585
+ body?: never;
12586
+ path: {
12587
+ /**
12588
+ * The ID of the item.
12589
+ */
12590
+ id: number;
12591
+ };
12592
+ query: {
12593
+ /**
12594
+ * The version ID to revert to.
12595
+ */
12596
+ version_id: number;
12597
+ };
12598
+ url: '/staff/wikis/{id}/revert.json';
12599
+ };
12600
+ export type StaffWikisRevertErrors = {
12601
+ /**
12602
+ * Access Denied
12603
+ */
12604
+ 403: AccessDeniedResponse;
12605
+ /**
12606
+ * Not Found
12607
+ */
12608
+ 404: NotFoundResponse;
12609
+ /**
12610
+ * Invalid Input Data
12611
+ */
12612
+ 422: {
12613
+ errors: Array<string>;
12614
+ };
12615
+ };
12616
+ export type StaffWikisRevertError = StaffWikisRevertErrors[keyof StaffWikisRevertErrors];
12617
+ export type StaffWikisRevertResponses = {
12618
+ /**
12619
+ * Success
12620
+ */
12621
+ 204: void;
12622
+ };
12623
+ export type StaffWikisRevertResponse = StaffWikisRevertResponses[keyof StaffWikisRevertResponses];
12624
+ export type StaffWikiRefsCreateData = {
12625
+ body?: {
12626
+ 'staff_wiki_ref[related_type]': StaffWikiRefRelatedType;
12627
+ 'staff_wiki_ref[related_id]': number;
12628
+ };
12629
+ path: {
12630
+ /**
12631
+ * The ID of the item.
12632
+ */
12633
+ id: number;
12634
+ };
12635
+ query?: never;
12636
+ url: '/staff/wikis/{id}/references';
12637
+ };
12638
+ export type StaffWikiRefsCreateErrors = {
12639
+ /**
12640
+ * Access Denied
12641
+ */
12642
+ 403: AccessDeniedResponse;
12643
+ /**
12644
+ * Not Found
12645
+ */
12646
+ 404: NotFoundResponse;
12647
+ };
12648
+ export type StaffWikiRefsCreateError = StaffWikiRefsCreateErrors[keyof StaffWikiRefsCreateErrors];
12649
+ export type StaffWikiRefsDestroyData = {
12650
+ body?: never;
12651
+ path: {
12652
+ /**
12653
+ * The ID of the item.
12654
+ */
12655
+ id: number;
12656
+ /**
12657
+ * The ID of the item.
12658
+ */
12659
+ wiki_id: number;
12660
+ };
12661
+ query?: never;
12662
+ url: '/staff/wikis/{wiki_id}/references/{id}';
12663
+ };
12664
+ export type StaffWikiRefsDestroyErrors = {
12665
+ /**
12666
+ * Access Denied
12667
+ */
12668
+ 403: AccessDeniedResponse;
12669
+ /**
12670
+ * Not Found
12671
+ */
12672
+ 404: NotFoundResponse;
12673
+ };
12674
+ export type StaffWikiRefsDestroyError = StaffWikiRefsDestroyErrors[keyof StaffWikiRefsDestroyErrors];
12675
+ export type StaffWikiRefsBulkCreateData = {
12676
+ body?: {
12677
+ /**
12678
+ * Space separated, parses `users/<id>`, `artists/<id>`, `staff/wiki/<id>`
12679
+ */
12680
+ urls: string;
12681
+ };
12682
+ path: {
12683
+ /**
12684
+ * The ID of the item.
12685
+ */
12686
+ id: number;
12687
+ };
12688
+ query?: never;
12689
+ url: '/staff/wikis/{id}/references/bulk_create';
12690
+ };
12691
+ export type StaffWikiRefsBulkCreateErrors = {
12692
+ /**
12693
+ * Access Denied
12694
+ */
12695
+ 403: AccessDeniedResponse;
12696
+ /**
12697
+ * Not Found
12698
+ */
12699
+ 404: NotFoundResponse;
12700
+ };
12701
+ export type StaffWikiRefsBulkCreateError = StaffWikiRefsBulkCreateErrors[keyof StaffWikiRefsBulkCreateErrors];
11640
12702
  export type StaffWikiVersionsIndexData = {
11641
12703
  body?: never;
11642
12704
  path?: never;
@@ -11736,3 +12798,142 @@ export type StaffVoteTrendsIndexResponses = {
11736
12798
  200: Array<VoteTrend | Array<number>>;
11737
12799
  };
11738
12800
  export type StaffVoteTrendsIndexResponse = StaffVoteTrendsIndexResponses[keyof StaffVoteTrendsIndexResponses];
12801
+ export type StaffIpAddrsIndexData = {
12802
+ body?: never;
12803
+ path?: never;
12804
+ query?: {
12805
+ 'search[with_history]'?: boolean;
12806
+ /**
12807
+ * Accepts multiple comma separated values.
12808
+ */
12809
+ 'search[user_id]'?: string;
12810
+ /**
12811
+ * Accepts multiple comma separated values.
12812
+ */
12813
+ 'search[user_name]'?: string;
12814
+ /**
12815
+ * Accepts multiple comma separated values.
12816
+ */
12817
+ 'search[ip_addr]'?: string;
12818
+ 'search[add_ip_mask]'?: boolean;
12819
+ };
12820
+ url: '/staff/ip_addrs.json';
12821
+ };
12822
+ export type StaffIpAddrsIndexErrors = {
12823
+ /**
12824
+ * Access Denied
12825
+ */
12826
+ 403: AccessDeniedResponse;
12827
+ /**
12828
+ * Invalid Input Data
12829
+ */
12830
+ 422: {
12831
+ errors: Array<string>;
12832
+ };
12833
+ };
12834
+ export type StaffIpAddrsIndexError = StaffIpAddrsIndexErrors[keyof StaffIpAddrsIndexErrors];
12835
+ export type StaffIpAddrsIndexResponses = {
12836
+ /**
12837
+ * Success
12838
+ */
12839
+ 200: Array<StaffIPAddrUserListing | StaffIPAddrIPListing>;
12840
+ };
12841
+ export type StaffIpAddrsIndexResponse = StaffIpAddrsIndexResponses[keyof StaffIpAddrsIndexResponses];
12842
+ export type StaffIpAddrsExportData = {
12843
+ body?: never;
12844
+ path?: never;
12845
+ query?: {
12846
+ 'search[with_history]'?: boolean;
12847
+ /**
12848
+ * Accepts multiple comma separated values.
12849
+ */
12850
+ 'search[user_id]'?: string;
12851
+ /**
12852
+ * Accepts multiple comma separated values.
12853
+ */
12854
+ 'search[user_name]'?: string;
12855
+ /**
12856
+ * Accepts multiple comma separated values.
12857
+ */
12858
+ 'search[ip_addr]'?: string;
12859
+ 'search[add_ip_mask]'?: boolean;
12860
+ };
12861
+ url: '/staff/ip_addrs/export.json';
12862
+ };
12863
+ export type StaffIpAddrsExportErrors = {
12864
+ /**
12865
+ * Access Denied
12866
+ */
12867
+ 403: AccessDeniedResponse;
12868
+ /**
12869
+ * Invalid Input Data
12870
+ */
12871
+ 422: {
12872
+ errors: Array<string>;
12873
+ };
12874
+ };
12875
+ export type StaffIpAddrsExportError = StaffIpAddrsExportErrors[keyof StaffIpAddrsExportErrors];
12876
+ export type StaffIpAddrsExportResponses = {
12877
+ /**
12878
+ * Success
12879
+ */
12880
+ 200: Array<string>;
12881
+ };
12882
+ export type StaffIpAddrsExportResponse = StaffIpAddrsExportResponses[keyof StaffIpAddrsExportResponses];
12883
+ export type StaffReownerCreateData = {
12884
+ body?: {
12885
+ /**
12886
+ * Must be a string
12887
+ * Name: `name`
12888
+ * ID: `!1234`
12889
+ *
12890
+ */
12891
+ 'reowner[new_owner]': string;
12892
+ /**
12893
+ * Also reown post versions. (default false)
12894
+ */
12895
+ 'reowner[reowner_versions]'?: boolean;
12896
+ /**
12897
+ * Also reown post events. (default true)
12898
+ */
12899
+ 'reowner[post_events]'?: boolean;
12900
+ };
12901
+ path?: never;
12902
+ query?: never;
12903
+ url: '/staff/reowner.json';
12904
+ };
12905
+ export type StaffReownerCreateErrors = {
12906
+ /**
12907
+ * Access Denied
12908
+ */
12909
+ 403: AccessDeniedResponse;
12910
+ };
12911
+ export type StaffReownerCreateError = StaffReownerCreateErrors[keyof StaffReownerCreateErrors];
12912
+ export type StaffStuckDnpCreateData = {
12913
+ body?: {
12914
+ 'stuck_dnp[query]': string;
12915
+ };
12916
+ path?: never;
12917
+ query?: never;
12918
+ url: '/staff/stuck_dnp.json';
12919
+ };
12920
+ export type StaffStuckDnpCreateErrors = {
12921
+ /**
12922
+ * Access Denied
12923
+ */
12924
+ 403: AccessDeniedResponse;
12925
+ };
12926
+ export type StaffStuckDnpCreateError = StaffStuckDnpCreateErrors[keyof StaffStuckDnpCreateErrors];
12927
+ export type StatsIndexData = {
12928
+ body?: never;
12929
+ path?: never;
12930
+ query?: never;
12931
+ url: '/stats.json';
12932
+ };
12933
+ export type StatsIndexResponses = {
12934
+ /**
12935
+ * Success
12936
+ */
12937
+ 200: Stats;
12938
+ };
12939
+ export type StatsIndexResponse = StatsIndexResponses[keyof StatsIndexResponses];