e621_openapi 1.0.385

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.
@@ -0,0 +1,319 @@
1
+ # Generated by scripts/generate.rb from the E621OpenAPI spec, don't edit by hand.
2
+
3
+ module E621OpenAPI
4
+ module Types
5
+ type appeal_status = ("pending" | "partial" | "approved" | "rejected")
6
+
7
+ type appeal_type = "post_deletion"
8
+
9
+ type db_export_name = ("artists" | "bulk_update_requests" | "pools" | "post_replacements" | "posts" | "post_versions" | "tag_aliases" | "tag_implications" | "tags" | "wiki_pages")
10
+
11
+ type edit_history_versionable_type = ("Blip" | "Comment" | "ForumPost")
12
+
13
+ type jwks_algorithm = "RS256"
14
+
15
+ type mod_action_action = ("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" | "flag_reason_create" | "flag_reason_update" | "flag_reason_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_alias_undo" | "tag_implication_create" | "tag_implication_update" | "tag_implication_undo" | "ticket_claim" | "ticket_unclaim" | "ticket_update" | "appeal_claim" | "appeal_unclaim" | "appeal_update" | "upload_whitelist_create" | "upload_whitelist_update" | "upload_whitelist_delete" | "upload_url_rule_create" | "upload_url_rule_update" | "upload_url_rule_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")
16
+
17
+ type oauth_claim = ("iss" | "sub" | "aud" | "exp" | "iat" | "preferred_username" | "name" | "picture" | "updated_at" | "e621_level" | "e621_level_string" | "e621_avatar_id" | "e621_permissions" | "email" | "email_verified")
18
+
19
+ type oauth_claim_type = "normal"
20
+
21
+ type oauth_code_challenge_method = "S256"
22
+
23
+ type oauth_grant_type = ("authorization_code" | "refresh_token")
24
+
25
+ type oauth_id_token_signing_alg_value = "RS256"
26
+
27
+ type oauth_permission = ("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")
28
+
29
+ type oauth_response_mode = ("query" | "fragment" | "form_post")
30
+
31
+ type oauth_response_type = "code"
32
+
33
+ type oauth_scope = ("openid" | "profile" | "email" | "full")
34
+
35
+ type oauth_subject_type = "public"
36
+
37
+ type oauth_token_endpoint_auth_method = ("client_secret_basic" | "client_secret_post")
38
+
39
+ type pool_category = ("collection" | "series")
40
+
41
+ type post_event_action = ("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")
42
+
43
+ type post_replacement_status = ("promoted" | "approved" | "rejected" | "pending" | "original")
44
+
45
+ type rating = ("s" | "q" | "e")
46
+
47
+ type tag_category = (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8)
48
+
49
+ type tag_category_names = ("general" | "artist" | "contributor" | "copyright" | "character" | "species" | "invalid" | "meta" | "lore")
50
+
51
+ type tag_request_status = (("active" | "deleted" | "processing" | "queued" | "retired" | "pending") | String)
52
+
53
+ type ticket_status = ("pending" | "partial" | "approved")
54
+
55
+ type ticket_type = ("blip" | "comment" | "dmail" | "forum" | "pool" | "post" | "set" | "user" | "wiki" | "replacement")
56
+
57
+ type up_down_meh_flip_vote = (2 | 1 | 0 | -1)
58
+
59
+ type up_down_meh_vote = (1 | 0 | -1)
60
+
61
+ type up_down_vote = (1 | -1)
62
+
63
+ type upload_karma_event_reason = ("approved" | "unapproved" | "deleted" | "undeleted" | "replacement_penalty" | "replacement_penalty_reversed" | "replacement_transfer" | "owner_change" | "staff_override" | "queue_bypass")
64
+
65
+ type upload_status = (("completed" | "failed" | "processing" | "queued" | "pending") | String)
66
+
67
+ type user_feedback_category = ("negative" | "neutral" | "positive")
68
+
69
+ type user_level = (0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80)
70
+
71
+ type user_level_name = ("Anonymous" | "Blocked" | "Member" | "Privileged" | "Former Staff" | "Staff" | "Janitor" | "Moderator" | "Admin")
72
+
73
+ type warning_record_type = ("warning" | "record" | "ban" | "unmark")
74
+
75
+ type warning_type = ("warning" | "record" | "ban")
76
+
77
+ type api_key = { id: Integer, updated_at: String, created_at: String, user_id: Integer, key: String, name: String, last_used_at: String?, last_used_ip_address: String?, last_user_agent: String?, expires_at: String?, notified_at: String? }
78
+
79
+ type appeal = { id: Integer, ?creator_id: Integer, disp_id: String, qtype: appeal_type, status: appeal_status, ?reason: String, ?response: String, ?claimant_id: Integer?, handler_id: Integer?, ?accused_id: Integer, created_at: String, updated_at: String }
80
+
81
+ type artist = { id: Integer, name: String, updated_at: String, is_active: bool, other_names: Array[String], group_name: String, linked_user_id: Integer?, created_at: String, creator_id: Integer, is_locked: bool, notes: String?, urls: Array[artist_url] }
82
+
83
+ type artist_url = { id: Integer, artist_id: Integer, url: String, normalized_url: String, created_at: String, updated_at: String, is_active: bool }
84
+
85
+ type artist_version = { id: Integer, artist_id: Integer, name: String, updater_id: Integer, created_at: String, updated_at: String, is_active: bool, other_names: Array[String], notes_changed: bool, urls: Array[String] }
86
+
87
+ type avoid_posting = { id: Integer, creator_id: Integer, updater_id: Integer, artist_id: Integer, ?staff_notes: String, details: String, is_active: bool, created_at: String, updated_at: String }
88
+
89
+ type avoid_posting_version = { id: Integer, updater_id: Integer, avoid_posting_id: Integer, details: String, ?staff_notes: String, is_active: bool, updated_at: String }
90
+
91
+ type ban = { id: Integer, user_id: Integer, reason: String, banner_id: Integer, expires_at: String?, created_at: String, updated_at: String }
92
+
93
+ type basic_post = { id: Integer, created_at: String, updated_at: String, change_seq: Integer, files: post_files, uploader_id: Integer, uploader_name: String, approver_id: Integer?, stats: post_stats, flags: post_flags, has: post_has, relationships: post_relationships, pools: Array[Integer], rating: rating, locked_tags: Array[String], sources: Array[String], description: String, tags: Array[String] }
94
+
95
+ type blip = { id: Integer, creator_id: Integer, body: String, response_to: Integer, created_at: String, updated_at: String, is_deleted: bool, warning_type: warning_type, warning_user_id: Integer, updater_id: Integer, creator_name: String }
96
+
97
+ type bulk_update_request = { id: Integer, creator_id: Integer, forum_topic_id: Integer?, script: String, status: ("approved" | "rejected" | "pending"), created_at: String, updated_at: String, approver_id: Integer?, forum_post_id: Integer?, title: String }
98
+
99
+ type comment = { id: Integer, created_at: String, post_id: Integer, creator_id: Integer, body: String, score: Integer, updated_at: String, updater_id: Integer, do_not_bump_post: bool, is_hidden: bool, is_sticky: bool, warning_type: warning_type, warning_user_id: Integer?, creator_name: String, updater_name: String, vote: up_down_meh_vote }
100
+
101
+ type comment_vote = { id: Integer, comment_id: Integer, user_id: Integer, score: up_down_vote, created_at: String, updated_at: String }
102
+
103
+ type current_user = { id: Integer, created_at: String, name: String, level: user_level, base_upload_limit: Integer, upload_karma: Integer, upload_karma_free: bool, post_upload_count: Integer, post_update_count: Integer, note_update_count: Integer, is_banned: bool, can_approve_posts: bool, can_upload_free: bool, level_string: user_level_name, avatar_id: Integer?, ?is_verified: bool, has_cropped_avatar: bool, last_logged_in_at: String, blacklist_users: bool, description_collapsed_initially: bool, hide_comments: bool, show_hidden_comments: bool, show_post_statistics: bool, receive_email_notifications: bool, enable_keyboard_navigation: bool, enable_privacy_mode: bool, enable_auto_complete: bool, disable_cropped_thumbnails: bool, enable_safe_mode: bool, disable_responsive_mode: bool, no_flagging: bool, disable_user_dmails: bool, enable_compact_uploader: bool, replacements_beta: bool, updated_at: String, email: String, last_forum_read_at: String, recent_tags: String, comment_threshold: Integer, default_image_size: ("large" | "fit" | "fitv" | "original"), favorite_tags: String, blacklisted_tags: String, time_zone: String, per_page: Integer, custom_style: String, favorite_count: Integer, api_regen_multiplier: Integer, api_burst_limit: Integer, remaining_api_limit: Integer, statement_timeout: Integer, favorite_limit: Integer, tag_query_limit: Integer, has_mail: bool, forum_notification_dot: bool, oauth_applications_beta: bool }
104
+
105
+ type db_export = { name: db_export_name, file_name: String, file_size: Integer, updated_at: String, url: String, checksum: String }
106
+
107
+ type d_mail = { id: Integer, owner_id: Integer, from_id: Integer, to_id: Integer, title: String, body: String, is_read: bool, is_deleted: bool, created_at: String, updated_at: String, to_name: String, from_name: String }
108
+
109
+ type deferred_post = { id: Integer, flags: String, tags: String, rating: rating, file_ext: String, width: Integer, height: Integer, size: Integer, created_at: String, uploader: String, uploader_id: Integer, score: Integer, fav_count: Integer, is_favorited: bool, pools: Array[Integer], md5: String, preview_url: String?, large_url: String?, file_url: String?, preview_width: Integer, preview_height: Integer }
110
+
111
+ type edit_history = { id: Integer, created_at: String, updated_at: String, body: String, subject: String?, versionable_type: edit_history_versionable_type, versionable_id: Integer, version: Integer, user_id: Integer }
112
+
113
+ type email_blacklist = { id: Integer, created_at: String, updated_at: String, domain: String, creator_id: String, reason: String }
114
+
115
+ type exception_log = { id: Integer, created_at: String, updated_at: String, class_name: String, version: String, extra_params: Hash[Symbol, untyped], message: String, trace: String, code: String, user_id: Integer }
116
+
117
+ type extended_post = { id: Integer, created_at: String, updated_at: String, change_seq: Integer, files: post_files, uploader_id: Integer, uploader_name: String, approver_id: Integer?, stats: post_stats, flags: post_flags, has: post_has, relationships: post_relationships, pools: Array[Integer], rating: rating, locked_tags: Array[String], sources: Array[String], description: String, tags: { general: Array[String], artist: Array[String], contributor: Array[String], copyright: Array[String], character: Array[String], species: Array[String], invalid: Array[String], meta: Array[String], lore: Array[String] } }
118
+
119
+ type forum_post = { id: Integer, topic_id: Integer, creator_id: Integer, updater_id: Integer, body: String, is_hidden: bool, created_at: String, updated_at: String, warning_type: warning_type, warning_user_id: Integer?, vote_score: String?, creator_name: String, updater_name: String }
120
+
121
+ type forum_post_vote = { id: Integer, forum_post_id: Integer, creator_id: Integer, score: up_down_meh_flip_vote, created_at: String, updated_at: String, creator_name: String }
122
+
123
+ type forum_topic = { id: Integer, creator_id: Integer, updater_id: Integer, title: String, response_count: Integer, is_sticky: bool, is_locked: bool, is_hidden: bool, created_at: String, updated_at: String, category_id: Integer, last_bumped_at: String, creator_name: String, updater_name: String }
124
+
125
+ type full_current_user = { id: Integer, created_at: String, name: String, level: user_level, base_upload_limit: Integer, upload_karma: Integer, upload_karma_free: bool, post_upload_count: Integer, post_update_count: Integer, note_update_count: Integer, is_banned: bool, can_approve_posts: bool, can_upload_free: bool, level_string: user_level_name, avatar_id: Integer?, ?is_verified: bool, has_cropped_avatar: bool, last_logged_in_at: String, blacklist_users: bool, description_collapsed_initially: bool, hide_comments: bool, show_hidden_comments: bool, show_post_statistics: bool, receive_email_notifications: bool, enable_keyboard_navigation: bool, enable_privacy_mode: bool, enable_auto_complete: bool, disable_cropped_thumbnails: bool, enable_safe_mode: bool, disable_responsive_mode: bool, no_flagging: bool, disable_user_dmails: bool, enable_compact_uploader: bool, replacements_beta: bool, updated_at: String, email: String, last_forum_read_at: String, recent_tags: String, comment_threshold: Integer, default_image_size: ("large" | "fit" | "fitv" | "original"), favorite_tags: String, blacklisted_tags: String, time_zone: String, per_page: Integer, custom_style: String, favorite_count: Integer?, api_regen_multiplier: Integer, api_burst_limit: Integer, remaining_api_limit: Integer, statement_timeout: Integer, favorite_limit: Integer, tag_query_limit: Integer, has_mail: bool, forum_notification_dot: bool, oauth_applications_beta: bool, wiki_page_version_count: Integer, artist_version_count: Integer, pool_version_count: Integer, forum_post_count: Integer, comment_count: Integer, ?flag_count: Integer, positive_feedback_count: Integer, neutral_feedback_count: Integer, negative_feedback_count: Integer, upload_slots: Integer, profile_about: String, profile_artinfo: String }
126
+
127
+ type full_user = { id: Integer, created_at: String, name: String, level: user_level, base_upload_limit: Integer, upload_karma: Integer, upload_karma_free: bool, post_upload_count: Integer, post_update_count: Integer, note_update_count: Integer, is_banned: bool, can_approve_posts: bool, can_upload_free: bool, level_string: user_level_name, avatar_id: Integer?, ?is_verified: bool, has_cropped_avatar: bool, ?last_logged_in_at: String, wiki_page_version_count: Integer, artist_version_count: Integer, pool_version_count: Integer, forum_post_count: Integer, comment_count: Integer, ?flag_count: Integer, favorite_count: Integer?, positive_feedback_count: Integer, neutral_feedback_count: Integer, negative_feedback_count: Integer, upload_slots: Integer, profile_about: String, profile_artinfo: String }
128
+
129
+ type help_page = { id: Integer, name: String, title: String, wiki_page: String, related: String, created_at: String, updated_at: String }
130
+
131
+ # Due to a global filter, the ip_addr is not present no matter your user level.
132
+ type ip_ban = { id: Integer, creator_id: Integer, reason: String, created_at: String, updated_at: String }
133
+
134
+ type iqdb_post = { id: Integer, created_at: String, updated_at: String, up_score: Integer, down_score: Integer, score: Integer, source: String, md5: String, rating: rating, is_note_locked: bool, is_rating_locked: bool, is_status_locked: bool, is_pending: bool, is_flagged: bool, is_deleted: bool, uploader_id: Integer, approver_id: Integer, last_noted_at: String?, last_comment_bumped_at: String?, fav_count: Integer, tag_string: String, tag_count: Integer, tag_count_general: Integer, tag_count_artist: Integer, tag_count_character: Integer, tag_count_copyright: Integer, file_ext: String, file_size: Integer, image_width: Integer, image_height: Integer, parent_id: Integer?, has_children: bool, last_commented_at: String?, has_active_children: bool, bit_flags: Integer, tag_count_meta: Integer, locked_tags: String?, tag_count_species: Integer, tag_count_invalid: Integer, description: String, comment_count: Integer, change_seq: Integer, tag_count_lore: Integer, bg_color: String?, generated_samples: Array[("720p" | "480p" | "original")]?, duration: String?, is_comment_disabled: bool, is_comment_locked: bool, has_large: bool, has_visible_children: bool, children_ids: String?, pool_ids: Array[Integer], is_favorited: bool, ?file_url: String, ?large_file_url: String, ?preview_file_url: String }
135
+
136
+ type jwks = { keys: Array[jwks_key] }
137
+
138
+ type jwks_key = { kty: "RSA", use: "sig", alg: jwks_algorithm, kid: String, n: String, e: String }
139
+
140
+ type legacy_post = { id: Integer, created_at: String, updated_at: String, file: { width: Integer, height: Integer, ext: String, size: Integer, md5: String, url: String? }, preview: { width: Integer, height: Integer, url: String?, ?alt: String? }, sample: { has: bool, height: Integer?, width: Integer?, url: String?, ?alt: String?, alternates: { ?has: bool, ?original: post_sample_alternate, ?variants: { ?webm: post_sample_alternate, ?mp4: post_sample_alternate }, ?samples: { ?:"480p" => post_sample_alternate, ?:"720p" => post_sample_alternate } } }, score: { up: Integer, down: Integer, total: Integer }, tags: { general: Array[String], artist: Array[String], copyright: Array[String], character: Array[String], species: Array[String], invalid: Array[String], meta: Array[String], lore: Array[String], contributor: Array[String] }, locked_tags: Array[String]?, change_seq: Integer, flags: { pending: bool, flagged: bool, note_locked: bool, status_locked: bool, rating_locked: bool, deleted: bool }, rating: rating, fav_count: Integer, sources: Array[String], pools: Array[Integer], relationships: { parent_id: Integer?, has_children: bool, has_active_children: bool, children: Array[Integer] }, approver_id: Integer?, uploader_id: Integer, description: String, comment_count: Integer, is_favorited: bool, has_notes: bool, duration: Numeric?, uploader_name: String, vote: up_down_meh_vote }
141
+
142
+ type mascot = { id: Integer, creator_id: Integer, display_name: String, md5: String, file_ext: String, background_color: String, artist_url: String, artist_name: String, active: bool, created_at: String, updated_at: String, available_on: Array[String], url_path: String }
143
+
144
+ type minimal_user = { id: Integer, name: String, level_string: user_level_name, favorite_count: Integer }
145
+
146
+ type mod_action = ({ ?action: "admin_user_delete", ?values: { ?user_id: Integer } } | { ?action: "artist_delete", ?values: { ?artist_id: Integer, ?artist_name: String } } | { ?action: "artist_page_rename", ?values: { ?old_name: String, ?new_name: String } } | { ?action: "artist_page_lock", ?values: { ?artist_page: Integer } } | { ?action: "artist_page_unlock", ?values: { ?artist_page: Integer } } | { ?action: "artist_user_linked", ?values: { ?artist_page: Integer, ?user_id: Integer } } | { ?action: "artist_user_unlinked", ?values: { ?artist_page: Integer, ?user_id: Integer } } | { ?action: "avoid_posting_create", ?values: { ?id: Integer, ?artist_name: String } } | { ?action: "avoid_posting_update", ?values: { ?id: Integer, ?artist_name: String, ?details: String, ?old_details: String, ?staff_notes: String, ?old_staff_notes: String } } | { ?action: "avoid_posting_delete", ?values: { ?id: Integer, ?artist_name: String } } | { ?action: "avoid_posting_undelete", ?values: { ?id: Integer, ?artist_name: String } } | { ?action: "avoid_posting_destroy", ?values: { ?id: Integer, ?artist_name: String } } | { ?action: "staff_note_create", ?values: { ?id: Integer, ?user_id: Integer, ?body: String } } | { ?action: "staff_note_update", ?values: { ?id: Integer, ?user_id: Integer, ?body: String, ?old_body: String } } | { ?action: "staff_note_delete", ?values: { ?id: Integer, ?user_id: Integer } } | { ?action: "staff_note_undelete", ?values: { ?id: Integer, ?user_id: Integer } } | { ?action: "blip_destroy", ?values: { ?blip_id: Integer, ?user_id: Integer } } | { ?action: "blip_delete", ?values: { ?blip_id: Integer, ?user_id: Integer } } | { ?action: "blip_undelete", ?values: { ?blip_id: Integer, ?user_id: Integer } } | { ?action: "blip_update", ?values: { ?blip_id: Integer, ?user_id: Integer } } | { ?action: "comment_delete", ?values: { ?comment_id: Integer, ?user_id: Integer } } | { ?action: "comment_hide", ?values: { ?comment_id: Integer, ?user_id: Integer } } | { ?action: "comment_unhide", ?values: { ?comment_id: Integer, ?user_id: Integer } } | { ?action: "comment_update", ?values: { ?comment_id: Integer, ?user_id: Integer } } | { ?action: "forum_category_create", ?values: { ?forum_category_id: Integer } } | { ?action: "forum_category_delete", ?values: { ?forum_category_id: (Integer | String) } } | { ?action: "forum_category_update", ?values: { ?forum_category_id: Integer } } | { ?action: "forum_post_delete", ?values: { ?forum_post_id: Integer, ?forum_topic_id: Integer, ?user_id: Integer } } | { ?action: "forum_post_hide", ?values: { ?forum_post_id: Integer, ?forum_topic_id: Integer, ?user_id: Integer } } | { ?action: "forum_post_unhide", ?values: { ?forum_post_id: Integer, ?forum_topic_id: Integer, ?user_id: Integer } } | { ?action: "forum_post_update", ?values: { ?forum_post_id: Integer, ?forum_topic_id: Integer, ?user_id: Integer } } | { ?action: "forum_topic_delete", ?values: { ?forum_topic_id: Integer, ?forum_topic_title: String, ?user_id: Integer } } | { ?action: "forum_topic_hide", ?values: { ?forum_topic_id: Integer, ?forum_topic_title: String, ?user_id: Integer } } | { ?action: "forum_topic_unhide", ?values: { ?forum_topic_id: Integer, ?forum_topic_title: String, ?user_id: Integer } } | { ?action: "forum_topic_lock", ?values: { ?forum_topic_id: Integer, ?forum_topic_title: String, ?user_id: Integer } } | { ?action: "forum_topic_unlock", ?values: { ?forum_topic_id: Integer, ?forum_topic_title: String, ?user_id: Integer } } | { ?action: "forum_topic_stick", ?values: { ?forum_topic_id: Integer, ?forum_topic_title: String, ?user_id: Integer } } | { ?action: "forum_topic_unstick", ?values: { ?forum_topic_id: Integer, ?forum_topic_title: String, ?user_id: Integer } } | { ?action: "forum_topic_update", ?values: Hash[Symbol, untyped] } | { ?action: "help_create", ?values: { ?name: String, ?wiki_page: String } } | { ?action: "help_delete", ?values: { ?name: String, ?wiki_page: String } } | { ?action: "help_update", ?values: { ?name: String, ?wiki_page: String } } | { ?action: "ip_ban_create", ?values: { ?ip_addr: String, ?reason: String } } | { ?action: "ip_ban_delete", ?values: { ?ip_addr: String, ?reason: String } } | { ?action: "search_trend_blacklist_create", ?values: { ?tag: String, ?reason: String } } | { ?action: "search_trend_blacklist_update", ?values: { ?tag: String, ?reason: String } } | { ?action: "search_trend_blacklist_delete", ?values: { ?tag: String, ?reason: String } } | { ?action: "search_trend_blacklist_purge", ?values: { ?tag: String, ?reason: String, ?deleted_count: Integer } } | { ?action: "mascot_create", ?values: { ?id: Integer } } | { ?action: "mascot_update", ?values: { ?id: Integer } } | { ?action: "mascot_delete", ?values: { ?id: Integer } } | { ?action: "staff_file_create", ?values: { ?id: Integer, ?filename: String, ?file_size: Integer, ?user_id: Integer } } | { ?action: "staff_file_update", ?values: { ?id: Integer, ?filename: String, ?user_id: Integer } } | { ?action: "staff_file_delete", ?values: { ?id: Integer, ?filename: String, ?user_id: Integer } } | { ?action: "pool_delete", ?values: { ?pool_id: Integer, ?pool_name: String, ?user_id: Integer } } | { ?action: "flag_reason_create", ?values: { ?reason: String, ?text: String } } | { ?action: "flag_reason_update", ?values: { ?reason: String, ?reason_was: String, ?text: String, ?text_was: String } } | { ?action: "flag_reason_delete", ?values: { ?reason: String } } | { ?action: "report_reason_create", ?values: { ?reason: String } } | { ?action: "report_reason_delete", ?values: { ?reason: String, ?user_id: Integer } } | { ?action: "report_reason_update", ?values: { ?reason: String, ?reason_was: String, ?description: String, ?description_was: String } } | { ?action: "set_update", ?values: { ?set_id: Integer, ?user_id: Integer } } | { ?action: "set_delete", ?values: { ?set_id: Integer, ?user_id: Integer } } | { ?action: "set_change_visibility", ?values: { ?set_id: Integer, ?user_id: Integer, ?is_public: bool } } | { ?action: "tag_destroy", ?values: { ?name: String } } | { ?action: "tag_alias_create", ?values: { ?alias_id: Integer, ?alias_desc: String } } | { ?action: "tag_alias_update", ?values: { ?alias_id: Integer, ?alias_desc: String, ?change_desc: String } } | { ?action: "tag_alias_undo", ?values: { ?alias_id: Integer, ?alias_desc: String } } | { ?action: "tag_implication_create", ?values: { ?implication_id: Integer, ?implication_desc: String } } | { ?action: "tag_implication_update", ?values: { ?implication_id: Integer, ?implication_desc: String, ?change_desc: String } } | { ?action: "tag_implication_undo", ?values: { ?implication_id: Integer, ?implication_desc: String } } | { ?action: "ticket_claim", ?values: { ?ticket_id: Integer } } | { ?action: "ticket_unclaim", ?values: { ?ticket_id: Integer } } | { ?action: "ticket_update", ?values: { ?ticket_id: Integer, ?status: String, ?response: String, ?status_was: String, ?response_was: String } } | { ?action: "appeal_claim", ?values: { ?appeal_id: Integer } } | { ?action: "appeal_unclaim", ?values: { ?appeal_id: Integer } } | { ?action: "appeal_update", ?values: { ?appeal_id: Integer, ?status: String, ?response: String, ?status_was: String, ?response_was: String } } | { ?action: "upload_whitelist_create", ?values: { ?domain: String, ?path: String, ?note: String, ?hidden: bool } } | { ?action: "upload_whitelist_update", ?values: { ?domain: String, ?path: String, ?note: String, ?old_domain: String, ?old_path: String, ?hidden: bool } } | { ?action: "upload_whitelist_delete", ?values: { ?domain: String, ?path: String, ?note: String, ?hidden: bool } } | { ?action: "upload_url_rule_create", ?values: { ?label: String, ?pattern: String, ?replacement: String, ?handling: ("recommend" | "block"), ?message: String, ?enabled: bool } } | { ?action: "upload_url_rule_update", ?values: { ?label: String, ?pattern: String, ?replacement: String, ?handling: ("recommend" | "block"), ?message: String, ?enabled: bool, ?old_label: String, ?old_pattern: String, ?old_replacement: String, ?old_handling: ("recommend" | "block") } } | { ?action: "upload_url_rule_delete", ?values: { ?label: String, ?pattern: String, ?replacement: String, ?handling: ("recommend" | "block"), ?message: String, ?enabled: bool } } | { ?action: "user_avatar_clear", ?values: { ?user_id: Integer } } | { ?action: "user_profile_clear", ?values: { ?user_id: Integer } } | { ?action: "user_comments_hide", ?values: { ?user_id: Integer } } | { ?action: "user_forum_posts_hide", ?values: { ?user_id: Integer } } | { ?action: "user_blips_delete", ?values: { ?user_id: Integer } } | { ?action: "user_blacklist_changed", ?values: { ?user_id: Integer } } | { ?action: "user_text_change", ?values: { ?user_id: Integer } } | { ?action: "user_custom_title_change", ?values: { ?user_id: Integer, ?old_custom_title: String, ?new_custom_title: String } } | { ?action: "user_upload_limit_change", ?values: { ?user_id: Integer, ?old_upload_limit: Integer, ?new_upload_limit: Integer } } | { ?action: "user_karma_change", ?values: { ?user_id: Integer, ?old_karma: Integer, ?new_karma: Integer } } | { ?action: "user_karma_free_toggle", ?values: { ?user_id: Integer, ?disabled: bool } } | { ?action: "user_uploads_toggle", ?values: { ?user_id: Integer, ?disabled: bool } } | { ?action: "user_flags_change", ?values: { ?user_id: Integer, ?added: Array[String], ?removed: Array[String] } } | { ?action: "user_level_change", ?values: { ?user_id: Integer, ?level: String, ?level_was: String } } | { ?action: "user_name_change", ?values: { ?user_id: Integer } } | { ?action: "totp_reset", ?values: { ?user_id: Integer } } | { ?action: "password_reset", ?values: { ?user_id: Integer, ?invalidated: bool, ?credentials_revoked: bool } } | { ?action: "user_delete", ?values: { ?user_id: Integer } } | { ?action: "user_ban", ?values: { ?user_id: Integer, ?duration: Integer, ?reason: String } } | { ?action: "user_ban_update", ?values: { ?user_id: Integer, ?ban_id: Integer, ?expires_at: String?, ?expires_at_was: String?, ?reason: String, ?reason_was: String } } | { ?action: "user_unban", ?values: { ?user_id: Integer } } | { ?action: "user_feedback_create", ?values: { ?user_id: Integer, ?reason: String, ?type: String, ?record_id: Integer } } | { ?action: "user_feedback_update", ?values: { ?user_id: Integer, ?reason: String, ?reason_was: String, ?type: String, ?type_was: String, ?record_id: Integer } } | { ?action: "user_feedback_delete", ?values: { ?user_id: Integer, ?reason: String, ?reason_was: String, ?type: String, ?type_was: String, ?record_id: Integer } } | { ?action: "user_feedback_undelete", ?values: { ?user_id: Integer, ?reason: String, ?reason_was: String, ?type: String, ?type_was: String, ?record_id: Integer } } | { ?action: "user_feedback_destroy", ?values: { ?user_id: Integer, ?reason: String, ?type: String, ?record_id: Integer } } | { ?action: "user_flush_favorites", ?values: { ?user_id: Integer } } | { ?action: "wiki_page_rename", ?values: { ?new_title: String, ?old_title: String } } | { ?action: "wiki_page_delete", ?values: { ?wiki_page: String, ?wiki_page_id: Integer } } | { ?action: "wiki_page_lock", ?values: { ?wiki_page: String } } | { ?action: "wiki_page_unlock", ?values: { ?wiki_page: String } } | { ?action: "mass_update", ?values: { ?antecedent: String, ?consequent: String } } | { ?action: "nuke_tag", ?values: { ?tag_name: String } } | { ?action: "takedown_delete", ?values: { ?takedown_id: Integer } } | { ?action: "takedown_process", ?values: { ?takedown_id: Integer } } | { ?action: "post_version_hide", ?values: { ?version: Integer, ?post_id: Integer } } | { ?action: "post_version_unhide", ?values: { ?version: Integer, ?post_id: Integer } } | { ?action: ("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"), ?values: Hash[Symbol, untyped] })
147
+
148
+ type news_update = { id: Integer, message: String, creator_id: Integer, updater_id: Integer, created_at: String, updated_at: String }
149
+
150
+ type note = { id: Integer, created_at: String, updated_at: String, creator_id: Integer, x: Integer, y: Integer, width: Integer, height: Integer, version: Integer, is_active: bool, post_id: Integer, body: String, creator_name: String }
151
+
152
+ type note_version = { id: Integer, created_at: String, updated_at: String, x: Integer, y: Integer, width: Integer, height: Integer, body: String, version: Integer, is_active: bool, note_id: Integer, post_id: Integer, updater_id: Integer }
153
+
154
+ # Only `active` is present when the token is inactive/unknown - the other fields are omitted entirely.
155
+ type oauth_introspection = { active: bool, ?scope: String, ?client_id: String, ?token_type: "Bearer", ?iat: Integer, ?exp: Integer }
156
+
157
+ type oauth_token = { access_token: String, token_type: "Bearer", expires_in: Integer, refresh_token: String, scope: String, created_at: Integer, ?id_token: String }
158
+
159
+ type oauth_token_info = { resource_owner_id: Integer, scope: Array[oauth_scope], expires_in: Integer, application: { uid: String }, created_at: Integer }
160
+
161
+ # null properties are entriely absent
162
+ type oauth_user_info = { preferred_username: String, name: String, ?picture: String, updated_at: Integer, e621_level: user_level, e621_level_string: user_level_name, ?e621_avatar_id: Integer, e621_permissions: oauth_permission, ?email: String, ?email_verified: bool, sub: String }
163
+
164
+ type open_id_configuration = { issuer: String, authorization_endpoint: String, token_endpoint: String, revocation_endpoint: String, introspection_endpoint: String, userinfo_endpoint: String, jwks_uri: String, scopes_supported: Array[oauth_scope], response_types_supported: Array[oauth_response_type], response_modes_supported: Array[oauth_response_mode], grant_types_supported: Array[oauth_grant_type], token_endpoint_auth_methods_supported: Array[oauth_token_endpoint_auth_method], subject_types_supported: Array[oauth_subject_type], id_token_signing_alg_values_supported: Array[oauth_id_token_signing_alg_value], claim_types_supported: Array[oauth_claim_type], claims_supported: Array[oauth_claim], code_challenge_methods_supported: Array[oauth_code_challenge_method] }
165
+
166
+ type pool = { id: Integer, name: String, updated_at: String, creator_id: Integer, description: String, is_active: bool, category: pool_category, post_ids: Array[Integer], created_at: String, creator_name: String, post_count: Integer }
167
+
168
+ type pool_version = { id: Integer, pool_id: Integer, post_ids: Array[Integer], created_at: String, updated_at: String, updater_id: Integer, name: String, name_changed: bool, description: String, description_changed: bool, is_active: bool, is_locked: bool, category: pool_category, version: Integer, added_post_ids: Array[Integer], removed_post_ids: Array[Integer] }
169
+
170
+ type post = { id: Integer, created_at: String, updated_at: String, change_seq: Integer, files: post_files, uploader_id: Integer, uploader_name: String, approver_id: Integer?, stats: post_stats, flags: post_flags, has: post_has, relationships: post_relationships, pools: Array[Integer], rating: rating, locked_tags: Array[String], sources: Array[String], description: String }
171
+
172
+ type post_approval = { id: Integer, user_id: Integer, post_id: Integer, created_at: String, updated_at: String }
173
+
174
+ type post_data = { post_data: Array[thumbnail_post] }
175
+
176
+ type post_deletion = { id: Integer, post_id: Integer, deleter_id: Integer, undeleter_id: Integer?, reason: String, is_undeleted: bool, source_post_flag_id: Integer?, created_at: String, undeleted_at: String? }
177
+
178
+ type post_disapproval = { id: Integer, user_id: Integer, post_id: Integer, reason: ("borderline_quality" | "borderline_relevancy" | "other"), message: String?, created_at: String, updated_at: String }
179
+
180
+ type post_event = { id: Integer, creator_id: Integer?, post_id: Integer, action: post_event_action, created_at: String }
181
+
182
+ type post_files = { meta: post_files_meta, original: post_files_original, preview: post_files_preview, sample: post_files_sample, ?video: { has: bool, original: post_sample_alternate, variants: { ?webm: post_sample_alternate, ?mp4: post_sample_alternate }, samples: { ?:"480p" => post_sample_alternate, ?:"720p" => post_sample_alternate } } }
183
+
184
+ type post_files_meta = { md5: String, ext: String, size: Integer, duration: Numeric?, has_sample: bool }
185
+
186
+ type post_files_original = { width: Integer, height: Integer, url: String? }
187
+
188
+ type post_files_preview = { width: Integer, height: Integer, jpg: String?, webp: String? }
189
+
190
+ type post_files_sample = { width: Integer, height: Integer, jpg: String?, webp: String? }
191
+
192
+ type post_flag = { id: Integer, created_at: String, post_id: Integer, reason: String, ?creator_id: Integer?, is_resolved: bool, updated_at: String, is_deletion: bool, ?note: String? }
193
+
194
+ type post_flags = { pending: bool, flagged: bool, note_locked: bool, status_locked: bool, rating_locked: bool, deleted: bool }
195
+
196
+ type post_has = { parent: bool, children: bool, active_children: bool, notes: bool, sample: bool }
197
+
198
+ type post_recommendation = { post_id: Integer, score: Numeric, explanation: String? }
199
+
200
+ type post_relationships = { parent_id: Integer?, children: Array[Integer] }
201
+
202
+ type post_replacement = { id: Integer, created_at: String, updated_at: String, post_id: Integer, creator_id: Integer, approver_id: Integer?, file_ext: String, file_size: Integer, image_height: Integer, image_width: Integer, md5: String, source: String, file_name: String, status: post_replacement_status, reason: String, sequence_number: Integer }
203
+
204
+ type post_sample_alternate = { fps: Numeric, codec: String?, size: Integer, width: Integer, height: Integer, url: String? }
205
+
206
+ type post_set = { id: Integer, created_at: String, updated_at: String, creator_id: Integer, is_public: bool, name: String, shortname: String, description: String, post_count: Integer, transfer_on_delete: bool, post_ids: Array[Integer] }
207
+
208
+ type post_stats = { score: post_stats_score, fav_count: Integer, is_favorited: bool, vote: up_down_meh_vote, comment_count: Integer, hotness: Numeric }
209
+
210
+ type post_stats_score = { up: Integer, down: Integer, total: Integer }
211
+
212
+ type post_version = { id: Integer, post_id: Integer, tags: String, updater_id: Integer, updated_at: String, rating: rating, parent_id: Integer?, source: String, description: String, reason: String?, locked_tags: String?, added_tags: Array[String], removed_tags: Array[String], original_tags: Array[String], added_locked_tags: Array[String], removed_locked_tags: Array[String], rating_changed: bool, parent_changed: bool, source_changed: bool, description_changed: bool, version: Integer, obsolete_added_tags: String, obsolete_removed_tags: String, unchanged_tags: String, updater_name: String, is_hidden: bool }
213
+
214
+ type post_vote = { id: Integer, post_id: Integer, user_id: Integer, score: up_down_vote, created_at: String, updated_at: String }
215
+
216
+ type raw_post = { id: Integer, created_at: String, updated_at: String, up_score: Integer, down_score: Integer, score: Integer, source: String, md5: String, rating: rating, is_note_locked: bool, is_rating_locked: bool, is_status_locked: bool, is_pending: bool, is_flagged: bool, is_deleted: bool, uploader_id: Integer, approver_id: Integer, last_noted_at: String?, last_comment_bumped_at: String?, fav_count: Integer, tag_string: String, tag_count: Integer, tag_count_general: Integer, tag_count_artist: Integer, tag_count_character: Integer, tag_count_copyright: Integer, file_ext: String, file_size: Integer, image_width: Integer, image_height: Integer, parent_id: Integer?, has_children: bool, last_commented_at: String?, has_active_children: bool, bit_flags: Integer, tag_count_meta: Integer, locked_tags: String?, tag_count_species: Integer, tag_count_invalid: Integer, description: String, comment_count: Integer, change_seq: Integer, tag_count_lore: Integer, bg_color: String?, generated_samples: Array[("720p" | "480p" | "original")]?, duration: String?, is_comment_disabled: bool, is_comment_locked: bool, has_large: bool, has_visible_children: bool, children_ids: String?, pool_ids: Array[Integer], is_favorited: bool, ?file_url: String, ?large_file_url: String, ?preview_file_url: String }
217
+
218
+ type recommended_posts = { post_id: Integer, model_version: String, results: Array[post_recommendation] }
219
+
220
+ type rising_search_trend = { name: String, pretty_name: String, post_count: Integer, category: tag_category }
221
+
222
+ type saved_search = { id: Integer, query: String, name: String?, is_tracked: bool, is_subscription: bool, last_seen_post_id: Integer?, created_at: String, updated_at: String, ?tag_count: Integer, new_count: Integer? }
223
+
224
+ type search_trend = { tag: String, count: Integer, day: String }
225
+
226
+ type search_trend_blacklist = { id: Integer, tag: String, reason: String, creator_id: Integer, created_at: String, updated_at: String }
227
+
228
+ type search_trend_hourly = { tag: String, count: Integer, hour: String, processed: bool }
229
+
230
+ type staff_file = { id: Integer, creator_id: Integer, storage_id: String, md5: String, file_ext: String, file_size: Integer, original_filename: String, title: String, description: String?, created_at: String, updated_at: String }
231
+
232
+ type staff_ip_addr_ip_listing = { comment: staff_ip_addr_sum, blip: staff_ip_addr_sum, dmail: staff_ip_addr_sum, post_flag: staff_ip_addr_sum, posts: staff_ip_addr_sum, users: staff_ip_addr_sum, ?artist_version: staff_ip_addr_sum, ?note_version: staff_ip_addr_sum, ?pool_version: staff_ip_addr_sum, ?post_version: staff_ip_addr_sum, ?wiki_page_version: staff_ip_addr_sum, last_login: Hash[Symbol, Integer] }
233
+
234
+ # Dictionary of ip address to count.
235
+ type staff_ip_addr_sum = Hash[Symbol, Integer]
236
+
237
+ type staff_ip_addr_sums = { comment: staff_ip_addr_sum, blip: staff_ip_addr_sum, dmail: staff_ip_addr_sum, post_flag: staff_ip_addr_sum, posts: staff_ip_addr_sum, users: staff_ip_addr_sum, ?artist_version: staff_ip_addr_sum, ?note_version: staff_ip_addr_sum, ?pool_version: staff_ip_addr_sum, ?post_version: staff_ip_addr_sum, ?wiki_page_version: staff_ip_addr_sum }
238
+
239
+ type staff_ip_addr_user_listing = { sums: staff_ip_addr_sums, ip_addrs: Array[String] }
240
+
241
+ type staff_note = { id: Integer, created_at: String, updated_at: String, user_id: Integer, creator_id: Integer, body: String, is_deleted: bool, updater_id: Integer }
242
+
243
+ type staff_wiki = { id: Integer, creator_id: Integer, updater_id: Integer, claimant_id: Integer?, title: String, body: String, created_at: String, updated_at: String }
244
+
245
+ type staff_wiki_version = { id: Integer, staff_wiki_id: Integer, updater_id: Integer, claimant_id: Integer?, title: String, body: String, created_at: String, updated_at: String }
246
+
247
+ type stats = { started: String, total_posts: Integer, active_posts: Integer, deleted_posts: Integer, existing_posts: Integer, destroyed_posts: Integer, total_votes: Integer, total_notes: Integer, total_favorites: Integer, total_pools: Integer, public_sets: Integer, private_sets: Integer, total_sets: Integer, average_posts_per_pool: Numeric, average_posts_per_set: Numeric, safe_posts: Integer, questionable_posts: Integer, explicit_posts: Integer, jpg_posts: Integer, png_posts: Integer, webp_posts: Integer, gif_posts: Integer, swf_posts: Integer, webm_posts: Integer, mp4_posts: Integer, average_file_size: Numeric, total_file_size: Integer, average_posts_per_day: Integer, total_users: Integer, anonymous_users: Integer, blocked_users: Integer, member_users: Integer, privileged_users: Integer, former_staff_users: Integer, staff_users: Integer, janitor_users: Integer, moderator_users: Integer, admin_users: Integer, unactivated_users: Integer, total_dmails: Integer, average_registrations_per_day: Integer, active_users: Integer, total_comments: Integer, active_comments: Integer, hidden_comments: Integer, deleted_comments: Integer, average_comments_per_day: Integer, total_forum_threads: Integer, total_forum_posts: Integer, average_posts_per_thread: Integer, average_forum_posts_per_day: Integer, total_blips: Integer, active_blips: Integer, deleted_blips: Integer, destroyed_blips: Integer, average_blips_per_day: Integer, total_tags: Integer, general_tags: Integer, species_tags: Integer, character_tags: Integer, copyright_tags: Integer, artist_tags: Integer, contributor_tags: Integer, invalid_tags: Integer, lore_tags: Integer, meta_tags: Integer, updated_at: String }
248
+
249
+ type tag = { id: Integer, name: String, post_count: Integer, related_tags: String, related_tags_updated_at: String?, category: tag_category, is_locked: bool, created_at: String, updated_at: String }
250
+
251
+ type tag_alias = { id: Integer, antecedent_name: String, reason: String, creator_id: Integer, created_at: String?, forum_post_id: Integer?, updated_at: String?, forum_topic_id: Integer?, consequent_name: String, status: tag_request_status, post_count: Integer, approver_id: Integer? }
252
+
253
+ type tag_correction = { post_count: Integer, real_post_count: Integer, category: tag_category, category_cache: tag_category, tag: tag }
254
+
255
+ type tag_implication = { id: Integer, reason: String, creator_id: Integer, created_at: String, forum_post_id: Integer?, antecedent_name: String, consequent_name: String, status: tag_request_status, forum_topic_id: Integer?, updated_at: String, descendant_names: Array[String], approver_id: Integer? }
256
+
257
+ type tag_preview = { ?id: Integer, name: String, ?resolved: String, ?category: tag_category, ?post_count: Integer, ?alias: String, ?implies: Array[String] }
258
+
259
+ type tag_subscription = { id: Integer, tag_id: Integer, created_at: String, tag_name: String, category: tag_category }
260
+
261
+ type tag_type_version = { id: Integer, created_at: String, updated_at: String, old_type: tag_category, new_type: tag_category, is_locked: bool, tag_id: Integer, creator_id: Integer }
262
+
263
+ type tag_with_count = { name: String, category_id: tag_category, count: Integer }
264
+
265
+ type takedown = { id: Integer, status: ("approved" | "denied" | "partial" | "pending"), approver_id: Integer?, reason_hidden: bool, created_at: String, updated_at: String, post_count: Integer }
266
+
267
+ type thumbnail_post = { id: Integer, created_at: String, md5: String, file_ext: String, width: Integer, height: Integer, size: Integer, duration: Numeric?, preview_url: String?, preview_webp: String?, sample_url: String?, file_url: String?, preview_width: Integer, preview_height: Integer, uploader_id: Integer, uploader: String, score: Integer, fav_count: Integer, is_favorited: bool, vote: up_down_meh_vote, comment_count: Integer, flags: String, pools: String, rating: rating, tags: String }
268
+
269
+ type ticket = { id: Integer, creator_id: Integer, reason: String, disp_id: Integer, qtype: ticket_type, status: ticket_status, created_at: String, updated_at: String, response: String, handler_id: Integer?, ?claimant_id: Integer?, report_reason: String?, accused_id: Integer? }
270
+
271
+ type tracked_search_trend = { count: Integer, day: String }
272
+
273
+ type upload = { id: Integer, source: String, rating: rating, uploader_id: Integer, tag_string: String, status: upload_status, ?backtrace: String?, post_id: Integer?, ?md5_confirmation: String?, created_at: String, updated_at: String, parent_id: Integer?, md5: String?, file_ext: String?, file_size: Integer?, image_width: Integer?, image_height: Integer?, description: String, processing_step: ("integrity" | "thumbnail" | "sound" | "post" | nil)?, error_message: String?, warning_messages: Array[String], is_animated: bool, duration: String?, has_sound: bool, locked_tags: String?, locked_rating: bool, as_pending: bool, submitted_tag_string: String?, processing_started_at: String?, processed_at: String?, requeued_at: String?, uploader_name: String, duplicate_post_id: Integer? }
274
+
275
+ type upload_karma_event = { id: Integer, user_id: Integer, creator_id: Integer, post_id: Integer?, reason: upload_karma_event_reason, delta: Integer, balance: Integer, extra_data: Hash[Symbol, untyped], created_at: String }
276
+
277
+ type upload_url_rule = { id: Integer, label: String, pattern: String, replacement: String, message: String, handling: ("recommend" | "block"), enabled: bool, creator_id: Integer, updater_id: Integer, created_at: String, updated_at: String }
278
+
279
+ type upload_whitelist = { id: Integer, created_at: String, updated_at: String, pattern: String, note: String, hidden: bool, allowed: bool, reason: String, domain: String, path: String }
280
+
281
+ type user = { id: Integer, created_at: String, name: String, level: user_level, base_upload_limit: Integer, upload_karma: Integer, upload_karma_free: bool, post_upload_count: Integer, post_update_count: Integer, note_update_count: Integer, is_banned: bool, can_approve_posts: bool, can_upload_free: bool, level_string: user_level_name, avatar_id: Integer?, ?is_verified: bool, has_cropped_avatar: bool, ?last_logged_in_at: String }
282
+
283
+ type user_alt = { user_id: Integer, score: Integer, handoff: bool, handoff_users: Integer?, shared_exact: Integer, shared_subnet: Integer, total_ips: Integer, ratio: Integer, rarest_users: Integer, overlap_first: String, overlap_last: String, last_co_seen: String, concurrent: bool, deleted: bool, user: user_alt_user? }
284
+
285
+ type user_alt_user = { id: Integer, name: String, level_string: String, created_at: String }
286
+
287
+ type user_avatar_menu = { has_uploads: bool, has_favorites: bool, has_sets: bool, has_comments: bool, has_forums: bool }
288
+
289
+ type user_feedback = { id: Integer, user_id: Integer, creator_id: Integer, category: user_feedback_category, body: String, created_at: String, updated_at: String, updater_id: Integer, is_deleted: bool }
290
+
291
+ type user_name_change_request = { id: Integer, approver_id: Integer, user_id: Integer, original_name: String, desired_name: String, ?change_reason: String, created_at: String, updated_at: String, status: "approved" }
292
+
293
+ type vote_trend = (tag | vote_trend_metatag | vote_trend_uploader)
294
+
295
+ type vote_trend_metatag = { name: String, post_count: Integer, uploader_id: nil, uploader: nil }
296
+
297
+ type vote_trend_uploader = { name: String, post_count: Integer, uploader_id: Integer, uploader: user }
298
+
299
+ type wiki_page = { id: Integer, created_at: String, updated_at: String, title: String, body: String, creator_id: Integer, is_locked: bool, updater_id: Integer, is_deleted: bool, other_names: Array[String], parent: String?, creator_name: String, category_id: tag_category, ?featured_posts: Array[Integer] }
300
+
301
+ type wiki_page_version = { id: Integer, created_at: String, updated_at: String, title: String, body: String, updater_id: Integer, wiki_page_id: Integer, is_locked: bool, other_names: Array[String], is_deleted: bool, reason: String?, parent: String?, ?featured_posts: Array[Integer] }
302
+
303
+ type access_denied_response = { success: bool, reason: String }
304
+
305
+ type d_text_response = { html: String, posts: deferred_post }
306
+
307
+ type iqdb_response = { hash: String, post_id: Integer, score: Numeric, post: { posts: iqdb_post } }
308
+
309
+ type iqdb_response_v2 = { hash: String, post_id: Integer, score: Numeric, post: basic_post }
310
+
311
+ type message_error_response = { success: bool, message: String, ?code: String? }
312
+
313
+ type message_success_response = { success: true, message: String }
314
+
315
+ type not_found_response = { success: bool, reason: "not found" }
316
+
317
+ type oauth_error = { error: String, ?error_description: String, ?state: String }
318
+ end
319
+ end
@@ -0,0 +1,66 @@
1
+ module E621OpenAPI
2
+ VERSION: String
3
+ SPEC_COMMIT: String
4
+ SPEC_URL: String
5
+ DEREFERENCED_SPEC_URL: String
6
+
7
+ def self.fetch_spec: (?dereferenced: bool) -> String
8
+
9
+ type body_type = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json"
10
+
11
+ type http_method = :get | :post | :put | :patch | :delete
12
+
13
+ module Operations
14
+ private
15
+
16
+ def request: (http_method method, String path, ?query: Hash[Symbol, untyped]?, ?body: Hash[Symbol, untyped]?, ?body_type: body_type?) -> untyped
17
+ def escape: (Integer | String value) -> String
18
+ end
19
+
20
+ class Error < StandardError
21
+ attr_reader request: Net::HTTPRequest
22
+ attr_reader response: Net::HTTPResponse
23
+ attr_reader status: Integer
24
+ attr_reader body: untyped
25
+
26
+ def initialize: (Net::HTTPRequest request, Net::HTTPResponse response, untyped body) -> void
27
+
28
+ private
29
+
30
+ def message_from: (untyped body) -> String?
31
+ end
32
+
33
+ class Client
34
+ include Operations
35
+
36
+ DEFAULT_BASE_URL: String
37
+ REQUESTS: Hash[http_method, singleton(Net::HTTPRequest)]
38
+
39
+ attr_reader base_url: URI::Generic
40
+ attr_reader user_agent: String
41
+
42
+ def initialize: (user_agent: String, ?username: String?, ?api_key: String?, ?base_url: String, ?open_timeout: Numeric, ?read_timeout: Numeric) -> void
43
+
44
+ def inspect: () -> String
45
+
46
+ private
47
+
48
+ @host: String
49
+ @username: String?
50
+ @api_key: String?
51
+ @open_timeout: Numeric
52
+ @read_timeout: Numeric
53
+
54
+ def request: (http_method method, String path, ?query: Hash[Symbol, untyped]?, ?body: Hash[Symbol, untyped]?, ?body_type: body_type?) -> untyped
55
+ def encode_body: (Net::HTTPRequest req, Hash[Symbol, untyped]? body, body_type body_type) -> void
56
+ def handle: (Net::HTTPRequest req, Net::HTTPResponse response) -> untyped
57
+ def multipart: (Array[[String, untyped]] pairs, String boundary) -> String
58
+ def parse: (Net::HTTPResponse response) -> untyped
59
+ def flatten: (Hash[Symbol | String, untyped]? params, ?String? prefix, ?Array[[String, untyped]] pairs) -> Array[[String, untyped]]
60
+ def param_value: (untyped value) -> untyped
61
+ def compact: (untyped value) -> untyped
62
+ def file?: (untyped value) -> bool
63
+ def filename: (untyped io) -> String
64
+ def escape: (Integer | String value) -> String
65
+ end
66
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: e621_openapi
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.385
5
+ platform: ruby
6
+ authors:
7
+ - Donovan_DMC
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ email:
13
+ - hewwo@yiff.rocks
14
+ executables: []
15
+ extensions: []
16
+ extra_rdoc_files: []
17
+ files:
18
+ - README.md
19
+ - lib/e621_openapi.rb
20
+ - lib/e621_openapi/client.rb
21
+ - lib/e621_openapi/enums.rb
22
+ - lib/e621_openapi/error.rb
23
+ - lib/e621_openapi/operations.rb
24
+ - lib/e621_openapi/spec.rb
25
+ - lib/e621_openapi/spec_commit.rb
26
+ - lib/e621_openapi/version.rb
27
+ - sig/e621_openapi.rbs
28
+ - sig/e621_openapi/enums.rbs
29
+ - sig/e621_openapi/operations.rbs
30
+ - sig/e621_openapi/types.rbs
31
+ homepage: https://e621.wiki
32
+ licenses:
33
+ - MIT
34
+ metadata:
35
+ source_code_uri: https://github.com/DonovanDMC/E621OpenAPI/tree/master/client/ruby
36
+ bug_tracker_uri: https://github.com/DonovanDMC/E621OpenAPI/issues
37
+ rubygems_mfa_required: 'true'
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '3.2'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubygems_version: 3.6.9
53
+ specification_version: 4
54
+ summary: RBS types and a client for the e621.net API, generated from the E621OpenAPI
55
+ spec.
56
+ test_files: []