diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 162ce93..61c93ca 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -16,6 +16,14 @@
+
+
+
@@ -39,53 +47,57 @@
- {
- "keyToString": {
- "NIXITCH_NIXPKGS_CONFIG": "/etc/nix/nixpkgs-config.nix",
- "NIXITCH_NIX_CONF_DIR": "",
- "NIXITCH_NIX_OTHER_STORES": "",
- "NIXITCH_NIX_PATH": "/home/Rory/.nix-defexpr/channels:nixpkgs=/nix/store/wb6agba4kfsxpbnb5hzlq58vkjzvbsk6-source",
- "NIXITCH_NIX_PROFILES": "/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/per-user/Rory /home/Rory/.local/state/nix/profile /nix/profile /home/Rory/.nix-profile",
- "NIXITCH_NIX_REMOTE": "",
- "NIXITCH_NIX_USER_PROFILE_DIR": "/nix/var/nix/profiles/per-user/Rory",
- "Node.js.Server.ts.executor": "Debug",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.git.unshallow": "true",
- "javascript.nodejs.core.library.configured.version": "24.8.0",
- "javascript.nodejs.core.library.typings.version": "24.7.0",
- "last_opened_file_path": "/home/Rory/git/spacebar/server/src/admin-api/routes/v0",
- "node.js.detected.package.eslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_interpreter_path": "node",
- "nodejs_package_manager_path": "npm",
- "npm.Start API.executor": "Run",
- "npm.Start CDN.executor": "Run",
- "npm.Start Gateway.executor": "Run",
- "npm.build.executor": "Run",
- "npm.start.executor": "Debug",
- "prettierjs.PrettierConfiguration.Package": "/home/Rory/git/spacebar/server/node_modules/prettier",
- "settings.editor.selected.configurable": "preferences.pluginManager",
- "ts.external.directory.path": "/home/Rory/git/spacebar/server-master/node_modules/typescript/lib"
+
+}]]>
+
+
+
-
-
-
-
+
+
+
+
+
@@ -132,7 +144,7 @@
-
+
diff --git a/assets/openapi.json b/assets/openapi.json
index 2888040..6a4563a 100644
--- a/assets/openapi.json
+++ b/assets/openapi.json
@@ -30,37 +30,74 @@
}
},
"schemas": {
- "AckBulkSchema": {
+ "ApplicationCreateSchema": {
"type": "object",
"properties": {
- "read_states": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "message_id": {
- "type": "string"
- },
- "read_state_type": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_id",
- "message_id",
- "read_state_type"
- ]
- }
+ "name": {
+ "type": "string"
+ },
+ "team_id": {
+ "type": "string"
}
},
"required": [
- "read_states"
+ "name"
]
},
+ "ApplicationModifySchema": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "icon": {
+ "type": "string"
+ },
+ "cover_image": {
+ "type": "string"
+ },
+ "interactions_endpoint_url": {
+ "type": "string"
+ },
+ "max_participants": {
+ "type": "integer",
+ "nullable": true
+ },
+ "name": {
+ "type": "string"
+ },
+ "privacy_policy_url": {
+ "type": "string"
+ },
+ "role_connections_verification_url": {
+ "type": "string"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "terms_of_service_url": {
+ "type": "string"
+ },
+ "bot_public": {
+ "type": "boolean"
+ },
+ "bot_require_code_grant": {
+ "type": "boolean"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ }
+ },
"ConnectedAccountCommonOAuthTokenResponse": {
"type": "object",
"properties": {
@@ -10515,1073 +10552,6 @@
"message"
]
},
- "ApplicationAuthorizeSchema": {
- "type": "object",
- "properties": {
- "authorize": {
- "type": "boolean"
- },
- "guild_id": {
- "type": "string"
- },
- "permissions": {
- "type": "string"
- },
- "captcha_key": {
- "type": "string"
- },
- "code": {
- "minLength": 6,
- "maxLength": 6,
- "type": "string"
- }
- },
- "required": [
- "authorize",
- "guild_id",
- "permissions"
- ]
- },
- "ApplicationCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "team_id": {
- "type": "string"
- }
- },
- "required": [
- "name"
- ]
- },
- "ApplicationModifySchema": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- },
- "icon": {
- "type": "string"
- },
- "cover_image": {
- "type": "string"
- },
- "interactions_endpoint_url": {
- "type": "string"
- },
- "max_participants": {
- "type": "integer",
- "nullable": true
- },
- "name": {
- "type": "string"
- },
- "privacy_policy_url": {
- "type": "string"
- },
- "role_connections_verification_url": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "terms_of_service_url": {
- "type": "string"
- },
- "bot_public": {
- "type": "boolean"
- },
- "bot_require_code_grant": {
- "type": "boolean"
- },
- "flags": {
- "type": "integer"
- },
- "custom_install_url": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- }
- }
- },
- "AutomodMentionSpamRuleSchema": {
- "type": "object",
- "properties": {
- "mention_total_limit": {
- "type": "integer"
- },
- "mention_raid_protection_enabled": {
- "type": "boolean"
- }
- },
- "required": [
- "mention_raid_protection_enabled",
- "mention_total_limit"
- ]
- },
- "AutomodSuspectedSpamRuleSchema": {
- "type": "object"
- },
- "AutomodCommonlyFlaggedWordsRuleSchema": {
- "type": "object",
- "properties": {
- "allow_list": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "presets": {
- "type": "array",
- "items": [
- {
- "type": "integer"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- }
- },
- "required": [
- "allow_list",
- "presets"
- ]
- },
- "AutomodCustomWordsRuleSchema": {
- "type": "object",
- "properties": {
- "allow_list": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "keyword_filter": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "regex_patterns": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- }
- },
- "required": [
- "allow_list",
- "keyword_filter",
- "regex_patterns"
- ]
- },
- "AutomodRuleSchema": {
- "type": "object",
- "properties": {
- "creator_id": {
- "type": "string"
- },
- "enabled": {
- "type": "boolean"
- },
- "event_type": {
- "type": "integer"
- },
- "exempt_channels": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "exempt_roles": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "guild_id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- },
- "trigger_type": {
- "type": "integer"
- },
- "trigger_metadata": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/AutomodMentionSpamRuleSchema"
- },
- {
- "$ref": "#/components/schemas/AutomodSuspectedSpamRuleSchema"
- },
- {
- "$ref": "#/components/schemas/AutomodCommonlyFlaggedWordsRuleSchema"
- },
- {
- "$ref": "#/components/schemas/AutomodCustomWordsRuleSchema"
- }
- ]
- }
- },
- "required": [
- "creator_id",
- "enabled",
- "event_type",
- "exempt_channels",
- "exempt_roles",
- "guild_id",
- "name",
- "position",
- "trigger_metadata",
- "trigger_type"
- ]
- },
- "BackupCodesChallengeSchema": {
- "type": "object",
- "properties": {
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- }
- },
- "required": [
- "password"
- ]
- },
- "BanCreateSchema": {
- "type": "object",
- "properties": {
- "delete_message_seconds": {
- "type": "string"
- },
- "delete_message_days": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- }
- },
- "BanModeratorSchema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "executor_id": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "required": [
- "executor_id",
- "guild_id",
- "id",
- "user_id"
- ]
- },
- "BanRegistrySchema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "executor_id": {
- "type": "string"
- },
- "ip": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "required": [
- "executor_id",
- "guild_id",
- "id",
- "user_id"
- ]
- },
- "BotModifySchema": {
- "type": "object",
- "properties": {
- "avatar": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- }
- },
- "ChannelPermissionOverwriteType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "ChannelModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "type": {
- "enum": [
- 0,
- 1,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 2,
- 255,
- 3,
- 33,
- 34,
- 35,
- 4,
- 5,
- 6,
- 64,
- 7,
- 8,
- 9
- ],
- "type": "number"
- },
- "topic": {
- "type": "string"
- },
- "icon": {
- "type": "string",
- "nullable": true
- },
- "bitrate": {
- "type": "integer"
- },
- "user_limit": {
- "type": "integer"
- },
- "rate_limit_per_user": {
- "type": "integer"
- },
- "position": {
- "type": "integer"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/components/schemas/ChannelPermissionOverwriteType"
- },
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "allow",
- "deny",
- "id",
- "type"
- ]
- }
- },
- "parent_id": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "nsfw": {
- "type": "boolean"
- },
- "rtc_region": {
- "type": "string"
- },
- "default_auto_archive_duration": {
- "type": "integer"
- },
- "default_reaction_emoji": {
- "type": "string",
- "nullable": true
- },
- "flags": {
- "type": "integer"
- },
- "default_thread_rate_limit_per_user": {
- "type": "integer"
- },
- "video_quality_mode": {
- "type": "integer"
- }
- }
- },
- "ChannelPermissionOverwriteSchema": {
- "type": "object",
- "properties": {
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/components/schemas/ChannelPermissionOverwriteType"
- }
- },
- "required": [
- "allow",
- "deny",
- "id",
- "type"
- ]
- },
- "ChannelReorderSchema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- },
- "lock_permissions": {
- "type": "boolean"
- },
- "parent_id": {
- "type": [
- "null",
- "string"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "id"
- ]
- }
- },
- "CodesVerificationSchema": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "nonce": {
- "type": "string"
- },
- "regenerate": {
- "type": "boolean"
- }
- },
- "required": [
- "key",
- "nonce"
- ]
- },
- "ConnectedAccountTokenData": {
- "type": "object",
- "properties": {
- "access_token": {
- "type": "string"
- },
- "token_type": {
- "type": "string"
- },
- "scope": {
- "type": "string"
- },
- "refresh_token": {
- "type": "string"
- },
- "expires_in": {
- "type": "integer"
- },
- "expires_at": {
- "type": "integer"
- },
- "fetched_at": {
- "type": "integer"
- }
- },
- "required": [
- "access_token",
- "fetched_at"
- ]
- },
- "ConnectedAccountSchema": {
- "type": "object",
- "properties": {
- "external_id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "token_data": {
- "$ref": "#/components/schemas/ConnectedAccountTokenData"
- },
- "friend_sync": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "revoked": {
- "type": "boolean"
- },
- "show_activity": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- },
- "verified": {
- "type": "boolean"
- },
- "visibility": {
- "type": "integer"
- },
- "integrations": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "metadata_": {},
- "metadata_visibility": {
- "type": "integer"
- },
- "two_way_link": {
- "type": "boolean"
- }
- },
- "required": [
- "external_id",
- "name",
- "type",
- "user_id"
- ]
- },
- "ConnectionCallbackSchema": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string"
- },
- "state": {
- "type": "string"
- },
- "insecure": {
- "type": "boolean"
- },
- "friend_sync": {
- "type": "boolean"
- },
- "openid_params": {}
- },
- "required": [
- "friend_sync",
- "insecure",
- "state"
- ]
- },
- "ConnectionUpdateSchema": {
- "type": "object",
- "properties": {
- "visibility": {
- "type": "boolean"
- },
- "show_activity": {
- "type": "boolean"
- },
- "metadata_visibility": {
- "type": "boolean"
- }
- }
- },
- "DmChannelCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "recipients": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "recipients"
- ]
- },
- "EmailDomainLookupSchema": {
- "type": "object",
- "properties": {
- "allow_multiple_guilds": {
- "type": "boolean"
- },
- "email": {
- "type": "string"
- },
- "use_verification_code": {
- "type": "boolean"
- },
- "guild_id": {
- "type": "string"
- }
- },
- "required": [
- "allow_multiple_guilds",
- "email",
- "use_verification_code"
- ]
- },
- "EmailDomainLookupVerifyCodeSchema": {
- "type": "object",
- "properties": {
- "email": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "code": {
- "type": "string"
- }
- },
- "required": [
- "code",
- "email",
- "guild_id"
- ]
- },
- "EmojiCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "image": {
- "type": "string"
- },
- "require_colons": {
- "type": "boolean",
- "nullable": true
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "image"
- ]
- },
- "EmojiModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "ForgotPasswordSchema": {
- "type": "object",
- "properties": {
- "login": {
- "type": "string"
- },
- "captcha_key": {
- "type": "string"
- }
- },
- "required": [
- "login"
- ]
- },
- "AllowedMentions": {
- "type": "object",
- "properties": {
- "parse": {
- "type": "array",
- "items": {
- "enum": [
- "everyone",
- "roles",
- "users"
- ],
- "type": "string"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "users": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "replied_user": {
- "type": "boolean"
- }
- }
- },
- "GreetRequestSchema": {
- "type": "object",
- "properties": {
- "sticker_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "allowed_mentions": {
- "$ref": "#/components/schemas/AllowedMentions"
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "fail_if_not_exists": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "message_id"
- ]
- }
- },
- "required": [
- "sticker_ids"
- ]
- },
- "GuildCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "icon": {
- "type": "string",
- "nullable": true
- },
- "channels": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ChannelModifySchema"
- }
- },
- "system_channel_id": {
- "type": "string"
- },
- "rules_channel_id": {
- "type": "string"
- },
- "guild_template_code": {
- "type": "string"
- },
- "staff_only": {
- "type": "boolean"
- }
- }
- },
- "GuildSubscriptionSchema": {
- "type": "object",
- "properties": {
- "channels": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "activities": {
- "type": "boolean"
- },
- "threads": {
- "type": "boolean"
- },
- "typing": {
- "const": true,
- "type": "boolean"
- },
- "members": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "member_updates": {
- "type": "boolean"
- },
- "thread_member_lists": {
- "type": "array",
- "items": {}
- }
- }
- },
- "GuildSubscriptionsBulkSchema": {
- "type": "object",
- "properties": {
- "subscriptions": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/GuildSubscriptionSchema"
- }
- }
- },
- "required": [
- "subscriptions"
- ]
- },
- "GuildTemplateCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "avatar": {
- "type": "string",
- "nullable": true
- }
- },
- "required": [
- "name"
- ]
- },
- "GuildUpdateSchema": {
- "type": "object",
- "properties": {
- "banner": {
- "type": "string",
- "nullable": true
- },
- "splash": {
- "type": "string",
- "nullable": true
- },
- "description": {
- "type": "string"
- },
- "features": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "verification_level": {
- "type": "integer"
- },
- "default_message_notifications": {
- "type": "integer"
- },
- "system_channel_flags": {
- "type": "integer"
- },
- "explicit_content_filter": {
- "type": "integer"
- },
- "public_updates_channel_id": {
- "type": "string"
- },
- "afk_timeout": {
- "type": "integer"
- },
- "afk_channel_id": {
- "type": "string"
- },
- "preferred_locale": {
- "type": "string"
- },
- "premium_progress_bar_enabled": {
- "type": "boolean"
- },
- "discovery_splash": {
- "type": "string"
- },
- "safety_alerts_channel_id": {
- "type": "string",
- "nullable": true
- },
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "icon": {
- "type": "string",
- "nullable": true
- },
- "system_channel_id": {
- "type": "string"
- },
- "rules_channel_id": {
- "type": "string"
- },
- "guild_template_code": {
- "type": "string"
- },
- "staff_only": {
- "type": "boolean"
- }
- }
- },
- "GuildUpdateWelcomeScreenSchema": {
- "type": "object",
- "properties": {
- "welcome_channels": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "emoji_id": {
- "type": "string"
- },
- "emoji_name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_id",
- "description"
- ]
- }
- },
- "enabled": {
- "type": "boolean"
- },
- "description": {
- "type": "string"
- }
- }
- },
- "HubWaitlistSignupSchema": {
- "type": "object",
- "properties": {
- "email": {
- "type": "string"
- },
- "school": {
- "type": "string"
- }
- },
- "required": [
- "email",
- "school"
- ]
- },
"ActivitySchema": {
"type": "object",
"properties": {
@@ -11954,1208 +10924,127 @@
"token"
]
},
- "InviteCreateSchema": {
+ "StreamCreateSchema": {
"type": "object",
"properties": {
- "target_user_id": {
+ "type": {
+ "enum": [
+ "call",
+ "guild"
+ ],
"type": "string"
},
- "target_type": {
+ "channel_id": {
"type": "string"
},
- "validate": {
+ "guild_id": {
"type": "string"
},
- "max_age": {
- "type": "integer"
- },
- "max_uses": {
- "type": "integer"
- },
- "temporary": {
- "type": "boolean"
- },
- "unique": {
- "type": "boolean"
- },
- "target_user": {
- "type": "string"
- },
- "target_user_type": {
- "type": "integer"
- },
- "flags": {
- "type": "integer"
- }
- }
- },
- "LoginSchema": {
- "type": "object",
- "properties": {
- "login": {
- "type": "string"
- },
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "undelete": {
- "type": "boolean"
- },
- "captcha_key": {
- "type": "string"
- },
- "login_source": {
- "type": "string"
- },
- "gift_code_sku_id": {
+ "preferred_region": {
"type": "string"
}
},
"required": [
- "login",
- "password"
+ "channel_id",
+ "type"
]
},
- "MemberChangeProfileSchema": {
+ "StreamDeleteSchema": {
"type": "object",
"properties": {
- "banner": {
- "type": "string",
- "nullable": true
- },
- "nick": {
- "type": "string"
- },
- "bio": {
- "type": "string"
- },
- "pronouns": {
- "type": "string"
- },
- "theme_colors": {
- "items": [
- {
- "type": "integer"
- },
- {
- "type": "integer"
- }
- ],
- "type": "array",
- "minItems": 2,
- "maxItems": 2
- }
- }
- },
- "MemberChangeSchema": {
- "type": "object",
- "properties": {
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "nick": {
- "type": "string"
- },
- "avatar": {
- "type": "string",
- "nullable": true
- },
- "bio": {
+ "stream_key": {
"type": "string"
}
- }
+ },
+ "required": [
+ "stream_key"
+ ]
},
- "MessageAcknowledgeSchema": {
+ "StreamWatchSchema": {
"type": "object",
"properties": {
- "manual": {
- "type": "boolean"
- },
- "mention_count": {
- "type": "integer"
- },
- "flags": {
- "type": "integer"
- },
- "last_viewed": {
- "type": "integer"
- },
- "token": {
+ "stream_key": {
"type": "string"
}
- }
+ },
+ "required": [
+ "stream_key"
+ ]
},
- "Embed": {
+ "APIErrorResponse": {
"type": "object",
"properties": {
- "title": {
- "type": "string"
- },
- "type": {
- "enum": [
- "article",
- "gifv",
- "image",
- "link",
- "rich",
- "video"
- ],
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "color": {
+ "code": {
"type": "integer"
},
- "footer": {
+ "message": {
+ "type": "string"
+ },
+ "errors": {
"type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "text"
- ]
- },
- "image": {
- "$ref": "#/components/schemas/EmbedImage"
- },
- "thumbnail": {
- "$ref": "#/components/schemas/EmbedImage"
- },
- "video": {
- "$ref": "#/components/schemas/EmbedImage"
- },
- "provider": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "author": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "fields": {
- "type": "array",
- "items": {
+ "additionalProperties": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "inline": {
- "type": "boolean"
+ "_errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "message"
+ ]
+ }
}
},
"additionalProperties": false,
"required": [
- "name",
- "value"
- ]
- }
- }
- }
- },
- "EmbedImage": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "proxy_url": {
- "type": "string"
- },
- "height": {
- "type": "integer"
- },
- "width": {
- "type": "integer"
- }
- }
- },
- "ActionRowComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/components/schemas/MessageComponentType.ActionRow"
- },
- "components": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/ButtonComponent"
- },
- {
- "$ref": "#/components/schemas/SelectMenuComponent"
- },
- {
- "$ref": "#/components/schemas/StringSelectMenuComponent"
- },
- {
- "$ref": "#/components/schemas/TextInputComponent"
- }
+ "_errors"
]
}
}
},
"required": [
- "components",
- "type"
+ "code",
+ "errors",
+ "message"
]
},
- "MessageComponentType.ActionRow": {
- "type": "number",
- "const": 1
- },
- "ButtonComponent": {
+ "CaptchaRequiredResponse": {
"type": "object",
"properties": {
- "type": {
- "$ref": "#/components/schemas/MessageComponentType.Button"
- },
- "style": {
- "$ref": "#/components/schemas/ButtonStyle"
- },
- "label": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/components/schemas/PartialEmoji"
- },
- "custom_id": {
- "type": "string"
- },
- "sku_id": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "required": [
- "style",
- "type"
- ]
- },
- "MessageComponentType.Button": {
- "type": "number",
- "const": 2
- },
- "ButtonStyle": {
- "type": "number",
- "enum": [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6
- ]
- },
- "PartialEmoji": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "animated": {
- "type": "boolean"
- }
- },
- "required": [
- "name"
- ]
- },
- "SelectMenuComponent": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- 3,
- 5,
- 6,
- 7,
- 8
- ],
- "type": "number"
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "required": [
- "custom_id",
- "type"
- ]
- },
- "SelectMenuDefaultOption": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "enum": [
- "channel",
- "role",
- "user"
- ],
- "type": "string"
- }
- },
- "required": [
- "id",
- "type"
- ]
- },
- "StringSelectMenuComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/components/schemas/MessageComponentType.StringSelect"
- },
- "options": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/SelectMenuOption"
- }
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "required": [
- "custom_id",
- "options",
- "type"
- ]
- },
- "MessageComponentType.StringSelect": {
- "type": "number",
- "const": 3
- },
- "SelectMenuOption": {
- "type": "object",
- "properties": {
- "label": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/components/schemas/PartialEmoji"
- },
- "default": {
- "type": "boolean"
- }
- },
- "required": [
- "label",
- "value"
- ]
- },
- "TextInputComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/components/schemas/MessageComponentType.TextInput"
- },
- "custom_id": {
- "type": "string"
- },
- "style": {
- "$ref": "#/components/schemas/TextInputStyle"
- },
- "label": {
- "type": "string"
- },
- "min_length": {
- "type": "integer"
- },
- "max_length": {
- "type": "integer"
- },
- "required": {
- "type": "boolean"
- },
- "value": {
- "type": "string"
- },
- "placeholder": {
- "type": "string"
- }
- },
- "required": [
- "custom_id",
- "label",
- "style",
- "type"
- ]
- },
- "MessageComponentType.TextInput": {
- "type": "number",
- "const": 4
- },
- "TextInputStyle": {
- "type": "number",
- "enum": [
- 1,
- 2
- ]
- },
- "PollCreationSchema": {
- "type": "object",
- "properties": {
- "question": {
- "$ref": "#/components/schemas/PollMedia"
- },
- "answers": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/PollAnswer"
- }
- },
- "duration": {
- "type": "integer"
- },
- "allow_multiselect": {
- "type": "boolean"
- },
- "layout_type": {
- "type": "integer"
- }
- },
- "required": [
- "answers",
- "question"
- ]
- },
- "PollMedia": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/components/schemas/PartialEmoji"
- }
- }
- },
- "PollAnswer": {
- "type": "object",
- "properties": {
- "answer_id": {
- "type": "string"
- },
- "poll_media": {
- "$ref": "#/components/schemas/PollMedia"
- }
- },
- "required": [
- "poll_media"
- ]
- },
- "MessageCreateSchema": {
- "type": "object",
- "properties": {
- "type": {
- "type": "integer"
- },
- "content": {
- "type": "string"
- },
- "mobile_network_type": {
- "type": "string"
- },
- "nonce": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "tts": {
- "type": "boolean"
- },
- "flags": {
- "type": "integer"
- },
- "embeds": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Embed"
- }
- },
- "embed": {
- "$ref": "#/components/schemas/Embed"
- },
- "allowed_mentions": {
- "type": "object",
- "properties": {
- "parse": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "users": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "replied_user": {
- "type": "boolean"
- }
- },
- "additionalProperties": false
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "fail_if_not_exists": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "message_id"
- ]
- },
- "payload_json": {
- "type": "string"
- },
- "file": {
- "type": "object",
- "properties": {
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename"
- ]
- },
- "attachments": {
- "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "id"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- },
- "uploaded_filename": {
- "type": "string"
- },
- "original_content_type": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "uploaded_filename"
- ]
- }
- ]
- }
- },
- "sticker_ids": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "components": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ActionRowComponent"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "poll": {
- "$ref": "#/components/schemas/PollCreationSchema"
- },
- "enforce_nonce": {
- "type": "boolean"
- },
- "applied_tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "thread_name": {
- "type": "string"
- },
- "avatar_url": {
- "type": "string"
- }
- }
- },
- "MessageEditSchema": {
- "type": "object",
- "properties": {
- "embed": {
- "$ref": "#/components/schemas/Embed"
- },
- "file": {
- "type": "object",
- "properties": {
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename"
- ]
- },
- "flags": {
- "type": "integer"
- },
- "channel_id": {
- "type": "string"
- },
- "content": {
- "type": "string"
- },
- "mobile_network_type": {
- "type": "string"
- },
- "nonce": {
- "type": "string"
- },
- "tts": {
- "type": "boolean"
- },
- "embeds": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Embed"
- }
- },
- "allowed_mentions": {
- "type": "object",
- "properties": {
- "parse": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "users": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "replied_user": {
- "type": "boolean"
- }
- },
- "additionalProperties": false
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "fail_if_not_exists": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "message_id"
- ]
- },
- "payload_json": {
- "type": "string"
- },
- "attachments": {
- "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "id"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- },
- "uploaded_filename": {
- "type": "string"
- },
- "original_content_type": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "uploaded_filename"
- ]
- }
- ]
- }
- },
- "sticker_ids": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "components": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ActionRowComponent"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "poll": {
- "$ref": "#/components/schemas/PollCreationSchema"
- },
- "enforce_nonce": {
- "type": "boolean"
- },
- "applied_tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "thread_name": {
- "type": "string"
- },
- "avatar_url": {
- "type": "string"
- }
- }
- },
- "MfaCodesSchema": {
- "type": "object",
- "properties": {
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "regenerate": {
- "type": "boolean"
- }
- },
- "required": [
- "password"
- ]
- },
- "ModifyGuildStickerSchema": {
- "type": "object",
- "properties": {
- "name": {
- "minLength": 2,
- "maxLength": 30,
- "type": "string"
- },
- "description": {
- "maxLength": 100,
- "type": "string"
- },
- "tags": {
- "maxLength": 200,
- "type": "string"
- }
- },
- "required": [
- "name",
- "tags"
- ]
- },
- "PreloadMessagesRequestSchema": {
- "type": "object",
- "properties": {
- "channels": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "channels"
- ]
- },
- "PasswordResetSchema": {
- "type": "object",
- "properties": {
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "token": {
- "type": "string"
- }
- },
- "required": [
- "password",
- "token"
- ]
- },
- "PurgeSchema": {
- "type": "object",
- "properties": {
- "before": {
- "type": "string"
- },
- "after": {
- "type": "string"
- }
- },
- "required": [
- "after",
- "before"
- ]
- },
- "RefreshUrlsRequestSchema": {
- "type": "object",
- "properties": {
- "attachment_urls": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "attachment_urls"
- ]
- },
- "RegisterSchema": {
- "type": "object",
- "properties": {
- "username": {
- "minLength": 2,
- "type": "string"
- },
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "consent": {
- "type": "boolean"
- },
- "email": {
- "format": "email",
- "type": "string"
- },
- "fingerprint": {
- "type": "string"
- },
- "invite": {
- "type": "string"
- },
- "date_of_birth": {
- "type": "string"
- },
- "gift_code_sku_id": {
- "type": "string"
- },
"captcha_key": {
"type": "string"
},
- "promotional_email_opt_in": {
- "type": "boolean"
+ "captcha_sitekey": {
+ "type": "string"
},
- "unique_username_registration": {
- "type": "boolean"
- },
- "global_name": {
+ "captcha_service": {
"type": "string"
}
},
"required": [
- "consent",
- "username"
+ "captcha_key",
+ "captcha_service",
+ "captcha_sitekey"
]
},
- "RelationshipPostSchema": {
- "type": "object",
- "properties": {
- "discriminator": {
- "type": "string"
+ "APIErrorOrCaptchaResponse": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/APIErrorResponse"
},
- "username": {
- "type": "string"
+ {
+ "$ref": "#/components/schemas/CaptchaRequiredResponse"
}
- },
- "required": [
- "discriminator",
- "username"
- ]
- },
- "RelationshipPutSchema": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- 1,
- 2,
- 3,
- 4
- ],
- "type": "number"
- }
- }
- },
- "RequestGuildMembersSchema": {
- "type": "object",
- "properties": {
- "guild_id": {
- "anyOf": [
- {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- {
- "type": "string"
- }
- ]
- },
- "query": {
- "type": "string"
- },
- "limit": {
- "type": "integer"
- },
- "presences": {
- "type": "boolean"
- },
- "user_ids": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "string"
- }
- ]
- },
- "nonce": {
- "type": "string"
- }
- },
- "required": [
- "guild_id"
]
},
"Classification": {
@@ -13479,82 +11368,6 @@
"username"
]
},
- "APIErrorResponse": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "message": {
- "type": "string"
- },
- "errors": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "_errors": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "code",
- "message"
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "_errors"
- ]
- }
- }
- },
- "required": [
- "code",
- "errors",
- "message"
- ]
- },
- "CaptchaRequiredResponse": {
- "type": "object",
- "properties": {
- "captcha_key": {
- "type": "string"
- },
- "captcha_sitekey": {
- "type": "string"
- },
- "captcha_service": {
- "type": "string"
- }
- },
- "required": [
- "captcha_key",
- "captcha_service",
- "captcha_sitekey"
- ]
- },
- "APIErrorOrCaptchaResponse": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/APIErrorResponse"
- },
- {
- "$ref": "#/components/schemas/CaptchaRequiredResponse"
- }
- ]
- },
"BackupCodesChallengeResponse": {
"type": "object",
"properties": {
@@ -15044,6 +12857,36 @@
"user_id"
]
},
+ "ConnectedAccountTokenData": {
+ "type": "object",
+ "properties": {
+ "access_token": {
+ "type": "string"
+ },
+ "token_type": {
+ "type": "string"
+ },
+ "scope": {
+ "type": "string"
+ },
+ "refresh_token": {
+ "type": "string"
+ },
+ "expires_in": {
+ "type": "integer"
+ },
+ "expires_at": {
+ "type": "integer"
+ },
+ "fetched_at": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "access_token",
+ "fetched_at"
+ ]
+ },
"UserSettings": {
"type": "object",
"properties": {
@@ -15358,6 +13201,14 @@
"type"
]
},
+ "ChannelPermissionOverwriteType": {
+ "type": "number",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ]
+ },
"Invite": {
"type": "object",
"properties": {
@@ -16432,6 +14283,134 @@
"url"
]
},
+ "Embed": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "article",
+ "gifv",
+ "image",
+ "link",
+ "rich",
+ "video"
+ ],
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "color": {
+ "type": "integer"
+ },
+ "footer": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "icon_url": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "text"
+ ]
+ },
+ "image": {
+ "$ref": "#/components/schemas/EmbedImage"
+ },
+ "thumbnail": {
+ "$ref": "#/components/schemas/EmbedImage"
+ },
+ "video": {
+ "$ref": "#/components/schemas/EmbedImage"
+ },
+ "provider": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "author": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "icon_url": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "inline": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "value"
+ ]
+ }
+ }
+ }
+ },
+ "EmbedImage": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "proxy_url": {
+ "type": "string"
+ },
+ "height": {
+ "type": "integer"
+ },
+ "width": {
+ "type": "integer"
+ }
+ }
+ },
"Reaction": {
"type": "object",
"properties": {
@@ -16454,6 +14433,23 @@
"user_ids"
]
},
+ "PartialEmoji": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "animated": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
"MessageType": {
"type": "number",
"enum": [
@@ -16492,6 +14488,278 @@
2
]
},
+ "ActionRowComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/components/schemas/MessageComponentType.ActionRow"
+ },
+ "components": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ButtonComponent"
+ },
+ {
+ "$ref": "#/components/schemas/SelectMenuComponent"
+ },
+ {
+ "$ref": "#/components/schemas/StringSelectMenuComponent"
+ },
+ {
+ "$ref": "#/components/schemas/TextInputComponent"
+ }
+ ]
+ }
+ }
+ },
+ "required": [
+ "components",
+ "type"
+ ]
+ },
+ "MessageComponentType.ActionRow": {
+ "type": "number",
+ "const": 1
+ },
+ "ButtonComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/components/schemas/MessageComponentType.Button"
+ },
+ "style": {
+ "$ref": "#/components/schemas/ButtonStyle"
+ },
+ "label": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/components/schemas/PartialEmoji"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "sku_id": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "style",
+ "type"
+ ]
+ },
+ "MessageComponentType.Button": {
+ "type": "number",
+ "const": 2
+ },
+ "ButtonStyle": {
+ "type": "number",
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6
+ ]
+ },
+ "SelectMenuComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ 3,
+ 5,
+ 6,
+ 7,
+ 8
+ ],
+ "type": "number"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "channel_types": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "default_values": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SelectMenuDefaultOption"
+ }
+ },
+ "min_values": {
+ "type": "integer"
+ },
+ "max_values": {
+ "type": "integer"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "custom_id",
+ "type"
+ ]
+ },
+ "SelectMenuDefaultOption": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "channel",
+ "role",
+ "user"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "type"
+ ]
+ },
+ "StringSelectMenuComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/components/schemas/MessageComponentType.StringSelect"
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SelectMenuOption"
+ }
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "channel_types": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "default_values": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SelectMenuDefaultOption"
+ }
+ },
+ "min_values": {
+ "type": "integer"
+ },
+ "max_values": {
+ "type": "integer"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "custom_id",
+ "options",
+ "type"
+ ]
+ },
+ "MessageComponentType.StringSelect": {
+ "type": "number",
+ "const": 3
+ },
+ "SelectMenuOption": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/components/schemas/PartialEmoji"
+ },
+ "default": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "label",
+ "value"
+ ]
+ },
+ "TextInputComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/components/schemas/MessageComponentType.TextInput"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "style": {
+ "$ref": "#/components/schemas/TextInputStyle"
+ },
+ "label": {
+ "type": "string"
+ },
+ "min_length": {
+ "type": "integer"
+ },
+ "max_length": {
+ "type": "integer"
+ },
+ "required": {
+ "type": "boolean"
+ },
+ "value": {
+ "type": "string"
+ },
+ "placeholder": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "custom_id",
+ "label",
+ "style",
+ "type"
+ ]
+ },
+ "MessageComponentType.TextInput": {
+ "type": "number",
+ "const": 4
+ },
+ "TextInputStyle": {
+ "type": "number",
+ "enum": [
+ 1,
+ 2
+ ]
+ },
"Poll": {
"type": "object",
"properties": {
@@ -16522,6 +14790,31 @@
"question"
]
},
+ "PollMedia": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/components/schemas/PartialEmoji"
+ }
+ }
+ },
+ "PollAnswer": {
+ "type": "object",
+ "properties": {
+ "answer_id": {
+ "type": "string"
+ },
+ "poll_media": {
+ "$ref": "#/components/schemas/PollMedia"
+ }
+ },
+ "required": [
+ "poll_media"
+ ]
+ },
"PollResult": {
"type": "object",
"properties": {
@@ -16929,24 +15222,226 @@
"type": "string"
},
"author": {
- "$ref": "#/components/schemas/User"
+ "$ref": "#/components/schemas/PartialUser"
},
"flags": {
"type": "integer"
},
"application_id": {
"type": "string"
- },
- "channel": {
- "$ref": "#/components/schemas/Channel"
}
},
"required": [
- "flags",
+ "author",
+ "channel_id",
+ "content",
"id",
"type"
]
},
+ "PartialUser": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```",
+ "format": "snowflake",
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "discriminator": {
+ "type": "string"
+ },
+ "global_name": {
+ "type": "string",
+ "nullable": true
+ },
+ "avatar": {
+ "type": "string",
+ "nullable": true
+ },
+ "avatar_decoration_data": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/AvatarDecorationData"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "collectibles": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Collectibles"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "display_name_styles": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/DisplayNameStyle"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "primary_guild": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/PrimaryGuild"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "bot": {
+ "type": "boolean"
+ },
+ "system": {
+ "type": "boolean"
+ },
+ "banner": {
+ "type": "string",
+ "nullable": true
+ },
+ "accent_color": {
+ "type": "integer",
+ "nullable": true
+ },
+ "public_flags": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "avatar",
+ "discriminator",
+ "id",
+ "username"
+ ]
+ },
+ "AvatarDecorationData": {
+ "type": "object",
+ "properties": {
+ "asset": {
+ "type": "string"
+ },
+ "sku_id": {
+ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```",
+ "format": "snowflake",
+ "type": "string"
+ },
+ "expires_at": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "required": [
+ "asset",
+ "expires_at",
+ "sku_id"
+ ]
+ },
+ "Collectibles": {
+ "type": "object",
+ "properties": {
+ "nameplate": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/NameplateData"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ },
+ "required": [
+ "nameplate"
+ ]
+ },
+ "NameplateData": {
+ "type": "object",
+ "properties": {
+ "asset": {
+ "type": "string"
+ },
+ "sku_id": {
+ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```",
+ "format": "snowflake",
+ "type": "string"
+ },
+ "label": {
+ "type": "string"
+ },
+ "palette": {
+ "type": "string"
+ },
+ "expires_at": {
+ "type": "integer",
+ "nullable": true
+ }
+ },
+ "required": [
+ "asset",
+ "expires_at",
+ "label",
+ "palette",
+ "sku_id"
+ ]
+ },
+ "DisplayNameStyle": {
+ "type": "object",
+ "properties": {
+ "font_id": {
+ "type": "integer"
+ },
+ "effect_id": {
+ "type": "integer"
+ },
+ "colors": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "colors",
+ "effect_id",
+ "font_id"
+ ]
+ },
+ "PrimaryGuild": {
+ "type": "object",
+ "properties": {
+ "identity_enabled": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "identity_guild_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "tag": {
+ "type": "string",
+ "nullable": true
+ },
+ "badge": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "required": [
+ "badge",
+ "identity_enabled",
+ "identity_guild_id",
+ "tag"
+ ]
+ },
"DmMessagesResponseSchema": {
"type": "array",
"items": {
@@ -18371,7 +16866,7 @@
"length": {
"type": "integer"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
@@ -18530,17 +17025,17 @@
"except": {
"type": "boolean"
},
- "__@iterator@646": {
+ "__@iterator@684": {
"type": "boolean"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "boolean"
}
}
}
},
"required": [
- "__@unscopables@679",
+ "__@unscopables@686",
"length"
]
},
@@ -18851,12 +17346,6 @@
"$ref": "#/components/schemas/Channel"
}
},
- "members": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Member"
- }
- },
"system_channel_id": {
"type": "string",
"nullable": true
@@ -18936,6 +17425,12 @@
"presence_count": {
"type": "integer"
},
+ "members": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Member"
+ }
+ },
"template_id": {
"type": "string"
},
@@ -19084,9 +17579,15 @@
"APIPrivateUser": {
"type": "object",
"properties": {
+ "email": {
+ "type": "string"
+ },
"id": {
"type": "string"
},
+ "verified": {
+ "type": "boolean"
+ },
"flags": {
"type": "integer"
},
@@ -19097,9 +17598,6 @@
"avatar": {
"type": "string"
},
- "verified": {
- "type": "boolean"
- },
"username": {
"type": "string"
},
@@ -19142,9 +17640,6 @@
"mfa_enabled": {
"type": "boolean"
},
- "email": {
- "type": "string"
- },
"phone": {
"type": "string"
},
@@ -19295,9 +17790,15 @@
"newToken": {
"type": "string"
},
+ "email": {
+ "type": "string"
+ },
"id": {
"type": "string"
},
+ "verified": {
+ "type": "boolean"
+ },
"flags": {
"type": "integer"
},
@@ -19308,9 +17809,6 @@
"avatar": {
"type": "string"
},
- "verified": {
- "type": "boolean"
- },
"username": {
"type": "string"
},
@@ -19353,9 +17851,6 @@
"mfa_enabled": {
"type": "boolean"
},
- "email": {
- "type": "string"
- },
"phone": {
"type": "string"
},
@@ -20393,29 +18888,6 @@
"user_profile"
]
},
- "UserRelationshipsResponse": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/components/schemas/RelationshipType"
- },
- "nickname": {
- "type": "null"
- },
- "user": {
- "$ref": "#/components/schemas/PublicUser"
- }
- },
- "required": [
- "id",
- "nickname",
- "type",
- "user"
- ]
- },
"UserRelationsResponse": {
"type": "array",
"items": {
@@ -20446,6 +18918,29 @@
]
}
},
+ "UserRelationshipsResponse": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/components/schemas/RelationshipType"
+ },
+ "nickname": {
+ "type": "null"
+ },
+ "user": {
+ "$ref": "#/components/schemas/PublicUser"
+ }
+ },
+ "required": [
+ "id",
+ "nickname",
+ "type",
+ "user"
+ ]
+ },
"WebAuthnCreateResponse": {
"type": "object",
"properties": {
@@ -20476,6 +18971,1880 @@
"user"
]
},
+ "AckBulkSchema": {
+ "type": "object",
+ "properties": {
+ "read_states": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "message_id": {
+ "type": "string"
+ },
+ "read_state_type": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id",
+ "message_id",
+ "read_state_type"
+ ]
+ }
+ }
+ },
+ "required": [
+ "read_states"
+ ]
+ },
+ "ApplicationAuthorizeSchema": {
+ "type": "object",
+ "properties": {
+ "authorize": {
+ "type": "boolean"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "permissions": {
+ "type": "string"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "code": {
+ "minLength": 6,
+ "maxLength": 6,
+ "type": "string"
+ }
+ },
+ "required": [
+ "authorize",
+ "guild_id",
+ "permissions"
+ ]
+ },
+ "AutomodMentionSpamRuleSchema": {
+ "type": "object",
+ "properties": {
+ "mention_total_limit": {
+ "type": "integer"
+ },
+ "mention_raid_protection_enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "mention_raid_protection_enabled",
+ "mention_total_limit"
+ ]
+ },
+ "AutomodSuspectedSpamRuleSchema": {
+ "type": "object"
+ },
+ "AutomodCommonlyFlaggedWordsRuleSchema": {
+ "type": "object",
+ "properties": {
+ "allow_list": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "presets": {
+ "type": "array",
+ "items": [
+ {
+ "type": "integer"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ }
+ },
+ "required": [
+ "allow_list",
+ "presets"
+ ]
+ },
+ "AutomodCustomWordsRuleSchema": {
+ "type": "object",
+ "properties": {
+ "allow_list": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "keyword_filter": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "regex_patterns": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ }
+ },
+ "required": [
+ "allow_list",
+ "keyword_filter",
+ "regex_patterns"
+ ]
+ },
+ "AutomodRuleSchema": {
+ "type": "object",
+ "properties": {
+ "creator_id": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "event_type": {
+ "type": "integer"
+ },
+ "exempt_channels": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "exempt_roles": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "trigger_type": {
+ "type": "integer"
+ },
+ "trigger_metadata": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/AutomodMentionSpamRuleSchema"
+ },
+ {
+ "$ref": "#/components/schemas/AutomodSuspectedSpamRuleSchema"
+ },
+ {
+ "$ref": "#/components/schemas/AutomodCommonlyFlaggedWordsRuleSchema"
+ },
+ {
+ "$ref": "#/components/schemas/AutomodCustomWordsRuleSchema"
+ }
+ ]
+ }
+ },
+ "required": [
+ "creator_id",
+ "enabled",
+ "event_type",
+ "exempt_channels",
+ "exempt_roles",
+ "guild_id",
+ "name",
+ "position",
+ "trigger_metadata",
+ "trigger_type"
+ ]
+ },
+ "BackupCodesChallengeSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ }
+ },
+ "required": [
+ "password"
+ ]
+ },
+ "BanCreateSchema": {
+ "type": "object",
+ "properties": {
+ "delete_message_seconds": {
+ "type": "string"
+ },
+ "delete_message_days": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ }
+ },
+ "BanModeratorSchema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "executor_id": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "executor_id",
+ "guild_id",
+ "id",
+ "user_id"
+ ]
+ },
+ "BanRegistrySchema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "executor_id": {
+ "type": "string"
+ },
+ "ip": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "executor_id",
+ "guild_id",
+ "id",
+ "user_id"
+ ]
+ },
+ "BotModifySchema": {
+ "type": "object",
+ "properties": {
+ "avatar": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ }
+ },
+ "BulkBanSchema": {
+ "type": "object",
+ "properties": {
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "delete_message_seconds": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "user_ids"
+ ]
+ },
+ "BulkDeleteSchema": {
+ "type": "object",
+ "properties": {
+ "messages": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "messages"
+ ]
+ },
+ "ChannelModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ 0,
+ 1,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 2,
+ 255,
+ 3,
+ 33,
+ 34,
+ 35,
+ 4,
+ 5,
+ 6,
+ 64,
+ 7,
+ 8,
+ 9
+ ],
+ "type": "number"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "icon": {
+ "type": "string",
+ "nullable": true
+ },
+ "bitrate": {
+ "type": "integer"
+ },
+ "user_limit": {
+ "type": "integer"
+ },
+ "rate_limit_per_user": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/components/schemas/ChannelPermissionOverwriteType"
+ },
+ "allow": {
+ "type": "string"
+ },
+ "deny": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow",
+ "deny",
+ "id",
+ "type"
+ ]
+ }
+ },
+ "parent_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "nsfw": {
+ "type": "boolean"
+ },
+ "rtc_region": {
+ "type": "string"
+ },
+ "default_auto_archive_duration": {
+ "type": "integer"
+ },
+ "default_reaction_emoji": {
+ "type": "string",
+ "nullable": true
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "default_thread_rate_limit_per_user": {
+ "type": "integer"
+ },
+ "video_quality_mode": {
+ "type": "integer"
+ }
+ }
+ },
+ "ChannelPermissionOverwriteSchema": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "string"
+ },
+ "deny": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/components/schemas/ChannelPermissionOverwriteType"
+ }
+ },
+ "required": [
+ "allow",
+ "deny",
+ "id",
+ "type"
+ ]
+ },
+ "ChannelReorderSchema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "lock_permissions": {
+ "type": "boolean"
+ },
+ "parent_id": {
+ "type": [
+ "null",
+ "string"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ]
+ }
+ },
+ "CodesVerificationSchema": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "regenerate": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "key",
+ "nonce"
+ ]
+ },
+ "ConnectedAccountSchema": {
+ "type": "object",
+ "properties": {
+ "external_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "token_data": {
+ "$ref": "#/components/schemas/ConnectedAccountTokenData"
+ },
+ "friend_sync": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "revoked": {
+ "type": "boolean"
+ },
+ "show_activity": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "verified": {
+ "type": "boolean"
+ },
+ "visibility": {
+ "type": "integer"
+ },
+ "integrations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "metadata_": {},
+ "metadata_visibility": {
+ "type": "integer"
+ },
+ "two_way_link": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "external_id",
+ "name",
+ "type",
+ "user_id"
+ ]
+ },
+ "ConnectionCallbackSchema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "state": {
+ "type": "string"
+ },
+ "insecure": {
+ "type": "boolean"
+ },
+ "friend_sync": {
+ "type": "boolean"
+ },
+ "openid_params": {}
+ },
+ "required": [
+ "friend_sync",
+ "insecure",
+ "state"
+ ]
+ },
+ "ConnectionUpdateSchema": {
+ "type": "object",
+ "properties": {
+ "visibility": {
+ "type": "boolean"
+ },
+ "show_activity": {
+ "type": "boolean"
+ },
+ "metadata_visibility": {
+ "type": "boolean"
+ }
+ }
+ },
+ "DmChannelCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "recipients": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "recipients"
+ ]
+ },
+ "EmailDomainLookupSchema": {
+ "type": "object",
+ "properties": {
+ "allow_multiple_guilds": {
+ "type": "boolean"
+ },
+ "email": {
+ "type": "string"
+ },
+ "use_verification_code": {
+ "type": "boolean"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "allow_multiple_guilds",
+ "email",
+ "use_verification_code"
+ ]
+ },
+ "EmailDomainLookupVerifyCodeSchema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "code",
+ "email",
+ "guild_id"
+ ]
+ },
+ "EmojiCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "require_colons": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "image"
+ ]
+ },
+ "EmojiModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "ForgotPasswordSchema": {
+ "type": "object",
+ "properties": {
+ "login": {
+ "type": "string"
+ },
+ "captcha_key": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "login"
+ ]
+ },
+ "AllowedMentions": {
+ "type": "object",
+ "properties": {
+ "parse": {
+ "type": "array",
+ "items": {
+ "enum": [
+ "everyone",
+ "roles",
+ "users"
+ ],
+ "type": "string"
+ }
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "users": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "replied_user": {
+ "type": "boolean"
+ }
+ }
+ },
+ "GreetRequestSchema": {
+ "type": "object",
+ "properties": {
+ "sticker_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "allowed_mentions": {
+ "$ref": "#/components/schemas/AllowedMentions"
+ },
+ "message_reference": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "fail_if_not_exists": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "message_id"
+ ]
+ }
+ },
+ "required": [
+ "sticker_ids"
+ ]
+ },
+ "GuildCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "icon": {
+ "type": "string",
+ "nullable": true
+ },
+ "channels": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ChannelModifySchema"
+ }
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ },
+ "guild_template_code": {
+ "type": "string"
+ },
+ "staff_only": {
+ "type": "boolean"
+ }
+ }
+ },
+ "GuildSubscriptionSchema": {
+ "type": "object",
+ "properties": {
+ "channels": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "members": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "activities": {
+ "type": "boolean"
+ },
+ "threads": {
+ "type": "boolean"
+ },
+ "typing": {
+ "const": true,
+ "type": "boolean"
+ },
+ "member_updates": {
+ "type": "boolean"
+ },
+ "thread_member_lists": {
+ "type": "array",
+ "items": {}
+ }
+ }
+ },
+ "GuildSubscriptionsBulkSchema": {
+ "type": "object",
+ "properties": {
+ "subscriptions": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/GuildSubscriptionSchema"
+ }
+ }
+ },
+ "required": [
+ "subscriptions"
+ ]
+ },
+ "GuildTemplateCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
+ "GuildUpdateSchema": {
+ "type": "object",
+ "properties": {
+ "banner": {
+ "type": "string",
+ "nullable": true
+ },
+ "splash": {
+ "type": "string",
+ "nullable": true
+ },
+ "description": {
+ "type": "string"
+ },
+ "features": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "verification_level": {
+ "type": "integer"
+ },
+ "default_message_notifications": {
+ "type": "integer"
+ },
+ "system_channel_flags": {
+ "type": "integer"
+ },
+ "explicit_content_filter": {
+ "type": "integer"
+ },
+ "public_updates_channel_id": {
+ "type": "string"
+ },
+ "afk_timeout": {
+ "type": "integer"
+ },
+ "afk_channel_id": {
+ "type": "string"
+ },
+ "preferred_locale": {
+ "type": "string"
+ },
+ "premium_progress_bar_enabled": {
+ "type": "boolean"
+ },
+ "discovery_splash": {
+ "type": "string"
+ },
+ "safety_alerts_channel_id": {
+ "type": "string",
+ "nullable": true
+ },
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "icon": {
+ "type": "string",
+ "nullable": true
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ },
+ "guild_template_code": {
+ "type": "string"
+ },
+ "staff_only": {
+ "type": "boolean"
+ }
+ }
+ },
+ "GuildUpdateWelcomeScreenSchema": {
+ "type": "object",
+ "properties": {
+ "welcome_channels": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "emoji_id": {
+ "type": "string"
+ },
+ "emoji_name": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id",
+ "description"
+ ]
+ }
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "description": {
+ "type": "string"
+ }
+ }
+ },
+ "HubWaitlistSignupSchema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "school": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "school"
+ ]
+ },
+ "InviteCreateSchema": {
+ "type": "object",
+ "properties": {
+ "target_user_id": {
+ "type": "string"
+ },
+ "target_type": {
+ "type": "string"
+ },
+ "validate": {
+ "type": "string"
+ },
+ "max_age": {
+ "type": "integer"
+ },
+ "max_uses": {
+ "type": "integer"
+ },
+ "temporary": {
+ "type": "boolean"
+ },
+ "unique": {
+ "type": "boolean"
+ },
+ "target_user": {
+ "type": "string"
+ },
+ "target_user_type": {
+ "type": "integer"
+ },
+ "flags": {
+ "type": "integer"
+ }
+ }
+ },
+ "MFAResponse": {
+ "type": "object",
+ "properties": {
+ "ticket": {
+ "type": "string"
+ },
+ "mfa": {
+ "type": "boolean",
+ "const": true
+ },
+ "sms": {
+ "type": "boolean",
+ "const": false
+ },
+ "token": {
+ "type": "null"
+ }
+ },
+ "required": [
+ "mfa",
+ "sms",
+ "ticket",
+ "token"
+ ]
+ },
+ "WebAuthnResponse": {
+ "type": "object",
+ "properties": {
+ "webauthn": {
+ "type": "string"
+ },
+ "ticket": {
+ "type": "string"
+ },
+ "mfa": {
+ "type": "boolean",
+ "const": true
+ },
+ "sms": {
+ "type": "boolean",
+ "const": false
+ },
+ "token": {
+ "type": "null"
+ }
+ },
+ "required": [
+ "mfa",
+ "sms",
+ "ticket",
+ "token",
+ "webauthn"
+ ]
+ },
+ "LoginResponse": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/TokenResponse"
+ },
+ {
+ "$ref": "#/components/schemas/MFAResponse"
+ },
+ {
+ "$ref": "#/components/schemas/WebAuthnResponse"
+ }
+ ]
+ },
+ "LoginSchema": {
+ "type": "object",
+ "properties": {
+ "login": {
+ "type": "string"
+ },
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "undelete": {
+ "type": "boolean"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "login_source": {
+ "type": "string"
+ },
+ "gift_code_sku_id": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "login",
+ "password"
+ ]
+ },
+ "MemberChangeProfileSchema": {
+ "type": "object",
+ "properties": {
+ "banner": {
+ "type": "string",
+ "nullable": true
+ },
+ "nick": {
+ "type": "string"
+ },
+ "bio": {
+ "type": "string"
+ },
+ "pronouns": {
+ "type": "string"
+ },
+ "theme_colors": {
+ "items": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "type": "array",
+ "minItems": 2,
+ "maxItems": 2
+ }
+ }
+ },
+ "MemberChangeSchema": {
+ "type": "object",
+ "properties": {
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "nick": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": "string",
+ "nullable": true
+ },
+ "bio": {
+ "type": "string"
+ }
+ }
+ },
+ "MemberNickChangeSchema": {
+ "type": "object",
+ "properties": {
+ "nick": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "nick"
+ ]
+ },
+ "MessageAcknowledgeSchema": {
+ "type": "object",
+ "properties": {
+ "manual": {
+ "type": "boolean"
+ },
+ "mention_count": {
+ "type": "integer"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "last_viewed": {
+ "type": "integer"
+ },
+ "token": {
+ "type": "string"
+ }
+ }
+ },
+ "PollCreationSchema": {
+ "type": "object",
+ "properties": {
+ "question": {
+ "$ref": "#/components/schemas/PollMedia"
+ },
+ "answers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PollAnswer"
+ }
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "allow_multiselect": {
+ "type": "boolean"
+ },
+ "layout_type": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "answers",
+ "question"
+ ]
+ },
+ "MessageCreateSchema": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "integer"
+ },
+ "content": {
+ "type": "string"
+ },
+ "mobile_network_type": {
+ "type": "string"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "tts": {
+ "type": "boolean"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "embeds": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Embed"
+ }
+ },
+ "embed": {
+ "$ref": "#/components/schemas/Embed"
+ },
+ "allowed_mentions": {
+ "type": "object",
+ "properties": {
+ "parse": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "users": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "replied_user": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+ },
+ "message_reference": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "fail_if_not_exists": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "message_id"
+ ]
+ },
+ "payload_json": {
+ "type": "string"
+ },
+ "file": {
+ "type": "object",
+ "properties": {
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename"
+ ]
+ },
+ "attachments": {
+ "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "id"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ },
+ "uploaded_filename": {
+ "type": "string"
+ },
+ "original_content_type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "uploaded_filename"
+ ]
+ }
+ ]
+ }
+ },
+ "sticker_ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "components": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ActionRowComponent"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "poll": {
+ "$ref": "#/components/schemas/PollCreationSchema"
+ },
+ "enforce_nonce": {
+ "type": "boolean"
+ },
+ "applied_tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "thread_name": {
+ "type": "string"
+ },
+ "avatar_url": {
+ "type": "string"
+ }
+ }
+ },
+ "MessageEditSchema": {
+ "type": "object",
+ "properties": {
+ "embed": {
+ "$ref": "#/components/schemas/Embed"
+ },
+ "file": {
+ "type": "object",
+ "properties": {
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename"
+ ]
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ },
+ "mobile_network_type": {
+ "type": "string"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "tts": {
+ "type": "boolean"
+ },
+ "embeds": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Embed"
+ }
+ },
+ "allowed_mentions": {
+ "type": "object",
+ "properties": {
+ "parse": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "users": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "replied_user": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+ },
+ "message_reference": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "fail_if_not_exists": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "message_id"
+ ]
+ },
+ "payload_json": {
+ "type": "string"
+ },
+ "attachments": {
+ "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "id"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ },
+ "uploaded_filename": {
+ "type": "string"
+ },
+ "original_content_type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "uploaded_filename"
+ ]
+ }
+ ]
+ }
+ },
+ "sticker_ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "components": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ActionRowComponent"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "poll": {
+ "$ref": "#/components/schemas/PollCreationSchema"
+ },
+ "enforce_nonce": {
+ "type": "boolean"
+ },
+ "applied_tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "thread_name": {
+ "type": "string"
+ },
+ "avatar_url": {
+ "type": "string"
+ }
+ }
+ },
+ "MfaCodesSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "regenerate": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "password"
+ ]
+ },
+ "ModifyGuildStickerSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "minLength": 2,
+ "maxLength": 30,
+ "type": "string"
+ },
+ "description": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "tags": {
+ "maxLength": 200,
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "tags"
+ ]
+ },
+ "PasswordResetSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "password",
+ "token"
+ ]
+ },
+ "PreloadMessagesRequestSchema": {
+ "type": "object",
+ "properties": {
+ "channels": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "channels"
+ ]
+ },
+ "PruneSchema": {
+ "type": "object",
+ "properties": {
+ "days": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "days"
+ ]
+ },
+ "PurgeSchema": {
+ "type": "object",
+ "properties": {
+ "before": {
+ "type": "string"
+ },
+ "after": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "after",
+ "before"
+ ]
+ },
+ "RefreshUrlsRequestSchema": {
+ "type": "object",
+ "properties": {
+ "attachment_urls": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "attachment_urls"
+ ]
+ },
+ "RegisterSchema": {
+ "type": "object",
+ "properties": {
+ "username": {
+ "minLength": 2,
+ "type": "string"
+ },
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "consent": {
+ "type": "boolean"
+ },
+ "email": {
+ "format": "email",
+ "type": "string"
+ },
+ "fingerprint": {
+ "type": "string"
+ },
+ "invite": {
+ "type": "string"
+ },
+ "date_of_birth": {
+ "type": "string"
+ },
+ "gift_code_sku_id": {
+ "type": "string"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "promotional_email_opt_in": {
+ "type": "boolean"
+ },
+ "unique_username_registration": {
+ "type": "boolean"
+ },
+ "global_name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "consent",
+ "username"
+ ]
+ },
+ "RelationshipPostSchema": {
+ "type": "object",
+ "properties": {
+ "discriminator": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "discriminator",
+ "username"
+ ]
+ },
+ "RelationshipPutSchema": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "type": "number"
+ }
+ }
+ },
+ "RequestGuildMembersSchema": {
+ "type": "object",
+ "properties": {
+ "guild_id": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "query": {
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "presences": {
+ "type": "boolean"
+ },
+ "user_ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "nonce": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "guild_id"
+ ]
+ },
"RoleModifySchema": {
"type": "object",
"properties": {
@@ -20666,53 +21035,6 @@
"settings"
]
},
- "StreamCreateSchema": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- "call",
- "guild"
- ],
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "preferred_region": {
- "type": "string"
- }
- },
- "required": [
- "channel_id",
- "type"
- ]
- },
- "StreamDeleteSchema": {
- "type": "object",
- "properties": {
- "stream_key": {
- "type": "string"
- }
- },
- "required": [
- "stream_key"
- ]
- },
- "StreamWatchSchema": {
- "type": "object",
- "properties": {
- "stream_key": {
- "type": "string"
- }
- },
- "required": [
- "stream_key"
- ]
- },
"TeamCreateSchema": {
"type": "object",
"properties": {
@@ -21007,19 +21329,6 @@
"UserSettingsSchema": {
"type": "object",
"properties": {
- "status": {
- "enum": [
- "dnd",
- "idle",
- "invisible",
- "offline",
- "online"
- ],
- "type": "string"
- },
- "explicit_content_filter": {
- "type": "integer"
- },
"afk_timeout": {
"type": "integer"
},
@@ -21063,6 +21372,9 @@
"enable_tts_command": {
"type": "boolean"
},
+ "explicit_content_filter": {
+ "type": "integer"
+ },
"friend_discovery_flags": {
"type": "integer"
},
@@ -21117,6 +21429,16 @@
"show_current_game": {
"type": "boolean"
},
+ "status": {
+ "enum": [
+ "dnd",
+ "idle",
+ "invisible",
+ "offline",
+ "online"
+ ],
+ "type": "string"
+ },
"stream_notifications_enabled": {
"type": "boolean"
},
@@ -21133,7 +21455,42 @@
"view_nsfw_guilds": {
"type": "boolean"
}
- }
+ },
+ "required": [
+ "afk_timeout",
+ "allow_accessibility_detection",
+ "animate_emoji",
+ "animate_stickers",
+ "contact_sync_enabled",
+ "convert_emoticons",
+ "custom_status",
+ "default_guilds_restricted",
+ "detect_platform_accounts",
+ "developer_mode",
+ "disable_games_tab",
+ "enable_tts_command",
+ "explicit_content_filter",
+ "friend_discovery_flags",
+ "friend_source_flags",
+ "gateway_connected",
+ "gif_auto_play",
+ "guild_folders",
+ "guild_positions",
+ "inline_attachment_media",
+ "inline_embed_media",
+ "locale",
+ "message_display_compact",
+ "native_phone_integration_enabled",
+ "render_embeds",
+ "render_reactions",
+ "restricted_guilds",
+ "show_current_game",
+ "status",
+ "stream_notifications_enabled",
+ "theme",
+ "timezone_offset",
+ "view_nsfw_guilds"
+ ]
},
"VanityUrlSchema": {
"type": "object",
@@ -21145,61 +21502,19 @@
}
}
},
- "VoiceIdentifySchema": {
+ "VerifyEmailSchema": {
"type": "object",
"properties": {
- "server_id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "session_id": {
- "type": "string"
+ "captcha_key": {
+ "type": "string",
+ "nullable": true
},
"token": {
"type": "string"
- },
- "video": {
- "type": "boolean"
- },
- "streams": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- "audio",
- "screen",
- "video"
- ],
- "type": "string"
- },
- "rid": {
- "type": "string"
- },
- "quality": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "quality",
- "rid",
- "type"
- ]
- }
- },
- "max_secure_frames_version": {
- "type": "integer"
}
},
"required": [
- "server_id",
- "session_id",
- "token",
- "user_id"
+ "token"
]
},
"VoiceStateUpdateSchema": {
@@ -21239,96 +21554,6 @@
"self_mute"
]
},
- "VoiceVideoSchema": {
- "type": "object",
- "properties": {
- "audio_ssrc": {
- "type": "integer"
- },
- "video_ssrc": {
- "type": "integer"
- },
- "rtx_ssrc": {
- "type": "integer"
- },
- "user_id": {
- "type": "string"
- },
- "streams": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- "audio",
- "screen",
- "video"
- ],
- "type": "string"
- },
- "rid": {
- "type": "string"
- },
- "ssrc": {
- "type": "integer"
- },
- "active": {
- "type": "boolean"
- },
- "quality": {
- "type": "integer"
- },
- "rtx_ssrc": {
- "type": "integer"
- },
- "max_bitrate": {
- "type": "integer"
- },
- "max_framerate": {
- "type": "integer"
- },
- "max_resolution": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string"
- },
- "width": {
- "type": "integer"
- },
- "height": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "height",
- "type",
- "width"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "active",
- "max_bitrate",
- "max_framerate",
- "max_resolution",
- "quality",
- "rid",
- "rtx_ssrc",
- "ssrc",
- "type"
- ]
- }
- }
- },
- "required": [
- "audio_ssrc",
- "video_ssrc"
- ]
- },
"GenerateWebAuthnCredentialsSchema": {
"type": "object",
"properties": {
@@ -21565,139 +21790,151 @@
"enabled"
]
},
- "BulkBanSchema": {
+ "VoiceIdentifySchema": {
"type": "object",
"properties": {
- "user_ids": {
+ "server_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "session_id": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "video": {
+ "type": "boolean"
+ },
+ "streams": {
"type": "array",
"items": {
- "type": "string"
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "audio",
+ "screen",
+ "video"
+ ],
+ "type": "string"
+ },
+ "rid": {
+ "type": "string"
+ },
+ "quality": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "quality",
+ "rid",
+ "type"
+ ]
}
},
- "delete_message_seconds": {
+ "max_secure_frames_version": {
"type": "integer"
}
},
"required": [
- "user_ids"
- ]
- },
- "BulkDeleteSchema": {
- "type": "object",
- "properties": {
- "messages": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "required": [
- "messages"
- ]
- },
- "MFAResponse": {
- "type": "object",
- "properties": {
- "ticket": {
- "type": "string"
- },
- "mfa": {
- "type": "boolean",
- "const": true
- },
- "sms": {
- "type": "boolean",
- "const": false
- },
- "token": {
- "type": "null"
- }
- },
- "required": [
- "mfa",
- "sms",
- "ticket",
- "token"
- ]
- },
- "WebAuthnResponse": {
- "type": "object",
- "properties": {
- "webauthn": {
- "type": "string"
- },
- "ticket": {
- "type": "string"
- },
- "mfa": {
- "type": "boolean",
- "const": true
- },
- "sms": {
- "type": "boolean",
- "const": false
- },
- "token": {
- "type": "null"
- }
- },
- "required": [
- "mfa",
- "sms",
- "ticket",
+ "server_id",
+ "session_id",
"token",
- "webauthn"
+ "user_id"
]
},
- "LoginResponse": {
- "anyOf": [
- {
- "$ref": "#/components/schemas/TokenResponse"
- },
- {
- "$ref": "#/components/schemas/MFAResponse"
- },
- {
- "$ref": "#/components/schemas/WebAuthnResponse"
- }
- ]
- },
- "MemberNickChangeSchema": {
+ "VoiceVideoSchema": {
"type": "object",
"properties": {
- "nick": {
- "type": "string"
- }
- },
- "required": [
- "nick"
- ]
- },
- "PruneSchema": {
- "type": "object",
- "properties": {
- "days": {
+ "audio_ssrc": {
"type": "integer"
- }
- },
- "required": [
- "days"
- ]
- },
- "VerifyEmailSchema": {
- "type": "object",
- "properties": {
- "captcha_key": {
- "type": "string",
- "nullable": true
},
- "token": {
+ "video_ssrc": {
+ "type": "integer"
+ },
+ "rtx_ssrc": {
+ "type": "integer"
+ },
+ "user_id": {
"type": "string"
+ },
+ "streams": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "audio",
+ "screen",
+ "video"
+ ],
+ "type": "string"
+ },
+ "rid": {
+ "type": "string"
+ },
+ "ssrc": {
+ "type": "integer"
+ },
+ "active": {
+ "type": "boolean"
+ },
+ "quality": {
+ "type": "integer"
+ },
+ "rtx_ssrc": {
+ "type": "integer"
+ },
+ "max_bitrate": {
+ "type": "integer"
+ },
+ "max_framerate": {
+ "type": "integer"
+ },
+ "max_resolution": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "width": {
+ "type": "integer"
+ },
+ "height": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "height",
+ "type",
+ "width"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "active",
+ "max_bitrate",
+ "max_framerate",
+ "max_resolution",
+ "quality",
+ "rid",
+ "rtx_ssrc",
+ "ssrc",
+ "type"
+ ]
+ }
}
},
"required": [
- "token"
+ "audio_ssrc",
+ "video_ssrc"
]
}
}
diff --git a/assets/schemas.json b/assets/schemas.json
index 656a9e9..614ca9e 100644
--- a/assets/schemas.json
+++ b/assets/schemas.json
@@ -1,37 +1,78 @@
{
- "AckBulkSchema": {
+ "ApplicationCreateSchema": {
"type": "object",
"properties": {
- "read_states": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "message_id": {
- "type": "string"
- },
- "read_state_type": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_id",
- "message_id",
- "read_state_type"
- ]
- }
+ "name": {
+ "type": "string"
+ },
+ "team_id": {
+ "type": "string"
}
},
"additionalProperties": false,
"required": [
- "read_states"
+ "name"
],
"$schema": "http://json-schema.org/draft-07/schema#"
},
+ "ApplicationModifySchema": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "type": "string"
+ },
+ "icon": {
+ "type": "string"
+ },
+ "cover_image": {
+ "type": "string"
+ },
+ "interactions_endpoint_url": {
+ "type": "string"
+ },
+ "max_participants": {
+ "type": [
+ "null",
+ "integer"
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "privacy_policy_url": {
+ "type": "string"
+ },
+ "role_connections_verification_url": {
+ "type": "string"
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "terms_of_service_url": {
+ "type": "string"
+ },
+ "bot_public": {
+ "type": "boolean"
+ },
+ "bot_require_code_grant": {
+ "type": "boolean"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "custom_install_url": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
"ConnectedAccountCommonOAuthTokenResponse": {
"type": "object",
"properties": {
@@ -12174,13 +12215,13 @@
"Promise": {
"type": "object",
"properties": {
- "__@toStringTag@664": {
+ "__@toStringTag@1267": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
- "__@toStringTag@664"
+ "__@toStringTag@1267"
]
},
"Cancel": {
@@ -13409,1438 +13450,6 @@
},
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "ApplicationAuthorizeSchema": {
- "type": "object",
- "properties": {
- "authorize": {
- "type": "boolean"
- },
- "guild_id": {
- "type": "string"
- },
- "permissions": {
- "type": "string"
- },
- "captcha_key": {
- "type": "string"
- },
- "code": {
- "minLength": 6,
- "maxLength": 6,
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "authorize",
- "guild_id",
- "permissions"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ApplicationCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "team_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "name"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ApplicationModifySchema": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- },
- "icon": {
- "type": "string"
- },
- "cover_image": {
- "type": "string"
- },
- "interactions_endpoint_url": {
- "type": "string"
- },
- "max_participants": {
- "type": [
- "null",
- "integer"
- ]
- },
- "name": {
- "type": "string"
- },
- "privacy_policy_url": {
- "type": "string"
- },
- "role_connections_verification_url": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "terms_of_service_url": {
- "type": "string"
- },
- "bot_public": {
- "type": "boolean"
- },
- "bot_require_code_grant": {
- "type": "boolean"
- },
- "flags": {
- "type": "integer"
- },
- "custom_install_url": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "AutomodMentionSpamRuleSchema": {
- "type": "object",
- "properties": {
- "mention_total_limit": {
- "type": "integer"
- },
- "mention_raid_protection_enabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "mention_raid_protection_enabled",
- "mention_total_limit"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "AutomodSuspectedSpamRuleSchema": {
- "type": "object",
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "AutomodCommonlyFlaggedWordsRuleSchema": {
- "type": "object",
- "properties": {
- "allow_list": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "presets": {
- "type": "array",
- "items": [
- {
- "type": "integer"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- }
- },
- "additionalProperties": false,
- "required": [
- "allow_list",
- "presets"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "AutomodCustomWordsRuleSchema": {
- "type": "object",
- "properties": {
- "allow_list": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "keyword_filter": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "regex_patterns": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- }
- },
- "additionalProperties": false,
- "required": [
- "allow_list",
- "keyword_filter",
- "regex_patterns"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "AutomodRuleSchema": {
- "type": "object",
- "properties": {
- "creator_id": {
- "type": "string"
- },
- "enabled": {
- "type": "boolean"
- },
- "event_type": {
- "type": "integer"
- },
- "exempt_channels": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "exempt_roles": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "guild_id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- },
- "trigger_type": {
- "type": "integer"
- },
- "trigger_metadata": {
- "anyOf": [
- {
- "$ref": "#/definitions/AutomodMentionSpamRuleSchema"
- },
- {
- "$ref": "#/definitions/AutomodSuspectedSpamRuleSchema"
- },
- {
- "$ref": "#/definitions/AutomodCommonlyFlaggedWordsRuleSchema"
- },
- {
- "$ref": "#/definitions/AutomodCustomWordsRuleSchema"
- }
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "creator_id",
- "enabled",
- "event_type",
- "exempt_channels",
- "exempt_roles",
- "guild_id",
- "name",
- "position",
- "trigger_metadata",
- "trigger_type"
- ],
- "definitions": {
- "AutomodMentionSpamRuleSchema": {
- "type": "object",
- "properties": {
- "mention_total_limit": {
- "type": "integer"
- },
- "mention_raid_protection_enabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "mention_raid_protection_enabled",
- "mention_total_limit"
- ]
- },
- "AutomodSuspectedSpamRuleSchema": {
- "type": "object",
- "additionalProperties": false
- },
- "AutomodCommonlyFlaggedWordsRuleSchema": {
- "type": "object",
- "properties": {
- "allow_list": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "presets": {
- "type": "array",
- "items": [
- {
- "type": "integer"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- }
- },
- "additionalProperties": false,
- "required": [
- "allow_list",
- "presets"
- ]
- },
- "AutomodCustomWordsRuleSchema": {
- "type": "object",
- "properties": {
- "allow_list": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "keyword_filter": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- "regex_patterns": {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- }
- },
- "additionalProperties": false,
- "required": [
- "allow_list",
- "keyword_filter",
- "regex_patterns"
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BackupCodesChallengeSchema": {
- "type": "object",
- "properties": {
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "password"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BanCreateSchema": {
- "type": "object",
- "properties": {
- "delete_message_seconds": {
- "type": "string"
- },
- "delete_message_days": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BanModeratorSchema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "executor_id": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "executor_id",
- "guild_id",
- "id",
- "user_id"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BanRegistrySchema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "executor_id": {
- "type": "string"
- },
- "ip": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "executor_id",
- "guild_id",
- "id",
- "user_id"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BotModifySchema": {
- "type": "object",
- "properties": {
- "avatar": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ChannelModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "type": {
- "enum": [
- 0,
- 1,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 2,
- 255,
- 3,
- 33,
- 34,
- 35,
- 4,
- 5,
- 6,
- 64,
- 7,
- 8,
- 9
- ],
- "type": "number"
- },
- "topic": {
- "type": "string"
- },
- "icon": {
- "type": [
- "null",
- "string"
- ]
- },
- "bitrate": {
- "type": "integer"
- },
- "user_limit": {
- "type": "integer"
- },
- "rate_limit_per_user": {
- "type": "integer"
- },
- "position": {
- "type": "integer"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ChannelPermissionOverwriteType"
- },
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "allow",
- "deny",
- "id",
- "type"
- ]
- }
- },
- "parent_id": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "nsfw": {
- "type": "boolean"
- },
- "rtc_region": {
- "type": "string"
- },
- "default_auto_archive_duration": {
- "type": "integer"
- },
- "default_reaction_emoji": {
- "type": [
- "null",
- "string"
- ]
- },
- "flags": {
- "type": "integer"
- },
- "default_thread_rate_limit_per_user": {
- "type": "integer"
- },
- "video_quality_mode": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "definitions": {
- "ChannelPermissionOverwriteType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ChannelPermissionOverwriteSchema": {
- "type": "object",
- "properties": {
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ChannelPermissionOverwriteType"
- }
- },
- "additionalProperties": false,
- "required": [
- "allow",
- "deny",
- "id",
- "type"
- ],
- "definitions": {
- "ChannelPermissionOverwriteType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ChannelReorderSchema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- },
- "lock_permissions": {
- "type": "boolean"
- },
- "parent_id": {
- "type": [
- "null",
- "string"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "id"
- ]
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "CodesVerificationSchema": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- },
- "nonce": {
- "type": "string"
- },
- "regenerate": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "key",
- "nonce"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ConnectedAccountSchema": {
- "type": "object",
- "properties": {
- "external_id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "token_data": {
- "$ref": "#/definitions/ConnectedAccountTokenData"
- },
- "friend_sync": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "revoked": {
- "type": "boolean"
- },
- "show_activity": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- },
- "verified": {
- "type": "boolean"
- },
- "visibility": {
- "type": "integer"
- },
- "integrations": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "metadata_": {},
- "metadata_visibility": {
- "type": "integer"
- },
- "two_way_link": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "external_id",
- "name",
- "type",
- "user_id"
- ],
- "definitions": {
- "ConnectedAccountTokenData": {
- "type": "object",
- "properties": {
- "access_token": {
- "type": "string"
- },
- "token_type": {
- "type": "string"
- },
- "scope": {
- "type": "string"
- },
- "refresh_token": {
- "type": "string"
- },
- "expires_in": {
- "type": "integer"
- },
- "expires_at": {
- "type": "integer"
- },
- "fetched_at": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "access_token",
- "fetched_at"
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ConnectionCallbackSchema": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string"
- },
- "state": {
- "type": "string"
- },
- "insecure": {
- "type": "boolean"
- },
- "friend_sync": {
- "type": "boolean"
- },
- "openid_params": {}
- },
- "additionalProperties": false,
- "required": [
- "friend_sync",
- "insecure",
- "state"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ConnectionUpdateSchema": {
- "type": "object",
- "properties": {
- "visibility": {
- "type": "boolean"
- },
- "show_activity": {
- "type": "boolean"
- },
- "metadata_visibility": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "DmChannelCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "recipients": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "recipients"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "EmailDomainLookupSchema": {
- "type": "object",
- "properties": {
- "allow_multiple_guilds": {
- "type": "boolean"
- },
- "email": {
- "type": "string"
- },
- "use_verification_code": {
- "type": "boolean"
- },
- "guild_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "allow_multiple_guilds",
- "email",
- "use_verification_code"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "EmailDomainLookupVerifyCodeSchema": {
- "type": "object",
- "properties": {
- "email": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "code": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "code",
- "email",
- "guild_id"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "EmojiCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "image": {
- "type": "string"
- },
- "require_colons": {
- "type": [
- "null",
- "boolean"
- ]
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "image"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "EmojiModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ForgotPasswordSchema": {
- "type": "object",
- "properties": {
- "login": {
- "type": "string"
- },
- "captcha_key": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "login"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GreetRequestSchema": {
- "type": "object",
- "properties": {
- "sticker_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "allowed_mentions": {
- "$ref": "#/definitions/AllowedMentions"
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "fail_if_not_exists": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "message_id"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "sticker_ids"
- ],
- "definitions": {
- "AllowedMentions": {
- "type": "object",
- "properties": {
- "parse": {
- "type": "array",
- "items": {
- "enum": [
- "everyone",
- "roles",
- "users"
- ],
- "type": "string"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "users": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "replied_user": {
- "type": "boolean"
- }
- },
- "additionalProperties": false
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "icon": {
- "type": [
- "null",
- "string"
- ]
- },
- "channels": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ChannelModifySchema"
- }
- },
- "system_channel_id": {
- "type": "string"
- },
- "rules_channel_id": {
- "type": "string"
- },
- "guild_template_code": {
- "type": "string"
- },
- "staff_only": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "definitions": {
- "ChannelModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "type": {
- "enum": [
- 0,
- 1,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 2,
- 255,
- 3,
- 33,
- 34,
- 35,
- 4,
- 5,
- 6,
- 64,
- 7,
- 8,
- 9
- ],
- "type": "number"
- },
- "topic": {
- "type": "string"
- },
- "icon": {
- "type": [
- "null",
- "string"
- ]
- },
- "bitrate": {
- "type": "integer"
- },
- "user_limit": {
- "type": "integer"
- },
- "rate_limit_per_user": {
- "type": "integer"
- },
- "position": {
- "type": "integer"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ChannelPermissionOverwriteType"
- },
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "allow",
- "deny",
- "id",
- "type"
- ]
- }
- },
- "parent_id": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "nsfw": {
- "type": "boolean"
- },
- "rtc_region": {
- "type": "string"
- },
- "default_auto_archive_duration": {
- "type": "integer"
- },
- "default_reaction_emoji": {
- "type": [
- "null",
- "string"
- ]
- },
- "flags": {
- "type": "integer"
- },
- "default_thread_rate_limit_per_user": {
- "type": "integer"
- },
- "video_quality_mode": {
- "type": "integer"
- }
- },
- "additionalProperties": false
- },
- "ChannelPermissionOverwriteType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildSubscriptionsBulkSchema": {
- "type": "object",
- "properties": {
- "subscriptions": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/definitions/GuildSubscriptionSchema"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "subscriptions"
- ],
- "definitions": {
- "GuildSubscriptionSchema": {
- "type": "object",
- "properties": {
- "channels": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "activities": {
- "type": "boolean"
- },
- "threads": {
- "type": "boolean"
- },
- "typing": {
- "const": true,
- "type": "boolean"
- },
- "members": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "member_updates": {
- "type": "boolean"
- },
- "thread_member_lists": {
- "type": "array",
- "items": {}
- }
- },
- "additionalProperties": false
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildSubscriptionSchema": {
- "type": "object",
- "properties": {
- "channels": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "activities": {
- "type": "boolean"
- },
- "threads": {
- "type": "boolean"
- },
- "typing": {
- "const": true,
- "type": "boolean"
- },
- "members": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "member_updates": {
- "type": "boolean"
- },
- "thread_member_lists": {
- "type": "array",
- "items": {}
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildTemplateCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "avatar": {
- "type": [
- "null",
- "string"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "name"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildUpdateSchema": {
- "type": "object",
- "properties": {
- "banner": {
- "type": [
- "null",
- "string"
- ]
- },
- "splash": {
- "type": [
- "null",
- "string"
- ]
- },
- "description": {
- "type": "string"
- },
- "features": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "verification_level": {
- "type": "integer"
- },
- "default_message_notifications": {
- "type": "integer"
- },
- "system_channel_flags": {
- "type": "integer"
- },
- "explicit_content_filter": {
- "type": "integer"
- },
- "public_updates_channel_id": {
- "type": "string"
- },
- "afk_timeout": {
- "type": "integer"
- },
- "afk_channel_id": {
- "type": "string"
- },
- "preferred_locale": {
- "type": "string"
- },
- "premium_progress_bar_enabled": {
- "type": "boolean"
- },
- "discovery_splash": {
- "type": "string"
- },
- "safety_alerts_channel_id": {
- "type": [
- "null",
- "string"
- ]
- },
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "icon": {
- "type": [
- "null",
- "string"
- ]
- },
- "system_channel_id": {
- "type": "string"
- },
- "rules_channel_id": {
- "type": "string"
- },
- "guild_template_code": {
- "type": "string"
- },
- "staff_only": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildUpdateWelcomeScreenSchema": {
- "type": "object",
- "properties": {
- "welcome_channels": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "emoji_id": {
- "type": "string"
- },
- "emoji_name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_id",
- "description"
- ]
- }
- },
- "enabled": {
- "type": "boolean"
- },
- "description": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "HubWaitlistSignupSchema": {
- "type": "object",
- "properties": {
- "email": {
- "type": "string"
- },
- "school": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "email",
- "school"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
"IdentifySchema": {
"type": "object",
"properties": {
@@ -15219,1823 +13828,210 @@
},
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "InviteCreateSchema": {
- "type": "object",
- "properties": {
- "target_user_id": {
- "type": "string"
- },
- "target_type": {
- "type": "string"
- },
- "validate": {
- "type": "string"
- },
- "max_age": {
- "type": "integer"
- },
- "max_uses": {
- "type": "integer"
- },
- "temporary": {
- "type": "boolean"
- },
- "unique": {
- "type": "boolean"
- },
- "target_user": {
- "type": "string"
- },
- "target_user_type": {
- "type": "integer"
- },
- "flags": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "LoginSchema": {
- "type": "object",
- "properties": {
- "login": {
- "type": "string"
- },
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "undelete": {
- "type": "boolean"
- },
- "captcha_key": {
- "type": "string"
- },
- "login_source": {
- "type": "string"
- },
- "gift_code_sku_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "login",
- "password"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MemberChangeProfileSchema": {
- "type": "object",
- "properties": {
- "banner": {
- "type": [
- "null",
- "string"
- ]
- },
- "nick": {
- "type": "string"
- },
- "bio": {
- "type": "string"
- },
- "pronouns": {
- "type": "string"
- },
- "theme_colors": {
- "items": [
- {
- "type": "integer"
- },
- {
- "type": "integer"
- }
- ],
- "type": "array",
- "minItems": 2,
- "maxItems": 2
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MemberChangeSchema": {
- "type": "object",
- "properties": {
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "nick": {
- "type": "string"
- },
- "avatar": {
- "type": [
- "null",
- "string"
- ]
- },
- "bio": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MessageAcknowledgeSchema": {
- "type": "object",
- "properties": {
- "manual": {
- "type": "boolean"
- },
- "mention_count": {
- "type": "integer"
- },
- "flags": {
- "type": "integer"
- },
- "last_viewed": {
- "type": "integer"
- },
- "token": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MessageCreateSchema": {
+ "StreamCreateSchema": {
"type": "object",
"properties": {
"type": {
- "type": "integer"
- },
- "content": {
- "type": "string"
- },
- "mobile_network_type": {
- "type": "string"
- },
- "nonce": {
+ "enum": [
+ "call",
+ "guild"
+ ],
"type": "string"
},
"channel_id": {
"type": "string"
},
- "tts": {
- "type": "boolean"
- },
- "flags": {
- "type": "integer"
- },
- "embeds": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Embed"
- }
- },
- "embed": {
- "$ref": "#/definitions/Embed"
- },
- "allowed_mentions": {
- "type": "object",
- "properties": {
- "parse": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "users": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "replied_user": {
- "type": "boolean"
- }
- },
- "additionalProperties": false
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "fail_if_not_exists": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "message_id"
- ]
- },
- "payload_json": {
- "type": "string"
- },
- "file": {
- "type": "object",
- "properties": {
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename"
- ]
- },
- "attachments": {
- "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "id"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- },
- "uploaded_filename": {
- "type": "string"
- },
- "original_content_type": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "uploaded_filename"
- ]
- }
- ]
- }
- },
- "sticker_ids": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "components": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ActionRowComponent"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "poll": {
- "$ref": "#/definitions/PollCreationSchema"
- },
- "enforce_nonce": {
- "type": "boolean"
- },
- "applied_tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "thread_name": {
- "type": "string"
- },
- "avatar_url": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "definitions": {
- "Embed": {
- "type": "object",
- "properties": {
- "title": {
- "type": "string"
- },
- "type": {
- "enum": [
- "article",
- "gifv",
- "image",
- "link",
- "rich",
- "video"
- ],
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "color": {
- "type": "integer"
- },
- "footer": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "text"
- ]
- },
- "image": {
- "$ref": "#/definitions/EmbedImage"
- },
- "thumbnail": {
- "$ref": "#/definitions/EmbedImage"
- },
- "video": {
- "$ref": "#/definitions/EmbedImage"
- },
- "provider": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "author": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "fields": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "inline": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "name",
- "value"
- ]
- }
- }
- },
- "additionalProperties": false
- },
- "EmbedImage": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "proxy_url": {
- "type": "string"
- },
- "height": {
- "type": "integer"
- },
- "width": {
- "type": "integer"
- }
- },
- "additionalProperties": false
- },
- "ActionRowComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.ActionRow"
- },
- "components": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/ButtonComponent"
- },
- {
- "$ref": "#/definitions/SelectMenuComponent"
- },
- {
- "$ref": "#/definitions/StringSelectMenuComponent"
- },
- {
- "$ref": "#/definitions/TextInputComponent"
- }
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "components",
- "type"
- ]
- },
- "MessageComponentType.ActionRow": {
- "type": "number",
- "const": 1
- },
- "ButtonComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.Button"
- },
- "style": {
- "$ref": "#/definitions/ButtonStyle"
- },
- "label": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- },
- "custom_id": {
- "type": "string"
- },
- "sku_id": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "style",
- "type"
- ]
- },
- "MessageComponentType.Button": {
- "type": "number",
- "const": 2
- },
- "ButtonStyle": {
- "type": "number",
- "enum": [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6
- ]
- },
- "PartialEmoji": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "animated": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "name"
- ]
- },
- "SelectMenuComponent": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- 3,
- 5,
- 6,
- 7,
- 8
- ],
- "type": "number"
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "custom_id",
- "type"
- ]
- },
- "SelectMenuDefaultOption": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "enum": [
- "channel",
- "role",
- "user"
- ],
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "id",
- "type"
- ]
- },
- "StringSelectMenuComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.StringSelect"
- },
- "options": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuOption"
- }
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "custom_id",
- "options",
- "type"
- ]
- },
- "MessageComponentType.StringSelect": {
- "type": "number",
- "const": 3
- },
- "SelectMenuOption": {
- "type": "object",
- "properties": {
- "label": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- },
- "default": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "label",
- "value"
- ]
- },
- "TextInputComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.TextInput"
- },
- "custom_id": {
- "type": "string"
- },
- "style": {
- "$ref": "#/definitions/TextInputStyle"
- },
- "label": {
- "type": "string"
- },
- "min_length": {
- "type": "integer"
- },
- "max_length": {
- "type": "integer"
- },
- "required": {
- "type": "boolean"
- },
- "value": {
- "type": "string"
- },
- "placeholder": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "custom_id",
- "label",
- "style",
- "type"
- ]
- },
- "MessageComponentType.TextInput": {
- "type": "number",
- "const": 4
- },
- "TextInputStyle": {
- "type": "number",
- "enum": [
- 1,
- 2
- ]
- },
- "PollCreationSchema": {
- "type": "object",
- "properties": {
- "question": {
- "$ref": "#/definitions/PollMedia"
- },
- "answers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/PollAnswer"
- }
- },
- "duration": {
- "type": "integer"
- },
- "allow_multiselect": {
- "type": "boolean"
- },
- "layout_type": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "answers",
- "question"
- ]
- },
- "PollMedia": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- }
- },
- "additionalProperties": false
- },
- "PollAnswer": {
- "type": "object",
- "properties": {
- "answer_id": {
- "type": "string"
- },
- "poll_media": {
- "$ref": "#/definitions/PollMedia"
- }
- },
- "additionalProperties": false,
- "required": [
- "poll_media"
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "PollCreationSchema": {
- "type": "object",
- "properties": {
- "question": {
- "$ref": "#/definitions/PollMedia"
- },
- "answers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/PollAnswer"
- }
- },
- "duration": {
- "type": "integer"
- },
- "allow_multiselect": {
- "type": "boolean"
- },
- "layout_type": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "answers",
- "question"
- ],
- "definitions": {
- "PollMedia": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- }
- },
- "additionalProperties": false
- },
- "PartialEmoji": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "animated": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "name"
- ]
- },
- "PollAnswer": {
- "type": "object",
- "properties": {
- "answer_id": {
- "type": "string"
- },
- "poll_media": {
- "$ref": "#/definitions/PollMedia"
- }
- },
- "additionalProperties": false,
- "required": [
- "poll_media"
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MessageEditSchema": {
- "type": "object",
- "properties": {
- "embed": {
- "$ref": "#/definitions/Embed"
- },
- "file": {
- "type": "object",
- "properties": {
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename"
- ]
- },
- "flags": {
- "type": "integer"
- },
- "channel_id": {
- "type": "string"
- },
- "content": {
- "type": "string"
- },
- "mobile_network_type": {
- "type": "string"
- },
- "nonce": {
- "type": "string"
- },
- "tts": {
- "type": "boolean"
- },
- "embeds": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Embed"
- }
- },
- "allowed_mentions": {
- "type": "object",
- "properties": {
- "parse": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "users": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "replied_user": {
- "type": "boolean"
- }
- },
- "additionalProperties": false
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "fail_if_not_exists": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "message_id"
- ]
- },
- "payload_json": {
- "type": "string"
- },
- "attachments": {
- "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
- "type": "array",
- "items": {
- "anyOf": [
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "id"
- ]
- },
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- },
- "uploaded_filename": {
- "type": "string"
- },
- "original_content_type": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "uploaded_filename"
- ]
- }
- ]
- }
- },
- "sticker_ids": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "components": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ActionRowComponent"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "poll": {
- "$ref": "#/definitions/PollCreationSchema"
- },
- "enforce_nonce": {
- "type": "boolean"
- },
- "applied_tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "thread_name": {
- "type": "string"
- },
- "avatar_url": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "definitions": {
- "Embed": {
- "type": "object",
- "properties": {
- "title": {
- "type": "string"
- },
- "type": {
- "enum": [
- "article",
- "gifv",
- "image",
- "link",
- "rich",
- "video"
- ],
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "color": {
- "type": "integer"
- },
- "footer": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "text"
- ]
- },
- "image": {
- "$ref": "#/definitions/EmbedImage"
- },
- "thumbnail": {
- "$ref": "#/definitions/EmbedImage"
- },
- "video": {
- "$ref": "#/definitions/EmbedImage"
- },
- "provider": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "author": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "fields": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "inline": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "name",
- "value"
- ]
- }
- }
- },
- "additionalProperties": false
- },
- "EmbedImage": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "proxy_url": {
- "type": "string"
- },
- "height": {
- "type": "integer"
- },
- "width": {
- "type": "integer"
- }
- },
- "additionalProperties": false
- },
- "ActionRowComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.ActionRow"
- },
- "components": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/ButtonComponent"
- },
- {
- "$ref": "#/definitions/SelectMenuComponent"
- },
- {
- "$ref": "#/definitions/StringSelectMenuComponent"
- },
- {
- "$ref": "#/definitions/TextInputComponent"
- }
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "components",
- "type"
- ]
- },
- "MessageComponentType.ActionRow": {
- "type": "number",
- "const": 1
- },
- "ButtonComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.Button"
- },
- "style": {
- "$ref": "#/definitions/ButtonStyle"
- },
- "label": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- },
- "custom_id": {
- "type": "string"
- },
- "sku_id": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "style",
- "type"
- ]
- },
- "MessageComponentType.Button": {
- "type": "number",
- "const": 2
- },
- "ButtonStyle": {
- "type": "number",
- "enum": [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6
- ]
- },
- "PartialEmoji": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "animated": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "name"
- ]
- },
- "SelectMenuComponent": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- 3,
- 5,
- 6,
- 7,
- 8
- ],
- "type": "number"
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "custom_id",
- "type"
- ]
- },
- "SelectMenuDefaultOption": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "enum": [
- "channel",
- "role",
- "user"
- ],
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "id",
- "type"
- ]
- },
- "StringSelectMenuComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.StringSelect"
- },
- "options": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuOption"
- }
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "custom_id",
- "options",
- "type"
- ]
- },
- "MessageComponentType.StringSelect": {
- "type": "number",
- "const": 3
- },
- "SelectMenuOption": {
- "type": "object",
- "properties": {
- "label": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- },
- "default": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "label",
- "value"
- ]
- },
- "TextInputComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.TextInput"
- },
- "custom_id": {
- "type": "string"
- },
- "style": {
- "$ref": "#/definitions/TextInputStyle"
- },
- "label": {
- "type": "string"
- },
- "min_length": {
- "type": "integer"
- },
- "max_length": {
- "type": "integer"
- },
- "required": {
- "type": "boolean"
- },
- "value": {
- "type": "string"
- },
- "placeholder": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "custom_id",
- "label",
- "style",
- "type"
- ]
- },
- "MessageComponentType.TextInput": {
- "type": "number",
- "const": 4
- },
- "TextInputStyle": {
- "type": "number",
- "enum": [
- 1,
- 2
- ]
- },
- "PollCreationSchema": {
- "type": "object",
- "properties": {
- "question": {
- "$ref": "#/definitions/PollMedia"
- },
- "answers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/PollAnswer"
- }
- },
- "duration": {
- "type": "integer"
- },
- "allow_multiselect": {
- "type": "boolean"
- },
- "layout_type": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "answers",
- "question"
- ]
- },
- "PollMedia": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- }
- },
- "additionalProperties": false
- },
- "PollAnswer": {
- "type": "object",
- "properties": {
- "answer_id": {
- "type": "string"
- },
- "poll_media": {
- "$ref": "#/definitions/PollMedia"
- }
- },
- "additionalProperties": false,
- "required": [
- "poll_media"
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MfaCodesSchema": {
- "type": "object",
- "properties": {
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "regenerate": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "password"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ModifyGuildStickerSchema": {
- "type": "object",
- "properties": {
- "name": {
- "minLength": 2,
- "maxLength": 30,
- "type": "string"
- },
- "description": {
- "maxLength": 100,
- "type": "string"
- },
- "tags": {
- "maxLength": 200,
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "name",
- "tags"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "PreloadMessagesRequestSchema": {
- "type": "object",
- "properties": {
- "channels": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "channels"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "PasswordResetSchema": {
- "type": "object",
- "properties": {
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "token": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "password",
- "token"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "PurgeSchema": {
- "type": "object",
- "properties": {
- "before": {
- "type": "string"
- },
- "after": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "after",
- "before"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RefreshUrlsRequestSchema": {
- "type": "object",
- "properties": {
- "attachment_urls": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "attachment_urls"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RegisterSchema": {
- "type": "object",
- "properties": {
- "username": {
- "minLength": 2,
- "type": "string"
- },
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "consent": {
- "type": "boolean"
- },
- "email": {
- "format": "email",
- "type": "string"
- },
- "fingerprint": {
- "type": "string"
- },
- "invite": {
- "type": "string"
- },
- "date_of_birth": {
- "type": "string"
- },
- "gift_code_sku_id": {
- "type": "string"
- },
- "captcha_key": {
- "type": "string"
- },
- "promotional_email_opt_in": {
- "type": "boolean"
- },
- "unique_username_registration": {
- "type": "boolean"
- },
- "global_name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "consent",
- "username"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RelationshipPostSchema": {
- "type": "object",
- "properties": {
- "discriminator": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "discriminator",
- "username"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RelationshipPutSchema": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- 1,
- 2,
- 3,
- 4
- ],
- "type": "number"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RequestGuildMembersSchema": {
- "type": "object",
- "properties": {
"guild_id": {
- "anyOf": [
- {
- "type": "array",
- "items": [
- {
- "type": "string"
- }
- ],
- "minItems": 1,
- "maxItems": 1
- },
- {
- "type": "string"
- }
- ]
- },
- "query": {
"type": "string"
},
- "limit": {
- "type": "integer"
- },
- "presences": {
- "type": "boolean"
- },
- "user_ids": {
- "anyOf": [
- {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- {
- "type": "string"
- }
- ]
- },
- "nonce": {
+ "preferred_region": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
- "guild_id"
+ "channel_id",
+ "type"
],
"$schema": "http://json-schema.org/draft-07/schema#"
},
+ "StreamDeleteSchema": {
+ "type": "object",
+ "properties": {
+ "stream_key": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "stream_key"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "StreamWatchSchema": {
+ "type": "object",
+ "properties": {
+ "stream_key": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "stream_key"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "APIErrorResponse": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "_errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "message"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "_errors"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "errors",
+ "message"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "CaptchaRequiredResponse": {
+ "type": "object",
+ "properties": {
+ "captcha_key": {
+ "type": "string"
+ },
+ "captcha_sitekey": {
+ "type": "string"
+ },
+ "captcha_service": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "captcha_key",
+ "captcha_service",
+ "captcha_sitekey"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "APIErrorOrCaptchaResponse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/APIErrorResponse"
+ },
+ {
+ "$ref": "#/definitions/CaptchaRequiredResponse"
+ }
+ ],
+ "definitions": {
+ "APIErrorResponse": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "integer"
+ },
+ "message": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "_errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "message"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "_errors"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "errors",
+ "message"
+ ]
+ },
+ "CaptchaRequiredResponse": {
+ "type": "object",
+ "properties": {
+ "captcha_key": {
+ "type": "string"
+ },
+ "captcha_sitekey": {
+ "type": "string"
+ },
+ "captcha_service": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "captcha_key",
+ "captcha_service",
+ "captcha_sitekey"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
"AccountStandingResponse": {
"type": "object",
"properties": {
@@ -17366,157 +14362,6 @@
},
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "APIErrorResponse": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "message": {
- "type": "string"
- },
- "errors": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "_errors": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "code",
- "message"
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "_errors"
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "code",
- "errors",
- "message"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "CaptchaRequiredResponse": {
- "type": "object",
- "properties": {
- "captcha_key": {
- "type": "string"
- },
- "captcha_sitekey": {
- "type": "string"
- },
- "captcha_service": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "captcha_key",
- "captcha_service",
- "captcha_sitekey"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "APIErrorOrCaptchaResponse": {
- "anyOf": [
- {
- "$ref": "#/definitions/APIErrorResponse"
- },
- {
- "$ref": "#/definitions/CaptchaRequiredResponse"
- }
- ],
- "definitions": {
- "APIErrorResponse": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "message": {
- "type": "string"
- },
- "errors": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "_errors": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "code",
- "message"
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "_errors"
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "code",
- "errors",
- "message"
- ]
- },
- "CaptchaRequiredResponse": {
- "type": "object",
- "properties": {
- "captcha_key": {
- "type": "string"
- },
- "captcha_sitekey": {
- "type": "string"
- },
- "captcha_service": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "captcha_key",
- "captcha_service",
- "captcha_sitekey"
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
"BackupCodesChallengeResponse": {
"type": "object",
"properties": {
@@ -22095,7 +18940,6 @@
"definitions": {
"PartialMessage": {
"description": "https://docs.discord.food/resources/message#partial-message-structure",
- "additionalProperties": false,
"type": "object",
"properties": {
"id": {
@@ -22111,20 +18955,20 @@
"type": "string"
},
"author": {
- "$ref": "#/definitions/User"
+ "$ref": "#/definitions/PartialUser"
},
"flags": {
"type": "integer"
},
"application_id": {
"type": "string"
- },
- "channel": {
- "$ref": "#/definitions/Channel"
}
},
+ "additionalProperties": false,
"required": [
- "flags",
+ "author",
+ "channel_id",
+ "content",
"id",
"type"
]
@@ -22159,3382 +19003,233 @@
255
]
},
- "User": {
+ "PartialUser": {
"type": "object",
"properties": {
+ "id": {
+ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```",
+ "format": "snowflake",
+ "type": "string"
+ },
"username": {
"type": "string"
},
"discriminator": {
"type": "string"
},
+ "global_name": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
"avatar": {
- "type": "string"
+ "type": [
+ "null",
+ "string"
+ ]
},
- "accent_color": {
- "type": "integer"
+ "avatar_decoration_data": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AvatarDecorationData"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "banner": {
- "type": "string"
+ "collectibles": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/Collectibles"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "theme_colors": {
- "type": "array",
- "items": {
- "type": "integer"
- }
+ "display_name_styles": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DisplayNameStyle"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
- "pronouns": {
- "type": "string"
- },
- "phone": {
- "type": "string"
- },
- "desktop": {
- "type": "boolean",
- "default": false
- },
- "mobile": {
- "type": "boolean",
- "default": false
- },
- "premium": {
- "type": "boolean"
- },
- "premium_type": {
- "type": "integer"
+ "primary_guild": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/PrimaryGuild"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"bot": {
- "type": "boolean",
- "default": false
- },
- "bio": {
- "type": "string",
- "default": ""
+ "type": "boolean"
},
"system": {
- "type": "boolean",
- "default": false
- },
- "nsfw_allowed": {
- "type": "boolean",
- "default": true
- },
- "mfa_enabled": {
- "type": "boolean",
- "default": false
- },
- "webauthn_enabled": {
- "type": "boolean",
- "default": false
- },
- "totp_secret": {
- "type": "string",
- "default": ""
- },
- "totp_last_ticket": {
- "type": "string",
- "default": ""
- },
- "created_at": {
- "type": "string",
- "format": "date-time"
- },
- "premium_since": {
- "type": "string",
- "format": "date-time"
- },
- "verified": {
"type": "boolean"
},
- "disabled": {
- "type": "boolean",
- "default": false
+ "banner": {
+ "type": [
+ "null",
+ "string"
+ ]
},
- "deleted": {
- "type": "boolean",
- "default": false
- },
- "email": {
- "type": "string"
- },
- "flags": {
- "type": "integer",
- "default": 0
+ "accent_color": {
+ "type": [
+ "null",
+ "integer"
+ ]
},
"public_flags": {
- "type": "integer",
- "default": 0
- },
- "purchased_flags": {
- "type": "integer",
- "default": 0
- },
- "premium_usage_flags": {
- "type": "integer",
- "default": 0
- },
- "rights": {
- "type": "string"
- },
- "sessions": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Session"
- }
- },
- "relationships": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Relationship"
- }
- },
- "connected_accounts": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ConnectedAccount"
- }
- },
- "data": {
- "type": "object",
- "properties": {
- "valid_tokens_since": {
- "type": "string",
- "format": "date-time"
- },
- "hash": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "valid_tokens_since"
- ]
- },
- "fingerprints": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "default": []
- },
- "settings": {
- "$ref": "#/definitions/UserSettings"
- },
- "extended_settings": {
- "type": "string",
- "default": "{}"
- },
- "security_keys": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SecurityKey"
- }
- },
- "badge_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "bio",
- "bot",
- "connected_accounts",
- "created_at",
- "data",
- "deleted",
- "desktop",
- "disabled",
- "discriminator",
- "extended_settings",
- "fingerprints",
- "flags",
- "id",
- "mfa_enabled",
- "mobile",
- "nsfw_allowed",
- "premium",
- "premium_since",
- "premium_type",
- "premium_usage_flags",
- "public_flags",
- "purchased_flags",
- "relationships",
- "rights",
- "security_keys",
- "sessions",
- "system",
- "username",
- "verified",
- "webauthn_enabled"
- ]
- },
- "Session": {
- "type": "object",
- "properties": {
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "session_id": {
- "type": "string"
- },
- "activities": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Activity"
- }
- },
- "client_info": {
- "type": "object",
- "properties": {
- "client": {
- "type": "string"
- },
- "os": {
- "type": "string"
- },
- "version": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "client",
- "os",
- "version"
- ]
- },
- "client_status": {
- "$ref": "#/definitions/ClientStatus"
- },
- "status": {
- "$ref": "#/definitions/Status"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "activities",
- "client_info",
- "client_status",
- "id",
- "session_id",
- "status",
- "user",
- "user_id"
- ]
- },
- "Activity": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ActivityType"
- },
- "url": {
- "type": "string"
- },
- "created_at": {
- "type": "integer"
- },
- "timestamps": {
- "type": "object",
- "properties": {
- "start": {
- "type": "integer"
- },
- "end": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "end",
- "start"
- ]
- },
- "application_id": {
- "type": "string"
- },
- "details": {
- "type": "string"
- },
- "state": {
- "type": "string"
- },
- "emoji": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "animated": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "animated",
- "name"
- ]
- },
- "party": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "size": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- },
- "additionalProperties": false
- },
- "assets": {
- "type": "object",
- "properties": {
- "large_image": {
- "type": "string"
- },
- "large_text": {
- "type": "string"
- },
- "small_image": {
- "type": "string"
- },
- "small_text": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "secrets": {
- "type": "object",
- "properties": {
- "join": {
- "type": "string"
- },
- "spectate": {
- "type": "string"
- },
- "match": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "instance": {
- "type": "boolean"
- },
- "flags": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "sync_id": {
- "type": "string"
- },
- "metadata": {
- "type": "object",
- "properties": {
- "context_uri": {
- "type": "string"
- },
- "album_id": {
- "type": "string"
- },
- "artist_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "album_id",
- "artist_ids"
- ]
- },
- "session_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "flags",
- "name",
- "session_id",
- "type"
- ]
- },
- "ActivityType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2,
- 4,
- 5
- ]
- },
- "ClientStatus": {
- "type": "object",
- "properties": {
- "desktop": {
- "type": "string"
- },
- "mobile": {
- "type": "string"
- },
- "web": {
- "type": "string"
- },
- "embedded": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "Status": {
- "enum": [
- "dnd",
- "idle",
- "invisible",
- "offline",
- "online"
- ],
- "type": "string"
- },
- "Relationship": {
- "type": "object",
- "properties": {
- "from_id": {
- "type": "string"
- },
- "from": {
- "$ref": "#/definitions/User"
- },
- "to_id": {
- "type": "string"
- },
- "to": {
- "$ref": "#/definitions/User"
- },
- "nickname": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/RelationshipType"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "from",
- "from_id",
- "id",
- "to",
- "to_id",
- "type"
- ]
- },
- "RelationshipType": {
- "type": "number",
- "enum": [
- 4,
- 3,
- 2,
- 1
- ]
- },
- "ConnectedAccount": {
- "type": "object",
- "properties": {
- "external_id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "friend_sync": {
- "type": "boolean",
- "default": false
- },
- "name": {
- "type": "string"
- },
- "revoked": {
- "type": "boolean",
- "default": false
- },
- "show_activity": {
- "type": "integer",
- "default": 0
- },
- "type": {
- "type": "string"
- },
- "verified": {
- "type": "boolean",
- "default": true
- },
- "visibility": {
- "type": "integer",
- "default": 0
- },
- "integrations": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "default": []
- },
- "metadata_": {},
- "metadata_visibility": {
- "type": "integer",
- "default": 0
- },
- "two_way_link": {
- "type": "boolean",
- "default": false
- },
- "token_data": {
- "anyOf": [
- {
- "$ref": "#/definitions/ConnectedAccountTokenData"
- },
- {
- "type": "null"
- }
- ]
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "external_id",
- "id",
- "name",
- "type",
- "user",
- "user_id"
- ]
- },
- "ConnectedAccountTokenData": {
- "type": "object",
- "properties": {
- "access_token": {
- "type": "string"
- },
- "token_type": {
- "type": "string"
- },
- "scope": {
- "type": "string"
- },
- "refresh_token": {
- "type": "string"
- },
- "expires_in": {
- "type": "integer"
- },
- "expires_at": {
- "type": "integer"
- },
- "fetched_at": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
- "access_token",
- "fetched_at"
- ]
- },
- "UserSettings": {
- "type": "object",
- "properties": {
- "index": {
- "type": "string"
- },
- "afk_timeout": {
- "type": "integer",
- "default": 3600
- },
- "allow_accessibility_detection": {
- "type": "boolean",
- "default": true
- },
- "animate_emoji": {
- "type": "boolean",
- "default": true
- },
- "animate_stickers": {
- "type": "integer",
- "default": 0
- },
- "contact_sync_enabled": {
- "type": "boolean",
- "default": false
- },
- "convert_emoticons": {
- "type": "boolean",
- "default": false
- },
- "custom_status": {
- "anyOf": [
- {
- "$ref": "#/definitions/CustomStatus"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "default_guilds_restricted": {
- "type": "boolean",
- "default": false
- },
- "detect_platform_accounts": {
- "type": "boolean",
- "default": false
- },
- "developer_mode": {
- "type": "boolean",
- "default": true
- },
- "disable_games_tab": {
- "type": "boolean",
- "default": true
- },
- "enable_tts_command": {
- "type": "boolean",
- "default": false
- },
- "explicit_content_filter": {
- "type": "integer",
- "default": 0
- },
- "friend_discovery_flags": {
- "type": "integer",
- "default": 0
- },
- "friend_source_flags": {
- "$ref": "#/definitions/FriendSourceFlags"
- },
- "gateway_connected": {
- "type": "boolean",
- "default": false
- },
- "gif_auto_play": {
- "type": "boolean",
- "default": false
- },
- "guild_folders": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/GuildFolder"
- },
- "default": []
- },
- "guild_positions": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "default": []
- },
- "inline_attachment_media": {
- "type": "boolean",
- "default": true
- },
- "inline_embed_media": {
- "type": "boolean",
- "default": true
- },
- "locale": {
- "type": "string",
- "default": "en-US"
- },
- "message_display_compact": {
- "type": "boolean",
- "default": false
- },
- "native_phone_integration_enabled": {
- "type": "boolean",
- "default": true
- },
- "render_embeds": {
- "type": "boolean",
- "default": true
- },
- "render_reactions": {
- "type": "boolean",
- "default": true
- },
- "restricted_guilds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "default": []
- },
- "show_current_game": {
- "type": "boolean",
- "default": true
- },
- "status": {
- "enum": [
- "dnd",
- "idle",
- "invisible",
- "offline",
- "online"
- ],
- "type": "string",
- "default": "online"
- },
- "stream_notifications_enabled": {
- "type": "boolean",
- "default": false
- },
- "theme": {
- "enum": [
- "dark",
- "light"
- ],
- "type": "string",
- "default": "dark"
- },
- "timezone_offset": {
- "type": "integer",
- "default": 0
- },
- "view_nsfw_guilds": {
- "type": "boolean",
- "default": true
- }
- },
- "additionalProperties": false,
- "required": [
- "afk_timeout",
- "allow_accessibility_detection",
- "animate_emoji",
- "animate_stickers",
- "contact_sync_enabled",
- "convert_emoticons",
- "custom_status",
- "default_guilds_restricted",
- "detect_platform_accounts",
- "developer_mode",
- "disable_games_tab",
- "enable_tts_command",
- "explicit_content_filter",
- "friend_discovery_flags",
- "friend_source_flags",
- "gateway_connected",
- "gif_auto_play",
- "guild_folders",
- "guild_positions",
- "index",
- "inline_attachment_media",
- "inline_embed_media",
- "locale",
- "message_display_compact",
- "native_phone_integration_enabled",
- "render_embeds",
- "render_reactions",
- "restricted_guilds",
- "show_current_game",
- "status",
- "stream_notifications_enabled",
- "theme",
- "timezone_offset",
- "view_nsfw_guilds"
- ]
- },
- "CustomStatus": {
- "type": "object",
- "properties": {
- "emoji_id": {
- "type": "string"
- },
- "emoji_name": {
- "type": "string"
- },
- "expires_at": {
- "type": "integer"
- },
- "text": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "FriendSourceFlags": {
- "type": "object",
- "properties": {
- "all": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "all"
- ]
- },
- "GuildFolder": {
- "type": "object",
- "properties": {
- "color": {
- "type": "integer"
- },
- "guild_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "id": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "color",
- "guild_ids",
- "id",
- "name"
- ]
- },
- "SecurityKey": {
- "type": "object",
- "properties": {
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "key_id": {
- "type": "string"
- },
- "public_key": {
- "type": "string"
- },
- "counter": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "counter",
- "id",
- "key_id",
- "name",
- "public_key",
- "user",
- "user_id"
- ]
- },
- "Channel": {
- "type": "object",
- "properties": {
- "created_at": {
- "type": "string",
- "format": "date-time"
- },
- "name": {
- "type": "string"
- },
- "icon": {
- "type": [
- "null",
- "string"
- ]
- },
- "type": {
- "$ref": "#/definitions/ChannelType"
- },
- "recipients": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Recipient"
- }
- },
- "last_message_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "parent_id": {
- "type": [
- "null",
- "string"
- ]
- },
- "parent": {
- "$ref": "#/definitions/Channel"
- },
- "owner_id": {
- "type": "string"
- },
- "owner": {
- "$ref": "#/definitions/User"
- },
- "last_pin_timestamp": {
- "type": "integer"
- },
- "default_auto_archive_duration": {
- "type": "integer"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ChannelPermissionOverwrite"
- }
- },
- "video_quality_mode": {
- "type": "integer"
- },
- "bitrate": {
- "type": "integer"
- },
- "user_limit": {
- "type": "integer"
- },
- "nsfw": {
- "type": "boolean",
- "default": false
- },
- "rate_limit_per_user": {
- "type": "integer"
- },
- "topic": {
- "type": "string"
- },
- "invites": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Invite"
- }
- },
- "retention_policy_id": {
- "type": "string"
- },
- "messages": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Message"
- }
- },
- "voice_states": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/VoiceState"
- }
- },
- "read_states": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ReadState"
- }
- },
- "webhooks": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Webhook"
- }
- },
- "flags": {
- "type": "integer",
- "default": 0
- },
- "default_thread_rate_limit_per_user": {
- "type": "integer",
- "default": 0
- },
- "position": {
- "description": "Must be calculated Channel.calculatePosition",
- "type": "integer"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "created_at",
- "flags",
- "id",
- "nsfw",
- "owner",
- "parent_id",
- "position",
- "type"
- ]
- },
- "ChannelType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 33,
- 34,
- 35,
- 64,
- 255
- ]
- },
- "Recipient": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "channel": {
- "$ref": "#/definitions/Channel"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "closed": {
- "type": "boolean"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel",
- "channel_id",
- "closed",
- "id",
- "user",
- "user_id"
- ]
- },
- "Guild": {
- "type": "object",
- "properties": {
- "afk_channel_id": {
- "type": [
- "null",
- "string"
- ]
- },
- "afk_channel": {
- "$ref": "#/definitions/Channel"
- },
- "afk_timeout": {
- "type": "integer"
- },
- "bans": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Ban"
- }
- },
- "banner": {
- "type": "string"
- },
- "default_message_notifications": {
- "type": "integer"
- },
- "description": {
- "type": "string"
- },
- "discovery_splash": {
- "type": "string"
- },
- "explicit_content_filter": {
- "type": "integer"
- },
- "features": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "default": []
- },
- "primary_category_id": {
- "type": "string"
- },
- "icon": {
- "type": "string"
- },
- "large": {
- "type": "boolean",
- "default": false
- },
- "max_members": {
- "type": "integer"
- },
- "max_presences": {
- "type": "integer"
- },
- "max_video_channel_users": {
- "type": "integer"
- },
- "member_count": {
- "type": "integer"
- },
- "presence_count": {
- "type": "integer"
- },
- "members": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Member"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Role"
- }
- },
- "channels": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Channel"
- }
- },
- "template_id": {
- "type": "string"
- },
- "template": {
- "$ref": "#/definitions/Template"
- },
- "emojis": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Emoji"
- }
- },
- "stickers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Sticker"
- }
- },
- "invites": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Invite"
- }
- },
- "voice_states": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/VoiceState"
- }
- },
- "webhooks": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Webhook"
- }
- },
- "mfa_level": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "owner_id": {
- "type": "string"
- },
- "owner": {
- "$ref": "#/definitions/User"
- },
- "preferred_locale": {
- "type": "string"
- },
- "premium_subscription_count": {
- "type": "integer"
- },
- "premium_tier": {
- "type": "integer"
- },
- "public_updates_channel_id": {
- "type": [
- "null",
- "string"
- ]
- },
- "public_updates_channel": {
- "$ref": "#/definitions/Channel"
- },
- "rules_channel_id": {
- "type": [
- "null",
- "string"
- ]
- },
- "rules_channel": {
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "splash": {
- "type": "string"
- },
- "system_channel_id": {
- "type": [
- "null",
- "string"
- ]
- },
- "system_channel": {
- "$ref": "#/definitions/Channel"
- },
- "system_channel_flags": {
- "type": "integer"
- },
- "unavailable": {
- "type": "boolean",
- "default": false
- },
- "verification_level": {
- "type": "integer"
- },
- "welcome_screen": {
- "$ref": "#/definitions/GuildWelcomeScreen",
- "description": "DEPRECATED: Look at the new Guild onboarding screens."
- },
- "widget_channel_id": {
- "type": "string"
- },
- "widget_channel": {
- "$ref": "#/definitions/Channel"
- },
- "widget_enabled": {
- "type": "boolean",
- "default": true
- },
- "nsfw_level": {
- "type": "integer"
- },
- "nsfw": {
- "type": "boolean",
- "default": false
- },
- "parent": {
- "type": "string"
- },
- "permissions": {
- "type": "integer"
- },
- "premium_progress_bar_enabled": {
- "type": "boolean",
- "default": false
- },
- "channel_ordering": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "bans",
- "channel_ordering",
- "channels",
- "emojis",
- "features",
- "id",
- "invites",
- "members",
- "name",
- "nsfw",
- "premium_progress_bar_enabled",
- "public_updates_channel_id",
- "roles",
- "stickers",
- "template",
- "unavailable",
- "voice_states",
- "webhooks",
- "welcome_screen",
- "widget_enabled"
- ]
- },
- "Ban": {
- "type": "object",
- "properties": {
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "executor_id": {
- "type": "string"
- },
- "executor": {
- "$ref": "#/definitions/User"
- },
- "ip": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "executor",
- "executor_id",
- "guild",
- "guild_id",
- "id",
- "ip",
- "user",
- "user_id"
- ]
- },
- "Member": {
- "type": "object",
- "properties": {
- "index": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "nick": {
- "type": "string"
- },
- "roles": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Role"
- }
- },
- "joined_at": {
- "type": "string",
- "format": "date-time"
- },
- "premium_since": {
- "type": "integer"
- },
- "deaf": {
- "type": "boolean"
- },
- "mute": {
- "type": "boolean"
- },
- "pending": {
- "type": "boolean"
- },
- "settings": {
- "$ref": "#/definitions/UserGuildSettings"
- },
- "last_message_id": {
- "type": "string"
- },
- "joined_by": {
- "type": "string"
- },
- "avatar": {
- "type": "string"
- },
- "banner": {
- "type": "string"
- },
- "bio": {
- "type": "string"
- },
- "theme_colors": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "pronouns": {
- "type": "string"
- },
- "communication_disabled_until": {
- "type": "string",
- "format": "date-time"
- }
- },
- "additionalProperties": false,
- "required": [
- "banner",
- "bio",
- "communication_disabled_until",
- "deaf",
- "guild",
- "guild_id",
- "id",
- "index",
- "joined_at",
- "joined_by",
- "mute",
- "pending",
- "roles",
- "settings",
- "user"
- ]
- },
- "Role": {
- "type": "object",
- "properties": {
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "color": {
- "type": "integer"
- },
- "hoist": {
- "type": "boolean"
- },
- "managed": {
- "type": "boolean"
- },
- "mentionable": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "permissions": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- },
- "icon": {
- "type": "string"
- },
- "unicode_emoji": {
- "type": "string"
- },
- "tags": {
- "type": "object",
- "properties": {
- "bot_id": {
- "type": "string"
- },
- "integration_id": {
- "type": "string"
- },
- "premium_subscriber": {
- "type": "boolean"
- }
- },
- "additionalProperties": false
- },
- "flags": {
- "type": "integer"
- },
- "colors": {
- "$ref": "#/definitions/RoleColors"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "color",
- "colors",
- "flags",
- "guild",
- "guild_id",
- "hoist",
- "id",
- "managed",
- "mentionable",
- "name",
- "permissions",
- "position"
- ]
- },
- "RoleColors": {
- "type": "object",
- "properties": {
- "primary_color": {
- "type": "integer"
- },
- "secondary_color": {
- "type": "integer"
- },
- "tertiary_color": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "primary_color"
- ]
- },
- "UserGuildSettings": {
- "type": "object",
- "properties": {
- "channel_overrides": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/definitions/ChannelOverride"
- }
- },
- {
- "type": "null"
- }
- ]
- },
- "message_notifications": {
- "type": "integer"
- },
- "mobile_push": {
- "type": "boolean"
- },
- "mute_config": {
- "anyOf": [
- {
- "$ref": "#/definitions/MuteConfig"
- },
- {
- "type": "null"
- }
- ]
- },
- "muted": {
- "type": "boolean"
- },
- "suppress_everyone": {
- "type": "boolean"
- },
- "suppress_roles": {
- "type": "boolean"
- },
- "version": {
- "type": "integer"
- },
- "guild_id": {
- "type": [
- "null",
- "string"
- ]
- },
- "flags": {
- "type": "integer"
- },
- "mute_scheduled_events": {
- "type": "boolean"
- },
- "hide_muted_channels": {
- "type": "boolean"
- },
- "notify_highlights": {
- "type": "integer",
- "const": 0
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_overrides",
- "flags",
- "guild_id",
- "hide_muted_channels",
- "message_notifications",
- "mobile_push",
- "mute_config",
- "mute_scheduled_events",
- "muted",
- "notify_highlights",
- "suppress_everyone",
- "suppress_roles",
- "version"
- ]
- },
- "ChannelOverride": {
- "type": "object",
- "properties": {
- "message_notifications": {
- "type": "integer"
- },
- "mute_config": {
- "$ref": "#/definitions/MuteConfig"
- },
- "muted": {
- "type": "boolean"
- },
- "channel_id": {
- "type": [
- "null",
- "string"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_id",
- "message_notifications",
- "mute_config",
- "muted"
- ]
- },
- "MuteConfig": {
- "type": "object",
- "properties": {
- "end_time": {
- "type": "integer"
- },
- "selected_time_window": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "end_time",
- "selected_time_window"
- ]
- },
- "Template": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "usage_count": {
- "type": "integer"
- },
- "creator_id": {
- "type": "string"
- },
- "creator": {
- "$ref": "#/definitions/User"
- },
- "created_at": {
- "type": "string",
- "format": "date-time"
- },
- "updated_at": {
- "type": "string",
- "format": "date-time"
- },
- "source_guild_id": {
- "type": "string"
- },
- "source_guild": {
- "$ref": "#/definitions/Guild"
- },
- "serialized_source_guild": {
- "$ref": "#/definitions/Guild"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "code",
- "created_at",
- "creator",
- "creator_id",
- "id",
- "name",
- "serialized_source_guild",
- "source_guild",
- "source_guild_id",
- "updated_at"
- ]
- },
- "Emoji": {
- "type": "object",
- "properties": {
- "animated": {
- "type": "boolean"
- },
- "available": {
- "type": "boolean"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "managed": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "require_colons": {
- "type": "boolean"
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "groups": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "animated",
- "available",
- "groups",
- "guild",
- "guild_id",
- "id",
- "managed",
- "name",
- "require_colons",
- "roles",
- "user",
- "user_id"
- ]
- },
- "Sticker": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "available": {
- "type": "boolean"
- },
- "tags": {
- "type": "string"
- },
- "pack_id": {
- "type": "string"
- },
- "pack": {
- "$ref": "#/definitions/StickerPack"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "type": {
- "$ref": "#/definitions/StickerType"
- },
- "format_type": {
- "$ref": "#/definitions/StickerFormatType"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "format_type",
- "id",
- "name",
- "pack",
- "type"
- ]
- },
- "StickerPack": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "banner_asset_id": {
- "type": "string"
- },
- "stickers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Sticker"
- }
- },
- "cover_sticker_id": {
- "type": "string"
- },
- "cover_sticker": {
- "$ref": "#/definitions/Sticker"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "id",
- "name",
- "stickers"
- ]
- },
- "StickerType": {
- "type": "number",
- "enum": [
- 1,
- 2
- ]
- },
- "StickerFormatType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2,
- 3
- ]
- },
- "Invite": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string"
- },
- "temporary": {
- "type": "boolean"
- },
- "uses": {
- "type": "integer"
- },
- "max_uses": {
- "type": "integer"
- },
- "max_age": {
- "type": "integer"
- },
- "created_at": {
- "type": "string",
- "format": "date-time"
- },
- "expires_at": {
- "type": "string",
- "format": "date-time"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "channel_id": {
- "type": "string"
- },
- "channel": {
- "$ref": "#/definitions/Channel"
- },
- "inviter_id": {
- "type": "string"
- },
- "inviter": {
- "$ref": "#/definitions/User"
- },
- "target_user_id": {
- "type": "string"
- },
- "target_user": {
- "type": "string"
- },
- "target_user_type": {
- "type": "integer"
- },
- "vanity_url": {
- "type": "boolean"
- },
- "flags": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel",
- "channel_id",
- "code",
- "created_at",
- "flags",
- "guild",
- "guild_id",
- "inviter",
- "max_age",
- "max_uses",
- "target_user_id",
- "temporary",
- "uses"
- ]
- },
- "VoiceState": {
- "type": "object",
- "properties": {
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "channel_id": {
- "type": "string"
- },
- "channel": {
- "$ref": "#/definitions/Channel"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "member": {
- "$ref": "#/definitions/Member"
- },
- "session_id": {
- "type": "string"
- },
- "token": {
- "type": "string"
- },
- "deaf": {
- "type": "boolean"
- },
- "mute": {
- "type": "boolean"
- },
- "self_deaf": {
- "type": "boolean"
- },
- "self_mute": {
- "type": "boolean"
- },
- "self_stream": {
- "type": "boolean"
- },
- "self_video": {
- "type": "boolean"
- },
- "suppress": {
- "type": "boolean"
- },
- "request_to_speak_timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel",
- "channel_id",
- "deaf",
- "guild_id",
- "id",
- "member",
- "mute",
- "self_deaf",
- "self_mute",
- "self_video",
- "session_id",
- "suppress",
- "token",
- "user",
- "user_id"
- ]
- },
- "Webhook": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/WebhookType"
- },
- "name": {
- "type": "string"
- },
- "avatar": {
- "type": "string"
- },
- "token": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "channel_id": {
- "type": "string"
- },
- "channel": {
- "$ref": "#/definitions/Channel"
- },
- "application_id": {
- "type": "string"
- },
- "application": {
- "$ref": "#/definitions/Application"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "source_guild_id": {
- "type": "string"
- },
- "source_guild": {
- "$ref": "#/definitions/Guild"
- },
- "source_channel_id": {
- "type": "string"
- },
- "source_channel": {
- "$ref": "#/definitions/Channel"
- },
- "url": {
- "type": "string"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "application",
- "application_id",
"avatar",
- "channel",
- "channel_id",
+ "discriminator",
"id",
- "name",
- "source_channel",
- "source_channel_id",
- "type",
- "url",
- "user",
- "user_id"
+ "username"
]
},
- "WebhookType": {
- "type": "number",
- "enum": [
- 1,
- 2,
- 3
- ]
- },
- "Application": {
+ "AvatarDecorationData": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "icon": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "summary": {
- "type": "string",
- "default": ""
- },
- "type": {
- "type": "object",
- "properties": {},
- "additionalProperties": true
- },
- "hook": {
- "type": "boolean",
- "default": true
- },
- "bot_public": {
- "type": "boolean",
- "default": true
- },
- "bot_require_code_grant": {
- "type": "boolean",
- "default": false
- },
- "verify_key": {
- "type": "string"
- },
- "owner": {
- "$ref": "#/definitions/User"
- },
- "flags": {
- "type": "integer",
- "default": 0
- },
- "redirect_uris": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "default": []
- },
- "rpc_application_state": {
- "type": "integer",
- "default": 0
- },
- "store_application_state": {
- "type": "integer",
- "default": 1
- },
- "verification_state": {
- "type": "integer",
- "default": 1
- },
- "interactions_endpoint_url": {
- "type": "string"
- },
- "integration_public": {
- "type": "boolean",
- "default": true
- },
- "integration_require_code_grant": {
- "type": "boolean",
- "default": false
- },
- "discoverability_state": {
- "type": "integer",
- "default": 1
- },
- "discovery_eligibility_flags": {
- "type": "integer",
- "default": 2240
- },
- "bot": {
- "$ref": "#/definitions/User"
- },
- "tags": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "cover_image": {
- "type": "string"
- },
- "install_params": {
- "type": "object",
- "properties": {
- "scopes": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "permissions": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "permissions",
- "scopes"
- ]
- },
- "terms_of_service_url": {
- "type": "string"
- },
- "privacy_policy_url": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "custom_install_url": {
- "type": "string"
- },
- "team": {
- "$ref": "#/definitions/Team"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "description",
- "discoverability_state",
- "discovery_eligibility_flags",
- "flags",
- "hook",
- "id",
- "integration_public",
- "integration_require_code_grant",
- "name",
- "owner",
- "redirect_uris",
- "rpc_application_state",
- "store_application_state",
- "summary",
- "verification_state",
- "verify_key"
- ]
- },
- "Team": {
- "type": "object",
- "properties": {
- "icon": {
- "type": "string"
- },
- "members": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/TeamMember"
- }
- },
- "name": {
- "type": "string"
- },
- "owner_user_id": {
- "type": "string"
- },
- "owner_user": {
- "$ref": "#/definitions/User"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "id",
- "members",
- "name",
- "owner_user",
- "owner_user_id"
- ]
- },
- "TeamMember": {
- "type": "object",
- "properties": {
- "membership_state": {
- "$ref": "#/definitions/TeamMemberState"
- },
- "permissions": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "role": {
- "$ref": "#/definitions/TeamMemberRole"
- },
- "team_id": {
- "type": "string"
- },
- "team": {
- "$ref": "#/definitions/Team"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "id",
- "membership_state",
- "permissions",
- "role",
- "team",
- "team_id",
- "user",
- "user_id"
- ]
- },
- "TeamMemberState": {
- "type": "number",
- "enum": [
- 1,
- 2
- ]
- },
- "TeamMemberRole": {
- "type": "string",
- "enum": [
- "admin",
- "developer",
- "read_only"
- ]
- },
- "GuildWelcomeScreen": {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "description": {
- "type": "string"
- },
- "welcome_channels": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string"
- },
- "emoji_id": {
- "type": "string"
- },
- "emoji_name": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_id",
- "description"
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "description",
- "enabled",
- "welcome_channels"
- ]
- },
- "ChannelPermissionOverwrite": {
- "type": "object",
- "properties": {
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ChannelPermissionOverwriteType"
- }
- },
- "additionalProperties": false,
- "required": [
- "allow",
- "deny",
- "id",
- "type"
- ]
- },
- "ChannelPermissionOverwriteType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "Message": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "channel": {
- "$ref": "#/definitions/Channel"
- },
- "guild_id": {
- "type": "string"
- },
- "guild": {
- "$ref": "#/definitions/Guild"
- },
- "author_id": {
- "type": "string"
- },
- "author": {
- "$ref": "#/definitions/User"
- },
- "member_id": {
- "type": "string"
- },
- "member": {
- "$ref": "#/definitions/Member"
- },
- "webhook_id": {
- "type": "string"
- },
- "webhook": {
- "$ref": "#/definitions/Webhook"
- },
- "application_id": {
- "type": "string"
- },
- "application": {
- "$ref": "#/definitions/Application"
- },
- "content": {
- "type": "string"
- },
- "timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "edited_timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "tts": {
- "type": "boolean"
- },
- "mention_everyone": {
- "type": "boolean"
- },
- "mentions": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/User"
- }
- },
- "mention_roles": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Role"
- }
- },
- "mention_channels": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Channel"
- }
- },
- "sticker_items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Sticker"
- }
- },
- "attachments": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Attachment"
- }
- },
- "embeds": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Embed"
- }
- },
- "reactions": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Reaction"
- }
- },
- "nonce": {
- "type": "string"
- },
- "pinned_at": {
- "anyOf": [
- {
- "type": "string",
- "format": "date-time"
- },
- {
- "type": "null"
- }
- ]
- },
- "pinned": {
- "type": "boolean"
- },
- "type": {
- "$ref": "#/definitions/MessageType"
- },
- "activity": {
- "type": "object",
- "properties": {
- "type": {
- "type": "integer"
- },
- "party_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "party_id",
- "type"
- ]
- },
- "flags": {
- "type": "integer"
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "type": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "message_id"
- ]
- },
- "referenced_message": {
- "anyOf": [
- {
- "$ref": "#/definitions/Message"
- },
- {
- "type": "null"
- }
- ]
- },
- "interaction": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/InteractionType"
- },
- "name": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "id",
- "name",
- "type",
- "user_id"
- ]
- },
- "components": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ActionRowComponent"
- }
- },
- "poll": {
- "$ref": "#/definitions/Poll"
- },
- "username": {
- "type": "string"
- },
- "avatar": {
- "type": "string"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel",
- "embeds",
- "flags",
- "id",
- "mention_channels",
- "mention_roles",
- "mentions",
- "pinned",
- "reactions",
- "timestamp",
- "type"
- ]
- },
- "Attachment": {
- "type": "object",
- "properties": {
- "filename": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- },
- "url": {
- "type": "string"
- },
- "proxy_url": {
- "type": "string"
- },
- "height": {
- "type": "integer"
- },
- "width": {
- "type": "integer"
- },
- "content_type": {
- "type": "string"
- },
- "message_id": {
- "type": "string"
- },
- "message": {
- "$ref": "#/definitions/Message"
- },
- "id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "filename",
- "id",
- "message",
- "message_id",
- "proxy_url",
- "size",
- "url"
- ]
- },
- "Embed": {
- "type": "object",
- "properties": {
- "title": {
- "type": "string"
- },
- "type": {
- "enum": [
- "article",
- "gifv",
- "image",
- "link",
- "rich",
- "video"
- ],
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "color": {
- "type": "integer"
- },
- "footer": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "text"
- ]
- },
- "image": {
- "$ref": "#/definitions/EmbedImage"
- },
- "thumbnail": {
- "$ref": "#/definitions/EmbedImage"
- },
- "video": {
- "$ref": "#/definitions/EmbedImage"
- },
- "provider": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "author": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "icon_url": {
- "type": "string"
- },
- "proxy_icon_url": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "fields": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "inline": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "name",
- "value"
- ]
- }
- }
- },
- "additionalProperties": false
- },
- "EmbedImage": {
- "type": "object",
- "properties": {
- "url": {
- "type": "string"
- },
- "proxy_url": {
- "type": "string"
- },
- "height": {
- "type": "integer"
- },
- "width": {
- "type": "integer"
- }
- },
- "additionalProperties": false
- },
- "Reaction": {
- "type": "object",
- "properties": {
- "count": {
- "type": "integer"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- },
- "user_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "count",
- "emoji",
- "user_ids"
- ]
- },
- "PartialEmoji": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "animated": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "name"
- ]
- },
- "InteractionType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2
- ]
- },
- "ActionRowComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.ActionRow"
- },
- "components": {
- "type": "array",
- "items": {
- "anyOf": [
- {
- "$ref": "#/definitions/ButtonComponent"
- },
- {
- "$ref": "#/definitions/SelectMenuComponent"
- },
- {
- "$ref": "#/definitions/StringSelectMenuComponent"
- },
- {
- "$ref": "#/definitions/TextInputComponent"
- }
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "components",
- "type"
- ]
- },
- "MessageComponentType.ActionRow": {
- "type": "number",
- "const": 1
- },
- "ButtonComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.Button"
- },
- "style": {
- "$ref": "#/definitions/ButtonStyle"
- },
- "label": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- },
- "custom_id": {
+ "asset": {
"type": "string"
},
"sku_id": {
+ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```",
+ "format": "snowflake",
"type": "string"
},
- "url": {
- "type": "string"
- },
- "disabled": {
- "type": "boolean"
+ "expires_at": {
+ "type": [
+ "null",
+ "string"
+ ]
}
},
"additionalProperties": false,
"required": [
- "style",
- "type"
+ "asset",
+ "expires_at",
+ "sku_id"
]
},
- "MessageComponentType.Button": {
- "type": "number",
- "const": 2
- },
- "ButtonStyle": {
- "type": "number",
- "enum": [
- 1,
- 2,
- 3,
- 4,
- 5,
- 6
- ]
- },
- "SelectMenuComponent": {
+ "Collectibles": {
"type": "object",
"properties": {
- "type": {
- "enum": [
- 3,
- 5,
- 6,
- 7,
- 8
- ],
- "type": "number"
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
+ "nameplate": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/NameplateData"
+ },
+ {
+ "type": "null"
+ }
+ ]
}
},
"additionalProperties": false,
"required": [
- "custom_id",
- "type"
+ "nameplate"
]
},
- "SelectMenuDefaultOption": {
+ "NameplateData": {
"type": "object",
"properties": {
- "id": {
+ "asset": {
"type": "string"
},
- "type": {
- "enum": [
- "channel",
- "role",
- "user"
- ],
+ "sku_id": {
+ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```",
+ "format": "snowflake",
"type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "id",
- "type"
- ]
- },
- "StringSelectMenuComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.StringSelect"
- },
- "options": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuOption"
- }
- },
- "custom_id": {
- "type": "string"
- },
- "channel_types": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "placeholder": {
- "type": "string"
- },
- "default_values": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/SelectMenuDefaultOption"
- }
- },
- "min_values": {
- "type": "integer"
- },
- "max_values": {
- "type": "integer"
- },
- "disabled": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "custom_id",
- "options",
- "type"
- ]
- },
- "MessageComponentType.StringSelect": {
- "type": "number",
- "const": 3
- },
- "SelectMenuOption": {
- "type": "object",
- "properties": {
- "label": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- },
- "default": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "label",
- "value"
- ]
- },
- "TextInputComponent": {
- "type": "object",
- "properties": {
- "type": {
- "$ref": "#/definitions/MessageComponentType.TextInput"
- },
- "custom_id": {
- "type": "string"
- },
- "style": {
- "$ref": "#/definitions/TextInputStyle"
},
"label": {
"type": "string"
},
- "min_length": {
- "type": "integer"
- },
- "max_length": {
- "type": "integer"
- },
- "required": {
- "type": "boolean"
- },
- "value": {
+ "palette": {
"type": "string"
},
- "placeholder": {
- "type": "string"
+ "expires_at": {
+ "type": [
+ "null",
+ "integer"
+ ]
}
},
"additionalProperties": false,
"required": [
- "custom_id",
+ "asset",
+ "expires_at",
"label",
- "style",
- "type"
+ "palette",
+ "sku_id"
]
},
- "MessageComponentType.TextInput": {
- "type": "number",
- "const": 4
- },
- "TextInputStyle": {
- "type": "number",
- "enum": [
- 1,
- 2
- ]
- },
- "Poll": {
+ "DisplayNameStyle": {
"type": "object",
"properties": {
- "question": {
- "$ref": "#/definitions/PollMedia"
- },
- "answers": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/PollAnswer"
- }
- },
- "expiry": {
- "type": "string",
- "format": "date-time"
- },
- "allow_multiselect": {
- "type": "boolean"
- },
- "results": {
- "$ref": "#/definitions/PollResult"
- }
- },
- "additionalProperties": false,
- "required": [
- "allow_multiselect",
- "answers",
- "expiry",
- "question"
- ]
- },
- "PollMedia": {
- "type": "object",
- "properties": {
- "text": {
- "type": "string"
- },
- "emoji": {
- "$ref": "#/definitions/PartialEmoji"
- }
- },
- "additionalProperties": false
- },
- "PollAnswer": {
- "type": "object",
- "properties": {
- "answer_id": {
- "type": "string"
- },
- "poll_media": {
- "$ref": "#/definitions/PollMedia"
- }
- },
- "additionalProperties": false,
- "required": [
- "poll_media"
- ]
- },
- "PollResult": {
- "type": "object",
- "properties": {
- "is_finalized": {
- "type": "boolean"
- },
- "answer_counts": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/PollAnswerCount"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "answer_counts",
- "is_finalized"
- ]
- },
- "PollAnswerCount": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "count": {
+ "font_id": {
"type": "integer"
},
- "me_voted": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "count",
- "id",
- "me_voted"
- ]
- },
- "ReadState": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "channel": {
- "$ref": "#/definitions/Channel"
- },
- "user_id": {
- "type": "string"
- },
- "user": {
- "$ref": "#/definitions/User"
- },
- "last_message_id": {
- "type": "string"
- },
- "public_ack": {
- "type": "string"
- },
- "notifications_cursor": {
- "type": "string"
- },
- "last_pin_timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "mention_count": {
+ "effect_id": {
"type": "integer"
},
- "manual": {
- "type": "boolean"
- },
- "id": {
- "type": "string"
+ "colors": {
+ "type": "integer"
}
},
"additionalProperties": false,
"required": [
- "channel",
- "channel_id",
- "id",
- "last_message_id",
- "manual",
- "mention_count",
- "notifications_cursor",
- "public_ack",
- "user",
- "user_id"
+ "colors",
+ "effect_id",
+ "font_id"
+ ]
+ },
+ "PrimaryGuild": {
+ "type": "object",
+ "properties": {
+ "identity_enabled": {
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "identity_guild_id": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "tag": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "badge": {
+ "type": [
+ "null",
+ "string"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "badge",
+ "identity_enabled",
+ "identity_guild_id",
+ "tag"
]
}
},
@@ -51162,7 +44857,7 @@
"length": {
"type": "integer"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
@@ -51321,17 +45016,17 @@
"except": {
"type": "boolean"
},
- "__@iterator@646": {
+ "__@iterator@684": {
"type": "boolean"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "boolean"
}
}
}
},
"required": [
- "__@unscopables@679",
+ "__@unscopables@686",
"length"
]
},
@@ -51385,7 +45080,7 @@
"length": {
"type": "integer"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
@@ -51544,17 +45239,17 @@
"except": {
"type": "boolean"
},
- "__@iterator@646": {
+ "__@iterator@684": {
"type": "boolean"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "boolean"
}
}
}
},
"required": [
- "__@unscopables@679",
+ "__@unscopables@686",
"length"
]
},
@@ -54090,12 +47785,6 @@
"$ref": "#/definitions/Channel"
}
},
- "members": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Member"
- }
- },
"system_channel_id": {
"type": [
"null",
@@ -54183,6 +47872,12 @@
"presence_count": {
"type": "integer"
},
+ "members": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Member"
+ }
+ },
"template_id": {
"type": "string"
},
@@ -57745,9 +51440,15 @@
"APIPrivateUser": {
"type": "object",
"properties": {
+ "email": {
+ "type": "string"
+ },
"id": {
"type": "string"
},
+ "verified": {
+ "type": "boolean"
+ },
"flags": {
"type": "integer"
},
@@ -57758,9 +51459,6 @@
"avatar": {
"type": "string"
},
- "verified": {
- "type": "boolean"
- },
"username": {
"type": "string"
},
@@ -57803,9 +51501,6 @@
"mfa_enabled": {
"type": "boolean"
},
- "email": {
- "type": "string"
- },
"phone": {
"type": "string"
},
@@ -58216,12 +51911,6 @@
"$ref": "#/definitions/Channel"
}
},
- "members": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Member"
- }
- },
"system_channel_id": {
"type": [
"null",
@@ -58309,6 +51998,12 @@
"presence_count": {
"type": "integer"
},
+ "members": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Member"
+ }
+ },
"template_id": {
"type": "string"
},
@@ -62866,9 +56561,15 @@
"newToken": {
"type": "string"
},
+ "email": {
+ "type": "string"
+ },
"id": {
"type": "string"
},
+ "verified": {
+ "type": "boolean"
+ },
"flags": {
"type": "integer"
},
@@ -62879,9 +56580,6 @@
"avatar": {
"type": "string"
},
- "verified": {
- "type": "boolean"
- },
"username": {
"type": "string"
},
@@ -62924,9 +56622,6 @@
"mfa_enabled": {
"type": "boolean"
},
- "email": {
- "type": "string"
- },
"phone": {
"type": "string"
},
@@ -102071,6 +95766,37 @@
},
"$schema": "http://json-schema.org/draft-07/schema#"
},
+ "UserRelationsResponse": {
+ "type": "array",
+ "items": {
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ },
+ "discriminator": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": "string"
+ },
+ "public_flags": {
+ "type": "integer"
+ }
+ },
+ "required": [
+ "discriminator",
+ "id",
+ "public_flags",
+ "username"
+ ]
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
"UserRelationshipsResponse": {
"type": "object",
"properties": {
@@ -102172,37 +95898,6 @@
},
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "UserRelationsResponse": {
- "type": "array",
- "items": {
- "additionalProperties": false,
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "username": {
- "type": "string"
- },
- "discriminator": {
- "type": "string"
- },
- "avatar": {
- "type": "string"
- },
- "public_flags": {
- "type": "integer"
- }
- },
- "required": [
- "discriminator",
- "id",
- "public_flags",
- "username"
- ]
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
"WebAuthnCreateResponse": {
"type": "object",
"properties": {
@@ -105647,6 +99342,3881 @@
},
"$schema": "http://json-schema.org/draft-07/schema#"
},
+ "AckBulkSchema": {
+ "type": "object",
+ "properties": {
+ "read_states": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "message_id": {
+ "type": "string"
+ },
+ "read_state_type": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id",
+ "message_id",
+ "read_state_type"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "read_states"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ActivitySchema": {
+ "type": "object",
+ "properties": {
+ "afk": {
+ "type": "boolean"
+ },
+ "status": {
+ "$ref": "#/definitions/Status"
+ },
+ "activities": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Activity"
+ }
+ },
+ "since": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "status"
+ ],
+ "definitions": {
+ "Status": {
+ "enum": [
+ "dnd",
+ "idle",
+ "invisible",
+ "offline",
+ "online"
+ ],
+ "type": "string"
+ },
+ "Activity": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ActivityType"
+ },
+ "url": {
+ "type": "string"
+ },
+ "created_at": {
+ "type": "integer"
+ },
+ "timestamps": {
+ "type": "object",
+ "properties": {
+ "start": {
+ "type": "integer"
+ },
+ "end": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "end",
+ "start"
+ ]
+ },
+ "application_id": {
+ "type": "string"
+ },
+ "details": {
+ "type": "string"
+ },
+ "state": {
+ "type": "string"
+ },
+ "emoji": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "animated": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "animated",
+ "name"
+ ]
+ },
+ "party": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "size": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "assets": {
+ "type": "object",
+ "properties": {
+ "large_image": {
+ "type": "string"
+ },
+ "large_text": {
+ "type": "string"
+ },
+ "small_image": {
+ "type": "string"
+ },
+ "small_text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "secrets": {
+ "type": "object",
+ "properties": {
+ "join": {
+ "type": "string"
+ },
+ "spectate": {
+ "type": "string"
+ },
+ "match": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "instance": {
+ "type": "boolean"
+ },
+ "flags": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "sync_id": {
+ "type": "string"
+ },
+ "metadata": {
+ "type": "object",
+ "properties": {
+ "context_uri": {
+ "type": "string"
+ },
+ "album_id": {
+ "type": "string"
+ },
+ "artist_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "album_id",
+ "artist_ids"
+ ]
+ },
+ "session_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "flags",
+ "name",
+ "session_id",
+ "type"
+ ]
+ },
+ "ActivityType": {
+ "type": "number",
+ "enum": [
+ 0,
+ 1,
+ 2,
+ 4,
+ 5
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ApplicationAuthorizeSchema": {
+ "type": "object",
+ "properties": {
+ "authorize": {
+ "type": "boolean"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "permissions": {
+ "type": "string"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "code": {
+ "minLength": 6,
+ "maxLength": 6,
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "authorize",
+ "guild_id",
+ "permissions"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "AutomodMentionSpamRuleSchema": {
+ "type": "object",
+ "properties": {
+ "mention_total_limit": {
+ "type": "integer"
+ },
+ "mention_raid_protection_enabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "mention_raid_protection_enabled",
+ "mention_total_limit"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "AutomodSuspectedSpamRuleSchema": {
+ "type": "object",
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "AutomodCommonlyFlaggedWordsRuleSchema": {
+ "type": "object",
+ "properties": {
+ "allow_list": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "presets": {
+ "type": "array",
+ "items": [
+ {
+ "type": "integer"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow_list",
+ "presets"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "AutomodCustomWordsRuleSchema": {
+ "type": "object",
+ "properties": {
+ "allow_list": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "keyword_filter": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "regex_patterns": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow_list",
+ "keyword_filter",
+ "regex_patterns"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "AutomodRuleSchema": {
+ "type": "object",
+ "properties": {
+ "creator_id": {
+ "type": "string"
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "event_type": {
+ "type": "integer"
+ },
+ "exempt_channels": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "exempt_roles": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "trigger_type": {
+ "type": "integer"
+ },
+ "trigger_metadata": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/AutomodMentionSpamRuleSchema"
+ },
+ {
+ "$ref": "#/definitions/AutomodSuspectedSpamRuleSchema"
+ },
+ {
+ "$ref": "#/definitions/AutomodCommonlyFlaggedWordsRuleSchema"
+ },
+ {
+ "$ref": "#/definitions/AutomodCustomWordsRuleSchema"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "creator_id",
+ "enabled",
+ "event_type",
+ "exempt_channels",
+ "exempt_roles",
+ "guild_id",
+ "name",
+ "position",
+ "trigger_metadata",
+ "trigger_type"
+ ],
+ "definitions": {
+ "AutomodMentionSpamRuleSchema": {
+ "type": "object",
+ "properties": {
+ "mention_total_limit": {
+ "type": "integer"
+ },
+ "mention_raid_protection_enabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "mention_raid_protection_enabled",
+ "mention_total_limit"
+ ]
+ },
+ "AutomodSuspectedSpamRuleSchema": {
+ "type": "object",
+ "additionalProperties": false
+ },
+ "AutomodCommonlyFlaggedWordsRuleSchema": {
+ "type": "object",
+ "properties": {
+ "allow_list": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "presets": {
+ "type": "array",
+ "items": [
+ {
+ "type": "integer"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow_list",
+ "presets"
+ ]
+ },
+ "AutomodCustomWordsRuleSchema": {
+ "type": "object",
+ "properties": {
+ "allow_list": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "keyword_filter": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ "regex_patterns": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow_list",
+ "keyword_filter",
+ "regex_patterns"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BackupCodesChallengeSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "password"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BanCreateSchema": {
+ "type": "object",
+ "properties": {
+ "delete_message_seconds": {
+ "type": "string"
+ },
+ "delete_message_days": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BanModeratorSchema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "executor_id": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "executor_id",
+ "guild_id",
+ "id",
+ "user_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BanRegistrySchema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "executor_id": {
+ "type": "string"
+ },
+ "ip": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "executor_id",
+ "guild_id",
+ "id",
+ "user_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BotModifySchema": {
+ "type": "object",
+ "properties": {
+ "avatar": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BulkBanSchema": {
+ "type": "object",
+ "properties": {
+ "user_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "delete_message_seconds": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "user_ids"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BulkDeleteSchema": {
+ "type": "object",
+ "properties": {
+ "messages": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "messages"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ChannelModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ 0,
+ 1,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 2,
+ 255,
+ 3,
+ 33,
+ 34,
+ 35,
+ 4,
+ 5,
+ 6,
+ 64,
+ 7,
+ 8,
+ 9
+ ],
+ "type": "number"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "bitrate": {
+ "type": "integer"
+ },
+ "user_limit": {
+ "type": "integer"
+ },
+ "rate_limit_per_user": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ChannelPermissionOverwriteType"
+ },
+ "allow": {
+ "type": "string"
+ },
+ "deny": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow",
+ "deny",
+ "id",
+ "type"
+ ]
+ }
+ },
+ "parent_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "nsfw": {
+ "type": "boolean"
+ },
+ "rtc_region": {
+ "type": "string"
+ },
+ "default_auto_archive_duration": {
+ "type": "integer"
+ },
+ "default_reaction_emoji": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "default_thread_rate_limit_per_user": {
+ "type": "integer"
+ },
+ "video_quality_mode": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "ChannelPermissionOverwriteType": {
+ "type": "number",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ChannelPermissionOverwriteSchema": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "string"
+ },
+ "deny": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ChannelPermissionOverwriteType"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow",
+ "deny",
+ "id",
+ "type"
+ ],
+ "definitions": {
+ "ChannelPermissionOverwriteType": {
+ "type": "number",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ChannelReorderSchema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "lock_permissions": {
+ "type": "boolean"
+ },
+ "parent_id": {
+ "type": [
+ "null",
+ "string"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ]
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "CodesVerificationSchema": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "regenerate": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "key",
+ "nonce"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ConnectedAccountSchema": {
+ "type": "object",
+ "properties": {
+ "external_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "token_data": {
+ "$ref": "#/definitions/ConnectedAccountTokenData"
+ },
+ "friend_sync": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "revoked": {
+ "type": "boolean"
+ },
+ "show_activity": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "verified": {
+ "type": "boolean"
+ },
+ "visibility": {
+ "type": "integer"
+ },
+ "integrations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "metadata_": {},
+ "metadata_visibility": {
+ "type": "integer"
+ },
+ "two_way_link": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "external_id",
+ "name",
+ "type",
+ "user_id"
+ ],
+ "definitions": {
+ "ConnectedAccountTokenData": {
+ "type": "object",
+ "properties": {
+ "access_token": {
+ "type": "string"
+ },
+ "token_type": {
+ "type": "string"
+ },
+ "scope": {
+ "type": "string"
+ },
+ "refresh_token": {
+ "type": "string"
+ },
+ "expires_in": {
+ "type": "integer"
+ },
+ "expires_at": {
+ "type": "integer"
+ },
+ "fetched_at": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "access_token",
+ "fetched_at"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ConnectionCallbackSchema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "state": {
+ "type": "string"
+ },
+ "insecure": {
+ "type": "boolean"
+ },
+ "friend_sync": {
+ "type": "boolean"
+ },
+ "openid_params": {}
+ },
+ "additionalProperties": false,
+ "required": [
+ "friend_sync",
+ "insecure",
+ "state"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ConnectionUpdateSchema": {
+ "type": "object",
+ "properties": {
+ "visibility": {
+ "type": "boolean"
+ },
+ "show_activity": {
+ "type": "boolean"
+ },
+ "metadata_visibility": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "DmChannelCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "recipients": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "recipients"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "EmailDomainLookupSchema": {
+ "type": "object",
+ "properties": {
+ "allow_multiple_guilds": {
+ "type": "boolean"
+ },
+ "email": {
+ "type": "string"
+ },
+ "use_verification_code": {
+ "type": "boolean"
+ },
+ "guild_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow_multiple_guilds",
+ "email",
+ "use_verification_code"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "EmailDomainLookupVerifyCodeSchema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "email",
+ "guild_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "EmojiCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "require_colons": {
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "image"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "EmojiModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ForgotPasswordSchema": {
+ "type": "object",
+ "properties": {
+ "login": {
+ "type": "string"
+ },
+ "captcha_key": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "login"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GreetRequestSchema": {
+ "type": "object",
+ "properties": {
+ "sticker_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "allowed_mentions": {
+ "$ref": "#/definitions/AllowedMentions"
+ },
+ "message_reference": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "fail_if_not_exists": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "message_id"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "sticker_ids"
+ ],
+ "definitions": {
+ "AllowedMentions": {
+ "type": "object",
+ "properties": {
+ "parse": {
+ "type": "array",
+ "items": {
+ "enum": [
+ "everyone",
+ "roles",
+ "users"
+ ],
+ "type": "string"
+ }
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "users": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "replied_user": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "channels": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ChannelModifySchema"
+ }
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ },
+ "guild_template_code": {
+ "type": "string"
+ },
+ "staff_only": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "ChannelModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ 0,
+ 1,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 2,
+ 255,
+ 3,
+ 33,
+ 34,
+ 35,
+ 4,
+ 5,
+ 6,
+ 64,
+ 7,
+ 8,
+ 9
+ ],
+ "type": "number"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "bitrate": {
+ "type": "integer"
+ },
+ "user_limit": {
+ "type": "integer"
+ },
+ "rate_limit_per_user": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ChannelPermissionOverwriteType"
+ },
+ "allow": {
+ "type": "string"
+ },
+ "deny": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow",
+ "deny",
+ "id",
+ "type"
+ ]
+ }
+ },
+ "parent_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "nsfw": {
+ "type": "boolean"
+ },
+ "rtc_region": {
+ "type": "string"
+ },
+ "default_auto_archive_duration": {
+ "type": "integer"
+ },
+ "default_reaction_emoji": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "default_thread_rate_limit_per_user": {
+ "type": "integer"
+ },
+ "video_quality_mode": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ChannelPermissionOverwriteType": {
+ "type": "number",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildSubscriptionsBulkSchema": {
+ "type": "object",
+ "properties": {
+ "subscriptions": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/GuildSubscriptionSchema"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "subscriptions"
+ ],
+ "definitions": {
+ "GuildSubscriptionSchema": {
+ "type": "object",
+ "properties": {
+ "channels": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "members": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "activities": {
+ "type": "boolean"
+ },
+ "threads": {
+ "type": "boolean"
+ },
+ "typing": {
+ "const": true,
+ "type": "boolean"
+ },
+ "member_updates": {
+ "type": "boolean"
+ },
+ "thread_member_lists": {
+ "type": "array",
+ "items": {}
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildSubscriptionSchema": {
+ "type": "object",
+ "properties": {
+ "channels": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "members": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "activities": {
+ "type": "boolean"
+ },
+ "threads": {
+ "type": "boolean"
+ },
+ "typing": {
+ "const": true,
+ "type": "boolean"
+ },
+ "member_updates": {
+ "type": "boolean"
+ },
+ "thread_member_lists": {
+ "type": "array",
+ "items": {}
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildTemplateCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": [
+ "null",
+ "string"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildUpdateSchema": {
+ "type": "object",
+ "properties": {
+ "banner": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "splash": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "description": {
+ "type": "string"
+ },
+ "features": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "verification_level": {
+ "type": "integer"
+ },
+ "default_message_notifications": {
+ "type": "integer"
+ },
+ "system_channel_flags": {
+ "type": "integer"
+ },
+ "explicit_content_filter": {
+ "type": "integer"
+ },
+ "public_updates_channel_id": {
+ "type": "string"
+ },
+ "afk_timeout": {
+ "type": "integer"
+ },
+ "afk_channel_id": {
+ "type": "string"
+ },
+ "preferred_locale": {
+ "type": "string"
+ },
+ "premium_progress_bar_enabled": {
+ "type": "boolean"
+ },
+ "discovery_splash": {
+ "type": "string"
+ },
+ "safety_alerts_channel_id": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ },
+ "guild_template_code": {
+ "type": "string"
+ },
+ "staff_only": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildUpdateWelcomeScreenSchema": {
+ "type": "object",
+ "properties": {
+ "welcome_channels": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "emoji_id": {
+ "type": "string"
+ },
+ "emoji_name": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id",
+ "description"
+ ]
+ }
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "HubWaitlistSignupSchema": {
+ "type": "object",
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "school": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "email",
+ "school"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "InviteCreateSchema": {
+ "type": "object",
+ "properties": {
+ "target_user_id": {
+ "type": "string"
+ },
+ "target_type": {
+ "type": "string"
+ },
+ "validate": {
+ "type": "string"
+ },
+ "max_age": {
+ "type": "integer"
+ },
+ "max_uses": {
+ "type": "integer"
+ },
+ "temporary": {
+ "type": "boolean"
+ },
+ "unique": {
+ "type": "boolean"
+ },
+ "target_user": {
+ "type": "string"
+ },
+ "target_user_type": {
+ "type": "integer"
+ },
+ "flags": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MFAResponse": {
+ "type": "object",
+ "properties": {
+ "ticket": {
+ "type": "string"
+ },
+ "mfa": {
+ "type": "boolean",
+ "const": true
+ },
+ "sms": {
+ "type": "boolean",
+ "const": false
+ },
+ "token": {
+ "type": "null"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "mfa",
+ "sms",
+ "ticket",
+ "token"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "WebAuthnResponse": {
+ "type": "object",
+ "properties": {
+ "webauthn": {
+ "type": "string"
+ },
+ "ticket": {
+ "type": "string"
+ },
+ "mfa": {
+ "type": "boolean",
+ "const": true
+ },
+ "sms": {
+ "type": "boolean",
+ "const": false
+ },
+ "token": {
+ "type": "null"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "mfa",
+ "sms",
+ "ticket",
+ "token",
+ "webauthn"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "LoginResponse": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/TokenResponse"
+ },
+ {
+ "$ref": "#/definitions/MFAResponse"
+ },
+ {
+ "$ref": "#/definitions/WebAuthnResponse"
+ }
+ ],
+ "definitions": {
+ "TokenResponse": {
+ "type": "object",
+ "properties": {
+ "token": {
+ "type": "string"
+ },
+ "settings": {
+ "$ref": "#/definitions/UserSettings"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "settings",
+ "token"
+ ]
+ },
+ "UserSettings": {
+ "type": "object",
+ "properties": {
+ "index": {
+ "type": "string"
+ },
+ "afk_timeout": {
+ "type": "integer",
+ "default": 3600
+ },
+ "allow_accessibility_detection": {
+ "type": "boolean",
+ "default": true
+ },
+ "animate_emoji": {
+ "type": "boolean",
+ "default": true
+ },
+ "animate_stickers": {
+ "type": "integer",
+ "default": 0
+ },
+ "contact_sync_enabled": {
+ "type": "boolean",
+ "default": false
+ },
+ "convert_emoticons": {
+ "type": "boolean",
+ "default": false
+ },
+ "custom_status": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/CustomStatus"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "default_guilds_restricted": {
+ "type": "boolean",
+ "default": false
+ },
+ "detect_platform_accounts": {
+ "type": "boolean",
+ "default": false
+ },
+ "developer_mode": {
+ "type": "boolean",
+ "default": true
+ },
+ "disable_games_tab": {
+ "type": "boolean",
+ "default": true
+ },
+ "enable_tts_command": {
+ "type": "boolean",
+ "default": false
+ },
+ "explicit_content_filter": {
+ "type": "integer",
+ "default": 0
+ },
+ "friend_discovery_flags": {
+ "type": "integer",
+ "default": 0
+ },
+ "friend_source_flags": {
+ "$ref": "#/definitions/FriendSourceFlags"
+ },
+ "gateway_connected": {
+ "type": "boolean",
+ "default": false
+ },
+ "gif_auto_play": {
+ "type": "boolean",
+ "default": false
+ },
+ "guild_folders": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/GuildFolder"
+ },
+ "default": []
+ },
+ "guild_positions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "inline_attachment_media": {
+ "type": "boolean",
+ "default": true
+ },
+ "inline_embed_media": {
+ "type": "boolean",
+ "default": true
+ },
+ "locale": {
+ "type": "string",
+ "default": "en-US"
+ },
+ "message_display_compact": {
+ "type": "boolean",
+ "default": false
+ },
+ "native_phone_integration_enabled": {
+ "type": "boolean",
+ "default": true
+ },
+ "render_embeds": {
+ "type": "boolean",
+ "default": true
+ },
+ "render_reactions": {
+ "type": "boolean",
+ "default": true
+ },
+ "restricted_guilds": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": []
+ },
+ "show_current_game": {
+ "type": "boolean",
+ "default": true
+ },
+ "status": {
+ "enum": [
+ "dnd",
+ "idle",
+ "invisible",
+ "offline",
+ "online"
+ ],
+ "type": "string",
+ "default": "online"
+ },
+ "stream_notifications_enabled": {
+ "type": "boolean",
+ "default": false
+ },
+ "theme": {
+ "enum": [
+ "dark",
+ "light"
+ ],
+ "type": "string",
+ "default": "dark"
+ },
+ "timezone_offset": {
+ "type": "integer",
+ "default": 0
+ },
+ "view_nsfw_guilds": {
+ "type": "boolean",
+ "default": true
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "afk_timeout",
+ "allow_accessibility_detection",
+ "animate_emoji",
+ "animate_stickers",
+ "contact_sync_enabled",
+ "convert_emoticons",
+ "custom_status",
+ "default_guilds_restricted",
+ "detect_platform_accounts",
+ "developer_mode",
+ "disable_games_tab",
+ "enable_tts_command",
+ "explicit_content_filter",
+ "friend_discovery_flags",
+ "friend_source_flags",
+ "gateway_connected",
+ "gif_auto_play",
+ "guild_folders",
+ "guild_positions",
+ "index",
+ "inline_attachment_media",
+ "inline_embed_media",
+ "locale",
+ "message_display_compact",
+ "native_phone_integration_enabled",
+ "render_embeds",
+ "render_reactions",
+ "restricted_guilds",
+ "show_current_game",
+ "status",
+ "stream_notifications_enabled",
+ "theme",
+ "timezone_offset",
+ "view_nsfw_guilds"
+ ]
+ },
+ "CustomStatus": {
+ "type": "object",
+ "properties": {
+ "emoji_id": {
+ "type": "string"
+ },
+ "emoji_name": {
+ "type": "string"
+ },
+ "expires_at": {
+ "type": "integer"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "FriendSourceFlags": {
+ "type": "object",
+ "properties": {
+ "all": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "all"
+ ]
+ },
+ "GuildFolder": {
+ "type": "object",
+ "properties": {
+ "color": {
+ "type": "integer"
+ },
+ "guild_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "color",
+ "guild_ids",
+ "id",
+ "name"
+ ]
+ },
+ "MFAResponse": {
+ "type": "object",
+ "properties": {
+ "ticket": {
+ "type": "string"
+ },
+ "mfa": {
+ "type": "boolean",
+ "const": true
+ },
+ "sms": {
+ "type": "boolean",
+ "const": false
+ },
+ "token": {
+ "type": "null"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "mfa",
+ "sms",
+ "ticket",
+ "token"
+ ]
+ },
+ "WebAuthnResponse": {
+ "type": "object",
+ "properties": {
+ "webauthn": {
+ "type": "string"
+ },
+ "ticket": {
+ "type": "string"
+ },
+ "mfa": {
+ "type": "boolean",
+ "const": true
+ },
+ "sms": {
+ "type": "boolean",
+ "const": false
+ },
+ "token": {
+ "type": "null"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "mfa",
+ "sms",
+ "ticket",
+ "token",
+ "webauthn"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "LoginSchema": {
+ "type": "object",
+ "properties": {
+ "login": {
+ "type": "string"
+ },
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "undelete": {
+ "type": "boolean"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "login_source": {
+ "type": "string"
+ },
+ "gift_code_sku_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "login",
+ "password"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MemberChangeProfileSchema": {
+ "type": "object",
+ "properties": {
+ "banner": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "nick": {
+ "type": "string"
+ },
+ "bio": {
+ "type": "string"
+ },
+ "pronouns": {
+ "type": "string"
+ },
+ "theme_colors": {
+ "items": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "type": "array",
+ "minItems": 2,
+ "maxItems": 2
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MemberChangeSchema": {
+ "type": "object",
+ "properties": {
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "nick": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "bio": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MemberNickChangeSchema": {
+ "type": "object",
+ "properties": {
+ "nick": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "nick"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MessageAcknowledgeSchema": {
+ "type": "object",
+ "properties": {
+ "manual": {
+ "type": "boolean"
+ },
+ "mention_count": {
+ "type": "integer"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "last_viewed": {
+ "type": "integer"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MessageCreateSchema": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "integer"
+ },
+ "content": {
+ "type": "string"
+ },
+ "mobile_network_type": {
+ "type": "string"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "tts": {
+ "type": "boolean"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "embeds": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Embed"
+ }
+ },
+ "embed": {
+ "$ref": "#/definitions/Embed"
+ },
+ "allowed_mentions": {
+ "type": "object",
+ "properties": {
+ "parse": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "users": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "replied_user": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+ },
+ "message_reference": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "fail_if_not_exists": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "message_id"
+ ]
+ },
+ "payload_json": {
+ "type": "string"
+ },
+ "file": {
+ "type": "object",
+ "properties": {
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename"
+ ]
+ },
+ "attachments": {
+ "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "id"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ },
+ "uploaded_filename": {
+ "type": "string"
+ },
+ "original_content_type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "uploaded_filename"
+ ]
+ }
+ ]
+ }
+ },
+ "sticker_ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "components": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ActionRowComponent"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "poll": {
+ "$ref": "#/definitions/PollCreationSchema"
+ },
+ "enforce_nonce": {
+ "type": "boolean"
+ },
+ "applied_tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "thread_name": {
+ "type": "string"
+ },
+ "avatar_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "Embed": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "article",
+ "gifv",
+ "image",
+ "link",
+ "rich",
+ "video"
+ ],
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "color": {
+ "type": "integer"
+ },
+ "footer": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "icon_url": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "text"
+ ]
+ },
+ "image": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "thumbnail": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "video": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "provider": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "author": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "icon_url": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "inline": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "value"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "EmbedImage": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "proxy_url": {
+ "type": "string"
+ },
+ "height": {
+ "type": "integer"
+ },
+ "width": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ActionRowComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.ActionRow"
+ },
+ "components": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ButtonComponent"
+ },
+ {
+ "$ref": "#/definitions/SelectMenuComponent"
+ },
+ {
+ "$ref": "#/definitions/StringSelectMenuComponent"
+ },
+ {
+ "$ref": "#/definitions/TextInputComponent"
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "components",
+ "type"
+ ]
+ },
+ "MessageComponentType.ActionRow": {
+ "type": "number",
+ "const": 1
+ },
+ "ButtonComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.Button"
+ },
+ "style": {
+ "$ref": "#/definitions/ButtonStyle"
+ },
+ "label": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "sku_id": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "style",
+ "type"
+ ]
+ },
+ "MessageComponentType.Button": {
+ "type": "number",
+ "const": 2
+ },
+ "ButtonStyle": {
+ "type": "number",
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6
+ ]
+ },
+ "PartialEmoji": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "animated": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ]
+ },
+ "SelectMenuComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ 3,
+ 5,
+ 6,
+ 7,
+ 8
+ ],
+ "type": "number"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "channel_types": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "default_values": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SelectMenuDefaultOption"
+ }
+ },
+ "min_values": {
+ "type": "integer"
+ },
+ "max_values": {
+ "type": "integer"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "custom_id",
+ "type"
+ ]
+ },
+ "SelectMenuDefaultOption": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "channel",
+ "role",
+ "user"
+ ],
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "type"
+ ]
+ },
+ "StringSelectMenuComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.StringSelect"
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SelectMenuOption"
+ }
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "channel_types": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "default_values": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SelectMenuDefaultOption"
+ }
+ },
+ "min_values": {
+ "type": "integer"
+ },
+ "max_values": {
+ "type": "integer"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "custom_id",
+ "options",
+ "type"
+ ]
+ },
+ "MessageComponentType.StringSelect": {
+ "type": "number",
+ "const": 3
+ },
+ "SelectMenuOption": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "default": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "label",
+ "value"
+ ]
+ },
+ "TextInputComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.TextInput"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "style": {
+ "$ref": "#/definitions/TextInputStyle"
+ },
+ "label": {
+ "type": "string"
+ },
+ "min_length": {
+ "type": "integer"
+ },
+ "max_length": {
+ "type": "integer"
+ },
+ "required": {
+ "type": "boolean"
+ },
+ "value": {
+ "type": "string"
+ },
+ "placeholder": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "custom_id",
+ "label",
+ "style",
+ "type"
+ ]
+ },
+ "MessageComponentType.TextInput": {
+ "type": "number",
+ "const": 4
+ },
+ "TextInputStyle": {
+ "type": "number",
+ "enum": [
+ 1,
+ 2
+ ]
+ },
+ "PollCreationSchema": {
+ "type": "object",
+ "properties": {
+ "question": {
+ "$ref": "#/definitions/PollMedia"
+ },
+ "answers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PollAnswer"
+ }
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "allow_multiselect": {
+ "type": "boolean"
+ },
+ "layout_type": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "answers",
+ "question"
+ ]
+ },
+ "PollMedia": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ }
+ },
+ "additionalProperties": false
+ },
+ "PollAnswer": {
+ "type": "object",
+ "properties": {
+ "answer_id": {
+ "type": "string"
+ },
+ "poll_media": {
+ "$ref": "#/definitions/PollMedia"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "poll_media"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "PollCreationSchema": {
+ "type": "object",
+ "properties": {
+ "question": {
+ "$ref": "#/definitions/PollMedia"
+ },
+ "answers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PollAnswer"
+ }
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "allow_multiselect": {
+ "type": "boolean"
+ },
+ "layout_type": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "answers",
+ "question"
+ ],
+ "definitions": {
+ "PollMedia": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ }
+ },
+ "additionalProperties": false
+ },
+ "PartialEmoji": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "animated": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ]
+ },
+ "PollAnswer": {
+ "type": "object",
+ "properties": {
+ "answer_id": {
+ "type": "string"
+ },
+ "poll_media": {
+ "$ref": "#/definitions/PollMedia"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "poll_media"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MessageEditSchema": {
+ "type": "object",
+ "properties": {
+ "embed": {
+ "$ref": "#/definitions/Embed"
+ },
+ "file": {
+ "type": "object",
+ "properties": {
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename"
+ ]
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "content": {
+ "type": "string"
+ },
+ "mobile_network_type": {
+ "type": "string"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "tts": {
+ "type": "boolean"
+ },
+ "embeds": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Embed"
+ }
+ },
+ "allowed_mentions": {
+ "type": "object",
+ "properties": {
+ "parse": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "users": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "replied_user": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+ },
+ "message_reference": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "fail_if_not_exists": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "message_id"
+ ]
+ },
+ "payload_json": {
+ "type": "string"
+ },
+ "attachments": {
+ "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "id"
+ ]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ },
+ "uploaded_filename": {
+ "type": "string"
+ },
+ "original_content_type": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "filename",
+ "uploaded_filename"
+ ]
+ }
+ ]
+ }
+ },
+ "sticker_ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "components": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ActionRowComponent"
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "poll": {
+ "$ref": "#/definitions/PollCreationSchema"
+ },
+ "enforce_nonce": {
+ "type": "boolean"
+ },
+ "applied_tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "thread_name": {
+ "type": "string"
+ },
+ "avatar_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "Embed": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "article",
+ "gifv",
+ "image",
+ "link",
+ "rich",
+ "video"
+ ],
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "color": {
+ "type": "integer"
+ },
+ "footer": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "icon_url": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "text"
+ ]
+ },
+ "image": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "thumbnail": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "video": {
+ "$ref": "#/definitions/EmbedImage"
+ },
+ "provider": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "author": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "icon_url": {
+ "type": "string"
+ },
+ "proxy_icon_url": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "fields": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "inline": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "value"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false
+ },
+ "EmbedImage": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "proxy_url": {
+ "type": "string"
+ },
+ "height": {
+ "type": "integer"
+ },
+ "width": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ActionRowComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.ActionRow"
+ },
+ "components": {
+ "type": "array",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/ButtonComponent"
+ },
+ {
+ "$ref": "#/definitions/SelectMenuComponent"
+ },
+ {
+ "$ref": "#/definitions/StringSelectMenuComponent"
+ },
+ {
+ "$ref": "#/definitions/TextInputComponent"
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "components",
+ "type"
+ ]
+ },
+ "MessageComponentType.ActionRow": {
+ "type": "number",
+ "const": 1
+ },
+ "ButtonComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.Button"
+ },
+ "style": {
+ "$ref": "#/definitions/ButtonStyle"
+ },
+ "label": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "sku_id": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "style",
+ "type"
+ ]
+ },
+ "MessageComponentType.Button": {
+ "type": "number",
+ "const": 2
+ },
+ "ButtonStyle": {
+ "type": "number",
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6
+ ]
+ },
+ "PartialEmoji": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "animated": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ]
+ },
+ "SelectMenuComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ 3,
+ 5,
+ 6,
+ 7,
+ 8
+ ],
+ "type": "number"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "channel_types": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "default_values": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SelectMenuDefaultOption"
+ }
+ },
+ "min_values": {
+ "type": "integer"
+ },
+ "max_values": {
+ "type": "integer"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "custom_id",
+ "type"
+ ]
+ },
+ "SelectMenuDefaultOption": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "channel",
+ "role",
+ "user"
+ ],
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "type"
+ ]
+ },
+ "StringSelectMenuComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.StringSelect"
+ },
+ "options": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SelectMenuOption"
+ }
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "channel_types": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ "placeholder": {
+ "type": "string"
+ },
+ "default_values": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SelectMenuDefaultOption"
+ }
+ },
+ "min_values": {
+ "type": "integer"
+ },
+ "max_values": {
+ "type": "integer"
+ },
+ "disabled": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "custom_id",
+ "options",
+ "type"
+ ]
+ },
+ "MessageComponentType.StringSelect": {
+ "type": "number",
+ "const": 3
+ },
+ "SelectMenuOption": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ },
+ "default": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "label",
+ "value"
+ ]
+ },
+ "TextInputComponent": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/MessageComponentType.TextInput"
+ },
+ "custom_id": {
+ "type": "string"
+ },
+ "style": {
+ "$ref": "#/definitions/TextInputStyle"
+ },
+ "label": {
+ "type": "string"
+ },
+ "min_length": {
+ "type": "integer"
+ },
+ "max_length": {
+ "type": "integer"
+ },
+ "required": {
+ "type": "boolean"
+ },
+ "value": {
+ "type": "string"
+ },
+ "placeholder": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "custom_id",
+ "label",
+ "style",
+ "type"
+ ]
+ },
+ "MessageComponentType.TextInput": {
+ "type": "number",
+ "const": 4
+ },
+ "TextInputStyle": {
+ "type": "number",
+ "enum": [
+ 1,
+ 2
+ ]
+ },
+ "PollCreationSchema": {
+ "type": "object",
+ "properties": {
+ "question": {
+ "$ref": "#/definitions/PollMedia"
+ },
+ "answers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PollAnswer"
+ }
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "allow_multiselect": {
+ "type": "boolean"
+ },
+ "layout_type": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "answers",
+ "question"
+ ]
+ },
+ "PollMedia": {
+ "type": "object",
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "emoji": {
+ "$ref": "#/definitions/PartialEmoji"
+ }
+ },
+ "additionalProperties": false
+ },
+ "PollAnswer": {
+ "type": "object",
+ "properties": {
+ "answer_id": {
+ "type": "string"
+ },
+ "poll_media": {
+ "$ref": "#/definitions/PollMedia"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "poll_media"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MfaCodesSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "regenerate": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "password"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ModifyGuildStickerSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "minLength": 2,
+ "maxLength": 30,
+ "type": "string"
+ },
+ "description": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "tags": {
+ "maxLength": 200,
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "tags"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "PasswordResetSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "password",
+ "token"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "PreloadMessagesRequestSchema": {
+ "type": "object",
+ "properties": {
+ "channels": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channels"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "PruneSchema": {
+ "type": "object",
+ "properties": {
+ "days": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "days"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "PurgeSchema": {
+ "type": "object",
+ "properties": {
+ "before": {
+ "type": "string"
+ },
+ "after": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "after",
+ "before"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RefreshUrlsRequestSchema": {
+ "type": "object",
+ "properties": {
+ "attachment_urls": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "attachment_urls"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RegisterSchema": {
+ "type": "object",
+ "properties": {
+ "username": {
+ "minLength": 2,
+ "type": "string"
+ },
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "consent": {
+ "type": "boolean"
+ },
+ "email": {
+ "format": "email",
+ "type": "string"
+ },
+ "fingerprint": {
+ "type": "string"
+ },
+ "invite": {
+ "type": "string"
+ },
+ "date_of_birth": {
+ "type": "string"
+ },
+ "gift_code_sku_id": {
+ "type": "string"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "promotional_email_opt_in": {
+ "type": "boolean"
+ },
+ "unique_username_registration": {
+ "type": "boolean"
+ },
+ "global_name": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "consent",
+ "username"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RelationshipPostSchema": {
+ "type": "object",
+ "properties": {
+ "discriminator": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "discriminator",
+ "username"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RelationshipPutSchema": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ 1,
+ 2,
+ 3,
+ 4
+ ],
+ "type": "number"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RequestGuildMembersSchema": {
+ "type": "object",
+ "properties": {
+ "guild_id": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ }
+ ],
+ "minItems": 1,
+ "maxItems": 1
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "query": {
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "presences": {
+ "type": "boolean"
+ },
+ "user_ids": {
+ "anyOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "nonce": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "guild_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
"RoleModifySchema": {
"type": "object",
"properties": {
@@ -105867,7 +103437,7 @@
"length": {
"type": "integer"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
@@ -106026,17 +103596,17 @@
"except": {
"type": "boolean"
},
- "__@iterator@646": {
+ "__@iterator@684": {
"type": "boolean"
},
- "__@unscopables@679": {
+ "__@unscopables@686": {
"type": "boolean"
}
}
}
},
"required": [
- "__@unscopables@679",
+ "__@unscopables@686",
"length"
]
},
@@ -106053,59 +103623,6 @@
},
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "StreamCreateSchema": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- "call",
- "guild"
- ],
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "preferred_region": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "channel_id",
- "type"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "StreamDeleteSchema": {
- "type": "object",
- "properties": {
- "stream_key": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "stream_key"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "StreamWatchSchema": {
- "type": "object",
- "properties": {
- "stream_key": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "stream_key"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
"TeamCreateSchema": {
"type": "object",
"properties": {
@@ -106486,19 +104003,6 @@
"UserSettingsSchema": {
"type": "object",
"properties": {
- "status": {
- "enum": [
- "dnd",
- "idle",
- "invisible",
- "offline",
- "online"
- ],
- "type": "string"
- },
- "explicit_content_filter": {
- "type": "integer"
- },
"afk_timeout": {
"type": "integer"
},
@@ -106542,6 +104046,9 @@
"enable_tts_command": {
"type": "boolean"
},
+ "explicit_content_filter": {
+ "type": "integer"
+ },
"friend_discovery_flags": {
"type": "integer"
},
@@ -106596,6 +104103,16 @@
"show_current_game": {
"type": "boolean"
},
+ "status": {
+ "enum": [
+ "dnd",
+ "idle",
+ "invisible",
+ "offline",
+ "online"
+ ],
+ "type": "string"
+ },
"stream_notifications_enabled": {
"type": "boolean"
},
@@ -106614,6 +104131,41 @@
}
},
"additionalProperties": false,
+ "required": [
+ "afk_timeout",
+ "allow_accessibility_detection",
+ "animate_emoji",
+ "animate_stickers",
+ "contact_sync_enabled",
+ "convert_emoticons",
+ "custom_status",
+ "default_guilds_restricted",
+ "detect_platform_accounts",
+ "developer_mode",
+ "disable_games_tab",
+ "enable_tts_command",
+ "explicit_content_filter",
+ "friend_discovery_flags",
+ "friend_source_flags",
+ "gateway_connected",
+ "gif_auto_play",
+ "guild_folders",
+ "guild_positions",
+ "inline_attachment_media",
+ "inline_embed_media",
+ "locale",
+ "message_display_compact",
+ "native_phone_integration_enabled",
+ "render_embeds",
+ "render_reactions",
+ "restricted_guilds",
+ "show_current_game",
+ "status",
+ "stream_notifications_enabled",
+ "theme",
+ "timezone_offset",
+ "view_nsfw_guilds"
+ ],
"definitions": {
"CustomStatus": {
"type": "object",
@@ -106687,62 +104239,22 @@
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "VoiceIdentifySchema": {
+ "VerifyEmailSchema": {
"type": "object",
"properties": {
- "server_id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "session_id": {
- "type": "string"
+ "captcha_key": {
+ "type": [
+ "null",
+ "string"
+ ]
},
"token": {
"type": "string"
- },
- "video": {
- "type": "boolean"
- },
- "streams": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- "audio",
- "screen",
- "video"
- ],
- "type": "string"
- },
- "rid": {
- "type": "string"
- },
- "quality": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "quality",
- "rid",
- "type"
- ]
- }
- },
- "max_secure_frames_version": {
- "type": "integer"
}
},
"additionalProperties": false,
"required": [
- "server_id",
- "session_id",
- "token",
- "user_id"
+ "token"
],
"$schema": "http://json-schema.org/draft-07/schema#"
},
@@ -106785,98 +104297,6 @@
],
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "VoiceVideoSchema": {
- "type": "object",
- "properties": {
- "audio_ssrc": {
- "type": "integer"
- },
- "video_ssrc": {
- "type": "integer"
- },
- "rtx_ssrc": {
- "type": "integer"
- },
- "user_id": {
- "type": "string"
- },
- "streams": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "type": {
- "enum": [
- "audio",
- "screen",
- "video"
- ],
- "type": "string"
- },
- "rid": {
- "type": "string"
- },
- "ssrc": {
- "type": "integer"
- },
- "active": {
- "type": "boolean"
- },
- "quality": {
- "type": "integer"
- },
- "rtx_ssrc": {
- "type": "integer"
- },
- "max_bitrate": {
- "type": "integer"
- },
- "max_framerate": {
- "type": "integer"
- },
- "max_resolution": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string"
- },
- "width": {
- "type": "integer"
- },
- "height": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "height",
- "type",
- "width"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "active",
- "max_bitrate",
- "max_framerate",
- "max_resolution",
- "quality",
- "rid",
- "rtx_ssrc",
- "ssrc",
- "type"
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "audio_ssrc",
- "video_ssrc"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
"GenerateWebAuthnCredentialsSchema": {
"type": "object",
"properties": {
@@ -107367,689 +104787,154 @@
],
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "ActivitySchema": {
+ "VoiceIdentifySchema": {
"type": "object",
"properties": {
- "afk": {
+ "server_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "session_id": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "video": {
"type": "boolean"
},
- "status": {
- "$ref": "#/definitions/Status"
- },
- "activities": {
+ "streams": {
"type": "array",
"items": {
- "$ref": "#/definitions/Activity"
- }
- },
- "since": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "status"
- ],
- "definitions": {
- "Status": {
- "enum": [
- "dnd",
- "idle",
- "invisible",
- "offline",
- "online"
- ],
- "type": "string"
- },
- "Activity": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ActivityType"
- },
- "url": {
- "type": "string"
- },
- "created_at": {
- "type": "integer"
- },
- "timestamps": {
- "type": "object",
- "properties": {
- "start": {
- "type": "integer"
- },
- "end": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "end",
- "start"
- ]
- },
- "application_id": {
- "type": "string"
- },
- "details": {
- "type": "string"
- },
- "state": {
- "type": "string"
- },
- "emoji": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "animated": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "animated",
- "name"
- ]
- },
- "party": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "size": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- },
- "additionalProperties": false
- },
- "assets": {
- "type": "object",
- "properties": {
- "large_image": {
- "type": "string"
- },
- "large_text": {
- "type": "string"
- },
- "small_image": {
- "type": "string"
- },
- "small_text": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "secrets": {
- "type": "object",
- "properties": {
- "join": {
- "type": "string"
- },
- "spectate": {
- "type": "string"
- },
- "match": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "instance": {
- "type": "boolean"
- },
- "flags": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "sync_id": {
- "type": "string"
- },
- "metadata": {
- "type": "object",
- "properties": {
- "context_uri": {
- "type": "string"
- },
- "album_id": {
- "type": "string"
- },
- "artist_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "album_id",
- "artist_ids"
- ]
- },
- "session_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "flags",
- "name",
- "session_id",
- "type"
- ]
- },
- "ActivityType": {
- "type": "number",
- "enum": [
- 0,
- 1,
- 2,
- 4,
- 5
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BulkBanSchema": {
- "type": "object",
- "properties": {
- "user_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "delete_message_seconds": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "user_ids"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BulkDeleteSchema": {
- "type": "object",
- "properties": {
- "messages": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "messages"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MFAResponse": {
- "type": "object",
- "properties": {
- "ticket": {
- "type": "string"
- },
- "mfa": {
- "type": "boolean",
- "const": true
- },
- "sms": {
- "type": "boolean",
- "const": false
- },
- "token": {
- "type": "null"
- }
- },
- "additionalProperties": false,
- "required": [
- "mfa",
- "sms",
- "ticket",
- "token"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "WebAuthnResponse": {
- "type": "object",
- "properties": {
- "webauthn": {
- "type": "string"
- },
- "ticket": {
- "type": "string"
- },
- "mfa": {
- "type": "boolean",
- "const": true
- },
- "sms": {
- "type": "boolean",
- "const": false
- },
- "token": {
- "type": "null"
- }
- },
- "additionalProperties": false,
- "required": [
- "mfa",
- "sms",
- "ticket",
- "token",
- "webauthn"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "LoginResponse": {
- "anyOf": [
- {
- "$ref": "#/definitions/TokenResponse"
- },
- {
- "$ref": "#/definitions/MFAResponse"
- },
- {
- "$ref": "#/definitions/WebAuthnResponse"
- }
- ],
- "definitions": {
- "TokenResponse": {
- "type": "object",
- "properties": {
- "token": {
- "type": "string"
- },
- "settings": {
- "$ref": "#/definitions/UserSettings"
- }
- },
- "additionalProperties": false,
- "required": [
- "settings",
- "token"
- ]
- },
- "UserSettings": {
- "type": "object",
- "properties": {
- "index": {
- "type": "string"
- },
- "afk_timeout": {
- "type": "integer",
- "default": 3600
- },
- "allow_accessibility_detection": {
- "type": "boolean",
- "default": true
- },
- "animate_emoji": {
- "type": "boolean",
- "default": true
- },
- "animate_stickers": {
- "type": "integer",
- "default": 0
- },
- "contact_sync_enabled": {
- "type": "boolean",
- "default": false
- },
- "convert_emoticons": {
- "type": "boolean",
- "default": false
- },
- "custom_status": {
- "anyOf": [
- {
- "$ref": "#/definitions/CustomStatus"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "default_guilds_restricted": {
- "type": "boolean",
- "default": false
- },
- "detect_platform_accounts": {
- "type": "boolean",
- "default": false
- },
- "developer_mode": {
- "type": "boolean",
- "default": true
- },
- "disable_games_tab": {
- "type": "boolean",
- "default": true
- },
- "enable_tts_command": {
- "type": "boolean",
- "default": false
- },
- "explicit_content_filter": {
- "type": "integer",
- "default": 0
- },
- "friend_discovery_flags": {
- "type": "integer",
- "default": 0
- },
- "friend_source_flags": {
- "$ref": "#/definitions/FriendSourceFlags"
- },
- "gateway_connected": {
- "type": "boolean",
- "default": false
- },
- "gif_auto_play": {
- "type": "boolean",
- "default": false
- },
- "guild_folders": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/GuildFolder"
- },
- "default": []
- },
- "guild_positions": {
- "type": "array",
- "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "audio",
+ "screen",
+ "video"
+ ],
"type": "string"
},
- "default": []
- },
- "inline_attachment_media": {
- "type": "boolean",
- "default": true
- },
- "inline_embed_media": {
- "type": "boolean",
- "default": true
- },
- "locale": {
- "type": "string",
- "default": "en-US"
- },
- "message_display_compact": {
- "type": "boolean",
- "default": false
- },
- "native_phone_integration_enabled": {
- "type": "boolean",
- "default": true
- },
- "render_embeds": {
- "type": "boolean",
- "default": true
- },
- "render_reactions": {
- "type": "boolean",
- "default": true
- },
- "restricted_guilds": {
- "type": "array",
- "items": {
+ "rid": {
"type": "string"
},
- "default": []
- },
- "show_current_game": {
- "type": "boolean",
- "default": true
- },
- "status": {
- "enum": [
- "dnd",
- "idle",
- "invisible",
- "offline",
- "online"
- ],
- "type": "string",
- "default": "online"
- },
- "stream_notifications_enabled": {
- "type": "boolean",
- "default": false
- },
- "theme": {
- "enum": [
- "dark",
- "light"
- ],
- "type": "string",
- "default": "dark"
- },
- "timezone_offset": {
- "type": "integer",
- "default": 0
- },
- "view_nsfw_guilds": {
- "type": "boolean",
- "default": true
- }
- },
- "additionalProperties": false,
- "required": [
- "afk_timeout",
- "allow_accessibility_detection",
- "animate_emoji",
- "animate_stickers",
- "contact_sync_enabled",
- "convert_emoticons",
- "custom_status",
- "default_guilds_restricted",
- "detect_platform_accounts",
- "developer_mode",
- "disable_games_tab",
- "enable_tts_command",
- "explicit_content_filter",
- "friend_discovery_flags",
- "friend_source_flags",
- "gateway_connected",
- "gif_auto_play",
- "guild_folders",
- "guild_positions",
- "index",
- "inline_attachment_media",
- "inline_embed_media",
- "locale",
- "message_display_compact",
- "native_phone_integration_enabled",
- "render_embeds",
- "render_reactions",
- "restricted_guilds",
- "show_current_game",
- "status",
- "stream_notifications_enabled",
- "theme",
- "timezone_offset",
- "view_nsfw_guilds"
- ]
- },
- "CustomStatus": {
- "type": "object",
- "properties": {
- "emoji_id": {
- "type": "string"
- },
- "emoji_name": {
- "type": "string"
- },
- "expires_at": {
- "type": "integer"
- },
- "text": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "FriendSourceFlags": {
- "type": "object",
- "properties": {
- "all": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": [
- "all"
- ]
- },
- "GuildFolder": {
- "type": "object",
- "properties": {
- "color": {
- "type": "integer"
- },
- "guild_ids": {
- "type": "array",
- "items": {
- "type": "string"
+ "quality": {
+ "type": "integer"
}
},
- "id": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "color",
- "guild_ids",
- "id",
- "name"
- ]
+ "additionalProperties": false,
+ "required": [
+ "quality",
+ "rid",
+ "type"
+ ]
+ }
},
- "MFAResponse": {
- "type": "object",
- "properties": {
- "ticket": {
- "type": "string"
- },
- "mfa": {
- "type": "boolean",
- "const": true
- },
- "sms": {
- "type": "boolean",
- "const": false
- },
- "token": {
- "type": "null"
- }
- },
- "additionalProperties": false,
- "required": [
- "mfa",
- "sms",
- "ticket",
- "token"
- ]
- },
- "WebAuthnResponse": {
- "type": "object",
- "properties": {
- "webauthn": {
- "type": "string"
- },
- "ticket": {
- "type": "string"
- },
- "mfa": {
- "type": "boolean",
- "const": true
- },
- "sms": {
- "type": "boolean",
- "const": false
- },
- "token": {
- "type": "null"
- }
- },
- "additionalProperties": false,
- "required": [
- "mfa",
- "sms",
- "ticket",
- "token",
- "webauthn"
- ]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MemberNickChangeSchema": {
- "type": "object",
- "properties": {
- "nick": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "nick"
- ],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "PruneSchema": {
- "type": "object",
- "properties": {
- "days": {
+ "max_secure_frames_version": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
- "days"
+ "server_id",
+ "session_id",
+ "token",
+ "user_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
},
- "VerifyEmailSchema": {
+ "VoiceVideoSchema": {
"type": "object",
"properties": {
- "captcha_key": {
- "type": [
- "null",
- "string"
- ]
+ "audio_ssrc": {
+ "type": "integer"
},
- "token": {
+ "video_ssrc": {
+ "type": "integer"
+ },
+ "rtx_ssrc": {
+ "type": "integer"
+ },
+ "user_id": {
"type": "string"
+ },
+ "streams": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "audio",
+ "screen",
+ "video"
+ ],
+ "type": "string"
+ },
+ "rid": {
+ "type": "string"
+ },
+ "ssrc": {
+ "type": "integer"
+ },
+ "active": {
+ "type": "boolean"
+ },
+ "quality": {
+ "type": "integer"
+ },
+ "rtx_ssrc": {
+ "type": "integer"
+ },
+ "max_bitrate": {
+ "type": "integer"
+ },
+ "max_framerate": {
+ "type": "integer"
+ },
+ "max_resolution": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "width": {
+ "type": "integer"
+ },
+ "height": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "height",
+ "type",
+ "width"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "active",
+ "max_bitrate",
+ "max_framerate",
+ "max_resolution",
+ "quality",
+ "rid",
+ "rtx_ssrc",
+ "ssrc",
+ "type"
+ ]
+ }
}
},
"additionalProperties": false,
"required": [
- "token"
+ "audio_ssrc",
+ "video_ssrc"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}
diff --git a/package.json b/package.json
index 13a4102..6cf45c2 100644
--- a/package.json
+++ b/package.json
@@ -5,10 +5,10 @@
"scripts": {
"prepare": "husky install",
"postinstall": "npx patch-package",
- "start": "node dist/bundle/start.js",
- "start:api": "node dist/api/start.js",
- "start:cdn": "node dist/cdn/start.js",
- "start:gateway": "node dist/gateway/start.js",
+ "start": "node --enable-source-maps dist/bundle/start.js",
+ "start:api": "node --enable-source-maps dist/api/start.js",
+ "start:cdn": "node --enable-source-maps dist/cdn/start.js",
+ "start:gateway": "node --enable-source-maps dist/gateway/start.js",
"build": "npm run build:src && npm run generate:schema && npm run generate:openapi",
"build:src": "tsc -b -v",
"watch": "tsc -w -b .",
diff --git a/scripts/genIndex.js b/scripts/genIndex.js
new file mode 100644
index 0000000..701a756
--- /dev/null
+++ b/scripts/genIndex.js
@@ -0,0 +1,69 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+const fs = require("fs");
+const path = require("path");
+
+let content = `/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) ${new Date().getFullYear()} Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+`;
+
+// node scripts/genIndex.js /path/to/dir
+const targetDir = process.argv[2];
+if (!targetDir) {
+ console.error("Please provide a target directory.");
+ process.exit(1);
+}
+
+if (fs.existsSync(path.join(targetDir, "index.js")) || fs.existsSync(path.join(targetDir, "index.ts"))) {
+ console.error("index.js or index.ts already exists in the target directory.");
+ process.exit(1);
+}
+
+const dirs = fs.readdirSync(targetDir).filter(f => fs.statSync(path.join(targetDir, f)).isDirectory());
+for (const dir of dirs) {
+ content += `export * from "./${dir}";\n`;
+}
+
+const files = fs.readdirSync(targetDir).filter(f => f.endsWith(".js") || f.endsWith(".ts"));
+for (const file of files) {
+ const filePath = path.join(targetDir, file);
+ const stat = fs.statSync(filePath);
+ if (stat.isFile()) {
+ const ext = path.extname(file);
+ const base = path.basename(file, ext);
+ content += `export * from "./${base}";\n`;
+ }
+}
+
+fs.writeFileSync(path.join(targetDir, "index.ts"), content);
\ No newline at end of file
diff --git "a/src/api/routes/applications/\043application_id/bot/index.ts" "b/src/api/routes/applications/\043application_id/bot/index.ts"
index 0928af3..db1d025 100644
--- "a/src/api/routes/applications/\043application_id/bot/index.ts"
+++ "b/src/api/routes/applications/\043application_id/bot/index.ts"
@@ -19,7 +19,6 @@
import { route } from "@spacebar/api";
import {
Application,
- BotModifySchema,
DiscordApiErrors,
User,
createAppBotUser,
@@ -29,6 +28,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { verifyToken } from "node-2fa";
+import { BotModifySchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/applications/\043application_id/index.ts" "b/src/api/routes/applications/\043application_id/index.ts"
index d6ba26f..6701f86 100644
--- "a/src/api/routes/applications/\043application_id/index.ts"
+++ "b/src/api/routes/applications/\043application_id/index.ts"
@@ -19,7 +19,6 @@
import { route } from "@spacebar/api";
import {
Application,
- ApplicationModifySchema,
DiscordApiErrors,
Guild,
handleFile,
@@ -27,6 +26,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { verifyToken } from "node-2fa";
+import { ApplicationModifySchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/applications/index.ts b/src/api/routes/applications/index.ts
index 54a01aa..77f02fc 100644
--- a/src/api/routes/applications/index.ts
+++ b/src/api/routes/applications/index.ts
@@ -19,13 +19,13 @@
import { route } from "@spacebar/api";
import {
Application,
- ApplicationCreateSchema,
Config,
User,
createAppBotUser,
trimSpecial,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { ApplicationCreateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/attachments/refresh-urls.ts b/src/api/routes/attachments/refresh-urls.ts
index b04c12c..76954c7 100644
--- a/src/api/routes/attachments/refresh-urls.ts
+++ b/src/api/routes/attachments/refresh-urls.ts
@@ -18,11 +18,11 @@
import { route } from "@spacebar/api";
import {
- RefreshUrlsRequestSchema,
getUrlSignature,
NewUrlSignatureData,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { RefreshUrlsRequestSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.post(
diff --git a/src/api/routes/auth/forgot.ts b/src/api/routes/auth/forgot.ts
index 5b4a83c..12bc9cb 100644
--- a/src/api/routes/auth/forgot.ts
+++ b/src/api/routes/auth/forgot.ts
@@ -17,8 +17,9 @@
*/
import { getIpAdress, route, verifyCaptcha } from "@spacebar/api";
-import { Config, Email, ForgotPasswordSchema, User } from "@spacebar/util";
+import { Config, Email, User } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { ForgotPasswordSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.post(
diff --git a/src/api/routes/auth/login.ts b/src/api/routes/auth/login.ts
index e76bb65..06e3fe4 100644
--- a/src/api/routes/auth/login.ts
+++ b/src/api/routes/auth/login.ts
@@ -20,7 +20,6 @@
import {
Config,
FieldErrors,
- LoginSchema,
User,
WebAuthn,
generateToken,
@@ -29,6 +28,7 @@
import bcrypt from "bcrypt";
import crypto from "crypto";
import { Request, Response, Router } from "express";
+import { LoginSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
export default router;
@@ -47,8 +47,7 @@
},
}),
async (req: Request, res: Response) => {
- const { login, password, captcha_key, undelete } =
- req.body as LoginSchema;
+ const { login, password, captcha_key, undelete } = req.body as LoginSchema;
const config = Config.get();
diff --git a/src/api/routes/auth/mfa/totp.ts b/src/api/routes/auth/mfa/totp.ts
index 225fd62..cc6e8a2 100644
--- a/src/api/routes/auth/mfa/totp.ts
+++ b/src/api/routes/auth/mfa/totp.ts
@@ -17,10 +17,11 @@
*/
import { route } from "@spacebar/api";
-import { BackupCode, TotpSchema, User, generateToken } from "@spacebar/util";
+import { BackupCode, User, generateToken } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { verifyToken } from "node-2fa";
+import { TotpSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.post(
diff --git a/src/api/routes/auth/mfa/webauthn.ts b/src/api/routes/auth/mfa/webauthn.ts
index d904373..80ff57f 100644
--- a/src/api/routes/auth/mfa/webauthn.ts
+++ b/src/api/routes/auth/mfa/webauthn.ts
@@ -23,11 +23,11 @@
User,
verifyWebAuthnToken,
WebAuthn,
- WebAuthnTotpSchema,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { ExpectedAssertionResult } from "fido2-lib";
import { HTTPError } from "lambert-server";
+import { WebAuthnTotpSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
function toArrayBuffer(buf: Buffer) {
diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts
index 2a04886..2db60ab 100644
--- a/src/api/routes/auth/register.ts
+++ b/src/api/routes/auth/register.ts
@@ -27,7 +27,6 @@
Config,
FieldErrors,
Invite,
- RegisterSchema,
User,
ValidRegistrationToken,
generateToken,
@@ -36,6 +35,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { MoreThan } from "typeorm";
+import { RegisterSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/auth/reset.ts b/src/api/routes/auth/reset.ts
index 90df676..b14eb37 100644
--- a/src/api/routes/auth/reset.ts
+++ b/src/api/routes/auth/reset.ts
@@ -22,11 +22,11 @@
Email,
FieldErrors,
generateToken,
- PasswordResetSchema,
User,
} from "@spacebar/util";
import bcrypt from "bcrypt";
import { Request, Response, Router } from "express";
+import { PasswordResetSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/auth/verify/view-backup-codes-challenge.ts b/src/api/routes/auth/verify/view-backup-codes-challenge.ts
index 1889aaa..811de50 100644
--- a/src/api/routes/auth/verify/view-backup-codes-challenge.ts
+++ b/src/api/routes/auth/verify/view-backup-codes-challenge.ts
@@ -17,9 +17,10 @@
*/
import { route } from "@spacebar/api";
-import { BackupCodesChallengeSchema, FieldErrors, User } from "@spacebar/util";
+import { FieldErrors, User } from "@spacebar/util";
import bcrypt from "bcrypt";
import { Request, Response, Router } from "express";
+import { BackupCodesChallengeSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.post(
diff --git "a/src/api/routes/channels/\043channel_id/attachments.ts" "b/src/api/routes/channels/\043channel_id/attachments.ts"
index df9af9a..2c08931 100644
--- "a/src/api/routes/channels/\043channel_id/attachments.ts"
+++ "b/src/api/routes/channels/\043channel_id/attachments.ts"
@@ -21,13 +21,12 @@
Channel,
Config,
Permissions,
- UploadAttachmentRequestSchema,
- UploadAttachmentResponseSchema,
User,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
-import { CloudAttachment } from "../../../../util/entities/CloudAttachment";
+import { CloudAttachment } from "@spacebar/util";
import fetch from "node-fetch-commonjs";
+import { UploadAttachmentRequestSchema, UploadAttachmentResponseSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/channels/\043channel_id/directory-entries.ts" "b/src/api/routes/channels/\043channel_id/directory-entries.ts"
index ef01fb4..c07b1f7 100644
--- "a/src/api/routes/channels/\043channel_id/directory-entries.ts"
+++ "b/src/api/routes/channels/\043channel_id/directory-entries.ts"
@@ -17,7 +17,7 @@
*/
import { route } from "@spacebar/api";
-import { HubDirectoryEntriesResponse } from "@spacebar/util";
+import { HubDirectoryEntriesResponse } from "@spacebar/schemas";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/channels/\043channel_id/greet.ts" "b/src/api/routes/channels/\043channel_id/greet.ts"
index 2052dd4..399e30a 100644
--- "a/src/api/routes/channels/\043channel_id/greet.ts"
+++ "b/src/api/routes/channels/\043channel_id/greet.ts"
@@ -17,9 +17,10 @@
*/
import { route } from "@spacebar/api";
-import { Channel, emitEvent, GreetRequestSchema, Message, MessageCreateEvent, MessageType, Permissions, Sticker } from "@spacebar/util";
+import { Channel, emitEvent, Message, MessageCreateEvent, Permissions, Sticker } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { In } from "typeorm";
+import { GreetRequestSchema, MessageType } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/channels/\043channel_id/index.ts" "b/src/api/routes/channels/\043channel_id/index.ts"
index 9efbfe8..cc43790 100644
--- "a/src/api/routes/channels/\043channel_id/index.ts"
+++ "b/src/api/routes/channels/\043channel_id/index.ts"
@@ -20,7 +20,6 @@
import {
Channel,
ChannelDeleteEvent,
- ChannelModifySchema,
ChannelType,
ChannelUpdateEvent,
Recipient,
@@ -28,6 +27,7 @@
handleFile,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { ChannelModifySchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
// TODO: delete channel
diff --git "a/src/api/routes/channels/\043channel_id/invites.ts" "b/src/api/routes/channels/\043channel_id/invites.ts"
index 086c1eb..b6ce072 100644
--- "a/src/api/routes/channels/\043channel_id/invites.ts"
+++ "b/src/api/routes/channels/\043channel_id/invites.ts"
@@ -17,9 +17,10 @@
*/
import { randomString, route } from "@spacebar/api";
-import { Channel, Guild, Invite, InviteCreateEvent, InviteCreateSchema, PublicInviteRelation, User, emitEvent, isTextChannel } from "@spacebar/util";
+import { Channel, Guild, Invite, InviteCreateEvent, PublicInviteRelation, User, emitEvent, isTextChannel } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { InviteCreateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts" "b/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts"
index 2439894..bf35dc3 100644
--- "a/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts"
+++ "b/src/api/routes/channels/\043channel_id/messages/\043message_id/index.ts"
@@ -21,9 +21,7 @@
Channel,
Message,
MessageCreateEvent,
- MessageCreateSchema,
MessageDeleteEvent,
- MessageEditSchema,
MessageUpdateEvent,
Snowflake,
SpacebarApiErrors,
@@ -32,13 +30,12 @@
getRights,
uploadFile,
NewUrlUserSignatureData,
- MessageCreateAttachment,
- MessageCreateCloudAttachment,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import multer from "multer";
import { handleMessage, postHandleMessage, route } from "../../../../../util";
+import { MessageCreateAttachment, MessageCreateCloudAttachment, MessageCreateSchema, MessageEditSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
// TODO: message content/embed string length limit
diff --git "a/src/api/routes/channels/\043channel_id/messages/\043message_id/reactions.ts" "b/src/api/routes/channels/\043channel_id/messages/\043message_id/reactions.ts"
index f99d214..97e7e6b 100644
--- "a/src/api/routes/channels/\043channel_id/messages/\043message_id/reactions.ts"
+++ "b/src/api/routes/channels/\043channel_id/messages/\043message_id/reactions.ts"
@@ -28,7 +28,6 @@
MessageReactionRemoveAllEvent,
MessageReactionRemoveEmojiEvent,
MessageReactionRemoveEvent,
- PartialEmoji,
PublicMemberProjection,
PublicUserProjection,
User,
@@ -36,9 +35,10 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { In } from "typeorm";
+import { PartialEmoji } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
-// TODO: check if emoji is really an unicode emoji or a prperly encoded external emoji
+// TODO: check if emoji is really an unicode emoji or a properly encoded external emoji
function getEmoji(emoji: string): PartialEmoji {
emoji = decodeURIComponent(emoji);
diff --git "a/src/api/routes/channels/\043channel_id/messages/index.ts" "b/src/api/routes/channels/\043channel_id/messages/index.ts"
index 6e24086..03d7ca5 100644
--- "a/src/api/routes/channels/\043channel_id/messages/index.ts"
+++ "b/src/api/routes/channels/\043channel_id/messages/index.ts"
@@ -26,8 +26,6 @@
Member,
Message,
MessageCreateEvent,
- MessageCreateSchema,
- Reaction,
ReadState,
Rights,
Snowflake,
@@ -39,14 +37,13 @@
uploadFile,
NewUrlSignatureData,
NewUrlUserSignatureData,
- MessageCreateCloudAttachment,
- MessageCreateAttachment,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import multer from "multer";
import { FindManyOptions, FindOperator, LessThan, MoreThan, MoreThanOrEqual } from "typeorm";
import { URL } from "url";
+import { MessageCreateAttachment, MessageCreateCloudAttachment, MessageCreateSchema, Reaction } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/channels/\043channel_id/permissions.ts" "b/src/api/routes/channels/\043channel_id/permissions.ts"
index 3fcde5e..62b265e 100644
--- "a/src/api/routes/channels/\043channel_id/permissions.ts"
+++ "b/src/api/routes/channels/\043channel_id/permissions.ts"
@@ -16,11 +16,12 @@
along with this program. If not, see .
*/
-import { Channel, ChannelPermissionOverwrite, ChannelPermissionOverwriteSchema, ChannelPermissionOverwriteType, ChannelUpdateEvent, emitEvent, Member, Role } from "@spacebar/util";
+import { Channel, ChannelPermissionOverwrite, ChannelPermissionOverwriteType, ChannelUpdateEvent, emitEvent, Member, Role } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { route } from "@spacebar/api";
+import { ChannelPermissionOverwriteSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
// TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel)
diff --git "a/src/api/routes/channels/\043channel_id/purge.ts" "b/src/api/routes/channels/\043channel_id/purge.ts"
index 01f73b4..c48a46a 100644
--- "a/src/api/routes/channels/\043channel_id/purge.ts"
+++ "b/src/api/routes/channels/\043channel_id/purge.ts"
@@ -21,7 +21,6 @@
Channel,
Message,
MessageDeleteBulkEvent,
- PurgeSchema,
emitEvent,
getPermission,
getRights,
@@ -30,6 +29,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { Between, FindManyOptions, FindOperator, Not } from "typeorm";
+import { PurgeSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/channels/\043channel_id/webhooks.ts" "b/src/api/routes/channels/\043channel_id/webhooks.ts"
index a2b43c0..2d0de32 100644
--- "a/src/api/routes/channels/\043channel_id/webhooks.ts"
+++ "b/src/api/routes/channels/\043channel_id/webhooks.ts"
@@ -23,7 +23,6 @@
DiscordApiErrors,
User,
Webhook,
- WebhookCreateSchema,
WebhookType,
handleFile,
isTextChannel,
@@ -33,6 +32,7 @@
import crypto from "crypto";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { WebhookCreateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/channels/preload-messages.ts b/src/api/routes/channels/preload-messages.ts
index 8ea23ad..4779570 100644
--- a/src/api/routes/channels/preload-messages.ts
+++ b/src/api/routes/channels/preload-messages.ts
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { Config, PreloadMessagesRequestSchema, Message, PreloadMessagesResponseSchema } from "@spacebar/util";
+import { Config, Message } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { PreloadMessagesRequestSchema, PreloadMessagesResponseSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.post(
diff --git a/src/api/routes/collectibles-categories.ts b/src/api/routes/collectibles-categories.ts
index d662edb..d2cac39 100644
--- a/src/api/routes/collectibles-categories.ts
+++ b/src/api/routes/collectibles-categories.ts
@@ -18,7 +18,7 @@
import { route } from "@spacebar/api";
import { Request, Response, Router } from "express";
-import { CollectiblesCategoriesResponse } from "@spacebar/util";
+import { CollectiblesCategoriesResponse } from "@spacebar/schemas";
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/collectibles-shop.ts b/src/api/routes/collectibles-shop.ts
index 066a1e1..b4c82f5 100644
--- a/src/api/routes/collectibles-shop.ts
+++ b/src/api/routes/collectibles-shop.ts
@@ -18,7 +18,7 @@
import { route } from "@spacebar/api";
import { Request, Response, Router } from "express";
-import { CollectiblesShopResponse } from "@spacebar/util";
+import { CollectiblesShopResponse } from "@spacebar/schemas";
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/connections/\043connection_name/callback.ts" "b/src/api/routes/connections/\043connection_name/callback.ts"
index 40e0d01..0852acd 100644
--- "a/src/api/routes/connections/\043connection_name/callback.ts"
+++ "b/src/api/routes/connections/\043connection_name/callback.ts"
@@ -18,12 +18,12 @@
import { route } from "@spacebar/api";
import {
- ConnectionCallbackSchema,
ConnectionStore,
emitEvent,
FieldErrors,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/emojis/\043emoji_id/source.ts" "b/src/api/routes/emojis/\043emoji_id/source.ts"
index 28bfd3d..61133f0 100644
--- "a/src/api/routes/emojis/\043emoji_id/source.ts"
+++ "b/src/api/routes/emojis/\043emoji_id/source.ts"
@@ -19,14 +19,12 @@
import { route } from "@spacebar/api";
import {
Emoji,
- APIErrorResponse,
DiscordApiErrors,
- EmojiSourceResponse,
Guild,
Member,
- EmojiGuild,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { APIErrorResponse, EmojiGuild, EmojiSourceResponse } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/gifs/search.ts b/src/api/routes/gifs/search.ts
index 6c338cc..378e398 100644
--- a/src/api/routes/gifs/search.ts
+++ b/src/api/routes/gifs/search.ts
@@ -18,15 +18,14 @@
import { route } from "@spacebar/api";
import {
- TenorMediaTypes,
getGifApiKey,
parseGifResult,
- TenorGif,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import fetch from "node-fetch-commonjs";
import { ProxyAgent } from "proxy-agent";
import http from "http";
+import { TenorGif, TenorMediaTypes } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/gifs/trending-gifs.ts b/src/api/routes/gifs/trending-gifs.ts
index d0fdc7a..48c2a3b 100644
--- a/src/api/routes/gifs/trending-gifs.ts
+++ b/src/api/routes/gifs/trending-gifs.ts
@@ -18,15 +18,14 @@
import { route } from "@spacebar/api";
import {
- TenorMediaTypes,
getGifApiKey,
parseGifResult,
- TenorGif,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import fetch from "node-fetch-commonjs";
import { ProxyAgent } from "proxy-agent";
import http from "http";
+import { TenorGif, TenorMediaTypes } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/gifs/trending.ts b/src/api/routes/gifs/trending.ts
index d858122..bcbd450 100644
--- a/src/api/routes/gifs/trending.ts
+++ b/src/api/routes/gifs/trending.ts
@@ -18,8 +18,6 @@
import { route } from "@spacebar/api";
import {
- TenorCategoriesResults,
- TenorTrendingResults,
getGifApiKey,
parseGifResult,
} from "@spacebar/util";
@@ -27,6 +25,7 @@
import fetch from "node-fetch-commonjs";
import { ProxyAgent } from "proxy-agent";
import http from "http";
+import { TenorCategoriesResults, TenorTrendingResults } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/auto-moderation/rules.ts" "b/src/api/routes/guilds/\043guild_id/auto-moderation/rules.ts"
index 1532553..e2a84f6 100644
--- "a/src/api/routes/guilds/\043guild_id/auto-moderation/rules.ts"
+++ "b/src/api/routes/guilds/\043guild_id/auto-moderation/rules.ts"
@@ -17,9 +17,10 @@
*/
import { route } from "@spacebar/api";
-import { User, AutomodRuleSchema, AutomodRule } from "@spacebar/util";
+import { User, AutomodRule } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { AutomodRuleSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/bans.ts" "b/src/api/routes/guilds/\043guild_id/bans.ts"
index ffae807..69fa947 100644
--- "a/src/api/routes/guilds/\043guild_id/bans.ts"
+++ "b/src/api/routes/guilds/\043guild_id/bans.ts"
@@ -18,19 +18,17 @@
import { getIpAdress, route } from "@spacebar/api";
import {
- APIBansArray,
Ban,
- BanRegistrySchema,
DiscordApiErrors,
GuildBanAddEvent,
GuildBanRemoveEvent,
- GuildBansResponse,
Member,
User,
emitEvent,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { APIBansArray, BanRegistrySchema, GuildBansResponse } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/channels.ts" "b/src/api/routes/guilds/\043guild_id/channels.ts"
index fe383ec..af4e029 100644
--- "a/src/api/routes/guilds/\043guild_id/channels.ts"
+++ "b/src/api/routes/guilds/\043guild_id/channels.ts"
@@ -19,13 +19,12 @@
import { route } from "@spacebar/api";
import {
Channel,
- ChannelModifySchema,
- ChannelReorderSchema,
ChannelUpdateEvent,
Guild,
emitEvent,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { ChannelModifySchema, ChannelReorderSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.get(
diff --git "a/src/api/routes/guilds/\043guild_id/emojis.ts" "b/src/api/routes/guilds/\043guild_id/emojis.ts"
index 19109dc..b770e5b 100644
--- "a/src/api/routes/guilds/\043guild_id/emojis.ts"
+++ "b/src/api/routes/guilds/\043guild_id/emojis.ts"
@@ -21,8 +21,6 @@
Config,
DiscordApiErrors,
Emoji,
- EmojiCreateSchema,
- EmojiModifySchema,
GuildEmojisUpdateEvent,
Member,
Snowflake,
@@ -31,6 +29,7 @@
handleFile,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { EmojiCreateSchema, EmojiModifySchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/index.ts" "b/src/api/routes/guilds/\043guild_id/index.ts"
index 2f138d7..768e9ce 100644
--- "a/src/api/routes/guilds/\043guild_id/index.ts"
+++ "b/src/api/routes/guilds/\043guild_id/index.ts"
@@ -22,7 +22,6 @@
DiscordApiErrors,
Guild,
GuildUpdateEvent,
- GuildUpdateSchema,
Member,
Permissions,
SpacebarApiErrors,
@@ -33,6 +32,7 @@
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { GuildUpdateSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/members/\043member_id/index.ts" "b/src/api/routes/guilds/\043guild_id/members/\043member_id/index.ts"
index deaacd8..feb3bad 100644
--- "a/src/api/routes/guilds/\043guild_id/members/\043member_id/index.ts"
+++ "b/src/api/routes/guilds/\043guild_id/members/\043member_id/index.ts"
@@ -27,13 +27,13 @@
GuildMemberUpdateEvent,
handleFile,
Member,
- MemberChangeSchema,
PublicMemberProjection,
PublicUserProjection,
Role,
Sticker,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { MemberChangeSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/profile.ts" "b/src/api/routes/guilds/\043guild_id/profile.ts"
index a079b50..1dbb97c 100644
--- "a/src/api/routes/guilds/\043guild_id/profile.ts"
+++ "b/src/api/routes/guilds/\043guild_id/profile.ts"
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { Guild, GuildProfileResponse, GuildVisibilityLevel } from "@spacebar/util";
+import { Guild } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { GuildProfileResponse, GuildVisibilityLevel } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/profile/index.ts" "b/src/api/routes/guilds/\043guild_id/profile/index.ts"
index befb1b1..66e223d 100644
--- "a/src/api/routes/guilds/\043guild_id/profile/index.ts"
+++ "b/src/api/routes/guilds/\043guild_id/profile/index.ts"
@@ -22,10 +22,10 @@
GuildMemberUpdateEvent,
handleFile,
Member,
- MemberChangeProfileSchema,
OrmUtils,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { MemberChangeProfileSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/roles/\043role_id/index.ts" "b/src/api/routes/guilds/\043guild_id/roles/\043role_id/index.ts"
index 3e75f67..4ee6322 100644
--- "a/src/api/routes/guilds/\043guild_id/roles/\043role_id/index.ts"
+++ "b/src/api/routes/guilds/\043guild_id/roles/\043role_id/index.ts"
@@ -24,10 +24,10 @@
handleFile,
Member,
Role,
- RoleModifySchema,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { RoleModifySchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/roles/index.ts" "b/src/api/routes/guilds/\043guild_id/roles/index.ts"
index d226770..8f671b1 100644
--- "a/src/api/routes/guilds/\043guild_id/roles/index.ts"
+++ "b/src/api/routes/guilds/\043guild_id/roles/index.ts"
@@ -25,12 +25,11 @@
GuildRoleUpdateEvent,
Member,
Role,
- RoleModifySchema,
- RolePositionUpdateSchema,
Snowflake,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { Not } from "typeorm";
+import { RoleModifySchema, RolePositionUpdateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/stickers.ts" "b/src/api/routes/guilds/\043guild_id/stickers.ts"
index 07fbfd5..beccc7e 100644
--- "a/src/api/routes/guilds/\043guild_id/stickers.ts"
+++ "b/src/api/routes/guilds/\043guild_id/stickers.ts"
@@ -20,7 +20,6 @@
import {
GuildStickersUpdateEvent,
Member,
- ModifyGuildStickerSchema,
Snowflake,
Sticker,
StickerFormatType,
@@ -33,6 +32,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import multer from "multer";
+import { ModifyGuildStickerSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.get(
diff --git "a/src/api/routes/guilds/\043guild_id/vanity-url.ts" "b/src/api/routes/guilds/\043guild_id/vanity-url.ts"
index 2d63e6d..5261f67 100644
--- "a/src/api/routes/guilds/\043guild_id/vanity-url.ts"
+++ "b/src/api/routes/guilds/\043guild_id/vanity-url.ts"
@@ -22,10 +22,10 @@
ChannelType,
Guild,
Invite,
- VanityUrlSchema,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { VanityUrlSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/voice-states/\043user_id/index.ts" "b/src/api/routes/guilds/\043guild_id/voice-states/\043user_id/index.ts"
index 1944033..6966f70 100644
--- "a/src/api/routes/guilds/\043guild_id/voice-states/\043user_id/index.ts"
+++ "b/src/api/routes/guilds/\043guild_id/voice-states/\043user_id/index.ts"
@@ -25,9 +25,9 @@
getPermission,
VoiceState,
VoiceStateUpdateEvent,
- VoiceStateUpdateSchema,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { VoiceStateUpdateSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
//TODO need more testing when community guild and voice stage channel are working
diff --git "a/src/api/routes/guilds/\043guild_id/welcome-screen.ts" "b/src/api/routes/guilds/\043guild_id/welcome-screen.ts"
index fa28bda..03907f6 100644
--- "a/src/api/routes/guilds/\043guild_id/welcome-screen.ts"
+++ "b/src/api/routes/guilds/\043guild_id/welcome-screen.ts"
@@ -20,10 +20,10 @@
import {
Channel,
Guild,
- GuildUpdateWelcomeScreenSchema,
Member,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { GuildUpdateWelcomeScreenSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/guilds/\043guild_id/widget.ts" "b/src/api/routes/guilds/\043guild_id/widget.ts"
index 6773c36..7ea8dce 100644
--- "a/src/api/routes/guilds/\043guild_id/widget.ts"
+++ "b/src/api/routes/guilds/\043guild_id/widget.ts"
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { Guild, WidgetModifySchema } from "@spacebar/util";
+import { Guild } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { WidgetModifySchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/guilds/automations/email-domain-lookup.ts b/src/api/routes/guilds/automations/email-domain-lookup.ts
index 889f85c..b6d3338 100644
--- a/src/api/routes/guilds/automations/email-domain-lookup.ts
+++ b/src/api/routes/guilds/automations/email-domain-lookup.ts
@@ -18,14 +18,12 @@
import { route } from "@spacebar/api";
import {
- EmailDomainLookupResponse,
- EmailDomainLookupSchema,
- EmailDomainLookupVerifyCodeSchema,
FieldErrors,
} from "@spacebar/util";
import emailProviders from "email-providers/all.json";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { EmailDomainLookupResponse, EmailDomainLookupSchema, EmailDomainLookupVerifyCodeSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/guilds/index.ts b/src/api/routes/guilds/index.ts
index c6965c3..0794eaa 100644
--- a/src/api/routes/guilds/index.ts
+++ b/src/api/routes/guilds/index.ts
@@ -21,11 +21,11 @@
Config,
DiscordApiErrors,
Guild,
- GuildCreateSchema,
Member,
getRights,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { GuildCreateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/guilds/templates/index.ts b/src/api/routes/guilds/templates/index.ts
index 002347d..7937e98 100644
--- a/src/api/routes/guilds/templates/index.ts
+++ b/src/api/routes/guilds/templates/index.ts
@@ -17,10 +17,11 @@
*/
import { route } from "@spacebar/api";
-import { Config, DiscordApiErrors, Guild, GuildTemplateCreateSchema, Member, Template } from "@spacebar/util";
+import { Config, DiscordApiErrors, Guild, Member, Template } from "@spacebar/util";
import { Request, Response, Router } from "express";
import fetch from "node-fetch-commonjs";
import { HTTPError } from "lambert-server";
+import { GuildTemplateCreateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/hub-waitlist.ts b/src/api/routes/hub-waitlist.ts
index 8a36e29..2d21ad6 100644
--- a/src/api/routes/hub-waitlist.ts
+++ b/src/api/routes/hub-waitlist.ts
@@ -20,7 +20,7 @@
import {
HubWaitlistSignupResponse,
HubWaitlistSignupSchema,
-} from "@spacebar/util";
+} from "@spacebar/schemas";
import { Request, Response, Router } from "express";
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/oauth2/authorize.ts b/src/api/routes/oauth2/authorize.ts
index 515d77b..54891a5 100644
--- a/src/api/routes/oauth2/authorize.ts
+++ b/src/api/routes/oauth2/authorize.ts
@@ -20,7 +20,6 @@
import {
ApiError,
Application,
- ApplicationAuthorizeSchema,
DiscordApiErrors,
FieldErrors,
Member,
@@ -29,6 +28,7 @@
getPermission,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { ApplicationAuthorizeSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
// TODO: scopes, other oauth types
diff --git a/src/api/routes/read-states/ack-bulk.ts b/src/api/routes/read-states/ack-bulk.ts
index 566cb4e..475b223 100644
--- a/src/api/routes/read-states/ack-bulk.ts
+++ b/src/api/routes/read-states/ack-bulk.ts
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { AckBulkSchema, ReadState } from "@spacebar/util";
+import { ReadState } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { AckBulkSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.post(
diff --git a/src/api/routes/reporting/menu/message.ts b/src/api/routes/reporting/menu/message.ts
index 69dea24..c72bc84 100644
--- a/src/api/routes/reporting/menu/message.ts
+++ b/src/api/routes/reporting/menu/message.ts
@@ -18,7 +18,6 @@
import { route } from "@spacebar/api";
import { Request, Response, Router } from "express";
-import { CollectiblesCategoriesResponse } from "@spacebar/util";
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/safety-hub/@me/index.ts b/src/api/routes/safety-hub/@me/index.ts
index 4bd14eb..ea361ee 100644
--- a/src/api/routes/safety-hub/@me/index.ts
+++ b/src/api/routes/safety-hub/@me/index.ts
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { AccountStandingResponse, AccountStandingState, AppealEligibility, User } from "@spacebar/util";
+import { User } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { AccountStandingResponse, AccountStandingState, AppealEligibility } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/safety-hub/suspended/@me.ts b/src/api/routes/safety-hub/suspended/@me.ts
index 4bd14eb..ea361ee 100644
--- a/src/api/routes/safety-hub/suspended/@me.ts
+++ b/src/api/routes/safety-hub/suspended/@me.ts
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { AccountStandingResponse, AccountStandingState, AppealEligibility, User } from "@spacebar/util";
+import { User } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { AccountStandingResponse, AccountStandingState, AppealEligibility } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/teams.ts b/src/api/routes/teams.ts
index 142248b..a936fe8 100644
--- a/src/api/routes/teams.ts
+++ b/src/api/routes/teams.ts
@@ -20,13 +20,13 @@
import { route } from "@spacebar/api";
import {
Team,
- TeamCreateSchema,
TeamMember,
TeamMemberRole,
TeamMemberState,
User,
} from "@spacebar/util";
import { HTTPError } from "lambert-server";
+import { TeamCreateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/users/\043user_id/messages.ts" "b/src/api/routes/users/\043user_id/messages.ts"
index 04708cf..9ce0b36 100644
--- "a/src/api/routes/users/\043user_id/messages.ts"
+++ "b/src/api/routes/users/\043user_id/messages.ts"
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { Config, DmMessagesResponseSchema, Message, User } from "@spacebar/util";
+import { Config, Message, User } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { DmMessagesResponseSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.get(
diff --git "a/src/api/routes/users/\043user_id/profile.ts" "b/src/api/routes/users/\043user_id/profile.ts"
index 30b4fb0..9594000 100644
--- "a/src/api/routes/users/\043user_id/profile.ts"
+++ "b/src/api/routes/users/\043user_id/profile.ts"
@@ -28,13 +28,12 @@
PublicUser,
PublicUserProjection,
Relationship,
- RelationshipType,
User,
- UserProfileModifySchema,
UserUpdateEvent,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { In } from "typeorm";
+import { RelationshipType, UserProfileModifySchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git "a/src/api/routes/users/\043user_id/relationships.ts" "b/src/api/routes/users/\043user_id/relationships.ts"
index e4af351..c86b11a 100644
--- "a/src/api/routes/users/\043user_id/relationships.ts"
+++ "b/src/api/routes/users/\043user_id/relationships.ts"
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { User, UserRelationsResponse } from "@spacebar/util";
+import { User } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { UserRelationsResponse } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/channels.ts b/src/api/routes/users/@me/channels.ts
index 5ee36da..fa9ffe7 100644
--- a/src/api/routes/users/@me/channels.ts
+++ b/src/api/routes/users/@me/channels.ts
@@ -17,13 +17,9 @@
*/
import { route } from "@spacebar/api";
-import {
- Channel,
- DmChannelCreateSchema,
- DmChannelDTO,
- Recipient,
-} from "@spacebar/util";
+import { Channel, DmChannelDTO, Recipient } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { DmChannelCreateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/collectibles-marketing.ts b/src/api/routes/users/@me/collectibles-marketing.ts
index 131f437..c9f1a1d 100644
--- a/src/api/routes/users/@me/collectibles-marketing.ts
+++ b/src/api/routes/users/@me/collectibles-marketing.ts
@@ -18,7 +18,7 @@
import { route } from "@spacebar/api";
import { Request, Response, Router } from "express";
-import { CollectiblesMarketingResponse } from "@spacebar/util";
+import { CollectiblesMarketingResponse } from "@spacebar/schemas";
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/users/@me/connections/\043connection_name/\043connection_id/index.ts" "b/src/api/routes/users/@me/connections/\043connection_name/\043connection_id/index.ts"
index f499d24..f4b6ab1 100644
--- "a/src/api/routes/users/@me/connections/\043connection_name/\043connection_id/index.ts"
+++ "b/src/api/routes/users/@me/connections/\043connection_name/\043connection_id/index.ts"
@@ -17,13 +17,9 @@
*/
import { route } from "@spacebar/api";
-import {
- ConnectedAccount,
- ConnectionUpdateSchema,
- DiscordApiErrors,
- emitEvent,
-} from "@spacebar/util";
+import { ConnectedAccount, DiscordApiErrors, emitEvent } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { ConnectionUpdateSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
// TODO: connection update schema
diff --git "a/src/api/routes/users/@me/guilds/\043guild_id/settings.ts" "b/src/api/routes/users/@me/guilds/\043guild_id/settings.ts"
index 9d78773..593006f 100644
--- "a/src/api/routes/users/@me/guilds/\043guild_id/settings.ts"
+++ "b/src/api/routes/users/@me/guilds/\043guild_id/settings.ts"
@@ -21,9 +21,9 @@
Channel,
Member,
OrmUtils,
- UserGuildSettingsSchema,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { UserGuildSettingsSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/index.ts b/src/api/routes/users/@me/index.ts
index d05e181..4d4c64b 100644
--- a/src/api/routes/users/@me/index.ts
+++ b/src/api/routes/users/@me/index.ts
@@ -25,11 +25,11 @@
handleFile,
PrivateUserProjection,
User,
- UserModifySchema,
UserUpdateEvent,
} from "@spacebar/util";
import bcrypt from "bcrypt";
import { Request, Response, Router } from "express";
+import { UserModifySchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/mfa/codes-verification.ts b/src/api/routes/users/@me/mfa/codes-verification.ts
index 953648f..6dba4bb 100644
--- a/src/api/routes/users/@me/mfa/codes-verification.ts
+++ b/src/api/routes/users/@me/mfa/codes-verification.ts
@@ -19,12 +19,12 @@
import { route } from "@spacebar/api";
import {
BackupCode,
- CodesVerificationSchema,
DiscordApiErrors,
User,
generateMfaBackupCodes,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { CodesVerificationSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/mfa/codes.ts b/src/api/routes/users/@me/mfa/codes.ts
index 48f3d26..389dc01 100644
--- a/src/api/routes/users/@me/mfa/codes.ts
+++ b/src/api/routes/users/@me/mfa/codes.ts
@@ -21,11 +21,11 @@
BackupCode,
FieldErrors,
generateMfaBackupCodes,
- MfaCodesSchema,
User,
} from "@spacebar/util";
import bcrypt from "bcrypt";
import { Request, Response, Router } from "express";
+import { MfaCodesSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/mfa/totp/disable.ts b/src/api/routes/users/@me/mfa/totp/disable.ts
index 8ec6573..b266fcf 100644
--- a/src/api/routes/users/@me/mfa/totp/disable.ts
+++ b/src/api/routes/users/@me/mfa/totp/disable.ts
@@ -19,13 +19,13 @@
import { route } from "@spacebar/api";
import {
BackupCode,
- TotpDisableSchema,
User,
generateToken,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { verifyToken } from "node-2fa";
+import { TotpDisableSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/mfa/totp/enable.ts b/src/api/routes/users/@me/mfa/totp/enable.ts
index 774c748..3d6f4a8 100644
--- a/src/api/routes/users/@me/mfa/totp/enable.ts
+++ b/src/api/routes/users/@me/mfa/totp/enable.ts
@@ -18,7 +18,6 @@
import { route } from "@spacebar/api";
import {
- TotpEnableSchema,
User,
generateMfaBackupCodes,
generateToken,
@@ -27,6 +26,7 @@
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { verifyToken } from "node-2fa";
+import { TotpEnableSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
index 78c7470..1225cd3 100644
--- a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
+++ b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
@@ -18,21 +18,19 @@
import { route } from "@spacebar/api";
import {
- CreateWebAuthnCredentialSchema,
DiscordApiErrors,
FieldErrors,
- GenerateWebAuthnCredentialsSchema,
generateWebAuthnTicket,
SecurityKey,
User,
verifyWebAuthnToken,
WebAuthn,
- WebAuthnPostSchema,
} from "@spacebar/util";
import bcrypt from "bcrypt";
import { Request, Response, Router } from "express";
import { ExpectedAttestationResult } from "fido2-lib";
import { HTTPError } from "lambert-server";
+import { CreateWebAuthnCredentialSchema, GenerateWebAuthnCredentialsSchema, WebAuthnPostSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
const isGenerateSchema = (
diff --git a/src/api/routes/users/@me/relationships.ts b/src/api/routes/users/@me/relationships.ts
index 76746e3..7b1780b 100644
--- a/src/api/routes/users/@me/relationships.ts
+++ b/src/api/routes/users/@me/relationships.ts
@@ -24,12 +24,12 @@
Relationship,
RelationshipAddEvent,
RelationshipRemoveEvent,
- RelationshipType,
User,
emitEvent,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { RelationshipType } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/settings-proto/1.ts b/src/api/routes/users/@me/settings-proto/1.ts
index 2eea291..2ae3a55 100644
--- a/src/api/routes/users/@me/settings-proto/1.ts
+++ b/src/api/routes/users/@me/settings-proto/1.ts
@@ -21,14 +21,11 @@
import {
emitEvent,
OrmUtils,
- SettingsProtoJsonResponse,
- SettingsProtoResponse,
- SettingsProtoUpdateJsonSchema,
- SettingsProtoUpdateSchema,
UserSettingsProtos,
} from "@spacebar/util";
import { PreloadedUserSettings } from "discord-protos";
import { JsonValue } from "@protobuf-ts/runtime";
+import { SettingsProtoJsonResponse, SettingsProtoResponse, SettingsProtoUpdateJsonSchema, SettingsProtoUpdateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/settings-proto/2.ts b/src/api/routes/users/@me/settings-proto/2.ts
index 34cd3bf..bfbcc81 100644
--- a/src/api/routes/users/@me/settings-proto/2.ts
+++ b/src/api/routes/users/@me/settings-proto/2.ts
@@ -21,14 +21,11 @@
import {
emitEvent,
OrmUtils,
- SettingsProtoJsonResponse,
- SettingsProtoResponse,
- SettingsProtoUpdateJsonSchema,
- SettingsProtoUpdateSchema,
UserSettingsProtos,
} from "@spacebar/util";
import { FrecencyUserSettings } from "discord-protos";
import { JsonValue } from "@protobuf-ts/runtime";
+import { SettingsProtoJsonResponse, SettingsProtoResponse, SettingsProtoUpdateJsonSchema, SettingsProtoUpdateSchema } from "@spacebar/schemas"
const router: Router = Router({ mergeParams: true });
diff --git a/src/api/routes/users/@me/settings.ts b/src/api/routes/users/@me/settings.ts
index 26d2f21..82ca5ad 100644
--- a/src/api/routes/users/@me/settings.ts
+++ b/src/api/routes/users/@me/settings.ts
@@ -17,8 +17,9 @@
*/
import { route } from "@spacebar/api";
-import { User, UserSettings, UserSettingsSchema } from "@spacebar/util";
+import { User, UserSettings } from "@spacebar/util";
import { Request, Response, Router } from "express";
+import { UserSettingsSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
@@ -66,7 +67,7 @@
});
if (!user.settings)
- user.settings = UserSettings.create(body);
+ user.settings = UserSettings.create(body as Partial);
else
user.settings.assign(body);
diff --git "a/src/api/routes/webhooks/\043webhook_id/\043token/github.ts" "b/src/api/routes/webhooks/\043webhook_id/\043token/github.ts"
index f5d098b..eb9ec42 100644
--- "a/src/api/routes/webhooks/\043webhook_id/\043token/github.ts"
+++ "b/src/api/routes/webhooks/\043webhook_id/\043token/github.ts"
@@ -1,8 +1,9 @@
import { getProxyUrl, route } from "@spacebar/api";
-import { capitalize, EmbedType, WebhookExecuteSchema } from "@spacebar/util";
+import { capitalize } from "@spacebar/util";
import { NextFunction, Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import { executeWebhook } from "../../../../util/handlers/Webhook";
+import { EmbedType, WebhookExecuteSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
diff --git "a/src/api/routes/webhooks/\043webhook_id/\043token/index.ts" "b/src/api/routes/webhooks/\043webhook_id/\043token/index.ts"
index 18de03f..fd9b8c3 100644
--- "a/src/api/routes/webhooks/\043webhook_id/\043token/index.ts"
+++ "b/src/api/routes/webhooks/\043webhook_id/\043token/index.ts"
@@ -7,12 +7,12 @@
ValidateName,
Webhook,
WebhooksUpdateEvent,
- WebhookUpdateSchema,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
import multer from "multer";
import { executeWebhook } from "../../../../util/handlers/Webhook";
+import { WebhookUpdateSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.get(
diff --git "a/src/api/routes/webhooks/\043webhook_id/index.ts" "b/src/api/routes/webhooks/\043webhook_id/index.ts"
index 213f928..878985e 100644
--- "a/src/api/routes/webhooks/\043webhook_id/index.ts"
+++ "b/src/api/routes/webhooks/\043webhook_id/index.ts"
@@ -6,13 +6,13 @@
Webhook,
WebhooksUpdateEvent,
emitEvent,
- WebhookUpdateSchema,
Channel,
handleFile,
ValidateName,
} from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
+import { WebhookUpdateSchema } from "@spacebar/schemas"
const router = Router({ mergeParams: true });
router.get(
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts
index 1504faa..5cb7a56 100644
--- a/src/api/util/handlers/Message.ts
+++ b/src/api/util/handlers/Message.ts
@@ -22,7 +22,6 @@
Attachment,
Channel,
Config,
- Embed,
EmbedCache,
emitEvent,
EVERYONE_MENTION,
@@ -32,8 +31,6 @@
HERE_MENTION,
Message,
MessageCreateEvent,
- MessageCreateSchema,
- MessageType,
MessageUpdateEvent,
Role,
ROLE_MENTION,
@@ -45,14 +42,12 @@
handleFile,
Permissions,
normalizeUrl,
- Reaction,
- MessageCreateCloudAttachment,
- MessageCreateAttachment,
} from "@spacebar/util";
import { HTTPError } from "lambert-server";
import { In } from "typeorm";
import fetch from "node-fetch-commonjs";
import { CloudAttachment } from "../../../util/entities/CloudAttachment";
+import { Embed, MessageCreateAttachment, MessageCreateCloudAttachment, MessageCreateSchema, MessageType, Reaction } from "@spacebar/schemas";
const allow_empty = false;
// TODO: check webhook, application, system author, stickers
// TODO: embed gifs/videos/images
diff --git a/src/api/util/handlers/Webhook.ts b/src/api/util/handlers/Webhook.ts
index 4431766..9040f74 100644
--- a/src/api/util/handlers/Webhook.ts
+++ b/src/api/util/handlers/Webhook.ts
@@ -10,11 +10,11 @@
uploadFile,
ValidateName,
Webhook,
- WebhookExecuteSchema,
} from "@spacebar/util";
import { Request, Response } from "express";
import { HTTPError } from "lambert-server";
import { MoreThan } from "typeorm";
+import { WebhookExecuteSchema } from "@spacebar/schemas"
export const executeWebhook = async (req: Request, res: Response) => {
const { wait } = req.query;
diff --git a/src/api/util/handlers/route.ts b/src/api/util/handlers/route.ts
index 8425b8c..24c3416 100644
--- a/src/api/util/handlers/route.ts
+++ b/src/api/util/handlers/route.ts
@@ -25,12 +25,12 @@
RightResolvable,
Rights,
SpacebarApiErrors,
- ajv,
getPermission,
getRights,
} from "@spacebar/util";
import { AnyValidateFunction } from "ajv/dist/core";
import { NextFunction, Request, Response } from "express";
+import { ajv } from "@spacebar/schemas"
const ignoredRequestSchemas = [
// skip validation for settings proto JSON updates - TODO: figure out if this even possible to fix?
diff --git a/src/api/util/utility/EmbedHandlers.ts b/src/api/util/utility/EmbedHandlers.ts
index 6dec3a1..f93df3e 100644
--- a/src/api/util/utility/EmbedHandlers.ts
+++ b/src/api/util/utility/EmbedHandlers.ts
@@ -16,7 +16,8 @@
along with this program. If not, see .
*/
-import { Config, Embed, EmbedImage, EmbedType } from "@spacebar/util";
+import { Config }from "@spacebar/util";
+import { Embed, EmbedImage, EmbedType } from "@spacebar/schemas";
import * as cheerio from "cheerio";
import crypto from "crypto";
import fetch, { RequestInit } from "node-fetch-commonjs";
diff --git a/src/connections/BattleNet/index.ts b/src/connections/BattleNet/index.ts
index 8f44944..e9e03c8 100644
--- a/src/connections/BattleNet/index.ts
+++ b/src/connections/BattleNet/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { BattleNetSettings } from "./BattleNetSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
interface BattleNetConnectionUser {
sub: string;
diff --git a/src/connections/Discord/index.ts b/src/connections/Discord/index.ts
index e5508f4..e1c9817 100644
--- a/src/connections/Discord/index.ts
+++ b/src/connections/Discord/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { DiscordSettings } from "./DiscordSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
interface UserResponse {
id: string;
diff --git a/src/connections/EpicGames/index.ts b/src/connections/EpicGames/index.ts
index cedfcd0..3755f0d 100644
--- a/src/connections/EpicGames/index.ts
+++ b/src/connections/EpicGames/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { EpicGamesSettings } from "./EpicGamesSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
export interface UserResponse {
accountId: string;
diff --git a/src/connections/Facebook/index.ts b/src/connections/Facebook/index.ts
index bcb90b4..804b02a 100644
--- a/src/connections/Facebook/index.ts
+++ b/src/connections/Facebook/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { FacebookSettings } from "./FacebookSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
export interface FacebookErrorResponse {
error: {
diff --git a/src/connections/GitHub/index.ts b/src/connections/GitHub/index.ts
index 78bf510..bfda7d4 100644
--- a/src/connections/GitHub/index.ts
+++ b/src/connections/GitHub/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { GitHubSettings } from "./GitHubSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
interface UserResponse {
login: string;
diff --git a/src/connections/Reddit/index.ts b/src/connections/Reddit/index.ts
index 0db2373..192fa70 100644
--- a/src/connections/Reddit/index.ts
+++ b/src/connections/Reddit/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { RedditSettings } from "./RedditSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
export interface UserResponse {
verified: boolean;
diff --git a/src/connections/Spotify/index.ts b/src/connections/Spotify/index.ts
index 4eb1260..2ba8640 100644
--- a/src/connections/Spotify/index.ts
+++ b/src/connections/Spotify/index.ts
@@ -19,13 +19,13 @@
import {
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
RefreshableConnection,
} from "@spacebar/util";
import wretch from "wretch";
import { SpotifySettings } from "./SpotifySettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
export interface UserResponse {
display_name: string;
diff --git a/src/connections/Twitch/index.ts b/src/connections/Twitch/index.ts
index 953669a..5e9f2a8 100644
--- a/src/connections/Twitch/index.ts
+++ b/src/connections/Twitch/index.ts
@@ -19,13 +19,13 @@
import {
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
RefreshableConnection,
} from "@spacebar/util";
import wretch from "wretch";
import { TwitchSettings } from "./TwitchSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
interface TwitchConnectionUserResponse {
data: {
diff --git a/src/connections/Twitter/index.ts b/src/connections/Twitter/index.ts
index eba8ceb..fadc97e 100644
--- a/src/connections/Twitter/index.ts
+++ b/src/connections/Twitter/index.ts
@@ -19,13 +19,13 @@
import {
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
RefreshableConnection,
} from "@spacebar/util";
import wretch from "wretch";
import { TwitterSettings } from "./TwitterSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
interface TwitterUserResponse {
data: {
diff --git a/src/connections/Xbox/index.ts b/src/connections/Xbox/index.ts
index 84066de..5fc1871 100644
--- a/src/connections/Xbox/index.ts
+++ b/src/connections/Xbox/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { XboxSettings } from "./XboxSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
interface XboxUserResponse {
IssueInstant: string;
diff --git a/src/connections/Youtube/index.ts b/src/connections/Youtube/index.ts
index 38edbb0..4a84baf 100644
--- a/src/connections/Youtube/index.ts
+++ b/src/connections/Youtube/index.ts
@@ -20,12 +20,12 @@
ConnectedAccount,
ConnectedAccountCommonOAuthTokenResponse,
Connection,
- ConnectionCallbackSchema,
ConnectionLoader,
DiscordApiErrors,
} from "@spacebar/util";
import wretch from "wretch";
import { YoutubeSettings } from "./YoutubeSettings";
+import { ConnectionCallbackSchema } from "@spacebar/schemas"
interface YouTubeConnectionChannelListResult {
items: {
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts
index d430ecb..6fb222b 100644
--- a/src/gateway/events/Message.ts
+++ b/src/gateway/events/Message.ts
@@ -17,13 +17,14 @@
*/
import { CLOSECODES, OPCODES, Payload, WebSocket } from "@spacebar/gateway";
-import { ErlpackType, PayloadSchema } from "@spacebar/util";
+import { ErlpackType } from "@spacebar/util";
import fs from "fs/promises";
import BigIntJson from "json-bigint";
import path from "path";
import WS from "ws";
import OPCodeHandlers from "../opcodes";
import { check } from "../opcodes/instanceOf";
+import { PayloadSchema } from "@spacebar/schemas"
const bigIntJson = BigIntJson({ storeAsString: true });
diff --git a/src/gateway/listener/listener.ts b/src/gateway/listener/listener.ts
index 58e8bb3..b51b372 100644
--- a/src/gateway/listener/listener.ts
+++ b/src/gateway/listener/listener.ts
@@ -26,7 +26,6 @@
Member,
EVENTEnum,
Relationship,
- RelationshipType,
Message,
NewUrlUserSignatureData,
} from "@spacebar/util";
@@ -36,6 +35,7 @@
import { Channel as AMQChannel } from "amqplib";
import { Recipient } from "@spacebar/util";
import * as console from "node:console";
+import { RelationshipType } from "@spacebar/schemas"
// TODO: close connection on Invalidated Token
// TODO: check intent
diff --git a/src/gateway/opcodes/GuildSubscriptionsBulk.ts b/src/gateway/opcodes/GuildSubscriptionsBulk.ts
index 66e2836..54fe78e 100644
--- a/src/gateway/opcodes/GuildSubscriptionsBulk.ts
+++ b/src/gateway/opcodes/GuildSubscriptionsBulk.ts
@@ -1,6 +1,6 @@
import { WebSocket, Payload } from "@spacebar/gateway";
import { onLazyRequest } from "./LazyRequest";
-import { GuildSubscriptionsBulkSchema } from "@spacebar/util";
+import { GuildSubscriptionsBulkSchema } from "@spacebar/schemas";
import { check } from "./instanceOf";
export async function onGuildSubscriptionsBulk(
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts
index 71b0561..8b71840 100644
--- a/src/gateway/opcodes/Identify.ts
+++ b/src/gateway/opcodes/Identify.ts
@@ -25,7 +25,6 @@
EVENTEnum,
Guild,
GuildOrUnavailable,
- IdentifySchema,
Intents,
Member,
MemberPrivateProjection,
@@ -60,6 +59,7 @@
import { check } from "./instanceOf";
import { In } from "typeorm";
import { PreloadedUserSettings } from "discord-protos";
+import { IdentifySchema } from "@spacebar/schemas"
// TODO: user sharding
// TODO: check privileged intents, if defined in the config
diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts
index 41ec402..94dc751 100644
--- a/src/gateway/opcodes/LazyRequest.ts
+++ b/src/gateway/opcodes/LazyRequest.ts
@@ -23,7 +23,6 @@
Member,
Role,
Session,
- LazyRequestSchema,
User,
Presence,
Channel,
@@ -38,6 +37,7 @@
} from "@spacebar/gateway";
import murmur from "murmurhash-js/murmurhash3_gc";
import { check } from "./instanceOf";
+import { LazyRequestSchema } from "@spacebar/schemas"
// TODO: only show roles/members that have access to this channel
// TODO: config: to list all members (even those who are offline) sorted by role, or just those who are online
diff --git a/src/gateway/opcodes/PresenceUpdate.ts b/src/gateway/opcodes/PresenceUpdate.ts
index 7730d42..13fa3ac 100644
--- a/src/gateway/opcodes/PresenceUpdate.ts
+++ b/src/gateway/opcodes/PresenceUpdate.ts
@@ -22,9 +22,9 @@
PresenceUpdateEvent,
Session,
User,
- ActivitySchema,
} from "@spacebar/util";
import { check } from "./instanceOf";
+import { ActivitySchema } from "@spacebar/schemas"
export async function onPresenceUpdate(this: WebSocket, { d }: Payload) {
const startTime = Date.now();
diff --git a/src/gateway/opcodes/RequestGuildMembers.ts b/src/gateway/opcodes/RequestGuildMembers.ts
index b550793..034dce6 100644
--- a/src/gateway/opcodes/RequestGuildMembers.ts
+++ b/src/gateway/opcodes/RequestGuildMembers.ts
@@ -22,12 +22,12 @@
GuildMembersChunkEvent,
Member,
Presence,
- RequestGuildMembersSchema,
Session,
} from "@spacebar/util";
import { WebSocket, Payload, OPCODES, Send } from "@spacebar/gateway";
import { check } from "./instanceOf";
import { FindManyOptions, ILike, In } from "typeorm";
+import { RequestGuildMembersSchema } from "@spacebar/schemas"
export async function onRequestGuildMembers(this: WebSocket, { d }: Payload) {
const startTime = Date.now();
diff --git a/src/gateway/opcodes/StreamCreate.ts b/src/gateway/opcodes/StreamCreate.ts
index 3aa8e81..3defc12 100644
--- a/src/gateway/opcodes/StreamCreate.ts
+++ b/src/gateway/opcodes/StreamCreate.ts
@@ -12,13 +12,13 @@
Snowflake,
Stream,
StreamCreateEvent,
- StreamCreateSchema,
StreamServerUpdateEvent,
StreamSession,
VoiceState,
VoiceStateUpdateEvent,
} from "@spacebar/util";
import { check } from "./instanceOf";
+import { StreamCreateSchema } from "@spacebar/schemas"
export async function onStreamCreate(this: WebSocket, data: Payload) {
const startTime = Date.now();
diff --git a/src/gateway/opcodes/StreamDelete.ts b/src/gateway/opcodes/StreamDelete.ts
index a3ffb1b..069d6b2 100644
--- a/src/gateway/opcodes/StreamDelete.ts
+++ b/src/gateway/opcodes/StreamDelete.ts
@@ -3,11 +3,11 @@
emitEvent,
Stream,
StreamDeleteEvent,
- StreamDeleteSchema,
VoiceState,
VoiceStateUpdateEvent,
} from "@spacebar/util";
import { check } from "./instanceOf";
+import { StreamDeleteSchema } from "@spacebar/schemas"
export async function onStreamDelete(this: WebSocket, data: Payload) {
const startTime = Date.now();
diff --git a/src/gateway/opcodes/StreamWatch.ts b/src/gateway/opcodes/StreamWatch.ts
index 3583bc2..88bc046 100644
--- a/src/gateway/opcodes/StreamWatch.ts
+++ b/src/gateway/opcodes/StreamWatch.ts
@@ -11,10 +11,10 @@
StreamCreateEvent,
StreamServerUpdateEvent,
StreamSession,
- StreamWatchSchema,
} from "@spacebar/util";
import { check } from "./instanceOf";
import { Not } from "typeorm";
+import { StreamWatchSchema } from "@spacebar/schemas"
export async function onStreamWatch(this: WebSocket, data: Payload) {
const startTime = Date.now();
diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts
index 92d1859..7d1a80e 100644
--- a/src/gateway/opcodes/VoiceStateUpdate.ts
+++ b/src/gateway/opcodes/VoiceStateUpdate.ts
@@ -26,10 +26,10 @@
VoiceServerUpdateEvent,
VoiceState,
VoiceStateUpdateEvent,
- VoiceStateUpdateSchema,
} from "@spacebar/util";
import { genVoiceToken } from "../util/SessionUtils";
import { check } from "./instanceOf";
+import { VoiceStateUpdateSchema } from "@spacebar/schemas"
// TODO: check if a voice server is setup
// Notice: Bot users respect the voice channel's user limit, if set.
diff --git a/src/schemas/AckBulkSchema.ts b/src/schemas/AckBulkSchema.ts
deleted file mode 100644
index 5604c2f..0000000
--- a/src/schemas/AckBulkSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface AckBulkSchema {
- read_states: {
- channel_id: string;
- message_id: string;
- read_state_type: number; // WHat is this?
- }[];
-}
diff --git a/src/schemas/ActivitySchema.ts b/src/schemas/ActivitySchema.ts
deleted file mode 100644
index f168f96..0000000
--- a/src/schemas/ActivitySchema.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { Activity, Status } from "@spacebar/util";
-
-export const ActivitySchema = {
- $afk: Boolean,
- status: String,
- $activities: [
- {
- name: String,
- type: Number,
- $url: String,
- $created_at: Date,
- $timestamps: {
- $start: Number,
- $end: Number,
- },
- $application_id: String,
- $details: String,
- $state: String,
- $emoji: {
- $name: String,
- $id: String,
- $animated: Boolean,
- },
- $party: {
- $id: String,
- $size: [Number, Number],
- },
- $assets: {
- $large_image: String,
- $large_text: String,
- $small_image: String,
- $small_text: String,
- },
- $secrets: {
- $join: String,
- $spectate: String,
- $match: String,
- },
- $instance: Boolean,
- $flags: String,
-
- // Spotify and other rich presence data
- $id: String,
- $sync_id: String,
- $metadata: {
- // spotify
- $context_uri: String,
- album_id: String,
- artist_ids: [String],
- },
- $session_id: String,
- },
- ],
- $since: Number, // unix time (in milliseconds) of when the client went idle, or null if the client is not idle
-};
-
-export interface ActivitySchema {
- afk?: boolean;
- status: Status;
- activities?: Activity[];
- since?: number; // unix time (in milliseconds) of when the client went idle, or null if the client is not idle
-}
diff --git a/src/schemas/ApplicationAuthorizeSchema.ts b/src/schemas/ApplicationAuthorizeSchema.ts
deleted file mode 100644
index 04b7b1e..0000000
--- a/src/schemas/ApplicationAuthorizeSchema.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface ApplicationAuthorizeSchema {
- authorize: boolean;
- guild_id: string;
- permissions: string;
- captcha_key?: string;
- /**
- * @minLength 6
- * @maxLength 6
- */
- code?: string; // 2fa code
-}
diff --git a/src/schemas/ApplicationCreateSchema.ts b/src/schemas/ApplicationCreateSchema.ts
deleted file mode 100644
index 80956ec..0000000
--- a/src/schemas/ApplicationCreateSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface ApplicationCreateSchema {
- name: string;
- team_id?: string;
-}
diff --git a/src/schemas/ApplicationModifySchema.ts b/src/schemas/ApplicationModifySchema.ts
deleted file mode 100644
index a871797..0000000
--- a/src/schemas/ApplicationModifySchema.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface ApplicationModifySchema {
- description?: string;
- icon?: string;
- cover_image?: string;
- interactions_endpoint_url?: string;
- max_participants?: number | null;
- name?: string;
- privacy_policy_url?: string;
- role_connections_verification_url?: string;
- tags?: string[];
- terms_of_service_url?: string;
- bot_public?: boolean;
- bot_require_code_grant?: boolean;
- flags?: number;
- custom_install_url?: string;
- guild_id?: string;
- /*install_params?: { TODO: Validation
- scopes: string[];
- permissions: string;
- };*/
-}
diff --git a/src/schemas/AutomodRuleSchema.ts b/src/schemas/AutomodRuleSchema.ts
deleted file mode 100644
index 55cf202..0000000
--- a/src/schemas/AutomodRuleSchema.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2024 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface AutomodMentionSpamRuleSchema {
- mention_total_limit: number;
- mention_raid_protection_enabled: boolean;
-}
-
-export interface AutomodSuspectedSpamRuleSchema {}
-
-export interface AutomodCommonlyFlaggedWordsRuleSchema {
- allow_list: [string];
- presets: [number];
-}
-
-export interface AutomodCustomWordsRuleSchema {
- allow_list: [string];
- keyword_filter: [string];
- regex_patterns: [string];
-}
-
-export interface AutomodRuleSchema {
- creator_id: string;
- enabled: boolean;
- event_type: number; // No idea...
- exempt_channels: [string];
- exempt_roles: [string];
- guild_id: string;
- name: string;
- position: number;
- trigger_type: number; //AutomodTriggerTypes
- trigger_metadata:
- | AutomodMentionSpamRuleSchema
- | AutomodSuspectedSpamRuleSchema
- | AutomodCommonlyFlaggedWordsRuleSchema
- | AutomodCustomWordsRuleSchema;
-}
-
-export interface AutomodRuleSchemaWithId extends AutomodRuleSchema {
- id: string;
-}
diff --git a/src/schemas/BackupCodesChallengeSchema.ts b/src/schemas/BackupCodesChallengeSchema.ts
deleted file mode 100644
index 25f1b70..0000000
--- a/src/schemas/BackupCodesChallengeSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface BackupCodesChallengeSchema {
- /**
- * @minLength 1
- * @maxLength 72
- */
- password: string;
-}
diff --git a/src/schemas/BanCreateSchema.ts b/src/schemas/BanCreateSchema.ts
deleted file mode 100644
index 6d30ca2..0000000
--- a/src/schemas/BanCreateSchema.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface BanCreateSchema {
- delete_message_seconds?: string;
- delete_message_days?: string;
- reason?: string;
-}
diff --git a/src/schemas/BanModeratorSchema.ts b/src/schemas/BanModeratorSchema.ts
deleted file mode 100644
index cba1a5e..0000000
--- a/src/schemas/BanModeratorSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface BanModeratorSchema {
- id: string;
- user_id: string;
- guild_id: string;
- executor_id: string;
- reason?: string | undefined;
-}
diff --git a/src/schemas/BanRegistrySchema.ts b/src/schemas/BanRegistrySchema.ts
deleted file mode 100644
index 4e76870..0000000
--- a/src/schemas/BanRegistrySchema.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface BanRegistrySchema {
- id: string;
- user_id: string;
- guild_id: string;
- executor_id: string;
- ip?: string;
- reason?: string | undefined;
-}
diff --git a/src/schemas/BotModifySchema.ts b/src/schemas/BotModifySchema.ts
deleted file mode 100644
index 7d94da2..0000000
--- a/src/schemas/BotModifySchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface BotModifySchema {
- avatar?: string;
- username?: string;
-}
diff --git a/src/schemas/BulkBanSchema.ts b/src/schemas/BulkBanSchema.ts
deleted file mode 100644
index 48a7bac..0000000
--- a/src/schemas/BulkBanSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface BulkBanSchema {
- user_ids: string[];
- delete_message_seconds?: number;
-}
diff --git a/src/schemas/BulkDeleteSchema.ts b/src/schemas/BulkDeleteSchema.ts
deleted file mode 100644
index ca22f10..0000000
--- a/src/schemas/BulkDeleteSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface BulkDeleteSchema {
- messages: string[];
-}
diff --git a/src/schemas/ChannelModifySchema.ts b/src/schemas/ChannelModifySchema.ts
deleted file mode 100644
index 088ac45..0000000
--- a/src/schemas/ChannelModifySchema.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { ChannelPermissionOverwriteType, ChannelType } from "@spacebar/util";
-
-export interface ChannelModifySchema {
- /**
- * @maxLength 100
- */
- name?: string;
- type?: ChannelType;
- topic?: string;
- icon?: string | null;
- bitrate?: number;
- user_limit?: number;
- rate_limit_per_user?: number;
- position?: number;
- permission_overwrites?: {
- id: string;
- type: ChannelPermissionOverwriteType;
- allow: string;
- deny: string;
- }[];
- parent_id?: string;
- id?: string; // is not used (only for guild create)
- nsfw?: boolean;
- rtc_region?: string;
- default_auto_archive_duration?: number;
- default_reaction_emoji?: string | null;
- flags?: number;
- default_thread_rate_limit_per_user?: number;
- video_quality_mode?: number;
-}
diff --git a/src/schemas/ChannelPermissionOverwriteSchema.ts b/src/schemas/ChannelPermissionOverwriteSchema.ts
deleted file mode 100644
index 6e8b340..0000000
--- a/src/schemas/ChannelPermissionOverwriteSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { ChannelPermissionOverwrite } from "@spacebar/util";
-
-export type ChannelPermissionOverwriteSchema = ChannelPermissionOverwrite;
diff --git a/src/schemas/ChannelReorderSchema.ts b/src/schemas/ChannelReorderSchema.ts
deleted file mode 100644
index 657ed42..0000000
--- a/src/schemas/ChannelReorderSchema.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export type ChannelReorderSchema = {
- id: string;
- position?: number;
- lock_permissions?: boolean;
- parent_id?: null | string;
-}[];
diff --git a/src/schemas/CodesVerificationSchema.ts b/src/schemas/CodesVerificationSchema.ts
deleted file mode 100644
index 3c95e61..0000000
--- a/src/schemas/CodesVerificationSchema.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface CodesVerificationSchema {
- key: string;
- nonce: string;
- regenerate?: boolean;
-}
diff --git a/src/schemas/ConnectedAccountSchema.ts b/src/schemas/ConnectedAccountSchema.ts
deleted file mode 100644
index 3c3e76e..0000000
--- a/src/schemas/ConnectedAccountSchema.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { ConnectedAccountTokenData } from "../util/interfaces";
-
-export interface ConnectedAccountSchema {
- external_id: string;
- user_id: string;
- token_data?: ConnectedAccountTokenData;
- friend_sync?: boolean;
- name: string;
- revoked?: boolean;
- show_activity?: number;
- type: string;
- verified?: boolean;
- visibility?: number;
- integrations?: string[];
- metadata_?: unknown;
- metadata_visibility?: number;
- two_way_link?: boolean;
-}
diff --git a/src/schemas/ConnectionCallbackSchema.ts b/src/schemas/ConnectionCallbackSchema.ts
deleted file mode 100644
index b66bfe2..0000000
--- a/src/schemas/ConnectionCallbackSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface ConnectionCallbackSchema {
- code?: string;
- state: string;
- insecure: boolean;
- friend_sync: boolean;
- openid_params?: unknown; // TODO: types
-}
diff --git a/src/schemas/ConnectionUpdateSchema.ts b/src/schemas/ConnectionUpdateSchema.ts
deleted file mode 100644
index f9f17b0..0000000
--- a/src/schemas/ConnectionUpdateSchema.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface ConnectionUpdateSchema {
- visibility?: boolean;
- show_activity?: boolean;
- metadata_visibility?: boolean;
-}
diff --git a/src/schemas/DmChannelCreateSchema.ts b/src/schemas/DmChannelCreateSchema.ts
deleted file mode 100644
index 510ff9c..0000000
--- a/src/schemas/DmChannelCreateSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface DmChannelCreateSchema {
- name?: string;
- recipients: string[];
-}
diff --git a/src/schemas/EmailDomainLookupSchema.ts b/src/schemas/EmailDomainLookupSchema.ts
deleted file mode 100644
index 43680aa..0000000
--- a/src/schemas/EmailDomainLookupSchema.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface EmailDomainLookupSchema {
- allow_multiple_guilds: boolean;
- email: string;
- use_verification_code: boolean;
- guild_id?: string;
-}
diff --git a/src/schemas/EmailDomainLookupVerifyCodeSchema.ts b/src/schemas/EmailDomainLookupVerifyCodeSchema.ts
deleted file mode 100644
index 9fe0bd4..0000000
--- a/src/schemas/EmailDomainLookupVerifyCodeSchema.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface EmailDomainLookupVerifyCodeSchema {
- email: string;
- guild_id: string;
- code: string;
-}
diff --git a/src/schemas/EmojiCreateSchema.ts b/src/schemas/EmojiCreateSchema.ts
deleted file mode 100644
index 5eae5a9..0000000
--- a/src/schemas/EmojiCreateSchema.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface EmojiCreateSchema {
- name?: string;
- image: string;
- require_colons?: boolean | null;
- roles?: string[];
-}
diff --git a/src/schemas/EmojiModifySchema.ts b/src/schemas/EmojiModifySchema.ts
deleted file mode 100644
index 5d33bf6..0000000
--- a/src/schemas/EmojiModifySchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface EmojiModifySchema {
- name?: string;
- roles?: string[];
-}
diff --git a/src/schemas/ForgotPasswordSchema.ts b/src/schemas/ForgotPasswordSchema.ts
deleted file mode 100644
index 0f9fc92..0000000
--- a/src/schemas/ForgotPasswordSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface ForgotPasswordSchema {
- login: string;
- captcha_key?: string;
-}
diff --git a/src/schemas/GatewayBotResponse.ts b/src/schemas/GatewayBotResponse.ts
deleted file mode 100644
index c68ec09..0000000
--- a/src/schemas/GatewayBotResponse.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface GatewayBotResponse {
- url: string;
- shards: number;
- session_start_limit: {
- total: number;
- remaining: number;
- reset_after: number;
- max_concurrency: number;
- };
-}
diff --git a/src/schemas/GatewayPayloadSchema.ts b/src/schemas/GatewayPayloadSchema.ts
deleted file mode 100644
index cb01f16..0000000
--- a/src/schemas/GatewayPayloadSchema.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { Tuple } from "lambert-server*";
-
-export const PayloadSchema = {
- op: Number,
- $d: new Tuple(Object, Number), // or number for heartbeat sequence
- $s: Number,
- $t: String,
-};
diff --git a/src/schemas/GatewayResponse.ts b/src/schemas/GatewayResponse.ts
deleted file mode 100644
index 5b771ed..0000000
--- a/src/schemas/GatewayResponse.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface GatewayResponse {
- url: string;
-}
diff --git a/src/schemas/GreetRequestSchema.ts b/src/schemas/GreetRequestSchema.ts
deleted file mode 100644
index 545952d..0000000
--- a/src/schemas/GreetRequestSchema.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { AllowedMentions } from "@spacebar/util";
-
-export interface GreetRequestSchema {
- sticker_ids: string[];
- allowed_mentions?: AllowedMentions;
- message_reference?: {
- message_id: string;
- channel_id?: string;
- guild_id?: string;
- fail_if_not_exists?: boolean;
- };
-}
\ No newline at end of file
diff --git a/src/schemas/GuildCreateSchema.ts b/src/schemas/GuildCreateSchema.ts
deleted file mode 100644
index 278a759..0000000
--- a/src/schemas/GuildCreateSchema.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { ChannelModifySchema } from "./index";
-
-export interface GuildCreateSchema {
- /**
- * @maxLength 100
- */
- name?: string;
- region?: string;
- icon?: string | null;
- channels?: ChannelModifySchema[];
- system_channel_id?: string;
- rules_channel_id?: string;
- guild_template_code?: string;
- staff_only?: boolean;
-}
diff --git a/src/schemas/GuildSubscriptionsBulkSchema.ts b/src/schemas/GuildSubscriptionsBulkSchema.ts
deleted file mode 100644
index 86f00a3..0000000
--- a/src/schemas/GuildSubscriptionsBulkSchema.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { LazyRequestSchema } from "./LazyRequestSchema";
-
-export interface GuildSubscriptionsBulkSchema {
- subscriptions: { [key: string]: GuildSubscriptionSchema };
-}
-
-export type GuildSubscriptionSchema = Omit;
-
-export const GuildSubscriptionsBulkSchema = {
- $subscriptions: Object,
-};
diff --git a/src/schemas/GuildTemplateCreateSchema.ts b/src/schemas/GuildTemplateCreateSchema.ts
deleted file mode 100644
index 048de6f..0000000
--- a/src/schemas/GuildTemplateCreateSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface GuildTemplateCreateSchema {
- name: string;
- avatar?: string | null;
-}
diff --git a/src/schemas/GuildUpdateSchema.ts b/src/schemas/GuildUpdateSchema.ts
deleted file mode 100644
index 069be6c..0000000
--- a/src/schemas/GuildUpdateSchema.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { GuildCreateSchema } from "@spacebar/util";
-
-export interface GuildUpdateSchema extends Omit {
- banner?: string | null;
- splash?: string | null;
- description?: string;
- features?: string[];
- verification_level?: number;
- default_message_notifications?: number;
- system_channel_flags?: number;
- explicit_content_filter?: number;
- public_updates_channel_id?: string;
- afk_timeout?: number;
- afk_channel_id?: string;
- preferred_locale?: string;
- premium_progress_bar_enabled?: boolean;
- discovery_splash?: string;
- safety_alerts_channel_id?: string | null;
-}
diff --git a/src/schemas/GuildUpdateWelcomeScreenSchema.ts b/src/schemas/GuildUpdateWelcomeScreenSchema.ts
deleted file mode 100644
index 8046aae..0000000
--- a/src/schemas/GuildUpdateWelcomeScreenSchema.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface GuildUpdateWelcomeScreenSchema {
- welcome_channels?: {
- channel_id: string;
- description: string;
- emoji_id?: string;
- emoji_name?: string;
- }[];
- enabled?: boolean;
- description?: string;
-}
diff --git a/src/schemas/HubWaitlistSignupSchema.ts b/src/schemas/HubWaitlistSignupSchema.ts
deleted file mode 100644
index 8114b3d..0000000
--- a/src/schemas/HubWaitlistSignupSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface HubWaitlistSignupSchema {
- email: string;
- school: string;
-}
diff --git a/src/schemas/Identifiers.ts b/src/schemas/Identifiers.ts
new file mode 100644
index 0000000..cb0a0e2
--- /dev/null
+++ b/src/schemas/Identifiers.ts
@@ -0,0 +1,30 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+/**
+ * A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z
+ * ```
+ * If we have a snowflake '266241948824764416' we can represent it as binary:
+ *
+ * 64 22 17 12 0
+ * 000000111011000111100001101001000101000000 00001 00000 000000000000
+ * number of ms since Discord epoch worker pid increment
+ * ```
+ * @format snowflake
+ */
+export type Snowflake = string;
\ No newline at end of file
diff --git a/src/schemas/IdentifySchema.ts b/src/schemas/IdentifySchema.ts
deleted file mode 100644
index 0619dac..0000000
--- a/src/schemas/IdentifySchema.ts
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { ActivitySchema } from "@spacebar/util";
-
-// TODO: Need a way to allow camalCase and pascal_case without just duplicating the schema
-
-export const IdentifySchema = {
- token: String,
- $intents: BigInt, // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt
- $properties: Object,
- // {
- // // discord uses $ in the property key for bots, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key
- // $os: String,
- // $os_arch: String,
- // $browser: String,
- // $device: String,
- // $$os: String,
- // $$browser: String,
- // $$device: String,
- // $browser_user_agent: String,
- // $browser_version: String,
- // $os_version: String,
- // $referrer: String,
- // $$referrer: String,
- // $referring_domain: String,
- // $$referring_domain: String,
- // $referrer_current: String,
- // $referring_domain_current: String,
- // $release_channel: String,
- // $client_build_number: Number,
- // $client_event_source: String,
- // $client_version: String,
- // $system_locale: String,
- // $window_manager: String,
- // $distro: String,
- // },
- $presence: ActivitySchema,
- $compress: Boolean,
- $large_threshold: Number,
- $shard: [BigInt, BigInt],
- $guild_subscriptions: Boolean,
- $capabilities: Number,
- $client_state: {
- $guild_hashes: Object,
- $highest_last_message_id: String || Number,
- $read_state_version: Number,
- $user_guild_settings_version: Number,
- $user_settings_version: undefined,
- $useruser_guild_settings_version: undefined,
- $private_channels_version: Number,
- $guild_versions: Object,
- $api_code_version: Number,
- $initial_guild_id: String,
- },
- $clientState: {
- $guildHashes: Object,
- $highestLastMessageId: String || Number,
- $readStateVersion: Number,
- $useruserGuildSettingsVersion: undefined,
- $userGuildSettingsVersion: undefined,
- $guildVersions: Object,
- $apiCodeVersion: Number,
- $initialGuildId: String,
- },
- $v: Number,
- $version: Number,
-};
-
-export interface IdentifySchema {
- token: string;
- properties: {
- // bruh discord really uses $ in the property key, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key
- os?: string;
- os_atch?: string;
- browser?: string;
- device?: string;
- $os?: string;
- $browser?: string;
- $device?: string;
- browser_user_agent?: string;
- browser_version?: string;
- os_version?: string;
- referrer?: string;
- referring_domain?: string;
- referrer_current?: string;
- referring_domain_current?: string;
- release_channel?: "stable" | "dev" | "ptb" | "canary";
- client_build_number?: number;
- client_event_source?: string;
- client_version?: string;
- system_locale?: string;
- };
- intents?: bigint; // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt
- presence?: ActivitySchema;
- compress?: boolean;
- large_threshold?: number;
- largeThreshold?: number;
- /**
- * @minItems 2
- * @maxItems 2
- */
- shard?: bigint[]; // puyo: changed from [bigint, bigint] because it breaks openapi
- guild_subscriptions?: boolean;
- capabilities?: number;
- client_state?: {
- guild_hashes?: unknown;
- highest_last_message_id?: string | number;
- read_state_version?: number;
- user_guild_settings_version?: number;
- user_settings_version?: number;
- useruser_guild_settings_version?: number;
- private_channels_version?: number;
- guild_versions?: unknown;
- api_code_version?: number;
- initial_guild_id?: string;
- };
- clientState?: {
- guildHashes?: unknown;
- highestLastMessageId?: string | number;
- readStateVersion?: number;
- userGuildSettingsVersion?: number;
- useruserGuildSettingsVersion?: number;
- guildVersions?: unknown;
- apiCodeVersion?: number;
- initialGuildId?: string;
- };
- v?: number;
-}
diff --git a/src/schemas/InviteCreateSchema.ts b/src/schemas/InviteCreateSchema.ts
deleted file mode 100644
index 92333e7..0000000
--- a/src/schemas/InviteCreateSchema.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface InviteCreateSchema {
- target_user_id?: string;
- target_type?: string;
- validate?: string; // ? what is this
- max_age?: number;
- max_uses?: number;
- temporary?: boolean;
- unique?: boolean;
- target_user?: string;
- target_user_type?: number;
- flags?: number;
-}
diff --git a/src/schemas/LazyRequestSchema.ts b/src/schemas/LazyRequestSchema.ts
deleted file mode 100644
index ca07d37..0000000
--- a/src/schemas/LazyRequestSchema.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface LazyRequestSchema {
- guild_id: string;
- channels?: {
- /**
- * @items.type integer
- * @minItems 2
- * @maxItems 2
- */
- [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi
- };
- activities?: boolean;
- threads?: boolean;
- typing?: true;
- members?: string[];
- member_updates?: boolean;
- thread_member_lists?: unknown[];
-}
-
-export const LazyRequestSchema = {
- guild_id: String,
- $activities: Boolean,
- $channels: Object,
- $typing: Boolean,
- $threads: Boolean,
- $members: [] as string[],
- $member_updates: Boolean,
- $thread_member_lists: [] as unknown[],
-};
diff --git a/src/schemas/LoginResponse.ts b/src/schemas/LoginResponse.ts
deleted file mode 100644
index faf3f76..0000000
--- a/src/schemas/LoginResponse.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { TokenResponse } from "./responses";
-
-export interface MFAResponse {
- ticket: string;
- mfa: true;
- sms: false; // TODO
- token: null;
-}
-
-export interface WebAuthnResponse extends MFAResponse {
- webauthn: string;
-}
-
-export type LoginResponse = TokenResponse | MFAResponse | WebAuthnResponse;
diff --git a/src/schemas/LoginSchema.ts b/src/schemas/LoginSchema.ts
deleted file mode 100644
index 55b6a02..0000000
--- a/src/schemas/LoginSchema.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface LoginSchema {
- login: string;
- /**
- * @minLength 1
- * @maxLength 72
- */
- password: string;
- undelete?: boolean;
- captcha_key?: string;
- login_source?: string;
- gift_code_sku_id?: string;
-}
diff --git a/src/schemas/MemberChangeProfileSchema.ts b/src/schemas/MemberChangeProfileSchema.ts
deleted file mode 100644
index d2d1481..0000000
--- a/src/schemas/MemberChangeProfileSchema.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface MemberChangeProfileSchema {
- banner?: string | null;
- nick?: string;
- bio?: string;
- pronouns?: string;
- /**
- * @items.type integer
- */
- theme_colors?: [number, number];
-}
diff --git a/src/schemas/MemberChangeSchema.ts b/src/schemas/MemberChangeSchema.ts
deleted file mode 100644
index e1ee096..0000000
--- a/src/schemas/MemberChangeSchema.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface MemberChangeSchema {
- roles?: string[];
- nick?: string;
- avatar?: string | null;
- bio?: string;
-}
diff --git a/src/schemas/MemberNickChangeSchema.ts b/src/schemas/MemberNickChangeSchema.ts
deleted file mode 100644
index 4589056..0000000
--- a/src/schemas/MemberNickChangeSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface MemberNickChangeSchema {
- nick: string;
-}
diff --git a/src/schemas/MessageAcknowledgeSchema.ts b/src/schemas/MessageAcknowledgeSchema.ts
deleted file mode 100644
index 3ba7164..0000000
--- a/src/schemas/MessageAcknowledgeSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface MessageAcknowledgeSchema {
- manual?: boolean;
- mention_count?: number;
- flags?: number;
- last_viewed?: number;
- token?: string;
-}
diff --git a/src/schemas/MessageCreateSchema.ts b/src/schemas/MessageCreateSchema.ts
deleted file mode 100644
index f5037d6..0000000
--- a/src/schemas/MessageCreateSchema.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { ActionRowComponent, Embed, PollAnswer, PollMedia } from "@spacebar/util";
-
-export type MessageCreateAttachment = {
- id: string;
- filename: string;
-};
-
-export type MessageCreateCloudAttachment = {
- id?: string;
- filename: string;
- uploaded_filename: string;
- original_content_type?: string;
-}
-
-export interface MessageCreateSchema {
- type?: number;
- content?: string;
- mobile_network_type?: string;
- nonce?: string;
- channel_id?: string;
- tts?: boolean;
- flags?: number;
- embeds?: Embed[];
- embed?: Embed;
- // TODO: ^ embed is deprecated in favor of embeds (https://discord.com/developers/docs/resources/channel#message-object)
- allowed_mentions?: {
- parse?: string[];
- roles?: string[];
- users?: string[];
- replied_user?: boolean;
- };
- message_reference?: {
- message_id: string;
- channel_id?: string;
- guild_id?: string;
- fail_if_not_exists?: boolean;
- };
- payload_json?: string;
- file?: { filename: string };
- /**
- TODO: we should create an interface for attachments
- TODO: OpenWAAO<-->attachment-style metadata conversion
- **/
- attachments?: (MessageCreateAttachment | MessageCreateCloudAttachment)[];
- sticker_ids?: string[] | null; // null check: fixes Discord-Go
- components?: ActionRowComponent[] | null; // null check: fixes Discord-Go
- // TODO: Fix TypeScript errors in src\api\util\handlers\Message.ts once this is enabled
- poll?: PollCreationSchema;
- enforce_nonce?: boolean; // For Discord compatibility, it's the default behavior here
- applied_tags?: string[]; // Not implemented yet, for webhooks in forums
- thread_name?: string; // Not implemented yet, for webhooks
- avatar_url?: string; // Not implemented yet, for webhooks
-}
-
-// TypeScript complains once this is used above
-export interface PollCreationSchema {
- question: PollMedia;
- answers: PollAnswer[];
- duration?: number;
- allow_multiselect?: boolean;
- layout_type?: number;
-}
diff --git a/src/schemas/MessageEditSchema.ts b/src/schemas/MessageEditSchema.ts
deleted file mode 100644
index 002e5af..0000000
--- a/src/schemas/MessageEditSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { MessageCreateSchema } from "./MessageCreateSchema";
-
-export type MessageEditSchema = Omit;
diff --git a/src/schemas/MfaCodesSchema.ts b/src/schemas/MfaCodesSchema.ts
deleted file mode 100644
index 1f66f08..0000000
--- a/src/schemas/MfaCodesSchema.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface MfaCodesSchema {
- /**
- * @minLength 1
- * @maxLength 72
- */
- password: string;
- regenerate?: boolean;
-}
diff --git a/src/schemas/ModifyGuildStickerSchema.ts b/src/schemas/ModifyGuildStickerSchema.ts
deleted file mode 100644
index 95eb541..0000000
--- a/src/schemas/ModifyGuildStickerSchema.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface ModifyGuildStickerSchema {
- /**
- * @minLength 2
- * @maxLength 30
- */
- name: string;
- /**
- * @maxLength 100
- */
- description?: string;
- /**
- * @maxLength 200
- */
- tags: string;
-}
diff --git a/src/schemas/PasswordResetSchema.ts b/src/schemas/PasswordResetSchema.ts
deleted file mode 100644
index 15489a9..0000000
--- a/src/schemas/PasswordResetSchema.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface PasswordResetSchema {
- /**
- * @minLength 1
- * @maxLength 72
- */
- password: string;
- token: string;
-}
diff --git a/src/schemas/PreloadMessagesRequestSchema.ts b/src/schemas/PreloadMessagesRequestSchema.ts
deleted file mode 100644
index 7c5145b..0000000
--- a/src/schemas/PreloadMessagesRequestSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2025 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface PreloadMessagesRequestSchema {
- channels: string[];
-}
diff --git a/src/schemas/PruneSchema.ts b/src/schemas/PruneSchema.ts
deleted file mode 100644
index 88d2f6e..0000000
--- a/src/schemas/PruneSchema.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface PruneSchema {
- /**
- * @min 0
- */
- days: number;
-}
diff --git a/src/schemas/PurgeSchema.ts b/src/schemas/PurgeSchema.ts
deleted file mode 100644
index 2e88799..0000000
--- a/src/schemas/PurgeSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface PurgeSchema {
- before: string;
- after: string;
-}
diff --git a/src/schemas/RefreshUrlsRequestSchema.ts b/src/schemas/RefreshUrlsRequestSchema.ts
deleted file mode 100644
index 9c1df54..0000000
--- a/src/schemas/RefreshUrlsRequestSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface RefreshUrlsRequestSchema {
- attachment_urls: string[];
-}
diff --git a/src/schemas/RegisterSchema.ts b/src/schemas/RegisterSchema.ts
deleted file mode 100644
index cfee0f0..0000000
--- a/src/schemas/RegisterSchema.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface RegisterSchema {
- /**
- * @minLength 2
- */
- username: string;
- /**
- * @minLength 1
- * @maxLength 72
- */
- password?: string;
- consent: boolean;
- /**
- * @TJS-format email
- */
- email?: string;
- fingerprint?: string;
- invite?: string;
- /**
- * @TJS-type string
- */
- date_of_birth?: Date; // "2000-04-03"
- gift_code_sku_id?: string;
- captcha_key?: string;
-
- promotional_email_opt_in?: boolean;
-
- // part of pomelo
- unique_username_registration?: boolean;
- global_name?: string;
-}
diff --git a/src/schemas/RelationshipPostSchema.ts b/src/schemas/RelationshipPostSchema.ts
deleted file mode 100644
index 066ecfd..0000000
--- a/src/schemas/RelationshipPostSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface RelationshipPostSchema {
- discriminator: string;
- username: string;
-}
diff --git a/src/schemas/RelationshipPutSchema.ts b/src/schemas/RelationshipPutSchema.ts
deleted file mode 100644
index 36d9877..0000000
--- a/src/schemas/RelationshipPutSchema.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { RelationshipType } from "@spacebar/util";
-
-export interface RelationshipPutSchema {
- type?: RelationshipType;
-}
diff --git a/src/schemas/RequestGuildMembersSchema.ts b/src/schemas/RequestGuildMembersSchema.ts
deleted file mode 100644
index 9e60d26..0000000
--- a/src/schemas/RequestGuildMembersSchema.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface RequestGuildMembersSchema {
- guild_id: string | [string];
- query?: string;
- limit?: number;
- presences?: boolean;
- user_ids?: string | string[];
- nonce?: string;
-}
-
-export const RequestGuildMembersSchema = {
- guild_id: "" as string | string[],
- $query: String,
- $limit: Number,
- $presences: Boolean,
- $user_ids: [] as string | string[],
- $nonce: String,
-};
diff --git a/src/schemas/RoleModifySchema.ts b/src/schemas/RoleModifySchema.ts
deleted file mode 100644
index a6d1893..0000000
--- a/src/schemas/RoleModifySchema.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface RoleModifySchema {
- name?: string;
- permissions?: string;
- color?: number;
- hoist?: boolean; // whether the role should be displayed separately in the sidebar
- mentionable?: boolean; // whether the role should be mentionable
- position?: number;
- icon?: string;
- unicode_emoji?: string;
- colors?: {
- primary_color: number;
- secondary_color: number | null | undefined; // only used for "holographic" and "gradient" styles
- tertiary_color?: number | null | undefined; // only used for "holographic" style
- } | undefined;
-}
diff --git a/src/schemas/RolePositionUpdateSchema.ts b/src/schemas/RolePositionUpdateSchema.ts
deleted file mode 100644
index 6bfd7f3..0000000
--- a/src/schemas/RolePositionUpdateSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export type RolePositionUpdateSchema = {
- id: string;
- position: number;
-}[];
diff --git a/src/schemas/SelectProtocolSchema.ts b/src/schemas/SelectProtocolSchema.ts
deleted file mode 100644
index d04adf7..0000000
--- a/src/schemas/SelectProtocolSchema.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface SelectProtocolSchema {
- protocol: "webrtc" | "udp";
- data:
- | string
- | {
- address: string;
- port: number;
- mode: string;
- };
- sdp?: string;
- codecs?: {
- name: "opus" | "VP8" | "VP9" | "H264";
- type: "audio" | "video";
- priority: number;
- payload_type: number;
- rtx_payload_type?: number;
- }[];
- rtc_connection_id?: string; // uuid
-}
diff --git a/src/schemas/SettingsProtoUpdateSchema.ts b/src/schemas/SettingsProtoUpdateSchema.ts
deleted file mode 100644
index 2b930bc..0000000
--- a/src/schemas/SettingsProtoUpdateSchema.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2025 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { JsonValue } from "@protobuf-ts/runtime";
-
-export interface SettingsProtoUpdateSchema {
- settings: string;
- required_data_version?: number;
-}
-
-export interface SettingsProtoUpdateJsonSchema {
- settings: JsonValue;
- required_data_version?: number;
-}
-
-// TODO: these dont work with schema validation
-// typed JSON schemas:
-// export interface SettingsProtoUpdatePreloadedUserSettingsSchema {
-// settings: PreloadedUserSettings;
-// required_data_version?: number;
-// }
-//
-// export interface SettingsProtoUpdateFrecencyUserSettingsSchema {
-// settings: FrecencyUserSettings;
-// required_data_version?: number;
-// }
-
-// TODO: what is this?
-// export interface SettingsProtoUpdateTestSettingsSchema {
-// settings: {};
-// required_data_version?: number;
-// }
\ No newline at end of file
diff --git a/src/schemas/StreamCreateSchema.ts b/src/schemas/StreamCreateSchema.ts
deleted file mode 100644
index bb65079..0000000
--- a/src/schemas/StreamCreateSchema.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export interface StreamCreateSchema {
- type: "guild" | "call";
- channel_id: string;
- guild_id?: string;
- preferred_region?: string;
-}
-
-export const StreamCreateSchema = {
- type: String,
- channel_id: String,
- $guild_id: String,
- $preferred_region: String,
-};
diff --git a/src/schemas/StreamDeleteSchema.ts b/src/schemas/StreamDeleteSchema.ts
deleted file mode 100644
index 0e2aff7..0000000
--- a/src/schemas/StreamDeleteSchema.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export interface StreamDeleteSchema {
- stream_key: string;
-}
-
-export const StreamDeleteSchema = {
- stream_key: String,
-};
diff --git a/src/schemas/StreamWatchSchema.ts b/src/schemas/StreamWatchSchema.ts
deleted file mode 100644
index 263bb11..0000000
--- a/src/schemas/StreamWatchSchema.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export interface StreamWatchSchema {
- stream_key: string;
-}
-
-export const StreamWatchSchema = {
- stream_key: String,
-};
diff --git a/src/schemas/TeamCreateSchema.ts b/src/schemas/TeamCreateSchema.ts
deleted file mode 100644
index 5903a53..0000000
--- a/src/schemas/TeamCreateSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface TeamCreateSchema {
- name: string;
-}
diff --git a/src/schemas/TemplateCreateSchema.ts b/src/schemas/TemplateCreateSchema.ts
deleted file mode 100644
index 9e562c9..0000000
--- a/src/schemas/TemplateCreateSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface TemplateCreateSchema {
- name: string;
- description?: string;
-}
diff --git a/src/schemas/TemplateModifySchema.ts b/src/schemas/TemplateModifySchema.ts
deleted file mode 100644
index 49b0237..0000000
--- a/src/schemas/TemplateModifySchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface TemplateModifySchema {
- name: string;
- description?: string;
-}
diff --git a/src/schemas/TotpDisableSchema.ts b/src/schemas/TotpDisableSchema.ts
deleted file mode 100644
index 29706f4..0000000
--- a/src/schemas/TotpDisableSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface TotpDisableSchema {
- /**
- * @minLength 6
- * @maxLength 6
- */
- code: string;
-}
diff --git a/src/schemas/TotpEnableSchema.ts b/src/schemas/TotpEnableSchema.ts
deleted file mode 100644
index a80e06a..0000000
--- a/src/schemas/TotpEnableSchema.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface TotpEnableSchema {
- /**
- * @minLength 1
- * @maxLength 72
- */
- password: string;
- /**
- * @minLength 6
- * @maxLength 6
- */
- code?: string;
- secret?: string;
-}
diff --git a/src/schemas/TotpSchema.ts b/src/schemas/TotpSchema.ts
deleted file mode 100644
index 657b7e7..0000000
--- a/src/schemas/TotpSchema.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface TotpSchema {
- code: string;
- ticket: string;
- gift_code_sku_id?: string | null;
- login_source?: string | null;
-}
diff --git a/src/schemas/UploadAttachmentRequestSchema.ts b/src/schemas/UploadAttachmentRequestSchema.ts
deleted file mode 100644
index 60bf89f..0000000
--- a/src/schemas/UploadAttachmentRequestSchema.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2024 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-
-export interface UploadAttachmentRequestSchema {
- files: UploadAttachmentRequest[];
-}
-
-export interface UploadAttachmentRequest {
- id?: string;
- filename: string;
- file_size: number;
- is_clip?: boolean;
- original_content_type?: string;
-}
diff --git a/src/schemas/UserDeleteSchema.ts b/src/schemas/UserDeleteSchema.ts
deleted file mode 100644
index 40fb778..0000000
--- a/src/schemas/UserDeleteSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface UserDeleteSchema {
- user_id: string;
-}
diff --git a/src/schemas/UserGuildSettingsSchema.ts b/src/schemas/UserGuildSettingsSchema.ts
deleted file mode 100644
index 82edae9..0000000
--- a/src/schemas/UserGuildSettingsSchema.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { ChannelOverride, UserGuildSettings } from "@spacebar/util";
-
-// This sucks. I would use a DeepPartial, my own or typeorms, but they both generate inncorect schema
-export interface UserGuildSettingsSchema
- extends Partial> {
- channel_overrides?: {
- [channel_id: string]: ChannelOverride;
- };
-}
diff --git a/src/schemas/UserModifySchema.ts b/src/schemas/UserModifySchema.ts
deleted file mode 100644
index 6d2998e..0000000
--- a/src/schemas/UserModifySchema.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface UserModifySchema {
- /**
- * @minLength 2
- */
- username?: string;
- avatar?: string | null;
- bio?: string;
- accent_color?: number;
- banner?: string | null;
- /**
- * @minLength 1
- * @maxLength 72
- */
- password?: string;
- /**
- * @minLength 1
- * @maxLength 72
- */
- new_password?: string;
- /**
- * @minLength 6
- * @maxLength 6
- */
- code?: string;
- /**
- * @TJS-format email
- */
- email?: string;
- /**
- * @minLength 4
- * @maxLength 4
- */
- discriminator?: string;
-}
diff --git a/src/schemas/UserNoteUpdateSchema.ts b/src/schemas/UserNoteUpdateSchema.ts
deleted file mode 100644
index 0a73127..0000000
--- a/src/schemas/UserNoteUpdateSchema.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export interface UserNoteUpdateSchema {
- note: string;
-}
diff --git a/src/schemas/UserProfileModifySchema.ts b/src/schemas/UserProfileModifySchema.ts
deleted file mode 100644
index 3dea257..0000000
--- a/src/schemas/UserProfileModifySchema.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface UserProfileModifySchema {
- bio?: string;
- accent_color?: number | null;
- banner?: string | null;
- pronouns?: string;
- /**
- * @items.type integer
- */
- theme_colors?: [number, number];
-}
diff --git a/src/schemas/UserSettingsSchema.ts b/src/schemas/UserSettingsSchema.ts
deleted file mode 100644
index 0d23e75..0000000
--- a/src/schemas/UserSettingsSchema.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { UserSettings } from "@spacebar/util";
-
-export type UserSettingsSchema = Omit, "index">;
diff --git a/src/schemas/VanityUrlSchema.ts b/src/schemas/VanityUrlSchema.ts
deleted file mode 100644
index 12d5abd..0000000
--- a/src/schemas/VanityUrlSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface VanityUrlSchema {
- /**
- * @minLength 1
- * @maxLength 20
- */
- code?: string;
-}
diff --git a/src/schemas/VerifyEmailSchema.ts b/src/schemas/VerifyEmailSchema.ts
deleted file mode 100644
index ce297c5..0000000
--- a/src/schemas/VerifyEmailSchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface VerifyEmailSchema {
- captcha_key?: string | null;
- token: string;
-}
diff --git a/src/schemas/VoiceIdentifySchema.ts b/src/schemas/VoiceIdentifySchema.ts
deleted file mode 100644
index 82f846c..0000000
--- a/src/schemas/VoiceIdentifySchema.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface VoiceIdentifySchema {
- server_id: string;
- user_id: string;
- session_id: string;
- token: string;
- video?: boolean;
- streams?: {
- type: "video" | "audio" | "screen";
- rid: string;
- quality: number;
- }[];
- max_secure_frames_version?: number;
-}
diff --git a/src/schemas/VoiceStateUpdateSchema.ts b/src/schemas/VoiceStateUpdateSchema.ts
deleted file mode 100644
index fda073e..0000000
--- a/src/schemas/VoiceStateUpdateSchema.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-//TODO need more testing when community guild and voice stage channel are working
-export interface VoiceStateUpdateSchema {
- guild_id?: string;
- channel_id?: string;
- self_mute: boolean;
- self_deaf: boolean;
- self_video?: boolean;
- preferred_region?: string;
- request_to_speak_timestamp?: Date;
- suppress?: boolean;
- flags?: number;
-}
-
-export const VoiceStateUpdateSchema = {
- $guild_id: String,
- $channel_id: String,
- self_mute: Boolean,
- self_deaf: Boolean,
- $self_video: Boolean, //required in docs but bots don't always send it
- $preferred_region: String,
- $request_to_speak_timestamp: Date,
- $suppress: Boolean,
- $flags: Number,
-};
diff --git a/src/schemas/VoiceVideoSchema.ts b/src/schemas/VoiceVideoSchema.ts
deleted file mode 100644
index c621431..0000000
--- a/src/schemas/VoiceVideoSchema.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface VoiceVideoSchema {
- audio_ssrc: number;
- video_ssrc: number;
- rtx_ssrc?: number;
- user_id?: string;
- streams?: {
- type: "video" | "audio" | "screen";
- rid: string;
- ssrc: number;
- active: boolean;
- quality: number;
- rtx_ssrc: number;
- max_bitrate: number;
- max_framerate: number;
- max_resolution: { type: string; width: number; height: number };
- }[];
-}
diff --git a/src/schemas/WebAuthnSchema.ts b/src/schemas/WebAuthnSchema.ts
deleted file mode 100644
index 3f5e0da..0000000
--- a/src/schemas/WebAuthnSchema.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-// FIXME: better naming
-export interface GenerateWebAuthnCredentialsSchema {
- password: string;
-}
-
-// FIXME: better naming
-export interface CreateWebAuthnCredentialSchema {
- credential: string;
- name: string;
- ticket: string;
-}
-
-export type WebAuthnPostSchema =
- | GenerateWebAuthnCredentialsSchema
- | CreateWebAuthnCredentialSchema;
-
-export interface WebAuthnTotpSchema {
- code: string;
- ticket: string;
-}
diff --git a/src/schemas/WebhookCreateSchema.ts b/src/schemas/WebhookCreateSchema.ts
deleted file mode 100644
index 7bd0afa..0000000
--- a/src/schemas/WebhookCreateSchema.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface WebhookCreateSchema {
- /**
- * @maxLength 80
- */
- name: string;
- avatar?: string;
-}
diff --git a/src/schemas/WebhookExecuteSchema.ts b/src/schemas/WebhookExecuteSchema.ts
deleted file mode 100644
index b50a4cf..0000000
--- a/src/schemas/WebhookExecuteSchema.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-import { Embed } from "../util/entities";
-import {
- MessageCreateAttachment,
- PollCreationSchema,
-} from "./MessageCreateSchema";
-
-export interface WebhookExecuteSchema {
- content?: string;
- username?: string;
- avatar_url?: string;
- tts?: boolean;
- embeds?: Embed[];
- allowed_mentions?: {
- parse?: string[];
- roles?: string[];
- users?: string[];
- replied_user?: boolean;
- };
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- components?: any[];
- file?: { filename: string };
- payload_json?: string;
- /**
- TODO: we should create an interface for attachments
- TODO: OpenWAAO<-->attachment-style metadata conversion
- **/
- attachments?: MessageCreateAttachment[];
- flags?: number;
- thread_name?: string;
- applied_tags?: string[];
- message_reference?: {
- message_id: string;
- channel_id?: string;
- guild_id?: string;
- fail_if_not_exists?: boolean;
- };
- sticker_ids?: string[];
- nonce?: string;
- enforce_nonce?: boolean; // For Discord compatibility, it's the default behavior here
- poll?: PollCreationSchema;
-}
diff --git a/src/schemas/WebhookUpdateSchema.ts b/src/schemas/WebhookUpdateSchema.ts
deleted file mode 100755
index bc276e4..0000000
--- a/src/schemas/WebhookUpdateSchema.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface WebhookUpdateSchema {
- name?: string;
- avatar?: string;
- channel_id?: string;
-}
diff --git a/src/schemas/WidgetModifySchema.ts b/src/schemas/WidgetModifySchema.ts
deleted file mode 100644
index 50794d6..0000000
--- a/src/schemas/WidgetModifySchema.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
- Copyright (C) 2023 Spacebar and Spacebar Contributors
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-*/
-
-export interface WidgetModifySchema {
- enabled: boolean; // whether the widget is enabled
- channel_id: string; // the widget channel id
-}
diff --git a/src/schemas/api/developers/ApplicationCreateSchema.ts b/src/schemas/api/developers/ApplicationCreateSchema.ts
new file mode 100644
index 0000000..80956ec
--- /dev/null
+++ b/src/schemas/api/developers/ApplicationCreateSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface ApplicationCreateSchema {
+ name: string;
+ team_id?: string;
+}
diff --git a/src/schemas/api/developers/ApplicationModifySchema.ts b/src/schemas/api/developers/ApplicationModifySchema.ts
new file mode 100644
index 0000000..a871797
--- /dev/null
+++ b/src/schemas/api/developers/ApplicationModifySchema.ts
@@ -0,0 +1,39 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface ApplicationModifySchema {
+ description?: string;
+ icon?: string;
+ cover_image?: string;
+ interactions_endpoint_url?: string;
+ max_participants?: number | null;
+ name?: string;
+ privacy_policy_url?: string;
+ role_connections_verification_url?: string;
+ tags?: string[];
+ terms_of_service_url?: string;
+ bot_public?: boolean;
+ bot_require_code_grant?: boolean;
+ flags?: number;
+ custom_install_url?: string;
+ guild_id?: string;
+ /*install_params?: { TODO: Validation
+ scopes: string[];
+ permissions: string;
+ };*/
+}
diff --git a/src/schemas/api/developers/index.ts b/src/schemas/api/developers/index.ts
new file mode 100644
index 0000000..10717b7
--- /dev/null
+++ b/src/schemas/api/developers/index.ts
@@ -0,0 +1,19 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+export * from "./ApplicationCreateSchema";
+export * from "./ApplicationModifySchema";
diff --git a/src/schemas/api/index.ts b/src/schemas/api/index.ts
new file mode 100644
index 0000000..8e7520d
--- /dev/null
+++ b/src/schemas/api/index.ts
@@ -0,0 +1,20 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+export * from "./developers";
+export * from "./messages";
+export * from "./users";
diff --git a/src/schemas/api/messages/Components.ts b/src/schemas/api/messages/Components.ts
new file mode 100644
index 0000000..1415dea
--- /dev/null
+++ b/src/schemas/api/messages/Components.ts
@@ -0,0 +1,116 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { PartialEmoji } from "@spacebar/schemas";
+
+export interface MessageComponent {
+ type: MessageComponentType;
+}
+
+export interface ActionRowComponent extends MessageComponent {
+ type: MessageComponentType.ActionRow;
+ components: (
+ | ButtonComponent
+ | StringSelectMenuComponent
+ | SelectMenuComponent
+ | TextInputComponent
+ )[];
+}
+
+export interface ButtonComponent extends MessageComponent {
+ type: MessageComponentType.Button;
+ style: ButtonStyle;
+ label?: string;
+ emoji?: PartialEmoji;
+ custom_id?: string;
+ sku_id?: string;
+ url?: string;
+ disabled?: boolean;
+}
+
+export enum ButtonStyle {
+ Primary = 1,
+ Secondary = 2,
+ Success = 3,
+ Danger = 4,
+ Link = 5,
+ Premium = 6,
+}
+
+export interface SelectMenuComponent extends MessageComponent {
+ type:
+ | MessageComponentType.StringSelect
+ | MessageComponentType.UserSelect
+ | MessageComponentType.RoleSelect
+ | MessageComponentType.MentionableSelect
+ | MessageComponentType.ChannelSelect;
+ custom_id: string;
+ channel_types?: number[];
+ placeholder?: string;
+ default_values?: SelectMenuDefaultOption[]; // only for non-string selects
+ min_values?: number;
+ max_values?: number;
+ disabled?: boolean;
+}
+
+export interface SelectMenuOption {
+ label: string;
+ value: string;
+ description?: string;
+ emoji?: PartialEmoji;
+ default?: boolean;
+}
+
+export interface SelectMenuDefaultOption {
+ id: string;
+ type: "user" | "role" | "channel";
+}
+
+export interface StringSelectMenuComponent extends SelectMenuComponent {
+ type: MessageComponentType.StringSelect;
+ options: SelectMenuOption[];
+}
+
+export interface TextInputComponent extends MessageComponent {
+ type: MessageComponentType.TextInput;
+ custom_id: string;
+ style: TextInputStyle;
+ label: string;
+ min_length?: number;
+ max_length?: number;
+ required?: boolean;
+ value?: string;
+ placeholder?: string;
+}
+
+export enum TextInputStyle {
+ Short = 1,
+ Paragraph = 2,
+}
+
+export enum MessageComponentType {
+ Script = 0, // self command script
+ ActionRow = 1,
+ Button = 2,
+ StringSelect = 3,
+ TextInput = 4,
+ UserSelect = 5,
+ RoleSelect = 6,
+ MentionableSelect = 7,
+ ChannelSelect = 8,
+}
\ No newline at end of file
diff --git a/src/schemas/api/messages/Embeds.ts b/src/schemas/api/messages/Embeds.ts
new file mode 100644
index 0000000..e97020b
--- /dev/null
+++ b/src/schemas/api/messages/Embeds.ts
@@ -0,0 +1,65 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface Embed {
+ title?: string; //title of embed
+ type?: EmbedType; // type of embed (always "rich" for webhook embeds)
+ description?: string; // description of embed
+ url?: string; // url of embed
+ timestamp?: Date; // timestamp of embed content
+ color?: number; // color code of the embed
+ footer?: {
+ text: string;
+ icon_url?: string;
+ proxy_icon_url?: string;
+ }; // footer object footer information
+ image?: EmbedImage; // image object image information
+ thumbnail?: EmbedImage; // thumbnail object thumbnail information
+ video?: EmbedImage; // video object video information
+ provider?: {
+ name?: string;
+ url?: string;
+ }; // provider object provider information
+ author?: {
+ name?: string;
+ url?: string;
+ icon_url?: string;
+ proxy_icon_url?: string;
+ }; // author object author information
+ fields?: {
+ name: string;
+ value: string;
+ inline?: boolean;
+ }[];
+}
+
+export enum EmbedType {
+ rich = "rich",
+ image = "image",
+ video = "video",
+ gifv = "gifv",
+ article = "article",
+ link = "link",
+}
+
+export interface EmbedImage {
+ url?: string;
+ proxy_url?: string;
+ height?: number;
+ width?: number;
+}
diff --git a/src/schemas/api/messages/Message.ts b/src/schemas/api/messages/Message.ts
new file mode 100644
index 0000000..64fbd27
--- /dev/null
+++ b/src/schemas/api/messages/Message.ts
@@ -0,0 +1,97 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { PartialUser } from "@spacebar/schemas";
+
+export enum MessageType {
+ DEFAULT = 0,
+ RECIPIENT_ADD = 1,
+ RECIPIENT_REMOVE = 2,
+ CALL = 3,
+ CHANNEL_NAME_CHANGE = 4,
+ CHANNEL_ICON_CHANGE = 5,
+ CHANNEL_PINNED_MESSAGE = 6,
+ GUILD_MEMBER_JOIN = 7,
+ USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
+ USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
+ CHANNEL_FOLLOW_ADD = 12,
+ ACTION = 13, // /me messages
+ GUILD_DISCOVERY_DISQUALIFIED = 14,
+ GUILD_DISCOVERY_REQUALIFIED = 15,
+ ENCRYPTED = 16,
+ REPLY = 19,
+ APPLICATION_COMMAND = 20, // application command or self command invocation
+ ROUTE_ADDED = 41, // custom message routing: new route affecting that channel
+ ROUTE_DISABLED = 42, // custom message routing: given route no longer affecting that channel
+ SELF_COMMAND_SCRIPT = 43, // self command scripts
+ ENCRYPTION = 50,
+ CUSTOM_START = 63,
+ UNHANDLED = 255,
+}
+
+
+/**
+ * https://docs.discord.food/resources/message#partial-message-structure
+ */
+/*
+export type PartialMessage = Pick
+ // & Pick
+ & Pick
+ & Pick
+ & Pick
+ & Pick
+ & Pick
+ & Pick
+ & { channel?: Channel }
+// & Pick // TODO: ephemeral DM channels
+ ;
+ */
+
+export interface PartialMessage {
+ id: string;
+ channel_id: string;
+ type: MessageType;
+ content: string;
+ author: PartialUser;
+ flags?: number;
+ application_id?: string;
+ // channel?: Channel; // TODO: ephemeral DM channels
+ // recipient_id?: string; // TODO: ephemeral DM channels
+}
+
+export interface Reaction {
+ count: number;
+ //// not saved in the database // me: boolean; // whether the current user reacted using this emoji
+ emoji: PartialEmoji;
+ user_ids: string[];
+}
+
+export interface PartialEmoji {
+ id?: string;
+ name: string;
+ animated?: boolean;
+}
+
+export interface AllowedMentions {
+ parse?: ("users" | "roles" | "everyone")[];
+ roles?: string[];
+ users?: string[];
+ replied_user?: boolean;
+}
diff --git a/src/schemas/api/messages/Polls.ts b/src/schemas/api/messages/Polls.ts
new file mode 100644
index 0000000..c75717d
--- /dev/null
+++ b/src/schemas/api/messages/Polls.ts
@@ -0,0 +1,48 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { PartialEmoji } from "@spacebar/schemas"
+
+export interface Poll {
+ question: PollMedia;
+ answers: PollAnswer[];
+ expiry: Date;
+ allow_multiselect: boolean;
+ results?: PollResult;
+}
+
+export interface PollMedia {
+ text?: string;
+ emoji?: PartialEmoji;
+}
+
+export interface PollAnswer {
+ answer_id?: string;
+ poll_media: PollMedia;
+}
+
+export interface PollResult {
+ is_finalized: boolean;
+ answer_counts: PollAnswerCount[];
+}
+
+export interface PollAnswerCount {
+ id: string;
+ count: number;
+ me_voted: boolean;
+}
diff --git a/src/schemas/api/messages/index.ts b/src/schemas/api/messages/index.ts
new file mode 100644
index 0000000..95a8a65
--- /dev/null
+++ b/src/schemas/api/messages/index.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+export * from "./Components";
+export * from "./Embeds";
+export * from "./Message";
+export * from "./Polls";
diff --git a/src/schemas/api/users/User.ts b/src/schemas/api/users/User.ts
new file mode 100644
index 0000000..8915065
--- /dev/null
+++ b/src/schemas/api/users/User.ts
@@ -0,0 +1,68 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { Snowflake } from "@spacebar/schemas";
+
+export interface PartialUser {
+ id: Snowflake;
+ username: string;
+ discriminator: string;
+ global_name?: string | null;
+ avatar: string | null;
+ avatar_decoration_data?: AvatarDecorationData | null;
+ collectibles?: Collectibles | null;
+ display_name_styles?: DisplayNameStyle | null;
+ primary_guild?: PrimaryGuild | null;
+ bot?: boolean;
+ system?: boolean;
+ banner?: string | null;
+ accent_color?: number | null;
+ public_flags?: number;
+}
+
+export interface AvatarDecorationData {
+ asset: string;
+ sku_id: Snowflake;
+ expires_at: string | null;
+}
+
+export interface Collectibles {
+ nameplate: NameplateData | null;
+}
+
+export interface NameplateData {
+ asset: string;
+ sku_id: Snowflake;
+ label: string;
+ palette: string;
+ expires_at: number | null;
+}
+
+export interface DisplayNameStyle {
+ font_id: number;
+ effect_id: number;
+ colors: number;
+}
+
+export interface PrimaryGuild {
+ identity_enabled: boolean | null;
+ identity_guild_id: Snowflake | null;
+ tag: string | null;
+ badge: string | null;
+}
+
diff --git a/src/schemas/api/users/index.ts b/src/schemas/api/users/index.ts
new file mode 100644
index 0000000..44fa1c5
--- /dev/null
+++ b/src/schemas/api/users/index.ts
@@ -0,0 +1,18 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+export * from "./User";
diff --git a/src/schemas/gateway/GatewayPayloadSchema.ts b/src/schemas/gateway/GatewayPayloadSchema.ts
new file mode 100644
index 0000000..306f2c0
--- /dev/null
+++ b/src/schemas/gateway/GatewayPayloadSchema.ts
@@ -0,0 +1,26 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { Tuple } from "lambert-server";
+
+export const PayloadSchema = {
+ op: Number,
+ $d: new Tuple(Object, Number), // or number for heartbeat sequence
+ $s: Number,
+ $t: String,
+};
diff --git a/src/schemas/gateway/IdentifySchema.ts b/src/schemas/gateway/IdentifySchema.ts
new file mode 100644
index 0000000..7d0eeda
--- /dev/null
+++ b/src/schemas/gateway/IdentifySchema.ts
@@ -0,0 +1,144 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+// TODO: Need a way to allow camalCase and pascal_case without just duplicating the schema
+
+import { ActivitySchema } from "@spacebar/schemas"
+
+export const IdentifySchema = {
+ token: String,
+ $intents: BigInt, // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt
+ $properties: Object,
+ // {
+ // // discord uses $ in the property key for bots, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key
+ // $os: String,
+ // $os_arch: String,
+ // $browser: String,
+ // $device: String,
+ // $$os: String,
+ // $$browser: String,
+ // $$device: String,
+ // $browser_user_agent: String,
+ // $browser_version: String,
+ // $os_version: String,
+ // $referrer: String,
+ // $$referrer: String,
+ // $referring_domain: String,
+ // $$referring_domain: String,
+ // $referrer_current: String,
+ // $referring_domain_current: String,
+ // $release_channel: String,
+ // $client_build_number: Number,
+ // $client_event_source: String,
+ // $client_version: String,
+ // $system_locale: String,
+ // $window_manager: String,
+ // $distro: String,
+ // },
+ $presence: ActivitySchema,
+ $compress: Boolean,
+ $large_threshold: Number,
+ $shard: [BigInt, BigInt],
+ $guild_subscriptions: Boolean,
+ $capabilities: Number,
+ $client_state: {
+ $guild_hashes: Object,
+ $highest_last_message_id: String || Number,
+ $read_state_version: Number,
+ $user_guild_settings_version: Number,
+ $user_settings_version: undefined,
+ $useruser_guild_settings_version: undefined,
+ $private_channels_version: Number,
+ $guild_versions: Object,
+ $api_code_version: Number,
+ $initial_guild_id: String,
+ },
+ $clientState: {
+ $guildHashes: Object,
+ $highestLastMessageId: String || Number,
+ $readStateVersion: Number,
+ $useruserGuildSettingsVersion: undefined,
+ $userGuildSettingsVersion: undefined,
+ $guildVersions: Object,
+ $apiCodeVersion: Number,
+ $initialGuildId: String,
+ },
+ $v: Number,
+ $version: Number,
+};
+
+export interface IdentifySchema {
+ token: string;
+ properties: {
+ // bruh discord really uses $ in the property key, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key
+ os?: string;
+ os_atch?: string;
+ browser?: string;
+ device?: string;
+ $os?: string;
+ $browser?: string;
+ $device?: string;
+ browser_user_agent?: string;
+ browser_version?: string;
+ os_version?: string;
+ referrer?: string;
+ referring_domain?: string;
+ referrer_current?: string;
+ referring_domain_current?: string;
+ release_channel?: "stable" | "dev" | "ptb" | "canary";
+ client_build_number?: number;
+ client_event_source?: string;
+ client_version?: string;
+ system_locale?: string;
+ };
+ intents?: bigint; // discord uses a Integer for bitfields we use bigints tho. | instanceOf will automatically convert the Number to a BigInt
+ presence?: ActivitySchema;
+ compress?: boolean;
+ large_threshold?: number;
+ largeThreshold?: number;
+ /**
+ * @minItems 2
+ * @maxItems 2
+ */
+ shard?: bigint[]; // puyo: changed from [bigint, bigint] because it breaks openapi
+ guild_subscriptions?: boolean;
+ capabilities?: number;
+ client_state?: {
+ guild_hashes?: unknown;
+ highest_last_message_id?: string | number;
+ read_state_version?: number;
+ user_guild_settings_version?: number;
+ user_settings_version?: number;
+ useruser_guild_settings_version?: number;
+ private_channels_version?: number;
+ guild_versions?: unknown;
+ api_code_version?: number;
+ initial_guild_id?: string;
+ };
+ clientState?: {
+ guildHashes?: unknown;
+ highestLastMessageId?: string | number;
+ readStateVersion?: number;
+ userGuildSettingsVersion?: number;
+ useruserGuildSettingsVersion?: number;
+ guildVersions?: unknown;
+ apiCodeVersion?: number;
+ initialGuildId?: string;
+ };
+ v?: number;
+}
diff --git a/src/schemas/gateway/LazyRequestSchema.ts b/src/schemas/gateway/LazyRequestSchema.ts
new file mode 100644
index 0000000..ca07d37
--- /dev/null
+++ b/src/schemas/gateway/LazyRequestSchema.ts
@@ -0,0 +1,46 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface LazyRequestSchema {
+ guild_id: string;
+ channels?: {
+ /**
+ * @items.type integer
+ * @minItems 2
+ * @maxItems 2
+ */
+ [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi
+ };
+ activities?: boolean;
+ threads?: boolean;
+ typing?: true;
+ members?: string[];
+ member_updates?: boolean;
+ thread_member_lists?: unknown[];
+}
+
+export const LazyRequestSchema = {
+ guild_id: String,
+ $activities: Boolean,
+ $channels: Object,
+ $typing: Boolean,
+ $threads: Boolean,
+ $members: [] as string[],
+ $member_updates: Boolean,
+ $thread_member_lists: [] as unknown[],
+};
diff --git a/src/schemas/gateway/StreamCreateSchema.ts b/src/schemas/gateway/StreamCreateSchema.ts
new file mode 100644
index 0000000..bb65079
--- /dev/null
+++ b/src/schemas/gateway/StreamCreateSchema.ts
@@ -0,0 +1,13 @@
+export interface StreamCreateSchema {
+ type: "guild" | "call";
+ channel_id: string;
+ guild_id?: string;
+ preferred_region?: string;
+}
+
+export const StreamCreateSchema = {
+ type: String,
+ channel_id: String,
+ $guild_id: String,
+ $preferred_region: String,
+};
diff --git a/src/schemas/gateway/StreamDeleteSchema.ts b/src/schemas/gateway/StreamDeleteSchema.ts
new file mode 100644
index 0000000..0e2aff7
--- /dev/null
+++ b/src/schemas/gateway/StreamDeleteSchema.ts
@@ -0,0 +1,7 @@
+export interface StreamDeleteSchema {
+ stream_key: string;
+}
+
+export const StreamDeleteSchema = {
+ stream_key: String,
+};
diff --git a/src/schemas/gateway/StreamWatchSchema.ts b/src/schemas/gateway/StreamWatchSchema.ts
new file mode 100644
index 0000000..263bb11
--- /dev/null
+++ b/src/schemas/gateway/StreamWatchSchema.ts
@@ -0,0 +1,7 @@
+export interface StreamWatchSchema {
+ stream_key: string;
+}
+
+export const StreamWatchSchema = {
+ stream_key: String,
+};
diff --git a/src/schemas/gateway/index.ts b/src/schemas/gateway/index.ts
new file mode 100644
index 0000000..bdd1c40
--- /dev/null
+++ b/src/schemas/gateway/index.ts
@@ -0,0 +1,23 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+export * from "./GatewayPayloadSchema";
+export * from "./IdentifySchema";
+export * from "./LazyRequestSchema";
+export * from "./StreamCreateSchema";
+export * from "./StreamDeleteSchema";
+export * from "./StreamWatchSchema";
diff --git a/src/schemas/index.ts b/src/schemas/index.ts
index 3971042..e6428d5 100644
--- a/src/schemas/index.ts
+++ b/src/schemas/index.ts
@@ -1,100 +1,24 @@
/*
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
Copyright (C) 2025 Spacebar and Spacebar Contributors
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-
-export * from "./AckBulkSchema";
-export * from "./ActivitySchema";
-export * from "./ApplicationAuthorizeSchema";
-export * from "./ApplicationCreateSchema";
-export * from "./ApplicationModifySchema";
-export * from "./AutomodRuleSchema";
-export * from "./BackupCodesChallengeSchema";
-export * from "./BanCreateSchema";
-export * from "./BanModeratorSchema";
-export * from "./BanRegistrySchema";
-export * from "./BotModifySchema";
-export * from "./ChannelModifySchema";
-export * from "./ChannelPermissionOverwriteSchema";
-export * from "./ChannelReorderSchema";
-export * from "./CodesVerificationSchema";
-export * from "./ConnectedAccountSchema";
-export * from "./ConnectionCallbackSchema";
-export * from "./ConnectionUpdateSchema";
-export * from "./DmChannelCreateSchema";
-export * from "./EmailDomainLookupSchema";
-export * from "./EmailDomainLookupVerifyCodeSchema";
-export * from "./EmojiCreateSchema";
-export * from "./EmojiModifySchema";
-export * from "./ForgotPasswordSchema";
-export * from "./GatewayPayloadSchema";
-export * from "./GreetRequestSchema";
-export * from "./GuildCreateSchema";
-export * from "./GuildSubscriptionsBulkSchema";
-export * from "./GuildTemplateCreateSchema";
-export * from "./GuildUpdateSchema";
-export * from "./GuildUpdateWelcomeScreenSchema";
-export * from "./HubWaitlistSignupSchema";
-export * from "./IdentifySchema";
-export * from "./InviteCreateSchema";
-export * from "./LazyRequestSchema";
-export * from "./LoginSchema";
-export * from "./MemberChangeProfileSchema";
-export * from "./MemberChangeSchema";
-export * from "./MessageAcknowledgeSchema";
-export * from "./MessageCreateSchema";
-export * from "./MessageEditSchema";
-export * from "./MfaCodesSchema";
-export * from "./ModifyGuildStickerSchema";
-export * from "./PreloadMessagesRequestSchema";
-export * from "./PasswordResetSchema";
-export * from "./PurgeSchema";
-export * from "./RefreshUrlsRequestSchema";
-export * from "./RegisterSchema";
-export * from "./RelationshipPostSchema";
-export * from "./RelationshipPutSchema";
-export * from "./RequestGuildMembersSchema";
+export * from "./api";
+export * from "./gateway";
export * from "./responses";
-export * from "./RoleModifySchema";
-export * from "./RolePositionUpdateSchema";
-export * from "./SelectProtocolSchema";
-export * from "./SettingsProtoUpdateSchema";
-export * from "./StreamCreateSchema";
-export * from "./StreamDeleteSchema";
-export * from "./StreamWatchSchema";
-export * from "./TeamCreateSchema";
-export * from "./TemplateCreateSchema";
-export * from "./TemplateModifySchema";
-export * from "./TotpDisableSchema";
-export * from "./TotpEnableSchema";
-export * from "./TotpSchema";
-export * from "./UploadAttachmentRequestSchema";
-export * from "./UserDeleteSchema";
-export * from "./UserGuildSettingsSchema";
-export * from "./UserModifySchema";
-export * from "./UserNoteUpdateSchema";
-export * from "./UserProfileModifySchema";
-export * from "./UserSettingsSchema";
+export * from "./uncategorised";
+export * from "./webrtc";
+export * from "./Identifiers";
export * from "./Validator";
-export * from "./VanityUrlSchema";
-export * from "./VoiceIdentifySchema";
-export * from "./VoiceStateUpdateSchema";
-export * from "./VoiceVideoSchema";
-export * from "./WebAuthnSchema";
-export * from "./WebhookCreateSchema";
-export * from "./WebhookExecuteSchema";
-export * from "./WebhookUpdateSchema";
-export * from "./WidgetModifySchema";
diff --git a/src/schemas/responses/DmMessagesResponseSchema.ts b/src/schemas/responses/DmMessagesResponseSchema.ts
index 8bce6e6..62347ef 100644
--- a/src/schemas/responses/DmMessagesResponseSchema.ts
+++ b/src/schemas/responses/DmMessagesResponseSchema.ts
@@ -16,6 +16,6 @@
along with this program. If not, see .
*/
-import { PartialMessage } from "@spacebar/util";
+import { PartialMessage } from "@spacebar/schemas"
export type DmMessagesResponseSchema = PartialMessage[];
diff --git a/src/schemas/responses/GuildCreateResponse.ts b/src/schemas/responses/GuildCreateResponse.ts
index 50f5f2f..79331d2 100644
--- a/src/schemas/responses/GuildCreateResponse.ts
+++ b/src/schemas/responses/GuildCreateResponse.ts
@@ -16,7 +16,8 @@
along with this program. If not, see .
*/
-import { GuildUpdateSchema, GuildWelcomeScreen } from "@spacebar/util";
+import { GuildWelcomeScreen } from "@spacebar/util";
+import { GuildUpdateSchema } from "@spacebar/schemas"
export interface GuildCreateResponse extends Omit {
id: string;
diff --git a/src/schemas/responses/GuildMessagesSearchResponse.ts b/src/schemas/responses/GuildMessagesSearchResponse.ts
index 376b684..d42683e 100644
--- a/src/schemas/responses/GuildMessagesSearchResponse.ts
+++ b/src/schemas/responses/GuildMessagesSearchResponse.ts
@@ -17,14 +17,11 @@
*/
import {
- ActionRowComponent,
Attachment,
- Embed,
- MessageType,
- Poll,
PublicUser,
Role,
} from "../../util/entities";
+import { ActionRowComponent, Embed, MessageType, Poll } from "@spacebar/schemas";
export interface GuildMessagesSearchMessage {
id: string;
diff --git a/src/schemas/responses/MemberJoinGuildResponse.ts b/src/schemas/responses/MemberJoinGuildResponse.ts
index 40002e1..1ef78ea 100644
--- a/src/schemas/responses/MemberJoinGuildResponse.ts
+++ b/src/schemas/responses/MemberJoinGuildResponse.ts
@@ -16,8 +16,8 @@
along with this program. If not, see .
*/
-import { GuildCreateResponse } from "@spacebar/util";
import { Emoji, Role, Sticker } from "../../util/entities";
+import { GuildCreateResponse } from "@spacebar/schemas"
export interface MemberJoinGuildResponse {
guild: GuildCreateResponse;
diff --git a/src/schemas/responses/TypedResponses.ts b/src/schemas/responses/TypedResponses.ts
index 86d0849..bfab225 100644
--- a/src/schemas/responses/TypedResponses.ts
+++ b/src/schemas/responses/TypedResponses.ts
@@ -16,7 +16,6 @@
along with this program. If not, see .
*/
-import { GuildBansResponse, GuildCreateResponse } from "@spacebar/util";
import { GeneralConfiguration, LimitsConfiguration } from "../../util/config";
import { DmChannelDTO } from "../../util/dtos";
import {
@@ -39,6 +38,7 @@
Webhook,
} from "../../util/entities";
import { GuildVoiceRegion } from "./GuildVoiceRegionsResponse";
+import { GuildBansResponse, GuildCreateResponse } from "@spacebar/schemas"
// removes internal properties from the guild class
export type APIGuild = Omit<
diff --git a/src/schemas/responses/UserRelationshipsResponse.ts b/src/schemas/responses/UserRelationshipsResponse.ts
index 1a3341f..5bfb8f8 100644
--- a/src/schemas/responses/UserRelationshipsResponse.ts
+++ b/src/schemas/responses/UserRelationshipsResponse.ts
@@ -15,7 +15,8 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-import { PublicUser, RelationshipType } from "../../util/entities";
+import { PublicUser } from "../../util/entities";
+import { RelationshipType } from "@spacebar/schemas"
export interface UserRelationshipsResponse {
id: string;
diff --git a/src/schemas/responses/index.ts b/src/schemas/responses/index.ts
index dcf49f3..3263c7e 100644
--- a/src/schemas/responses/index.ts
+++ b/src/schemas/responses/index.ts
@@ -1,24 +1,23 @@
/*
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
Copyright (C) 2025 Spacebar and Spacebar Contributors
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-
-export * from "./AccountStandingResponse";
export * from "./APIErrorOrCaptchaResponse";
export * from "./APIErrorResponse";
+export * from "./AccountStandingResponse";
export * from "./BackupCodesChallengeResponse";
export * from "./CaptchaRequiredResponse";
export * from "./CollectiblesCategoriesResponse";
@@ -62,7 +61,7 @@
export * from "./UploadAttachmentResponseSchema";
export * from "./UserNoteResponse";
export * from "./UserProfileResponse";
-export * from "./UserRelationshipsResponse";
export * from "./UserRelationsResponse";
+export * from "./UserRelationshipsResponse";
export * from "./WebAuthnCreateResponse";
export * from "./WebhookCreateResponse";
diff --git a/src/schemas/uncategorised/AckBulkSchema.ts b/src/schemas/uncategorised/AckBulkSchema.ts
new file mode 100644
index 0000000..5604c2f
--- /dev/null
+++ b/src/schemas/uncategorised/AckBulkSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface AckBulkSchema {
+ read_states: {
+ channel_id: string;
+ message_id: string;
+ read_state_type: number; // WHat is this?
+ }[];
+}
diff --git a/src/schemas/uncategorised/ActivitySchema.ts b/src/schemas/uncategorised/ActivitySchema.ts
new file mode 100644
index 0000000..f168f96
--- /dev/null
+++ b/src/schemas/uncategorised/ActivitySchema.ts
@@ -0,0 +1,80 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { Activity, Status } from "@spacebar/util";
+
+export const ActivitySchema = {
+ $afk: Boolean,
+ status: String,
+ $activities: [
+ {
+ name: String,
+ type: Number,
+ $url: String,
+ $created_at: Date,
+ $timestamps: {
+ $start: Number,
+ $end: Number,
+ },
+ $application_id: String,
+ $details: String,
+ $state: String,
+ $emoji: {
+ $name: String,
+ $id: String,
+ $animated: Boolean,
+ },
+ $party: {
+ $id: String,
+ $size: [Number, Number],
+ },
+ $assets: {
+ $large_image: String,
+ $large_text: String,
+ $small_image: String,
+ $small_text: String,
+ },
+ $secrets: {
+ $join: String,
+ $spectate: String,
+ $match: String,
+ },
+ $instance: Boolean,
+ $flags: String,
+
+ // Spotify and other rich presence data
+ $id: String,
+ $sync_id: String,
+ $metadata: {
+ // spotify
+ $context_uri: String,
+ album_id: String,
+ artist_ids: [String],
+ },
+ $session_id: String,
+ },
+ ],
+ $since: Number, // unix time (in milliseconds) of when the client went idle, or null if the client is not idle
+};
+
+export interface ActivitySchema {
+ afk?: boolean;
+ status: Status;
+ activities?: Activity[];
+ since?: number; // unix time (in milliseconds) of when the client went idle, or null if the client is not idle
+}
diff --git a/src/schemas/uncategorised/ApplicationAuthorizeSchema.ts b/src/schemas/uncategorised/ApplicationAuthorizeSchema.ts
new file mode 100644
index 0000000..04b7b1e
--- /dev/null
+++ b/src/schemas/uncategorised/ApplicationAuthorizeSchema.ts
@@ -0,0 +1,29 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface ApplicationAuthorizeSchema {
+ authorize: boolean;
+ guild_id: string;
+ permissions: string;
+ captcha_key?: string;
+ /**
+ * @minLength 6
+ * @maxLength 6
+ */
+ code?: string; // 2fa code
+}
diff --git a/src/schemas/uncategorised/AutomodRuleSchema.ts b/src/schemas/uncategorised/AutomodRuleSchema.ts
new file mode 100644
index 0000000..55cf202
--- /dev/null
+++ b/src/schemas/uncategorised/AutomodRuleSchema.ts
@@ -0,0 +1,56 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2024 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface AutomodMentionSpamRuleSchema {
+ mention_total_limit: number;
+ mention_raid_protection_enabled: boolean;
+}
+
+export interface AutomodSuspectedSpamRuleSchema {}
+
+export interface AutomodCommonlyFlaggedWordsRuleSchema {
+ allow_list: [string];
+ presets: [number];
+}
+
+export interface AutomodCustomWordsRuleSchema {
+ allow_list: [string];
+ keyword_filter: [string];
+ regex_patterns: [string];
+}
+
+export interface AutomodRuleSchema {
+ creator_id: string;
+ enabled: boolean;
+ event_type: number; // No idea...
+ exempt_channels: [string];
+ exempt_roles: [string];
+ guild_id: string;
+ name: string;
+ position: number;
+ trigger_type: number; //AutomodTriggerTypes
+ trigger_metadata:
+ | AutomodMentionSpamRuleSchema
+ | AutomodSuspectedSpamRuleSchema
+ | AutomodCommonlyFlaggedWordsRuleSchema
+ | AutomodCustomWordsRuleSchema;
+}
+
+export interface AutomodRuleSchemaWithId extends AutomodRuleSchema {
+ id: string;
+}
diff --git a/src/schemas/uncategorised/BackupCodesChallengeSchema.ts b/src/schemas/uncategorised/BackupCodesChallengeSchema.ts
new file mode 100644
index 0000000..25f1b70
--- /dev/null
+++ b/src/schemas/uncategorised/BackupCodesChallengeSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface BackupCodesChallengeSchema {
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ password: string;
+}
diff --git a/src/schemas/uncategorised/BanCreateSchema.ts b/src/schemas/uncategorised/BanCreateSchema.ts
new file mode 100644
index 0000000..6d30ca2
--- /dev/null
+++ b/src/schemas/uncategorised/BanCreateSchema.ts
@@ -0,0 +1,23 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface BanCreateSchema {
+ delete_message_seconds?: string;
+ delete_message_days?: string;
+ reason?: string;
+}
diff --git a/src/schemas/uncategorised/BanModeratorSchema.ts b/src/schemas/uncategorised/BanModeratorSchema.ts
new file mode 100644
index 0000000..cba1a5e
--- /dev/null
+++ b/src/schemas/uncategorised/BanModeratorSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface BanModeratorSchema {
+ id: string;
+ user_id: string;
+ guild_id: string;
+ executor_id: string;
+ reason?: string | undefined;
+}
diff --git a/src/schemas/uncategorised/BanRegistrySchema.ts b/src/schemas/uncategorised/BanRegistrySchema.ts
new file mode 100644
index 0000000..4e76870
--- /dev/null
+++ b/src/schemas/uncategorised/BanRegistrySchema.ts
@@ -0,0 +1,26 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface BanRegistrySchema {
+ id: string;
+ user_id: string;
+ guild_id: string;
+ executor_id: string;
+ ip?: string;
+ reason?: string | undefined;
+}
diff --git a/src/schemas/uncategorised/BotModifySchema.ts b/src/schemas/uncategorised/BotModifySchema.ts
new file mode 100644
index 0000000..7d94da2
--- /dev/null
+++ b/src/schemas/uncategorised/BotModifySchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface BotModifySchema {
+ avatar?: string;
+ username?: string;
+}
diff --git a/src/schemas/uncategorised/BulkBanSchema.ts b/src/schemas/uncategorised/BulkBanSchema.ts
new file mode 100644
index 0000000..48a7bac
--- /dev/null
+++ b/src/schemas/uncategorised/BulkBanSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface BulkBanSchema {
+ user_ids: string[];
+ delete_message_seconds?: number;
+}
diff --git a/src/schemas/uncategorised/BulkDeleteSchema.ts b/src/schemas/uncategorised/BulkDeleteSchema.ts
new file mode 100644
index 0000000..ca22f10
--- /dev/null
+++ b/src/schemas/uncategorised/BulkDeleteSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface BulkDeleteSchema {
+ messages: string[];
+}
diff --git a/src/schemas/uncategorised/ChannelModifySchema.ts b/src/schemas/uncategorised/ChannelModifySchema.ts
new file mode 100644
index 0000000..088ac45
--- /dev/null
+++ b/src/schemas/uncategorised/ChannelModifySchema.ts
@@ -0,0 +1,48 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { ChannelPermissionOverwriteType, ChannelType } from "@spacebar/util";
+
+export interface ChannelModifySchema {
+ /**
+ * @maxLength 100
+ */
+ name?: string;
+ type?: ChannelType;
+ topic?: string;
+ icon?: string | null;
+ bitrate?: number;
+ user_limit?: number;
+ rate_limit_per_user?: number;
+ position?: number;
+ permission_overwrites?: {
+ id: string;
+ type: ChannelPermissionOverwriteType;
+ allow: string;
+ deny: string;
+ }[];
+ parent_id?: string;
+ id?: string; // is not used (only for guild create)
+ nsfw?: boolean;
+ rtc_region?: string;
+ default_auto_archive_duration?: number;
+ default_reaction_emoji?: string | null;
+ flags?: number;
+ default_thread_rate_limit_per_user?: number;
+ video_quality_mode?: number;
+}
diff --git a/src/schemas/uncategorised/ChannelPermissionOverwriteSchema.ts b/src/schemas/uncategorised/ChannelPermissionOverwriteSchema.ts
new file mode 100644
index 0000000..6e8b340
--- /dev/null
+++ b/src/schemas/uncategorised/ChannelPermissionOverwriteSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { ChannelPermissionOverwrite } from "@spacebar/util";
+
+export type ChannelPermissionOverwriteSchema = ChannelPermissionOverwrite;
diff --git a/src/schemas/uncategorised/ChannelReorderSchema.ts b/src/schemas/uncategorised/ChannelReorderSchema.ts
new file mode 100644
index 0000000..657ed42
--- /dev/null
+++ b/src/schemas/uncategorised/ChannelReorderSchema.ts
@@ -0,0 +1,24 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export type ChannelReorderSchema = {
+ id: string;
+ position?: number;
+ lock_permissions?: boolean;
+ parent_id?: null | string;
+}[];
diff --git a/src/schemas/uncategorised/CodesVerificationSchema.ts b/src/schemas/uncategorised/CodesVerificationSchema.ts
new file mode 100644
index 0000000..3c95e61
--- /dev/null
+++ b/src/schemas/uncategorised/CodesVerificationSchema.ts
@@ -0,0 +1,23 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface CodesVerificationSchema {
+ key: string;
+ nonce: string;
+ regenerate?: boolean;
+}
diff --git a/src/schemas/uncategorised/ConnectedAccountSchema.ts b/src/schemas/uncategorised/ConnectedAccountSchema.ts
new file mode 100644
index 0000000..4bf4a3d
--- /dev/null
+++ b/src/schemas/uncategorised/ConnectedAccountSchema.ts
@@ -0,0 +1,36 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { ConnectedAccountTokenData } from "../../util/interfaces";
+
+export interface ConnectedAccountSchema {
+ external_id: string;
+ user_id: string;
+ token_data?: ConnectedAccountTokenData;
+ friend_sync?: boolean;
+ name: string;
+ revoked?: boolean;
+ show_activity?: number;
+ type: string;
+ verified?: boolean;
+ visibility?: number;
+ integrations?: string[];
+ metadata_?: unknown;
+ metadata_visibility?: number;
+ two_way_link?: boolean;
+}
diff --git a/src/schemas/uncategorised/ConnectionCallbackSchema.ts b/src/schemas/uncategorised/ConnectionCallbackSchema.ts
new file mode 100644
index 0000000..b66bfe2
--- /dev/null
+++ b/src/schemas/uncategorised/ConnectionCallbackSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface ConnectionCallbackSchema {
+ code?: string;
+ state: string;
+ insecure: boolean;
+ friend_sync: boolean;
+ openid_params?: unknown; // TODO: types
+}
diff --git a/src/schemas/uncategorised/ConnectionUpdateSchema.ts b/src/schemas/uncategorised/ConnectionUpdateSchema.ts
new file mode 100644
index 0000000..f9f17b0
--- /dev/null
+++ b/src/schemas/uncategorised/ConnectionUpdateSchema.ts
@@ -0,0 +1,23 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface ConnectionUpdateSchema {
+ visibility?: boolean;
+ show_activity?: boolean;
+ metadata_visibility?: boolean;
+}
diff --git a/src/schemas/uncategorised/DmChannelCreateSchema.ts b/src/schemas/uncategorised/DmChannelCreateSchema.ts
new file mode 100644
index 0000000..510ff9c
--- /dev/null
+++ b/src/schemas/uncategorised/DmChannelCreateSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface DmChannelCreateSchema {
+ name?: string;
+ recipients: string[];
+}
diff --git a/src/schemas/uncategorised/EmailDomainLookupSchema.ts b/src/schemas/uncategorised/EmailDomainLookupSchema.ts
new file mode 100644
index 0000000..43680aa
--- /dev/null
+++ b/src/schemas/uncategorised/EmailDomainLookupSchema.ts
@@ -0,0 +1,24 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface EmailDomainLookupSchema {
+ allow_multiple_guilds: boolean;
+ email: string;
+ use_verification_code: boolean;
+ guild_id?: string;
+}
diff --git a/src/schemas/uncategorised/EmailDomainLookupVerifyCodeSchema.ts b/src/schemas/uncategorised/EmailDomainLookupVerifyCodeSchema.ts
new file mode 100644
index 0000000..9fe0bd4
--- /dev/null
+++ b/src/schemas/uncategorised/EmailDomainLookupVerifyCodeSchema.ts
@@ -0,0 +1,23 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface EmailDomainLookupVerifyCodeSchema {
+ email: string;
+ guild_id: string;
+ code: string;
+}
diff --git a/src/schemas/uncategorised/EmojiCreateSchema.ts b/src/schemas/uncategorised/EmojiCreateSchema.ts
new file mode 100644
index 0000000..5eae5a9
--- /dev/null
+++ b/src/schemas/uncategorised/EmojiCreateSchema.ts
@@ -0,0 +1,24 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface EmojiCreateSchema {
+ name?: string;
+ image: string;
+ require_colons?: boolean | null;
+ roles?: string[];
+}
diff --git a/src/schemas/uncategorised/EmojiModifySchema.ts b/src/schemas/uncategorised/EmojiModifySchema.ts
new file mode 100644
index 0000000..5d33bf6
--- /dev/null
+++ b/src/schemas/uncategorised/EmojiModifySchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface EmojiModifySchema {
+ name?: string;
+ roles?: string[];
+}
diff --git a/src/schemas/uncategorised/ForgotPasswordSchema.ts b/src/schemas/uncategorised/ForgotPasswordSchema.ts
new file mode 100644
index 0000000..0f9fc92
--- /dev/null
+++ b/src/schemas/uncategorised/ForgotPasswordSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface ForgotPasswordSchema {
+ login: string;
+ captcha_key?: string;
+}
diff --git a/src/schemas/uncategorised/GreetRequestSchema.ts b/src/schemas/uncategorised/GreetRequestSchema.ts
new file mode 100644
index 0000000..28d1fdd
--- /dev/null
+++ b/src/schemas/uncategorised/GreetRequestSchema.ts
@@ -0,0 +1,30 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { AllowedMentions } from "@spacebar/schemas";
+
+export interface GreetRequestSchema {
+ sticker_ids: string[];
+ allowed_mentions?: AllowedMentions;
+ message_reference?: {
+ message_id: string;
+ channel_id?: string;
+ guild_id?: string;
+ fail_if_not_exists?: boolean;
+ };
+}
\ No newline at end of file
diff --git a/src/schemas/uncategorised/GuildCreateSchema.ts b/src/schemas/uncategorised/GuildCreateSchema.ts
new file mode 100644
index 0000000..a9790fa
--- /dev/null
+++ b/src/schemas/uncategorised/GuildCreateSchema.ts
@@ -0,0 +1,33 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { ChannelModifySchema } from "@spacebar/schemas*";
+
+export interface GuildCreateSchema {
+ /**
+ * @maxLength 100
+ */
+ name?: string;
+ region?: string;
+ icon?: string | null;
+ channels?: ChannelModifySchema[];
+ system_channel_id?: string;
+ rules_channel_id?: string;
+ guild_template_code?: string;
+ staff_only?: boolean;
+}
diff --git a/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts
new file mode 100644
index 0000000..f4c8a1a
--- /dev/null
+++ b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts
@@ -0,0 +1,11 @@
+import { LazyRequestSchema } from "../gateway/LazyRequestSchema";
+
+export interface GuildSubscriptionsBulkSchema {
+ subscriptions: { [key: string]: GuildSubscriptionSchema };
+}
+
+export type GuildSubscriptionSchema = Omit;
+
+export const GuildSubscriptionsBulkSchema = {
+ $subscriptions: Object,
+};
diff --git a/src/schemas/uncategorised/GuildTemplateCreateSchema.ts b/src/schemas/uncategorised/GuildTemplateCreateSchema.ts
new file mode 100644
index 0000000..048de6f
--- /dev/null
+++ b/src/schemas/uncategorised/GuildTemplateCreateSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface GuildTemplateCreateSchema {
+ name: string;
+ avatar?: string | null;
+}
diff --git a/src/schemas/uncategorised/GuildUpdateSchema.ts b/src/schemas/uncategorised/GuildUpdateSchema.ts
new file mode 100644
index 0000000..55ccf44
--- /dev/null
+++ b/src/schemas/uncategorised/GuildUpdateSchema.ts
@@ -0,0 +1,37 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { GuildCreateSchema } from "@spacebar/schemas";
+
+export interface GuildUpdateSchema extends Omit {
+ banner?: string | null;
+ splash?: string | null;
+ description?: string;
+ features?: string[];
+ verification_level?: number;
+ default_message_notifications?: number;
+ system_channel_flags?: number;
+ explicit_content_filter?: number;
+ public_updates_channel_id?: string;
+ afk_timeout?: number;
+ afk_channel_id?: string;
+ preferred_locale?: string;
+ premium_progress_bar_enabled?: boolean;
+ discovery_splash?: string;
+ safety_alerts_channel_id?: string | null;
+}
diff --git a/src/schemas/uncategorised/GuildUpdateWelcomeScreenSchema.ts b/src/schemas/uncategorised/GuildUpdateWelcomeScreenSchema.ts
new file mode 100644
index 0000000..8046aae
--- /dev/null
+++ b/src/schemas/uncategorised/GuildUpdateWelcomeScreenSchema.ts
@@ -0,0 +1,28 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface GuildUpdateWelcomeScreenSchema {
+ welcome_channels?: {
+ channel_id: string;
+ description: string;
+ emoji_id?: string;
+ emoji_name?: string;
+ }[];
+ enabled?: boolean;
+ description?: string;
+}
diff --git a/src/schemas/uncategorised/HubWaitlistSignupSchema.ts b/src/schemas/uncategorised/HubWaitlistSignupSchema.ts
new file mode 100644
index 0000000..8114b3d
--- /dev/null
+++ b/src/schemas/uncategorised/HubWaitlistSignupSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface HubWaitlistSignupSchema {
+ email: string;
+ school: string;
+}
diff --git a/src/schemas/uncategorised/InviteCreateSchema.ts b/src/schemas/uncategorised/InviteCreateSchema.ts
new file mode 100644
index 0000000..92333e7
--- /dev/null
+++ b/src/schemas/uncategorised/InviteCreateSchema.ts
@@ -0,0 +1,30 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface InviteCreateSchema {
+ target_user_id?: string;
+ target_type?: string;
+ validate?: string; // ? what is this
+ max_age?: number;
+ max_uses?: number;
+ temporary?: boolean;
+ unique?: boolean;
+ target_user?: string;
+ target_user_type?: number;
+ flags?: number;
+}
diff --git a/src/schemas/uncategorised/LoginResponse.ts b/src/schemas/uncategorised/LoginResponse.ts
new file mode 100644
index 0000000..5c1e4f8
--- /dev/null
+++ b/src/schemas/uncategorised/LoginResponse.ts
@@ -0,0 +1,14 @@
+import { TokenResponse } from "../responses";
+
+export interface MFAResponse {
+ ticket: string;
+ mfa: true;
+ sms: false; // TODO
+ token: null;
+}
+
+export interface WebAuthnResponse extends MFAResponse {
+ webauthn: string;
+}
+
+export type LoginResponse = TokenResponse | MFAResponse | WebAuthnResponse;
diff --git a/src/schemas/uncategorised/LoginSchema.ts b/src/schemas/uncategorised/LoginSchema.ts
new file mode 100644
index 0000000..55b6a02
--- /dev/null
+++ b/src/schemas/uncategorised/LoginSchema.ts
@@ -0,0 +1,30 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface LoginSchema {
+ login: string;
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ password: string;
+ undelete?: boolean;
+ captcha_key?: string;
+ login_source?: string;
+ gift_code_sku_id?: string;
+}
diff --git a/src/schemas/uncategorised/MemberChangeProfileSchema.ts b/src/schemas/uncategorised/MemberChangeProfileSchema.ts
new file mode 100644
index 0000000..d2d1481
--- /dev/null
+++ b/src/schemas/uncategorised/MemberChangeProfileSchema.ts
@@ -0,0 +1,28 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface MemberChangeProfileSchema {
+ banner?: string | null;
+ nick?: string;
+ bio?: string;
+ pronouns?: string;
+ /**
+ * @items.type integer
+ */
+ theme_colors?: [number, number];
+}
diff --git a/src/schemas/uncategorised/MemberChangeSchema.ts b/src/schemas/uncategorised/MemberChangeSchema.ts
new file mode 100644
index 0000000..e1ee096
--- /dev/null
+++ b/src/schemas/uncategorised/MemberChangeSchema.ts
@@ -0,0 +1,24 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface MemberChangeSchema {
+ roles?: string[];
+ nick?: string;
+ avatar?: string | null;
+ bio?: string;
+}
diff --git a/src/schemas/uncategorised/MemberNickChangeSchema.ts b/src/schemas/uncategorised/MemberNickChangeSchema.ts
new file mode 100644
index 0000000..4589056
--- /dev/null
+++ b/src/schemas/uncategorised/MemberNickChangeSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface MemberNickChangeSchema {
+ nick: string;
+}
diff --git a/src/schemas/uncategorised/MessageAcknowledgeSchema.ts b/src/schemas/uncategorised/MessageAcknowledgeSchema.ts
new file mode 100644
index 0000000..3ba7164
--- /dev/null
+++ b/src/schemas/uncategorised/MessageAcknowledgeSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface MessageAcknowledgeSchema {
+ manual?: boolean;
+ mention_count?: number;
+ flags?: number;
+ last_viewed?: number;
+ token?: string;
+}
diff --git a/src/schemas/uncategorised/MessageCreateSchema.ts b/src/schemas/uncategorised/MessageCreateSchema.ts
new file mode 100644
index 0000000..8d278fc
--- /dev/null
+++ b/src/schemas/uncategorised/MessageCreateSchema.ts
@@ -0,0 +1,80 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { ActionRowComponent, Embed, PollAnswer, PollMedia } from "@spacebar/schemas"
+
+export type MessageCreateAttachment = {
+ id: string;
+ filename: string;
+};
+
+export type MessageCreateCloudAttachment = {
+ id?: string;
+ filename: string;
+ uploaded_filename: string;
+ original_content_type?: string;
+}
+
+export interface MessageCreateSchema {
+ type?: number;
+ content?: string;
+ mobile_network_type?: string;
+ nonce?: string;
+ channel_id?: string;
+ tts?: boolean;
+ flags?: number;
+ embeds?: Embed[];
+ embed?: Embed;
+ // TODO: ^ embed is deprecated in favor of embeds (https://discord.com/developers/docs/resources/channel#message-object)
+ allowed_mentions?: {
+ parse?: string[];
+ roles?: string[];
+ users?: string[];
+ replied_user?: boolean;
+ };
+ message_reference?: {
+ message_id: string;
+ channel_id?: string;
+ guild_id?: string;
+ fail_if_not_exists?: boolean;
+ };
+ payload_json?: string;
+ file?: { filename: string };
+ /**
+ TODO: we should create an interface for attachments
+ TODO: OpenWAAO<-->attachment-style metadata conversion
+ **/
+ attachments?: (MessageCreateAttachment | MessageCreateCloudAttachment)[];
+ sticker_ids?: string[] | null; // null check: fixes Discord-Go
+ components?: ActionRowComponent[] | null; // null check: fixes Discord-Go
+ // TODO: Fix TypeScript errors in src\api\util\handlers\Message.ts once this is enabled
+ poll?: PollCreationSchema;
+ enforce_nonce?: boolean; // For Discord compatibility, it's the default behavior here
+ applied_tags?: string[]; // Not implemented yet, for webhooks in forums
+ thread_name?: string; // Not implemented yet, for webhooks
+ avatar_url?: string; // Not implemented yet, for webhooks
+}
+
+// TypeScript complains once this is used above
+export interface PollCreationSchema {
+ question: PollMedia;
+ answers: PollAnswer[];
+ duration?: number;
+ allow_multiselect?: boolean;
+ layout_type?: number;
+}
diff --git a/src/schemas/uncategorised/MessageEditSchema.ts b/src/schemas/uncategorised/MessageEditSchema.ts
new file mode 100644
index 0000000..002e5af
--- /dev/null
+++ b/src/schemas/uncategorised/MessageEditSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { MessageCreateSchema } from "./MessageCreateSchema";
+
+export type MessageEditSchema = Omit;
diff --git a/src/schemas/uncategorised/MfaCodesSchema.ts b/src/schemas/uncategorised/MfaCodesSchema.ts
new file mode 100644
index 0000000..1f66f08
--- /dev/null
+++ b/src/schemas/uncategorised/MfaCodesSchema.ts
@@ -0,0 +1,26 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface MfaCodesSchema {
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ password: string;
+ regenerate?: boolean;
+}
diff --git a/src/schemas/uncategorised/ModifyGuildStickerSchema.ts b/src/schemas/uncategorised/ModifyGuildStickerSchema.ts
new file mode 100644
index 0000000..95eb541
--- /dev/null
+++ b/src/schemas/uncategorised/ModifyGuildStickerSchema.ts
@@ -0,0 +1,33 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface ModifyGuildStickerSchema {
+ /**
+ * @minLength 2
+ * @maxLength 30
+ */
+ name: string;
+ /**
+ * @maxLength 100
+ */
+ description?: string;
+ /**
+ * @maxLength 200
+ */
+ tags: string;
+}
diff --git a/src/schemas/uncategorised/PasswordResetSchema.ts b/src/schemas/uncategorised/PasswordResetSchema.ts
new file mode 100644
index 0000000..15489a9
--- /dev/null
+++ b/src/schemas/uncategorised/PasswordResetSchema.ts
@@ -0,0 +1,26 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface PasswordResetSchema {
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ password: string;
+ token: string;
+}
diff --git a/src/schemas/uncategorised/PreloadMessagesRequestSchema.ts b/src/schemas/uncategorised/PreloadMessagesRequestSchema.ts
new file mode 100644
index 0000000..7c5145b
--- /dev/null
+++ b/src/schemas/uncategorised/PreloadMessagesRequestSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface PreloadMessagesRequestSchema {
+ channels: string[];
+}
diff --git a/src/schemas/uncategorised/PruneSchema.ts b/src/schemas/uncategorised/PruneSchema.ts
new file mode 100644
index 0000000..88d2f6e
--- /dev/null
+++ b/src/schemas/uncategorised/PruneSchema.ts
@@ -0,0 +1,24 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface PruneSchema {
+ /**
+ * @min 0
+ */
+ days: number;
+}
diff --git a/src/schemas/uncategorised/PurgeSchema.ts b/src/schemas/uncategorised/PurgeSchema.ts
new file mode 100644
index 0000000..2e88799
--- /dev/null
+++ b/src/schemas/uncategorised/PurgeSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface PurgeSchema {
+ before: string;
+ after: string;
+}
diff --git a/src/schemas/uncategorised/RefreshUrlsRequestSchema.ts b/src/schemas/uncategorised/RefreshUrlsRequestSchema.ts
new file mode 100644
index 0000000..9c1df54
--- /dev/null
+++ b/src/schemas/uncategorised/RefreshUrlsRequestSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface RefreshUrlsRequestSchema {
+ attachment_urls: string[];
+}
diff --git a/src/schemas/uncategorised/RegisterSchema.ts b/src/schemas/uncategorised/RegisterSchema.ts
new file mode 100644
index 0000000..cfee0f0
--- /dev/null
+++ b/src/schemas/uncategorised/RegisterSchema.ts
@@ -0,0 +1,48 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface RegisterSchema {
+ /**
+ * @minLength 2
+ */
+ username: string;
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ password?: string;
+ consent: boolean;
+ /**
+ * @TJS-format email
+ */
+ email?: string;
+ fingerprint?: string;
+ invite?: string;
+ /**
+ * @TJS-type string
+ */
+ date_of_birth?: Date; // "2000-04-03"
+ gift_code_sku_id?: string;
+ captcha_key?: string;
+
+ promotional_email_opt_in?: boolean;
+
+ // part of pomelo
+ unique_username_registration?: boolean;
+ global_name?: string;
+}
diff --git a/src/schemas/uncategorised/RelationshipPostSchema.ts b/src/schemas/uncategorised/RelationshipPostSchema.ts
new file mode 100644
index 0000000..066ecfd
--- /dev/null
+++ b/src/schemas/uncategorised/RelationshipPostSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface RelationshipPostSchema {
+ discriminator: string;
+ username: string;
+}
diff --git a/src/schemas/uncategorised/RelationshipPutSchema.ts b/src/schemas/uncategorised/RelationshipPutSchema.ts
new file mode 100644
index 0000000..4d2438e
--- /dev/null
+++ b/src/schemas/uncategorised/RelationshipPutSchema.ts
@@ -0,0 +1,28 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface RelationshipPutSchema {
+ type?: RelationshipType;
+}
+
+export enum RelationshipType {
+ outgoing = 4,
+ incoming = 3,
+ blocked = 2,
+ friends = 1,
+}
\ No newline at end of file
diff --git a/src/schemas/uncategorised/RequestGuildMembersSchema.ts b/src/schemas/uncategorised/RequestGuildMembersSchema.ts
new file mode 100644
index 0000000..9e60d26
--- /dev/null
+++ b/src/schemas/uncategorised/RequestGuildMembersSchema.ts
@@ -0,0 +1,35 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface RequestGuildMembersSchema {
+ guild_id: string | [string];
+ query?: string;
+ limit?: number;
+ presences?: boolean;
+ user_ids?: string | string[];
+ nonce?: string;
+}
+
+export const RequestGuildMembersSchema = {
+ guild_id: "" as string | string[],
+ $query: String,
+ $limit: Number,
+ $presences: Boolean,
+ $user_ids: [] as string | string[],
+ $nonce: String,
+};
diff --git a/src/schemas/uncategorised/RoleModifySchema.ts b/src/schemas/uncategorised/RoleModifySchema.ts
new file mode 100644
index 0000000..a6d1893
--- /dev/null
+++ b/src/schemas/uncategorised/RoleModifySchema.ts
@@ -0,0 +1,33 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface RoleModifySchema {
+ name?: string;
+ permissions?: string;
+ color?: number;
+ hoist?: boolean; // whether the role should be displayed separately in the sidebar
+ mentionable?: boolean; // whether the role should be mentionable
+ position?: number;
+ icon?: string;
+ unicode_emoji?: string;
+ colors?: {
+ primary_color: number;
+ secondary_color: number | null | undefined; // only used for "holographic" and "gradient" styles
+ tertiary_color?: number | null | undefined; // only used for "holographic" style
+ } | undefined;
+}
diff --git a/src/schemas/uncategorised/RolePositionUpdateSchema.ts b/src/schemas/uncategorised/RolePositionUpdateSchema.ts
new file mode 100644
index 0000000..6bfd7f3
--- /dev/null
+++ b/src/schemas/uncategorised/RolePositionUpdateSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export type RolePositionUpdateSchema = {
+ id: string;
+ position: number;
+}[];
diff --git a/src/schemas/uncategorised/SelectProtocolSchema.ts b/src/schemas/uncategorised/SelectProtocolSchema.ts
new file mode 100644
index 0000000..d04adf7
--- /dev/null
+++ b/src/schemas/uncategorised/SelectProtocolSchema.ts
@@ -0,0 +1,37 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface SelectProtocolSchema {
+ protocol: "webrtc" | "udp";
+ data:
+ | string
+ | {
+ address: string;
+ port: number;
+ mode: string;
+ };
+ sdp?: string;
+ codecs?: {
+ name: "opus" | "VP8" | "VP9" | "H264";
+ type: "audio" | "video";
+ priority: number;
+ payload_type: number;
+ rtx_payload_type?: number;
+ }[];
+ rtc_connection_id?: string; // uuid
+}
diff --git a/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts b/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts
new file mode 100644
index 0000000..2b930bc
--- /dev/null
+++ b/src/schemas/uncategorised/SettingsProtoUpdateSchema.ts
@@ -0,0 +1,47 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { JsonValue } from "@protobuf-ts/runtime";
+
+export interface SettingsProtoUpdateSchema {
+ settings: string;
+ required_data_version?: number;
+}
+
+export interface SettingsProtoUpdateJsonSchema {
+ settings: JsonValue;
+ required_data_version?: number;
+}
+
+// TODO: these dont work with schema validation
+// typed JSON schemas:
+// export interface SettingsProtoUpdatePreloadedUserSettingsSchema {
+// settings: PreloadedUserSettings;
+// required_data_version?: number;
+// }
+//
+// export interface SettingsProtoUpdateFrecencyUserSettingsSchema {
+// settings: FrecencyUserSettings;
+// required_data_version?: number;
+// }
+
+// TODO: what is this?
+// export interface SettingsProtoUpdateTestSettingsSchema {
+// settings: {};
+// required_data_version?: number;
+// }
\ No newline at end of file
diff --git a/src/schemas/uncategorised/TeamCreateSchema.ts b/src/schemas/uncategorised/TeamCreateSchema.ts
new file mode 100644
index 0000000..5903a53
--- /dev/null
+++ b/src/schemas/uncategorised/TeamCreateSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface TeamCreateSchema {
+ name: string;
+}
diff --git a/src/schemas/uncategorised/TemplateCreateSchema.ts b/src/schemas/uncategorised/TemplateCreateSchema.ts
new file mode 100644
index 0000000..9e562c9
--- /dev/null
+++ b/src/schemas/uncategorised/TemplateCreateSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface TemplateCreateSchema {
+ name: string;
+ description?: string;
+}
diff --git a/src/schemas/uncategorised/TemplateModifySchema.ts b/src/schemas/uncategorised/TemplateModifySchema.ts
new file mode 100644
index 0000000..49b0237
--- /dev/null
+++ b/src/schemas/uncategorised/TemplateModifySchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface TemplateModifySchema {
+ name: string;
+ description?: string;
+}
diff --git a/src/schemas/uncategorised/TotpDisableSchema.ts b/src/schemas/uncategorised/TotpDisableSchema.ts
new file mode 100644
index 0000000..29706f4
--- /dev/null
+++ b/src/schemas/uncategorised/TotpDisableSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface TotpDisableSchema {
+ /**
+ * @minLength 6
+ * @maxLength 6
+ */
+ code: string;
+}
diff --git a/src/schemas/uncategorised/TotpEnableSchema.ts b/src/schemas/uncategorised/TotpEnableSchema.ts
new file mode 100644
index 0000000..a80e06a
--- /dev/null
+++ b/src/schemas/uncategorised/TotpEnableSchema.ts
@@ -0,0 +1,31 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface TotpEnableSchema {
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ password: string;
+ /**
+ * @minLength 6
+ * @maxLength 6
+ */
+ code?: string;
+ secret?: string;
+}
diff --git a/src/schemas/uncategorised/TotpSchema.ts b/src/schemas/uncategorised/TotpSchema.ts
new file mode 100644
index 0000000..657b7e7
--- /dev/null
+++ b/src/schemas/uncategorised/TotpSchema.ts
@@ -0,0 +1,24 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface TotpSchema {
+ code: string;
+ ticket: string;
+ gift_code_sku_id?: string | null;
+ login_source?: string | null;
+}
diff --git a/src/schemas/uncategorised/UploadAttachmentRequestSchema.ts b/src/schemas/uncategorised/UploadAttachmentRequestSchema.ts
new file mode 100644
index 0000000..60bf89f
--- /dev/null
+++ b/src/schemas/uncategorised/UploadAttachmentRequestSchema.ts
@@ -0,0 +1,30 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2024 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+
+export interface UploadAttachmentRequestSchema {
+ files: UploadAttachmentRequest[];
+}
+
+export interface UploadAttachmentRequest {
+ id?: string;
+ filename: string;
+ file_size: number;
+ is_clip?: boolean;
+ original_content_type?: string;
+}
diff --git a/src/schemas/uncategorised/UserDeleteSchema.ts b/src/schemas/uncategorised/UserDeleteSchema.ts
new file mode 100644
index 0000000..40fb778
--- /dev/null
+++ b/src/schemas/uncategorised/UserDeleteSchema.ts
@@ -0,0 +1,21 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface UserDeleteSchema {
+ user_id: string;
+}
diff --git a/src/schemas/uncategorised/UserGuildSettingsSchema.ts b/src/schemas/uncategorised/UserGuildSettingsSchema.ts
new file mode 100644
index 0000000..82edae9
--- /dev/null
+++ b/src/schemas/uncategorised/UserGuildSettingsSchema.ts
@@ -0,0 +1,27 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { ChannelOverride, UserGuildSettings } from "@spacebar/util";
+
+// This sucks. I would use a DeepPartial, my own or typeorms, but they both generate inncorect schema
+export interface UserGuildSettingsSchema
+ extends Partial> {
+ channel_overrides?: {
+ [channel_id: string]: ChannelOverride;
+ };
+}
diff --git a/src/schemas/uncategorised/UserModifySchema.ts b/src/schemas/uncategorised/UserModifySchema.ts
new file mode 100644
index 0000000..6d2998e
--- /dev/null
+++ b/src/schemas/uncategorised/UserModifySchema.ts
@@ -0,0 +1,52 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface UserModifySchema {
+ /**
+ * @minLength 2
+ */
+ username?: string;
+ avatar?: string | null;
+ bio?: string;
+ accent_color?: number;
+ banner?: string | null;
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ password?: string;
+ /**
+ * @minLength 1
+ * @maxLength 72
+ */
+ new_password?: string;
+ /**
+ * @minLength 6
+ * @maxLength 6
+ */
+ code?: string;
+ /**
+ * @TJS-format email
+ */
+ email?: string;
+ /**
+ * @minLength 4
+ * @maxLength 4
+ */
+ discriminator?: string;
+}
diff --git a/src/schemas/uncategorised/UserNoteUpdateSchema.ts b/src/schemas/uncategorised/UserNoteUpdateSchema.ts
new file mode 100644
index 0000000..0a73127
--- /dev/null
+++ b/src/schemas/uncategorised/UserNoteUpdateSchema.ts
@@ -0,0 +1,3 @@
+export interface UserNoteUpdateSchema {
+ note: string;
+}
diff --git a/src/schemas/uncategorised/UserProfileModifySchema.ts b/src/schemas/uncategorised/UserProfileModifySchema.ts
new file mode 100644
index 0000000..3dea257
--- /dev/null
+++ b/src/schemas/uncategorised/UserProfileModifySchema.ts
@@ -0,0 +1,28 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface UserProfileModifySchema {
+ bio?: string;
+ accent_color?: number | null;
+ banner?: string | null;
+ pronouns?: string;
+ /**
+ * @items.type integer
+ */
+ theme_colors?: [number, number];
+}
diff --git a/src/schemas/uncategorised/UserSettingsSchema.ts b/src/schemas/uncategorised/UserSettingsSchema.ts
new file mode 100644
index 0000000..b9d0ec8
--- /dev/null
+++ b/src/schemas/uncategorised/UserSettingsSchema.ts
@@ -0,0 +1,71 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface UserSettingsSchema {
+ afk_timeout: number;
+ allow_accessibility_detection: boolean;
+ animate_emoji: boolean;
+ animate_stickers: number;
+ contact_sync_enabled: boolean;
+ convert_emoticons: boolean;
+ custom_status: CustomStatus | null;
+ default_guilds_restricted: boolean;
+ detect_platform_accounts: boolean;
+ developer_mode: boolean;
+ disable_games_tab: boolean;
+ enable_tts_command: boolean;
+ explicit_content_filter: number;
+ friend_discovery_flags: number;
+ friend_source_flags: FriendSourceFlags;
+ gateway_connected: boolean;
+ gif_auto_play: boolean;
+ guild_folders: GuildFolder[]; // every top guild is displayed as a "folder"
+ guild_positions: string[]; // guild ids ordered by position
+ inline_attachment_media: boolean;
+ inline_embed_media: boolean;
+ locale: string; // en_US
+ message_display_compact: boolean;
+ native_phone_integration_enabled: boolean;
+ render_embeds: boolean;
+ render_reactions: boolean;
+ restricted_guilds: string[];
+ show_current_game: boolean;
+ status: "online" | "offline" | "dnd" | "idle" | "invisible";
+ stream_notifications_enabled: boolean;
+ theme: "dark" | "light"; // dark
+ timezone_offset: number; // e.g -60
+ view_nsfw_guilds: boolean
+}
+
+export interface CustomStatus {
+ emoji_id?: string;
+ emoji_name?: string;
+ expires_at?: number;
+ text?: string;
+}
+
+export interface GuildFolder {
+ color: number;
+ guild_ids: string[];
+ id: number;
+ name: string;
+}
+
+export interface FriendSourceFlags {
+ all: boolean;
+}
\ No newline at end of file
diff --git a/src/schemas/uncategorised/VanityUrlSchema.ts b/src/schemas/uncategorised/VanityUrlSchema.ts
new file mode 100644
index 0000000..12d5abd
--- /dev/null
+++ b/src/schemas/uncategorised/VanityUrlSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface VanityUrlSchema {
+ /**
+ * @minLength 1
+ * @maxLength 20
+ */
+ code?: string;
+}
diff --git a/src/schemas/uncategorised/VerifyEmailSchema.ts b/src/schemas/uncategorised/VerifyEmailSchema.ts
new file mode 100644
index 0000000..ce297c5
--- /dev/null
+++ b/src/schemas/uncategorised/VerifyEmailSchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface VerifyEmailSchema {
+ captcha_key?: string | null;
+ token: string;
+}
diff --git a/src/schemas/uncategorised/VoiceStateUpdateSchema.ts b/src/schemas/uncategorised/VoiceStateUpdateSchema.ts
new file mode 100644
index 0000000..fda073e
--- /dev/null
+++ b/src/schemas/uncategorised/VoiceStateUpdateSchema.ts
@@ -0,0 +1,42 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+//TODO need more testing when community guild and voice stage channel are working
+export interface VoiceStateUpdateSchema {
+ guild_id?: string;
+ channel_id?: string;
+ self_mute: boolean;
+ self_deaf: boolean;
+ self_video?: boolean;
+ preferred_region?: string;
+ request_to_speak_timestamp?: Date;
+ suppress?: boolean;
+ flags?: number;
+}
+
+export const VoiceStateUpdateSchema = {
+ $guild_id: String,
+ $channel_id: String,
+ self_mute: Boolean,
+ self_deaf: Boolean,
+ $self_video: Boolean, //required in docs but bots don't always send it
+ $preferred_region: String,
+ $request_to_speak_timestamp: Date,
+ $suppress: Boolean,
+ $flags: Number,
+};
diff --git a/src/schemas/uncategorised/WebAuthnSchema.ts b/src/schemas/uncategorised/WebAuthnSchema.ts
new file mode 100644
index 0000000..3f5e0da
--- /dev/null
+++ b/src/schemas/uncategorised/WebAuthnSchema.ts
@@ -0,0 +1,38 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+// FIXME: better naming
+export interface GenerateWebAuthnCredentialsSchema {
+ password: string;
+}
+
+// FIXME: better naming
+export interface CreateWebAuthnCredentialSchema {
+ credential: string;
+ name: string;
+ ticket: string;
+}
+
+export type WebAuthnPostSchema =
+ | GenerateWebAuthnCredentialsSchema
+ | CreateWebAuthnCredentialSchema;
+
+export interface WebAuthnTotpSchema {
+ code: string;
+ ticket: string;
+}
diff --git a/src/schemas/uncategorised/WebhookCreateSchema.ts b/src/schemas/uncategorised/WebhookCreateSchema.ts
new file mode 100644
index 0000000..7bd0afa
--- /dev/null
+++ b/src/schemas/uncategorised/WebhookCreateSchema.ts
@@ -0,0 +1,25 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface WebhookCreateSchema {
+ /**
+ * @maxLength 80
+ */
+ name: string;
+ avatar?: string;
+}
diff --git a/src/schemas/uncategorised/WebhookExecuteSchema.ts b/src/schemas/uncategorised/WebhookExecuteSchema.ts
new file mode 100644
index 0000000..d95606c
--- /dev/null
+++ b/src/schemas/uncategorised/WebhookExecuteSchema.ts
@@ -0,0 +1,59 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+import { Embed } from "@spacebar/schemas"
+import {
+ MessageCreateAttachment,
+ PollCreationSchema,
+} from "./MessageCreateSchema";
+
+export interface WebhookExecuteSchema {
+ content?: string;
+ username?: string;
+ avatar_url?: string;
+ tts?: boolean;
+ embeds?: Embed[];
+ allowed_mentions?: {
+ parse?: string[];
+ roles?: string[];
+ users?: string[];
+ replied_user?: boolean;
+ };
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ components?: any[];
+ file?: { filename: string };
+ payload_json?: string;
+ /**
+ TODO: we should create an interface for attachments
+ TODO: OpenWAAO<-->attachment-style metadata conversion
+ **/
+ attachments?: MessageCreateAttachment[];
+ flags?: number;
+ thread_name?: string;
+ applied_tags?: string[];
+ message_reference?: {
+ message_id: string;
+ channel_id?: string;
+ guild_id?: string;
+ fail_if_not_exists?: boolean;
+ };
+ sticker_ids?: string[];
+ nonce?: string;
+ enforce_nonce?: boolean; // For Discord compatibility, it's the default behavior here
+ poll?: PollCreationSchema;
+}
diff --git a/src/schemas/uncategorised/WebhookUpdateSchema.ts b/src/schemas/uncategorised/WebhookUpdateSchema.ts
new file mode 100755
index 0000000..bc276e4
--- /dev/null
+++ b/src/schemas/uncategorised/WebhookUpdateSchema.ts
@@ -0,0 +1,23 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface WebhookUpdateSchema {
+ name?: string;
+ avatar?: string;
+ channel_id?: string;
+}
diff --git a/src/schemas/uncategorised/WidgetModifySchema.ts b/src/schemas/uncategorised/WidgetModifySchema.ts
new file mode 100644
index 0000000..50794d6
--- /dev/null
+++ b/src/schemas/uncategorised/WidgetModifySchema.ts
@@ -0,0 +1,22 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface WidgetModifySchema {
+ enabled: boolean; // whether the widget is enabled
+ channel_id: string; // the widget channel id
+}
diff --git a/src/schemas/uncategorised/index.ts b/src/schemas/uncategorised/index.ts
new file mode 100644
index 0000000..c0ebde0
--- /dev/null
+++ b/src/schemas/uncategorised/index.ts
@@ -0,0 +1,93 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+export * from "./AckBulkSchema";
+export * from "./ActivitySchema";
+export * from "./ApplicationAuthorizeSchema";
+export * from "./AutomodRuleSchema";
+export * from "./BackupCodesChallengeSchema";
+export * from "./BanCreateSchema";
+export * from "./BanModeratorSchema";
+export * from "./BanRegistrySchema";
+export * from "./BotModifySchema";
+export * from "./BulkBanSchema";
+export * from "./BulkDeleteSchema";
+export * from "./ChannelModifySchema";
+export * from "./ChannelPermissionOverwriteSchema";
+export * from "./ChannelReorderSchema";
+export * from "./CodesVerificationSchema";
+export * from "./ConnectedAccountSchema";
+export * from "./ConnectionCallbackSchema";
+export * from "./ConnectionUpdateSchema";
+export * from "./DmChannelCreateSchema";
+export * from "./EmailDomainLookupSchema";
+export * from "./EmailDomainLookupVerifyCodeSchema";
+export * from "./EmojiCreateSchema";
+export * from "./EmojiModifySchema";
+export * from "./ForgotPasswordSchema";
+export * from "./GreetRequestSchema";
+export * from "./GuildCreateSchema";
+export * from "./GuildSubscriptionsBulkSchema";
+export * from "./GuildTemplateCreateSchema";
+export * from "./GuildUpdateSchema";
+export * from "./GuildUpdateWelcomeScreenSchema";
+export * from "./HubWaitlistSignupSchema";
+export * from "./InviteCreateSchema";
+export * from "./LoginResponse";
+export * from "./LoginSchema";
+export * from "./MemberChangeProfileSchema";
+export * from "./MemberChangeSchema";
+export * from "./MemberNickChangeSchema";
+export * from "./MessageAcknowledgeSchema";
+export * from "./MessageCreateSchema";
+export * from "./MessageEditSchema";
+export * from "./MfaCodesSchema";
+export * from "./ModifyGuildStickerSchema";
+export * from "./PasswordResetSchema";
+export * from "./PreloadMessagesRequestSchema";
+export * from "./PruneSchema";
+export * from "./PurgeSchema";
+export * from "./RefreshUrlsRequestSchema";
+export * from "./RegisterSchema";
+export * from "./RelationshipPostSchema";
+export * from "./RelationshipPutSchema";
+export * from "./RequestGuildMembersSchema";
+export * from "./RoleModifySchema";
+export * from "./RolePositionUpdateSchema";
+export * from "./SelectProtocolSchema";
+export * from "./SettingsProtoUpdateSchema";
+export * from "./TeamCreateSchema";
+export * from "./TemplateCreateSchema";
+export * from "./TemplateModifySchema";
+export * from "./TotpDisableSchema";
+export * from "./TotpEnableSchema";
+export * from "./TotpSchema";
+export * from "./UploadAttachmentRequestSchema";
+export * from "./UserDeleteSchema";
+export * from "./UserGuildSettingsSchema";
+export * from "./UserModifySchema";
+export * from "./UserNoteUpdateSchema";
+export * from "./UserProfileModifySchema";
+export * from "./UserSettingsSchema";
+export * from "./VanityUrlSchema";
+export * from "./VerifyEmailSchema";
+export * from "./VoiceStateUpdateSchema";
+export * from "./WebAuthnSchema";
+export * from "./WebhookCreateSchema";
+export * from "./WebhookExecuteSchema";
+export * from "./WebhookUpdateSchema";
+export * from "./WidgetModifySchema";
diff --git a/src/schemas/webrtc/VoiceIdentifySchema.ts b/src/schemas/webrtc/VoiceIdentifySchema.ts
new file mode 100644
index 0000000..82f846c
--- /dev/null
+++ b/src/schemas/webrtc/VoiceIdentifySchema.ts
@@ -0,0 +1,31 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface VoiceIdentifySchema {
+ server_id: string;
+ user_id: string;
+ session_id: string;
+ token: string;
+ video?: boolean;
+ streams?: {
+ type: "video" | "audio" | "screen";
+ rid: string;
+ quality: number;
+ }[];
+ max_secure_frames_version?: number;
+}
diff --git a/src/schemas/webrtc/VoiceVideoSchema.ts b/src/schemas/webrtc/VoiceVideoSchema.ts
new file mode 100644
index 0000000..c621431
--- /dev/null
+++ b/src/schemas/webrtc/VoiceVideoSchema.ts
@@ -0,0 +1,35 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2023 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+
+export interface VoiceVideoSchema {
+ audio_ssrc: number;
+ video_ssrc: number;
+ rtx_ssrc?: number;
+ user_id?: string;
+ streams?: {
+ type: "video" | "audio" | "screen";
+ rid: string;
+ ssrc: number;
+ active: boolean;
+ quality: number;
+ rtx_ssrc: number;
+ max_bitrate: number;
+ max_framerate: number;
+ max_resolution: { type: string; width: number; height: number };
+ }[];
+}
diff --git a/src/schemas/webrtc/index.ts b/src/schemas/webrtc/index.ts
new file mode 100644
index 0000000..7be4af6
--- /dev/null
+++ b/src/schemas/webrtc/index.ts
@@ -0,0 +1,19 @@
+/*
+ Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+ Copyright (C) 2025 Spacebar and Spacebar Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+*/
+export * from "./VoiceIdentifySchema";
+export * from "./VoiceVideoSchema";
diff --git a/src/util/entities/EmbedCache.ts b/src/util/entities/EmbedCache.ts
index f9358b5..2b481ad 100644
--- a/src/util/entities/EmbedCache.ts
+++ b/src/util/entities/EmbedCache.ts
@@ -18,7 +18,7 @@
import { BaseClass } from "./BaseClass";
import { Entity, Column } from "typeorm";
-import { Embed } from "./Message";
+import { Embed } from "@spacebar/schemas";
@Entity({
name: "embed_cache",
diff --git a/src/util/entities/Message.ts b/src/util/entities/Message.ts
index fcb9fbe..6a383f2 100644
--- a/src/util/entities/Message.ts
+++ b/src/util/entities/Message.ts
@@ -22,52 +22,14 @@
import { Channel } from "./Channel";
import { InteractionType } from "../interfaces/Interaction";
import { Application } from "./Application";
-import {
- Column,
- CreateDateColumn,
- Entity,
- Index,
- JoinColumn,
- JoinTable,
- ManyToMany,
- ManyToOne,
- OneToMany,
- RelationId,
-} from "typeorm";
+import { Column, CreateDateColumn, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, RelationId } from "typeorm";
import { BaseClass } from "./BaseClass";
import { Guild } from "./Guild";
import { Webhook } from "./Webhook";
import { Sticker } from "./Sticker";
import { Attachment } from "./Attachment";
import { NewUrlUserSignatureData } from "../Signing";
-
-export enum MessageType {
- DEFAULT = 0,
- RECIPIENT_ADD = 1,
- RECIPIENT_REMOVE = 2,
- CALL = 3,
- CHANNEL_NAME_CHANGE = 4,
- CHANNEL_ICON_CHANGE = 5,
- CHANNEL_PINNED_MESSAGE = 6,
- GUILD_MEMBER_JOIN = 7,
- USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
- USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
- USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
- USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
- CHANNEL_FOLLOW_ADD = 12,
- ACTION = 13, // /me messages
- GUILD_DISCOVERY_DISQUALIFIED = 14,
- GUILD_DISCOVERY_REQUALIFIED = 15,
- ENCRYPTED = 16,
- REPLY = 19,
- APPLICATION_COMMAND = 20, // application command or self command invocation
- ROUTE_ADDED = 41, // custom message routing: new route affecting that channel
- ROUTE_DISABLED = 42, // custom message routing: given route no longer affecting that channel
- SELF_COMMAND_SCRIPT = 43, // self command scripts
- ENCRYPTION = 50,
- CUSTOM_START = 63,
- UNHANDLED = 255,
-}
+import { ActionRowComponent, Embed, MessageType, PartialMessage, Poll, Reaction } from "@spacebar/schemas";
@Entity({
name: "messages",
@@ -164,14 +126,10 @@
@ManyToMany(() => Sticker, { cascade: true, onDelete: "CASCADE" })
sticker_items?: Sticker[];
- @OneToMany(
- () => Attachment,
- (attachment: Attachment) => attachment.message,
- {
- cascade: true,
- orphanedRowAction: "delete",
- },
- )
+ @OneToMany(() => Attachment, (attachment: Attachment) => attachment.message, {
+ cascade: true,
+ orphanedRowAction: "delete",
+ })
attachments?: Attachment[];
@Column({ type: "simple-json" })
@@ -270,232 +228,21 @@
return {
id: this.id,
// lobby_id: this.lobby_id,
- channel_id: this.channel_id,
+ channel_id: this.channel_id!,
type: this.type,
- content: this.content,
- author: this.author,
+ content: this.content!,
+ author: {...this.author!, avatar: this.author?.avatar ?? null },
flags: this.flags,
application_id: this.application_id,
- channel: this.channel,
+ //channel: this.channel, // TODO: ephemeral DM channels
// recipient_id: this.recipient_id, // TODO: ephemeral DM channels
- }
+ };
}
withSignedAttachments(data: NewUrlUserSignatureData) {
return {
...this,
- attachments: this.attachments?.map((attachment: Attachment) =>
- Attachment.prototype.signUrls.call(attachment, data),
- ),
+ attachments: this.attachments?.map((attachment: Attachment) => Attachment.prototype.signUrls.call(attachment, data)),
};
}
}
-
-/**
- * https://docs.discord.food/resources/message#partial-message-structure
- */
-export type PartialMessage = Pick
- // & Pick
- & Pick
- & Pick
- & Pick
- & Pick
- & Pick
- & Pick
- & { channel?: Channel }
-// & Pick // TODO: ephemeral DM channels
- ;
-
-export interface MessageComponent {
- type: MessageComponentType;
-}
-
-export interface ActionRowComponent extends MessageComponent {
- type: MessageComponentType.ActionRow;
- components: (
- | ButtonComponent
- | StringSelectMenuComponent
- | SelectMenuComponent
- | TextInputComponent
- )[];
-}
-
-export interface ButtonComponent extends MessageComponent {
- type: MessageComponentType.Button;
- style: ButtonStyle;
- label?: string;
- emoji?: PartialEmoji;
- custom_id?: string;
- sku_id?: string;
- url?: string;
- disabled?: boolean;
-}
-
-export enum ButtonStyle {
- Primary = 1,
- Secondary = 2,
- Success = 3,
- Danger = 4,
- Link = 5,
- Premium = 6,
-}
-
-export interface SelectMenuComponent extends MessageComponent {
- type:
- | MessageComponentType.StringSelect
- | MessageComponentType.UserSelect
- | MessageComponentType.RoleSelect
- | MessageComponentType.MentionableSelect
- | MessageComponentType.ChannelSelect;
- custom_id: string;
- channel_types?: number[];
- placeholder?: string;
- default_values?: SelectMenuDefaultOption[]; // only for non-string selects
- min_values?: number;
- max_values?: number;
- disabled?: boolean;
-}
-
-export interface SelectMenuOption {
- label: string;
- value: string;
- description?: string;
- emoji?: PartialEmoji;
- default?: boolean;
-}
-
-export interface SelectMenuDefaultOption {
- id: string;
- type: "user" | "role" | "channel";
-}
-
-export interface StringSelectMenuComponent extends SelectMenuComponent {
- type: MessageComponentType.StringSelect;
- options: SelectMenuOption[];
-}
-
-export interface TextInputComponent extends MessageComponent {
- type: MessageComponentType.TextInput;
- custom_id: string;
- style: TextInputStyle;
- label: string;
- min_length?: number;
- max_length?: number;
- required?: boolean;
- value?: string;
- placeholder?: string;
-}
-
-export enum TextInputStyle {
- Short = 1,
- Paragraph = 2,
-}
-
-export enum MessageComponentType {
- Script = 0, // self command script
- ActionRow = 1,
- Button = 2,
- StringSelect = 3,
- TextInput = 4,
- UserSelect = 5,
- RoleSelect = 6,
- MentionableSelect = 7,
- ChannelSelect = 8,
-}
-
-export interface Embed {
- title?: string; //title of embed
- type?: EmbedType; // type of embed (always "rich" for webhook embeds)
- description?: string; // description of embed
- url?: string; // url of embed
- timestamp?: Date; // timestamp of embed content
- color?: number; // color code of the embed
- footer?: {
- text: string;
- icon_url?: string;
- proxy_icon_url?: string;
- }; // footer object footer information
- image?: EmbedImage; // image object image information
- thumbnail?: EmbedImage; // thumbnail object thumbnail information
- video?: EmbedImage; // video object video information
- provider?: {
- name?: string;
- url?: string;
- }; // provider object provider information
- author?: {
- name?: string;
- url?: string;
- icon_url?: string;
- proxy_icon_url?: string;
- }; // author object author information
- fields?: {
- name: string;
- value: string;
- inline?: boolean;
- }[];
-}
-
-export enum EmbedType {
- rich = "rich",
- image = "image",
- video = "video",
- gifv = "gifv",
- article = "article",
- link = "link",
-}
-
-export interface EmbedImage {
- url?: string;
- proxy_url?: string;
- height?: number;
- width?: number;
-}
-
-export interface Reaction {
- count: number;
- //// not saved in the database // me: boolean; // whether the current user reacted using this emoji
- emoji: PartialEmoji;
- user_ids: string[];
-}
-
-export interface PartialEmoji {
- id?: string;
- name: string;
- animated?: boolean;
-}
-
-export interface AllowedMentions {
- parse?: ("users" | "roles" | "everyone")[];
- roles?: string[];
- users?: string[];
- replied_user?: boolean;
-}
-
-export interface Poll {
- question: PollMedia;
- answers: PollAnswer[];
- expiry: Date;
- allow_multiselect: boolean;
- results?: PollResult;
-}
-
-export interface PollMedia {
- text?: string;
- emoji?: PartialEmoji;
-}
-
-export interface PollAnswer {
- answer_id?: string;
- poll_media: PollMedia;
-}
-
-export interface PollResult {
- is_finalized: boolean;
- answer_counts: PollAnswerCount[];
-}
-
-export interface PollAnswerCount {
- id: string;
- count: number;
- me_voted: boolean;
-}
diff --git a/src/util/entities/Relationship.ts b/src/util/entities/Relationship.ts
index 0fe89c3..0d787ff 100644
--- a/src/util/entities/Relationship.ts
+++ b/src/util/entities/Relationship.ts
@@ -26,13 +26,7 @@
} from "typeorm";
import { BaseClass } from "./BaseClass";
import { User } from "./User";
-
-export enum RelationshipType {
- outgoing = 4,
- incoming = 3,
- blocked = 2,
- friends = 1,
-}
+import { RelationshipType } from "@spacebar/schemas";
@Entity({
name: "relationships",
diff --git a/src/util/entities/UserSettings.ts b/src/util/entities/UserSettings.ts
index b7b455f..b5e9135 100644
--- a/src/util/entities/UserSettings.ts
+++ b/src/util/entities/UserSettings.ts
@@ -19,6 +19,7 @@
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { BaseClassWithoutId } from "./BaseClass";
import { User } from "./User";
+import { CustomStatus, FriendSourceFlags, GuildFolder } from "@spacebar/schemas"
@Entity({
name: "user_settings",
@@ -142,21 +143,3 @@
return settings;
}
}
-
-interface CustomStatus {
- emoji_id?: string;
- emoji_name?: string;
- expires_at?: number;
- text?: string;
-}
-
-interface GuildFolder {
- color: number;
- guild_ids: string[];
- id: number;
- name: string;
-}
-
-interface FriendSourceFlags {
- all: boolean;
-}
diff --git a/src/util/entities/index.ts b/src/util/entities/index.ts
index 4c95e83..38190a4 100644
--- a/src/util/entities/index.ts
+++ b/src/util/entities/index.ts
@@ -27,6 +27,7 @@
export * from "./Categories";
export * from "./Channel";
export * from "./ClientRelease";
+export * from "./CloudAttachment";
export * from "./Config";
export * from "./ConnectedAccount";
export * from "./ConnectionConfigEntity";
diff --git a/src/util/index.ts b/src/util/index.ts
index f2b526e..dd2f7f3 100644
--- a/src/util/index.ts
+++ b/src/util/index.ts
@@ -24,7 +24,6 @@
export * from "./interfaces/index";
export * from "./entities/index";
export * from "./dtos/index";
-export * from "@spacebar/schemas*";
export * from "./imports";
export * from "./config";
export * from "./connections";
diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts
index 6692d33..2e9ba52 100644
--- a/src/util/interfaces/Event.ts
+++ b/src/util/interfaces/Event.ts
@@ -17,12 +17,10 @@
*/
import {
- RelationshipType,
ConnectedAccount,
Interaction,
ApplicationCommand,
Message,
- PartialEmoji,
Invite,
Role,
Emoji,
@@ -41,10 +39,10 @@
ReadyUserGuildSettingsEntries,
ReadyPrivateChannel,
GuildOrUnavailable,
- GuildCreateResponse,
PublicVoiceState,
} from "@spacebar/util";
import { JsonValue } from "@protobuf-ts/runtime";
+import { GuildCreateResponse, PartialEmoji, RelationshipType } from "@spacebar/schemas"
export interface Event {
guild_id?: string;
diff --git a/src/util/interfaces/Interaction.ts b/src/util/interfaces/Interaction.ts
index d1295cf..29fc931 100644
--- a/src/util/interfaces/Interaction.ts
+++ b/src/util/interfaces/Interaction.ts
@@ -16,7 +16,7 @@
along with this program. If not, see .
*/
-import { AllowedMentions, Embed } from "../entities/Message";
+import { Embed, AllowedMentions } from "@spacebar/schemas";
export interface Interaction {
id: string;
diff --git a/src/util/util/Gifs.ts b/src/util/util/Gifs.ts
index a5a5e64..23152e8 100644
--- a/src/util/util/Gifs.ts
+++ b/src/util/util/Gifs.ts
@@ -1,6 +1,6 @@
import { HTTPError } from "lambert-server";
import { Config } from "./Config";
-import { TenorGif } from "..";
+import { TenorGif } from "@spacebar/schemas";
export function parseGifResult(result: TenorGif) {
return {
diff --git a/src/webrtc/opcodes/Identify.ts b/src/webrtc/opcodes/Identify.ts
index 29b85e1..3abb26d 100644
--- a/src/webrtc/opcodes/Identify.ts
+++ b/src/webrtc/opcodes/Identify.ts
@@ -19,11 +19,13 @@
import { CLOSECODES } from "@spacebar/gateway";
import {
StreamSession,
- validateSchema,
- VoiceIdentifySchema,
VoiceState,
} from "@spacebar/util";
import {
+ validateSchema,
+ VoiceIdentifySchema,
+} from "@spacebar/schemas";
+import {
generateSsrc,
mediaServer,
Send,
diff --git a/src/webrtc/opcodes/SelectProtocol.ts b/src/webrtc/opcodes/SelectProtocol.ts
index 4a2ee85..2aa841f 100644
--- a/src/webrtc/opcodes/SelectProtocol.ts
+++ b/src/webrtc/opcodes/SelectProtocol.ts
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-import { SelectProtocolSchema, validateSchema } from "@spacebar/util";
+import { SelectProtocolSchema, validateSchema } from "@spacebar/schemas";
import {
VoiceOPCodes,
VoicePayload,
diff --git a/src/webrtc/opcodes/Video.ts b/src/webrtc/opcodes/Video.ts
index 2b327a0..1309fc4 100644
--- a/src/webrtc/opcodes/Video.ts
+++ b/src/webrtc/opcodes/Video.ts
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
-import { Stream, validateSchema, VoiceVideoSchema } from "@spacebar/util";
+import { Stream } from "@spacebar/util";
import {
mediaServer,
Send,
@@ -24,6 +24,7 @@
WebRtcWebSocket,
} from "@spacebar/webrtc";
import type { WebRtcClient } from "@spacebarchat/spacebar-webrtc-types";
+import { validateSchema, VoiceVideoSchema } from "@spacebar/schemas";
export async function onVideo(this: WebRtcWebSocket, payload: VoicePayload) {
if (!this.webRtcClient) return;