diff --git a/assets/locales/en/common.json b/assets/locales/en/common.json index edcafa1da2..f35197b866 100644 --- a/assets/locales/en/common.json +++ b/assets/locales/en/common.json @@ -13,7 +13,8 @@ "BASE_TYPE_CONSTANT": "This field must be {{value}}", "EMAIL_TYPE_INVALID_EMAIL": "Not a well-formed email address", "DATE_TYPE_PARSE": "Could not parse {{date}}. Should be ISO8601", - "BASE_TYPE_BAD_LENGTH": "Must be between {{length}} in length" + "BASE_TYPE_BAD_LENGTH": "Must be between {{length}} in length", + "ENUM_TYPE_COERCE": "Value \"{{value}}\" is not a valid enum value." }, "body": { "INVALID_BODY": "Invalid Body", diff --git a/assets/openapi.json b/assets/openapi.json index edfae315d0..69b01bb335 100644 --- a/assets/openapi.json +++ b/assets/openapi.json @@ -30,17 +30,6 @@ } }, "schemas": { - "CreateFingerprintResponse": { - "type": "object", - "properties": { - "fingerprint": { - "type": "string" - } - }, - "required": [ - "fingerprint" - ] - }, "ApplicationCommandSchema": { "type": "object", "properties": { @@ -300,6 +289,343 @@ "success" ] }, + "SKUGuildPowerupMetadataSchema": { + "type": "object", + "properties": { + "boost_price": { + "description": "The number of boosts the powerup costs", + "type": "integer" + }, + "purchase_limit": { + "description": "The maximum number of entitlements a guild can have for the powerup", + "type": "integer" + }, + "guild_features": { + "$ref": "#/components/schemas/GuildPremiumFeatures", + "description": "The features granted by the powerup" + }, + "category_type": { + "$ref": "#/components/schemas/GuildPowerupCategoryType", + "description": "The type of guild powerup" + }, + "static_image_url": { + "description": "URL of the static banner image for the powerup", + "type": "string" + }, + "animated_image_url": { + "description": "URL of the animated banner image for the powerup", + "type": "string" + }, + "store_removal_date": { + "description": "When the powerup will be removed from the store", + "type": "string", + "nullable": true + } + }, + "required": [ + "animated_image_url", + "boost_price", + "category_type", + "guild_features", + "purchase_limit", + "static_image_url" + ] + }, + "StoredEmailResponse": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string" + }, + "From": { + "type": "string" + }, + "Message-Id": { + "type": "string" + }, + "Mime-Version": { + "type": "string" + }, + "Subject": { + "type": "string" + }, + "To": { + "type": "string" + }, + "sender": { + "type": "string" + }, + "recipients": { + "type": "string" + }, + "from": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "body-html": { + "type": "string" + }, + "body-plain": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "content-type": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content-type", + "name", + "size", + "url" + ] + } + ], + "minItems": 1, + "maxItems": 1 + }, + "content-id-map": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "message-headers": { + "type": "array", + "items": { + "type": "array", + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "minItems": 2, + "maxItems": 2 + } + }, + "stripped-html": { + "type": "string" + }, + "stripped-text": { + "type": "string" + }, + "stripped-signature": { + "type": "string" + }, + "Content-Transfer-Encoding": { + "type": "string" + }, + "X-Mailgun-Tag": { + "type": "string" + }, + "X-Mailgun-Template-Name": { + "type": "string" + }, + "X-Mailgun-Template-Variables": { + "type": "string" + }, + "X-Mailgun-Deliver-By": { + "type": "string" + } + }, + "required": [ + "Content-Type", + "From", + "Message-Id", + "Mime-Version", + "Subject", + "To", + "body-html", + "body-plain", + "message-headers", + "recipients", + "sender", + "stripped-html", + "stripped-signature", + "stripped-text" + ] + }, + "MessagesQueueStatusAPIResponse": { + "type": "object", + "properties": { + "regular": { + "type": "object", + "properties": { + "is_disabled": { + "type": "boolean" + }, + "disabled": { + "type": "object", + "properties": { + "until": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "reason", + "until" + ] + } + }, + "additionalProperties": false, + "required": [ + "disabled", + "is_disabled" + ] + }, + "scheduled": { + "type": "object", + "properties": { + "is_disabled": { + "type": "boolean" + }, + "disabled": { + "type": "object", + "properties": { + "until": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "reason", + "until" + ] + } + }, + "additionalProperties": false, + "required": [ + "disabled", + "is_disabled" + ] + } + }, + "required": [ + "regular", + "scheduled" + ] + }, + "SubaccountSendingLimitResponse": { + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "current": { + "type": "integer" + }, + "period": { + "type": "string" + } + }, + "required": [ + "current", + "limit", + "period" + ] + }, + "SubaccountSetSendingLimitResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] + }, + "SubaccountDestroyResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "ActivateDomainKeyResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "authority": { + "type": "string" + }, + "selector": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "active", + "authority", + "message", + "selector", + "status" + ] + }, + "DeactivateDomainKeyResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "authority": { + "type": "string" + }, + "selector": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "status": { + "type": "integer" + } + }, + "required": [ + "active", + "authority", + "message", + "selector", + "status" + ] + }, "FieldErrorResponse": { "type": "object", "properties": { @@ -745,3811 +1071,6424 @@ "id" ] }, - "GuildProfileResponse": { + "QuestRewardSchema": { "type": "object", "properties": { - "id": { + "type": { + "$ref": "#/components/schemas/QuestRewardType" + }, + "sku_id": { "type": "string" }, - "name": { + "asset": { "type": "string" }, - "icon_hash": { + "asset_video": { "type": "string", "nullable": true }, - "member_count": { - "type": "integer" - }, - "online_count": { - "type": "integer" - }, - "description": { - "type": "string" - }, - "brand_color_primary": { - "type": "string" + "messages": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "name_with_article": { + "type": "string" + }, + "redemption_instructions_by_platform": { + "$ref": "#/components/schemas/Record" + } + }, + "additionalProperties": false, + "required": [ + "name", + "name_with_article", + "redemption_instructions_by_platform" + ] }, - "banner_hash": { - "type": "string", + "approximate_count": { + "type": "integer", "nullable": true }, - "game_application_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "game_activity": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/GameActivity" - } + "redemption_link": { + "type": "string", + "nullable": true }, - "tag": { + "expires_at": { "type": "string", "nullable": true }, - "badge": { - "$ref": "#/components/schemas/GuildBadgeType" + "expires_at_premium": { + "type": "string", + "nullable": true }, - "badge_color_primary": { - "type": "string" + "expiration_mode": { + "enum": [ + 1, + 2, + 3 + ], + "type": "number" }, - "badge_color_secondary": { - "type": "string" + "orb_quantity": { + "type": "integer" }, - "badge_hash": { - "type": "string" + "quantity": { + "type": "integer" + } + }, + "required": [ + "messages", + "sku_id", + "type" + ] + }, + "QuestRewardConfigSchema": { + "type": "object", + "properties": { + "assignment_method": { + "$ref": "#/components/schemas/QuestAssignmentMethod" }, - "traits": { + "platforms": { "type": "array", "items": { - "$ref": "#/components/schemas/GuildTrait" + "$ref": "#/components/schemas/QuestPlatformType" } }, - "features": { + "rewards": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/QuestRewardSchema" } }, - "visibility": { - "$ref": "#/components/schemas/GuildVisibilityLevel" - }, - "custom_banner_hash": { - "type": "string", - "nullable": true - }, - "premium_subscription_count": { - "type": "integer" - }, - "premium_tier": { - "type": "integer" + "rewards_expire_at": { + "type": "string" } }, "required": [ - "badge", - "badge_color_primary", - "badge_color_secondary", - "badge_hash", - "banner_hash", - "brand_color_primary", - "custom_banner_hash", - "description", - "features", - "game_activity", - "game_application_ids", - "icon_hash", - "id", - "member_count", - "name", - "online_count", - "premium_subscription_count", - "premium_tier", - "tag", - "traits", - "visibility" + "assignment_method", + "platforms", + "rewards", + "rewards_expire_at" ] }, - "GuildAvailableSchema": { + "QuestApplicationSchema": { "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```", "type": "string" }, - "available": { - "type": "boolean" + "link": { + "type": "string" + }, + "name": { + "type": "string" } }, "required": [ - "available", - "id" + "id", + "name" ] }, - "InstanceUserDeleteSchema": { - "$ref": "#/components/schemas/InstanceUserDeleteSchemaContent" - }, - "UserSettingsUpdateSchema": { + "QuestVideoAssetSchema": { "type": "object", "properties": { - "afk_timeout": { + "url": { + "type": "string" + }, + "width": { "type": "integer" }, - "allow_accessibility_detection": { - "type": "boolean" + "height": { + "type": "integer" }, - "animate_emoji": { - "type": "boolean" + "thumbnail": { + "type": "string" }, - "animate_stickers": { - "type": "integer" + "caption": { + "type": "string" }, - "contact_sync_enabled": { - "type": "boolean" + "transcript": { + "type": "string" + } + }, + "required": [ + "height", + "thumbnail", + "url", + "width" + ] + }, + "QuestTaskSchema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/QuestEventType" }, - "convert_emoticons": { - "type": "boolean" + "target": { + "type": "integer" }, - "custom_status": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomStatus" + "assets": { + "type": "object", + "properties": { + "video": { + "$ref": "#/components/schemas/QuestVideoAssetSchema" }, - { - "type": "null" + "video_low_res": { + "$ref": "#/components/schemas/QuestVideoAssetSchema" + }, + "video_hls": { + "$ref": "#/components/schemas/QuestVideoAssetSchema" } + }, + "additionalProperties": false, + "required": [ + "video" ] }, - "default_guilds_restricted": { - "type": "boolean" - }, - "detect_platform_accounts": { - "type": "boolean" - }, - "developer_mode": { - "type": "boolean" - }, - "disable_games_tab": { - "type": "boolean" - }, - "enable_tts_command": { - "type": "boolean" - }, - "explicit_content_filter": { - "type": "integer" - }, - "friend_discovery_flags": { - "type": "integer" - }, - "friend_source_flags": { - "$ref": "#/components/schemas/FriendSourceFlags" - }, - "gateway_connected": { - "type": "boolean" - }, - "gif_auto_play": { - "type": "boolean" - }, - "guild_folders": { + "applications": { "type": "array", "items": { - "$ref": "#/components/schemas/GuildFolder" + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] } }, - "guild_positions": { + "external_ids": { "type": "array", "items": { "type": "string" } }, - "inline_attachment_media": { - "type": "boolean" - }, - "inline_embed_media": { - "type": "boolean" + "messages": { + "type": "object", + "properties": { + "video_title": { + "type": "string" + }, + "task_title": { + "type": "string" + }, + "task_description": { + "type": "string" + } + }, + "additionalProperties": false }, - "locale": { + "event_name": { "type": "string" + } + }, + "required": [ + "target", + "type" + ] + }, + "QuestTaskConfigV2Schema": { + "type": "object", + "properties": { + "join_operator": { + "$ref": "#/components/schemas/QuestJoinOperator" }, - "message_display_compact": { - "type": "boolean" + "tasks": { + "$ref": "#/components/schemas/Partial>" + } + }, + "required": [ + "join_operator", + "tasks" + ] + }, + "QuestConfigSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "native_phone_integration_enabled": { - "type": "boolean" + "config_version": { + "type": "integer" }, - "render_embeds": { - "type": "boolean" + "starts_at": { + "type": "string" }, - "render_reactions": { - "type": "boolean" + "expires_at": { + "type": "string" }, - "restricted_guilds": { + "features": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/QuestFeature" } }, - "show_current_game": { - "type": "boolean" + "application": { + "$ref": "#/components/schemas/QuestApplicationSchema" }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], - "type": "string" + "assets": { + "type": "object", + "properties": { + "hero": { + "type": [ + "null", + "string" + ] + }, + "hero_video": { + "type": [ + "null", + "string" + ] + }, + "quest_bar_hero": { + "type": [ + "null", + "string" + ] + }, + "quest_bar_hero_video": { + "type": [ + "null", + "string" + ] + }, + "game_tile": { + "type": [ + "null", + "string" + ] + }, + "game_tile_dark": { + "type": [ + "null", + "string" + ] + }, + "game_tile_light": { + "type": [ + "null", + "string" + ] + }, + "logotype": { + "type": [ + "null", + "string" + ] + }, + "logotype_dark": { + "type": [ + "null", + "string" + ] + }, + "logotype_light": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "game_tile", + "game_tile_dark", + "game_tile_light", + "hero", + "logotype", + "logotype_dark", + "logotype_light", + "quest_bar_hero" + ] }, - "stream_notifications_enabled": { - "type": "boolean" + "colors": { + "type": "object", + "properties": { + "primary": { + "type": "string" + }, + "secondary": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "primary", + "secondary" + ] }, - "theme": { - "enum": [ - "dark", - "light" - ], - "type": "string" + "messages": { + "type": "object", + "properties": { + "quest_name": { + "type": "string" + }, + "game_title": { + "type": "string" + }, + "game_publisher": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "game_publisher", + "game_title", + "quest_name" + ] }, - "timezone_offset": { - "type": "integer" + "task_config": {}, + "task_config_v2": { + "$ref": "#/components/schemas/QuestTaskConfigV2Schema" }, - "view_nsfw_guilds": { - "type": "boolean" + "rewards_config": { + "$ref": "#/components/schemas/QuestRewardConfigSchema" + }, + "share_policy": { + "$ref": "#/components/schemas/QuestSharePolicy" + }, + "cta_config": { + "type": "object", + "properties": { + "button_label": { + "type": "string" + }, + "link": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "android": { + "type": "object", + "properties": { + "android_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "android_app_id" + ] + }, + "ios": { + "type": "object", + "properties": { + "ios_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ios_app_id" + ] + } + }, + "additionalProperties": false, + "required": [ + "button_label", + "link" + ] } - } + }, + "required": [ + "application", + "assets", + "colors", + "config_version", + "cta_config", + "expires_at", + "features", + "id", + "messages", + "rewards_config", + "share_policy", + "starts_at", + "task_config_v2" + ] }, - "UserSettingsSchema": { + "QuestUserStatusProgressSchema": { "type": "object", "properties": { - "afk_timeout": { + "value": { "type": "integer" }, - "allow_accessibility_detection": { - "type": "boolean" - }, - "animate_emoji": { - "type": "boolean" - }, - "animate_stickers": { - "type": "integer" + "event_name": { + "$ref": "#/components/schemas/QuestEventType" }, - "contact_sync_enabled": { - "type": "boolean" + "updated_at": { + "type": "string" }, - "convert_emoticons": { - "type": "boolean" + "completed_at": { + "type": "string", + "nullable": true }, - "custom_status": { + "heartbeat": { "anyOf": [ { - "$ref": "#/components/schemas/CustomStatus" + "type": "object", + "properties": { + "last_beat_at": { + "type": "string" + }, + "expires_at": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "expires_at", + "last_beat_at" + ] }, { "type": "null" } ] + } + }, + "required": [ + "completed_at", + "event_name", + "heartbeat", + "updated_at", + "value" + ] + }, + "QuestUserStatusSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "string" }, - "default_guilds_restricted": { - "type": "boolean" + "quest_id": { + "type": "string" }, - "detect_platform_accounts": { - "type": "boolean" + "enrolled_at": { + "type": "string", + "nullable": true }, - "developer_mode": { - "type": "boolean" + "completed_at": { + "type": "string", + "nullable": true }, - "disable_games_tab": { - "type": "boolean" + "claimed_at": { + "type": "string", + "nullable": true }, - "enable_tts_command": { - "type": "boolean" + "claimed_tier": { + "type": "integer", + "nullable": true }, - "explicit_content_filter": { - "type": "integer" + "last_stream_heartbeat_at": { + "type": "string", + "nullable": true }, - "friend_discovery_flags": { + "stream_progress_seconds": { "type": "integer" }, - "friend_source_flags": { - "$ref": "#/components/schemas/FriendSourceFlags" - }, - "gateway_connected": { - "type": "boolean" + "dismissed_quest_content": { + "type": "integer" }, - "gif_auto_play": { - "type": "boolean" + "progress": { + "$ref": "#/components/schemas/Record" + } + }, + "required": [ + "claimed_at", + "completed_at", + "enrolled_at", + "quest_id", + "stream_progress_seconds", + "user_id" + ] + }, + "ClaimedQuestSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "guild_folders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GuildFolder" - } + "config": { + "$ref": "#/components/schemas/QuestConfigSchema" }, - "guild_positions": { - "type": "array", - "items": { - "type": "string" - } + "user_status": { + "$ref": "#/components/schemas/QuestUserStatusSchema" + } + }, + "required": [ + "config", + "id", + "user_status" + ] + }, + "QuestAdIdentifiersSchema": { + "type": "object", + "properties": { + "campaign_id": { + "type": "string" }, - "inline_attachment_media": { - "type": "boolean" + "ad_set_id": { + "type": "string" }, - "inline_embed_media": { - "type": "boolean" + "ad_id": { + "type": "string" }, - "locale": { + "creative_id": { "type": "string" }, - "message_display_compact": { - "type": "boolean" + "creative_type": { + "type": "string" + } + }, + "required": [ + "ad_id", + "ad_set_id", + "campaign_id", + "creative_id", + "creative_type" + ] + }, + "QuestClaimRewardRequestSchema": { + "type": "object", + "properties": { + "location": { + "type": "integer" }, - "native_phone_integration_enabled": { - "type": "boolean" + "platform": { + "$ref": "#/components/schemas/QuestPlatformType" + } + }, + "required": [ + "location", + "platform" + ] + }, + "QuestEnrollRequestSchema": { + "type": "object", + "properties": { + "location": { + "type": "integer" }, - "render_embeds": { + "is_targeted": { "type": "boolean" }, - "render_reactions": { - "type": "boolean" + "metadata_raw": { + "type": "string", + "nullable": true }, - "restricted_guilds": { - "type": "array", - "items": { - "type": "string" - } + "metadata_sealed": { + "type": "string", + "nullable": true + } + }, + "required": [ + "location" + ] + }, + "QuestEntitlementExpirationMetadataSchema": { + "type": "object", + "properties": { + "extended": { + "type": "boolean" }, - "show_current_game": { + "extendable": { "type": "boolean" + } + }, + "required": [ + "extendable", + "extended" + ] + }, + "QuestRewardCodeSchema": { + "type": "object", + "properties": { + "quest_id": { + "type": "string" }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], + "code": { "type": "string" }, - "stream_notifications_enabled": { - "type": "boolean" + "platform": { + "$ref": "#/components/schemas/QuestPlatformType" }, - "theme": { - "enum": [ - "dark", - "light" - ], + "user_id": { "type": "string" }, - "timezone_offset": { - "type": "integer" + "claimed_at": { + "type": "string" }, - "view_nsfw_guilds": { - "type": "boolean" + "tier": { + "type": "integer", + "nullable": true } }, "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" + "claimed_at", + "code", + "platform", + "quest_id", + "tier", + "user_id" ] }, - "IdentifySchema": { + "QuestSchema": { "type": "object", "properties": { - "token": { + "id": { "type": "string" }, - "properties": { - "type": "object", - "properties": { - "os": { - "type": "string" - }, - "os_atch": { - "type": "string" - }, - "browser": { - "type": "string" - }, - "device": { - "type": "string" - }, - "$os": { - "type": "string" - }, - "$browser": { - "type": "string" - }, - "$device": { - "type": "string" - }, - "browser_user_agent": { - "type": "string" - }, - "browser_version": { - "type": "string" - }, - "os_version": { - "type": "string" - }, - "referrer": { - "type": "string" - }, - "referring_domain": { - "type": "string" - }, - "referrer_current": { - "type": "string" - }, - "referring_domain_current": { - "type": "string" - }, - "release_channel": { - "enum": [ - "canary", - "dev", - "ptb", - "stable" - ], - "type": "string" - }, - "client_build_number": { - "type": "integer" - }, - "client_event_source": { - "type": "string" - }, - "client_version": { - "type": "string" + "config": { + "$ref": "#/components/schemas/QuestConfigSchema" + }, + "preview": { + "type": "boolean" + }, + "targeted_content": { + "type": "array", + "items": {} + }, + "user_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/QuestUserStatusSchema" }, - "system_locale": { - "type": "string" + { + "type": "null" } - }, - "additionalProperties": false + ] + } + }, + "required": [ + "config", + "id", + "preview", + "targeted_content", + "user_status" + ] + }, + "QuestVideoProgressRequestSchema": { + "type": "object", + "properties": { + "timestamp": { + "type": "integer" + } + }, + "required": [ + "timestamp" + ] + }, + "EntitlementQuestRewardMetadataSchema": { + "type": "object", + "properties": { + "tag": { + "$ref": "#/components/schemas/QuestRewardType" }, - "intents": { - "type": "number" + "reward_code": { + "$ref": "#/components/schemas/QuestRewardCodeSchema" + } + }, + "required": [ + "tag" + ] + }, + "EntitlementTenantMetadataSchema": { + "type": "object", + "properties": { + "quest_rewards": { + "$ref": "#/components/schemas/EntitlementQuestRewardMetadataSchema" + } + }, + "required": [ + "quest_rewards" + ] + }, + "EntitlementSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "presence": { - "$ref": "#/components/schemas/ActivitySchema" + "type": { + "$ref": "#/components/schemas/EntitlementType" }, - "compress": { - "type": "boolean" + "sku_id": { + "type": "string" }, - "large_threshold": { - "type": "integer" + "application_id": { + "type": "string" }, - "largeThreshold": { - "type": "integer" + "user_id": { + "type": "string" }, - "shard": { - "minItems": 2, - "maxItems": 2, - "type": "array", - "items": { - "type": "number" - } + "user": { + "$ref": "#/components/schemas/Partial" }, - "guild_subscriptions": { - "type": "boolean" + "guild_id": { + "type": "string" }, - "capabilities": { - "type": "integer" + "parent_id": { + "type": "string" }, - "client_state": { - "type": "object", - "properties": { - "guild_hashes": {}, - "highest_last_message_id": { - "type": "integer" - }, - "read_state_version": { - "type": "integer" - }, - "user_guild_settings_version": { - "type": "integer" - }, - "user_settings_version": { - "type": "integer" - }, - "useruser_guild_settings_version": { - "type": "integer" - }, - "private_channels_version": { - "type": "integer" - }, - "guild_versions": {}, - "api_code_version": { - "type": "integer" - }, - "initial_guild_id": { - "type": "string" - } - }, - "additionalProperties": false + "deleted": { + "type": "boolean" }, - "clientState": { - "type": "object", - "properties": { - "guildHashes": {}, - "highestLastMessageId": { - "type": "integer" - }, - "readStateVersion": { - "type": "integer" - }, - "userGuildSettingsVersion": { - "type": "integer" - }, - "useruserGuildSettingsVersion": { - "type": "integer" - }, - "guildVersions": {}, - "apiCodeVersion": { - "type": "integer" - }, - "initialGuildId": { - "type": "string" - } - }, - "additionalProperties": false + "consumed": { + "type": "boolean" }, - "v": { - "type": "integer" - } - }, - "required": [ - "properties", - "token" - ] - }, - "StreamCreateSchema": { - "type": "object", - "properties": { - "type": { - "enum": [ - "call", - "guild" - ], + "branches": { + "type": "array", + "items": { + "type": "string" + } + }, + "starts_at": { + "type": "string", + "nullable": true + }, + "ends_at": { + "type": "string", + "nullable": true + }, + "promotion_id": { + "type": "string", + "nullable": true + }, + "subscription_id": { "type": "string" }, - "channel_id": { + "gift_code_flags": { + "type": "number" + }, + "gift_code_batch_id": { "type": "string" }, - "guild_id": { + "gifter_user_id": { "type": "string" }, - "preferred_region": { + "gift_style": { + "enum": [ + 1, + 10, + 11, + 12, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "type": "number" + }, + "fulfillment_status": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "type": "number" + }, + "fulfilled_at": { "type": "string" + }, + "source_type": { + "enum": [ + 1, + 11, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "type": "number" + }, + "tenant_metadata": { + "$ref": "#/components/schemas/Record" + }, + "sku": { + "$ref": "#/components/schemas/SKU" + }, + "subscription_plan": { + "$ref": "#/components/schemas/Partial" } }, "required": [ - "channel_id", - "type" + "application_id", + "deleted", + "ends_at", + "gift_code_flags", + "id", + "promotion_id", + "sku_id", + "starts_at", + "type", + "user_id" ] }, - "StreamDeleteSchema": { + "GuildProfileResponse": { "type": "object", "properties": { - "stream_key": { + "id": { "type": "string" - } - }, - "required": [ - "stream_key" - ] - }, - "StreamWatchSchema": { - "type": "object", - "properties": { - "stream_key": { + }, + "name": { "type": "string" - } - }, - "required": [ - "stream_key" - ] - }, - "APIErrorResponse": { - "type": "object", - "properties": { - "code": { + }, + "icon_hash": { + "type": "string", + "nullable": true + }, + "member_count": { "type": "integer" }, - "message": { + "online_count": { + "type": "integer" + }, + "description": { "type": "string" }, - "errors": { + "brand_color_primary": { + "type": "string" + }, + "banner_hash": { + "type": "string", + "nullable": true + }, + "game_application_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "game_activity": { "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" - ] + "$ref": "#/components/schemas/GameActivity" } - } - }, - "required": [ - "code", - "errors", - "message" - ] - }, - "CaptchaRequiredResponse": { - "type": "object", - "properties": { - "captcha_key": { - "type": "string" }, - "captcha_sitekey": { + "tag": { + "type": "string", + "nullable": true + }, + "badge": { + "$ref": "#/components/schemas/GuildBadgeType" + }, + "badge_color_primary": { "type": "string" }, - "captcha_service": { + "badge_color_secondary": { "type": "string" - } - }, - "required": [ - "captcha_key", - "captcha_service", - "captcha_sitekey" - ] - }, - "APIErrorOrCaptchaResponse": { - "anyOf": [ - { - "$ref": "#/components/schemas/APIErrorResponse" }, - { - "$ref": "#/components/schemas/CaptchaRequiredResponse" - } - ] - }, - "AccountStandingResponse": { - "type": "object", - "properties": { - "classifications": { + "badge_hash": { + "type": "string" + }, + "traits": { "type": "array", "items": { - "$ref": "#/components/schemas/Classification" + "$ref": "#/components/schemas/GuildTrait" } }, - "guild_classifications": { + "features": { "type": "array", "items": { - "$ref": "#/components/schemas/GuildClassification" + "type": "string" } }, - "account_standing": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/AccountStandingState" - } - }, - "additionalProperties": false, - "required": [ - "state" - ] - }, - "is_dsa_eligible": { - "type": "boolean" - }, - "username": { - "type": "string" + "visibility": { + "$ref": "#/components/schemas/GuildVisibilityLevel" }, - "discriminator": { - "type": "string" + "custom_banner_hash": { + "type": "string", + "nullable": true }, - "is_appeal_eligible": { - "type": "boolean" + "premium_subscription_count": { + "type": "integer" }, - "appeal_eligibility": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AppealEligibility" - } + "premium_tier": { + "type": "integer" } }, "required": [ - "account_standing", - "appeal_eligibility", - "classifications", - "discriminator", - "guild_classifications", - "is_appeal_eligible", - "is_dsa_eligible", - "username" + "badge", + "badge_color_primary", + "badge_color_secondary", + "badge_hash", + "banner_hash", + "brand_color_primary", + "custom_banner_hash", + "description", + "features", + "game_activity", + "game_application_ids", + "icon_hash", + "id", + "member_count", + "name", + "online_count", + "premium_subscription_count", + "premium_tier", + "tag", + "traits", + "visibility" ] }, - "BackupCodesChallengeResponse": { + "GuildAvailableSchema": { "type": "object", "properties": { - "nonce": { + "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```", "type": "string" }, - "regenerate_nonce": { - "type": "string" - } - }, - "required": [ - "nonce", - "regenerate_nonce" - ] - }, - "CollectiblesCategoriesResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CollectiblesCategoryItem" - } - }, - "CollectiblesMarketingResponse": { - "type": "object", - "properties": { - "marketings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/CollectiblesMarketingItem" - } + "available": { + "type": "boolean" } }, "required": [ - "marketings" + "available", + "id" ] }, - "CollectiblesShopResponse": { - "type": "object", - "properties": { - "shop_blocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnyShopBlock" - } - }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CollectiblesCategoryItem" - } - } - }, - "required": [ - "categories", - "shop_blocks" - ] + "InstanceUserDeleteSchema": { + "$ref": "#/components/schemas/InstanceUserDeleteSchemaContent" }, - "DiscoverableGuildsResponse": { + "UserSettingsUpdateSchema": { "type": "object", "properties": { - "total": { + "afk_timeout": { "type": "integer" }, - "guilds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Guild" - } + "allow_accessibility_detection": { + "type": "boolean" }, - "offset": { - "type": "integer" + "animate_emoji": { + "type": "boolean" }, - "limit": { + "animate_stickers": { "type": "integer" - } - }, - "required": [ - "guilds", - "limit", - "offset", - "total" - ] - }, - "DmMessagesResponseSchema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PartialMessage" - } - }, - "EmailDomainLookupResponse": { - "type": "object", - "properties": { - "guilds_info": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HubGuild" - } }, - "has_matching_guild": { + "contact_sync_enabled": { "type": "boolean" - } - }, - "required": [ - "guilds_info", - "has_matching_guild" - ] - }, - "EmailDomainLookupVerifyCodeResponse": { - "type": "object", - "properties": { - "guild": { - "$ref": "#/components/schemas/Guild" }, - "joined": { + "convert_emoticons": { "type": "boolean" - } - }, - "required": [ - "guild", - "joined" - ] - }, - "EmojiSourceResponse": { - "type": "object", - "properties": { - "type": { - "enum": [ - "APPLICATION", - "GUILD" - ], - "type": "string" }, - "guild": { + "custom_status": { "anyOf": [ { - "$ref": "#/components/schemas/EmojiGuild" + "$ref": "#/components/schemas/CustomStatus" }, { "type": "null" } ] }, - "application": { - "anyOf": [ - { - "$ref": "#/components/schemas/EmojiApplication" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "type" - ] - }, - "GatewayBotResponse": { - "type": "object", - "properties": { - "url": { - "type": "string" + "default_guilds_restricted": { + "type": "boolean" }, - "shards": { - "type": "integer" + "detect_platform_accounts": { + "type": "boolean" }, - "session_start_limit": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "remaining": { - "type": "integer" - }, - "reset_after": { - "type": "integer" - }, - "max_concurrency": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "max_concurrency", - "remaining", - "reset_after", - "total" - ] - } - }, - "required": [ - "session_start_limit", - "shards", - "url" - ] - }, - "GatewayResponse": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "required": [ - "url" - ] - }, - "GenerateRegistrationTokensResponse": { - "type": "object", - "properties": { - "tokens": { + "developer_mode": { + "type": "boolean" + }, + "disable_games_tab": { + "type": "boolean" + }, + "enable_tts_command": { + "type": "boolean" + }, + "explicit_content_filter": { + "type": "integer" + }, + "friend_discovery_flags": { + "type": "integer" + }, + "friend_source_flags": { + "$ref": "#/components/schemas/FriendSourceFlags" + }, + "gateway_connected": { + "type": "boolean" + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildFolder" + } + }, + "guild_positions": { "type": "array", "items": { "type": "string" } - } - }, - "required": [ - "tokens" - ] - }, - "GuildBansResponse": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "nullable": true }, - "user": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "id": { - "type": "string" - }, - "avatar": { - "type": [ - "null", - "string" - ] - }, - "public_flags": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "avatar", - "discriminator", - "id", - "public_flags", - "username" - ] - } - }, - "required": [ - "reason", - "user" - ] - }, - "GuildCreateResponse": { - "type": "object", - "properties": { - "id": { - "type": "string" + "inline_attachment_media": { + "type": "boolean" }, - "name": { - "type": "string" + "inline_embed_media": { + "type": "boolean" }, - "primary_category_id": { + "locale": { "type": "string" }, - "large": { + "message_display_compact": { "type": "boolean" }, - "max_members": { - "type": "integer" + "native_phone_integration_enabled": { + "type": "boolean" }, - "max_presences": { - "type": "integer" + "render_embeds": { + "type": "boolean" }, - "max_video_channel_users": { - "type": "integer" + "render_reactions": { + "type": "boolean" }, - "member_count": { - "type": "integer" + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } }, - "presence_count": { - "type": "integer" + "show_current_game": { + "type": "boolean" }, - "template_id": { + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], "type": "string" }, - "mfa_level": { - "type": "integer" + "stream_notifications_enabled": { + "type": "boolean" }, - "owner_id": { + "theme": { + "enum": [ + "dark", + "light" + ], "type": "string" }, - "premium_subscription_count": { + "timezone_offset": { "type": "integer" }, - "premium_tier": { + "view_nsfw_guilds": { + "type": "boolean" + } + } + }, + "UserSettingsSchema": { + "type": "object", + "properties": { + "afk_timeout": { "type": "integer" }, - "welcome_screen": { - "$ref": "#/components/schemas/GuildWelcomeScreen" - }, - "widget_channel_id": { - "type": "string" + "allow_accessibility_detection": { + "type": "boolean" }, - "widget_enabled": { + "animate_emoji": { "type": "boolean" }, - "nsfw_level": { + "animate_stickers": { "type": "integer" }, - "nsfw": { + "contact_sync_enabled": { "type": "boolean" }, - "parent": { - "type": "string" - }, - "region": { - "type": "string" - }, - "icon": { - "type": "string", - "nullable": true - }, - "banner": { - "type": "string", - "nullable": true - }, - "system_channel_id": { - "type": "string" + "convert_emoticons": { + "type": "boolean" }, - "rules_channel_id": { - "type": "string" + "custom_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomStatus" + }, + { + "type": "null" + } + ] }, - "guild_template_code": { - "type": "string" + "default_guilds_restricted": { + "type": "boolean" }, - "staff_only": { + "detect_platform_accounts": { "type": "boolean" }, - "splash": { - "type": "string", - "nullable": true + "developer_mode": { + "type": "boolean" }, - "description": { - "type": "string" + "disable_games_tab": { + "type": "boolean" }, - "features": { - "type": "array", - "items": { - "type": "string" - } + "enable_tts_command": { + "type": "boolean" }, - "verification_level": { + "explicit_content_filter": { "type": "integer" }, - "default_message_notifications": { + "friend_discovery_flags": { "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" + "friend_source_flags": { + "$ref": "#/components/schemas/FriendSourceFlags" }, - "preferred_locale": { - "type": "string" + "gateway_connected": { + "type": "boolean" }, - "premium_progress_bar_enabled": { + "gif_auto_play": { "type": "boolean" }, - "discovery_splash": { - "type": "string" + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildFolder" + } }, - "safety_alerts_channel_id": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "nsfw", - "welcome_screen", - "widget_enabled" - ] - }, - "GuildDiscoveryRequirementsResponse": { - "type": "object", - "properties": { - "guild_id": { - "type": "string" + "guild_positions": { + "type": "array", + "items": { + "type": "string" + } }, - "safe_environment": { + "inline_attachment_media": { "type": "boolean" }, - "healthy": { + "inline_embed_media": { "type": "boolean" }, - "health_score_pending": { - "type": "boolean" + "locale": { + "type": "string" }, - "size": { + "message_display_compact": { "type": "boolean" }, - "nsfw_properties": {}, - "protected": { + "native_phone_integration_enabled": { "type": "boolean" }, - "sufficient": { + "render_embeds": { "type": "boolean" }, - "sufficient_without_grace_period": { + "render_reactions": { "type": "boolean" }, - "valid_rules_channel": { - "type": "boolean" + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } }, - "retention_healthy": { + "show_current_game": { "type": "boolean" }, - "engagement_healthy": { - "type": "boolean" + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], + "type": "string" }, - "age": { + "stream_notifications_enabled": { "type": "boolean" }, - "minimum_age": { - "type": "integer" - }, - "health_score": { - "type": "object", - "properties": { - "avg_nonnew_participators": { - "type": "integer" - }, - "avg_nonnew_communicators": { - "type": "integer" - }, - "num_intentful_joiners": { - "type": "integer" - }, - "perc_ret_w1_intentful": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "avg_nonnew_communicators", - "avg_nonnew_participators", - "num_intentful_joiners", - "perc_ret_w1_intentful" - ] + "theme": { + "enum": [ + "dark", + "light" + ], + "type": "string" }, - "minimum_size": { + "timezone_offset": { "type": "integer" + }, + "view_nsfw_guilds": { + "type": "boolean" } }, "required": [ - "age", - "engagement_healthy", - "guild_id", - "health_score", - "health_score_pending", - "healthy", - "minimum_age", - "minimum_size", - "nsfw_properties", - "protected", - "retention_healthy", - "safe_environment", - "size", - "sufficient", - "sufficient_without_grace_period", - "valid_rules_channel" + "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" ] }, - "GuildMessagesSearchResponse": { + "SKUContentRatingSchema": { "type": "object", "properties": { - "messages": { + "rating": { + "$ref": "#/components/schemas/SKUContentRating", + "description": "The content rating" + }, + "descriptors": { + "description": "The content descriptors", "type": "array", "items": { - "$ref": "#/components/schemas/GuildMessagesSearchMessage" + "$ref": "#/components/schemas/SKUContentDescriptor" } - }, - "total_results": { - "type": "integer" } }, "required": [ - "messages", - "total_results" + "descriptors", + "rating" ] }, - "GuildPruneResponse": { + "SKUExternalSKUStrategySchema": { "type": "object", "properties": { - "pruned": { - "type": "integer" + "type": { + "$ref": "#/components/schemas/SKUExternalSKUStrategyType", + "description": "The type of external SKU strategy" + }, + "metadata": { + "description": "Additional metadata for the external SKU strategy", + "$ref": "#/components/schemas/Record" } }, "required": [ - "pruned" + "type" ] }, - "GuildPurgeResponse": { + "SKUGameServerPowerupMetadataSchema": { "type": "object", "properties": { - "purged": { + "boost_price": { + "description": "The number of boosts the powerup costs", "type": "integer" - } - }, - "required": [ - "purged" - ] - }, - "GuildRecommendationsResponse": { - "type": "object", - "properties": { - "recommended_guilds": { + }, + "purchase_limit": { + "description": "The maximum number of entitlements a guild can have for the powerup", + "type": "integer" + }, + "guild_features": { + "$ref": "#/components/schemas/GuildPremiumFeatures", + "description": "The features granted by the powerup" + }, + "category_type": { + "$ref": "#/components/schemas/GuildPowerupCategoryType", + "description": "The type of guild powerup" + }, + "available_providers": { + "description": "The available providers", "type": "array", "items": { - "$ref": "#/components/schemas/Guild" + "type": "string", + "const": "shockbyte" } }, - "load_id": { + "memory": { + "description": "The amount of RAM in megabytes that the game server provides", + "type": "integer" + }, + "cpu": { + "description": "The amount of CPU cores that the game server provides", + "type": "integer" + }, + "storage": { + "description": "The amount of storage in gigabytes that the game server provides", + "type": "integer" + }, + "max_slots": { + "description": "Maximum amount of players that can connect to the game server", + "type": "integer" + }, + "memory_string": { + "description": "Human-readable amount of RAM that the game server provides", + "type": "string" + }, + "player_string": { + "description": "Human-readable maximum amount of players that can connect to the game server", "type": "string" } }, "required": [ - "load_id", - "recommended_guilds" + "available_providers", + "boost_price", + "category_type", + "cpu", + "guild_features", + "max_slots", + "memory", + "memory_string", + "player_string", + "purchase_limit", + "storage" ] }, - "GuildVanityUrlResponse": { - "anyOf": [ - { - "$ref": "#/components/schemas/GuildVanityUrl" - }, - { - "$ref": "#/components/schemas/GuildVanityUrlNoInvite" + "SKUGuildMonetizationMetadataSchema": { + "type": "object", + "properties": { + "powerup": { + "description": "Guild powerup metadata", + "$ref": "#/components/schemas/SKUGuildPowerupMetadataSchema" }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/GuildVanityUrl" - } + "game_server": { + "description": "Game server powerup metadata", + "$ref": "#/components/schemas/SKUGameServerPowerupMetadataSchema" } - ] + } }, - "GuildVanityUrlCreateResponse": { + "SKUPremiumPriceSchema": { "type": "object", "properties": { - "code": { - "type": "string" + "amount": { + "description": "The price amount in the smallest currency unit", + "type": "integer" + }, + "percentage": { + "description": "The percentage discount for premium users", + "type": "integer" } }, "required": [ - "code" + "amount", + "percentage" ] }, - "GuildWidgetJsonResponse": { + "SKUPriceSchema": { "type": "object", "properties": { - "id": { + "currency": { + "description": "The lower-cased ISO 4217 currency code", "type": "string" }, - "name": { - "type": "string" + "currency_exponent": { + "description": "The exponent to convert the amount to the displayed currency unit", + "type": "integer" }, - "instant_invite": { - "type": "string" + "amount": { + "description": "The price amount in the smallest currency unit", + "type": "integer" }, - "channels": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "position": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "id", - "name", - "position" - ] - } + "sale_amount": { + "description": "The sale price amount in the smallest currency unit", + "type": "integer" }, - "members": { + "sale_percentage": { + "description": "The percentage discount of the sale price", + "type": "integer" + }, + "premium": { + "description": "The price for premium users per premium type", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/components/schemas/SKUPremiumPriceSchema" + } + } + } + }, + "required": [ + "amount", + "currency", + "currency_exponent" + ] + }, + "AckBulkSchema": { + "type": "object", + "properties": { + "read_states": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "username": { + "channel_id": { "type": "string" }, - "discriminator": { + "message_id": { "type": "string" }, - "avatar": { - "type": [ - "null", - "string" - ] - }, - "status": { - "$ref": "#/components/schemas/ClientStatus" - }, - "avatar_url": { - "type": "string" + "read_state_type": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "avatar", - "avatar_url", - "discriminator", - "id", - "status", - "username" + "channel_id", + "message_id", + "read_state_type" ] } - }, - "presence_count": { - "type": "integer" } }, "required": [ - "channels", - "id", - "instant_invite", - "members", - "name", - "presence_count" + "read_states" ] }, - "GuildWidgetSettingsResponse": { + "ActivitySchema": { "type": "object", "properties": { - "enabled": { + "afk": { "type": "boolean" }, - "channel_id": { - "anyOf": [ - { - "$ref": "#/components/schemas/Snowflake" - }, - { - "type": "null" - } - ] + "status": { + "$ref": "#/components/schemas/Status" + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + }, + "since": { + "type": "integer" } }, "required": [ - "channel_id", - "enabled" + "status" ] }, - "HubDirectoryEntriesResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HubDirectoryEntry" - } - }, - "HubWaitlistSignupResponse": { + "ApplicationAuthorizeSchema": { "type": "object", "properties": { - "email": { + "authorize": { + "type": "boolean" + }, + "guild_id": { "type": "string" }, - "email_domain": { + "permissions": { "type": "string" }, - "school": { + "captcha_key": { "type": "string" }, - "user_id": { + "code": { + "minLength": 6, + "maxLength": 6, "type": "string" } }, "required": [ - "email", - "email_domain", - "school", - "user_id" + "authorize", + "guild_id", + "permissions" ] }, - "InstanceDomainsResponse": { + "AutomodMentionSpamRuleSchema": { "type": "object", "properties": { - "admin": { - "type": "string" - }, - "api": { - "type": "string" - }, - "apiEndpoint": { - "type": "string" - }, - "cdn": { - "type": "string" - }, - "gateway": { - "type": "string" + "mention_total_limit": { + "type": "integer" }, - "defaultApiVersion": { - "type": "string" + "mention_raid_protection_enabled": { + "type": "boolean" } }, "required": [ - "api", - "apiEndpoint", - "cdn", - "defaultApiVersion", - "gateway" + "mention_raid_protection_enabled", + "mention_total_limit" ] }, - "InstancePingResponse": { + "AutomodSuspectedSpamRuleSchema": { + "type": "object" + }, + "AutomodCommonlyFlaggedWordsRuleSchema": { "type": "object", "properties": { - "ping": { - "type": "string", - "const": "pong!" - }, - "instance": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { + "allow_list": { + "type": "array", + "items": [ + { "type": "string" - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "image": { - "type": [ - "null", - "string" - ] - }, - "correspondenceEmail": { - "type": [ - "null", - "string" - ] - }, - "correspondenceUserID": { - "type": [ - "null", - "string" - ] - }, - "frontPage": { - "type": [ - "null", - "string" - ] - }, - "tosPage": { - "type": [ - "null", - "string" - ] } - }, - "additionalProperties": false, - "required": [ - "correspondenceEmail", - "correspondenceUserID", - "description", - "frontPage", - "id", - "image", - "name", - "tosPage" - ] + ], + "minItems": 1, + "maxItems": 1 + }, + "presets": { + "type": "array", + "items": [ + { + "type": "integer" + } + ], + "minItems": 1, + "maxItems": 1 } }, "required": [ - "instance", - "ping" - ] + "allow_list", + "presets" + ] }, - "InstanceStatsResponse": { + "AutomodCustomWordsRuleSchema": { "type": "object", "properties": { - "counts": { - "type": "object", - "properties": { - "user": { - "type": "integer" - }, - "guild": { - "type": "integer" - }, - "message": { - "type": "integer" - }, - "members": { - "type": "integer" + "allow_list": { + "type": "array", + "items": [ + { + "type": "string" } - }, - "additionalProperties": false, - "required": [ - "guild", - "members", - "message", - "user" - ] + ], + "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": [ - "counts" + "allow_list", + "keyword_filter", + "regex_patterns" ] }, - "LocationMetadataResponse": { + "AutomodRuleSchema": { "type": "object", "properties": { - "consent_required": { + "creator_id": { + "type": "string" + }, + "enabled": { "type": "boolean" }, - "country_code": { + "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" }, - "promotional_email_opt_in": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "const": true + "name": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "trigger_type": { + "type": "integer" + }, + "trigger_metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/AutomodMentionSpamRuleSchema" }, - "pre_checked": { - "type": "boolean", - "const": false + { + "$ref": "#/components/schemas/AutomodSuspectedSpamRuleSchema" + }, + { + "$ref": "#/components/schemas/AutomodCommonlyFlaggedWordsRuleSchema" + }, + { + "$ref": "#/components/schemas/AutomodCustomWordsRuleSchema" } - }, - "additionalProperties": false, - "required": [ - "pre_checked", - "required" ] } }, "required": [ - "consent_required", - "country_code", - "promotional_email_opt_in" + "creator_id", + "enabled", + "event_type", + "exempt_channels", + "exempt_roles", + "guild_id", + "name", + "position", + "trigger_metadata", + "trigger_type" ] }, - "MemberJoinGuildResponse": { + "BackupCodesChallengeSchema": { "type": "object", "properties": { - "guild": { - "$ref": "#/components/schemas/GuildCreateResponse" - }, - "emojis": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Emoji" - } - }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - } - }, - "stickers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sticker" - } + "password": { + "minLength": 1, + "maxLength": 72, + "type": "string" } }, "required": [ - "emojis", - "guild", - "roles", - "stickers" + "password" ] }, - "OAuthAuthorizeResponse": { + "BanCreateSchema": { "type": "object", "properties": { - "location": { + "delete_message_seconds": { + "type": "integer" + }, + "delete_message_days": { + "type": "integer" + }, + "reason": { "type": "string" } - }, - "required": [ - "location" - ] - }, - "PreloadMessagesResponseSchema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" } }, - "RefreshUrlsResponse": { + "BanModeratorSchema": { "type": "object", "properties": { - "refreshed_urls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RefreshedUrl" - } + "id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "executor_id": { + "type": "string" + }, + "reason": { + "type": "string" } }, "required": [ - "refreshed_urls" + "executor_id", + "guild_id", + "id", + "user_id" ] }, - "SettingsProtoResponse": { + "BanRegistrySchema": { "type": "object", "properties": { - "settings": { + "id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "executor_id": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "reason": { "type": "string" } }, "required": [ - "settings" + "executor_id", + "guild_id", + "id", + "user_id" ] }, - "SettingsProtoUpdateResponse": { + "BotModifySchema": { "type": "object", "properties": { - "out_of_date": { - "type": "boolean" + "avatar": { + "type": "string" }, - "settings": { + "username": { "type": "string" } - }, - "required": [ - "settings" - ] + } }, - "SettingsProtoJsonResponse": { + "BulkBanSchema": { "type": "object", "properties": { - "settings": { - "$ref": "#/components/schemas/JsonValue" + "user_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "delete_message_seconds": { + "type": "integer" } }, "required": [ - "settings" + "user_ids" ] }, - "SettingsProtoUpdateJsonResponse": { + "BulkDeleteSchema": { "type": "object", "properties": { - "out_of_date": { - "type": "boolean" - }, - "settings": { - "$ref": "#/components/schemas/JsonValue" + "messages": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "settings" + "messages" ] }, - "TeamListResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Team" - } - }, - "TenorGifResponse": { + "ChannelModifySchema": { "type": "object", "properties": { - "id": { + "name": { + "maxLength": 100, "type": "string" }, - "title": { + "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" }, - "url": { + "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" }, - "src": { + "id": { "type": "string" }, - "gif_src": { + "nsfw": { + "type": "boolean" + }, + "rtc_region": { "type": "string" }, - "width": { + "default_auto_archive_duration": { "type": "integer" }, - "height": { + "default_reaction_emoji": { + "type": "string", + "nullable": true + }, + "flags": { "type": "integer" }, - "preview": { - "type": "string" + "default_thread_rate_limit_per_user": { + "type": "integer" + }, + "video_quality_mode": { + "type": "integer" } - }, - "required": [ - "gif_src", - "height", - "id", - "preview", - "src", - "title", - "url", - "width" - ] + } }, - "TenorTrendingResponse": { + "ChannelPermissionOverwriteSchema": { "type": "object", "properties": { - "categories": { - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "object", - "properties": { - "searchterm": { - "type": "string" - }, - "path": { - "type": "string" - }, - "image": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "image", - "name", - "path", - "searchterm" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "tags" - ] + "allow": { + "type": "string" }, - "gifs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenorGifResponse" - } + "deny": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ChannelPermissionOverwriteType" } }, "required": [ - "categories", - "gifs" + "allow", + "deny", + "id", + "type" ] }, - "TenorGifsResponse": { + "ChannelReorderSchema": { "type": "array", "items": { - "$ref": "#/components/schemas/TenorGifResponse" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "lock_permissions": { + "type": "boolean" + }, + "parent_id": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "id" + ] } }, - "TokenResponse": { + "CodesVerificationSchema": { "type": "object", "properties": { - "token": { + "key": { "type": "string" }, - "settings": { - "$ref": "#/components/schemas/UserSettings" - } - }, - "required": [ - "settings", - "token" - ] - }, - "TokenOnlyResponse": { - "type": "object", - "properties": { - "token": { + "nonce": { "type": "string" + }, + "regenerate": { + "type": "boolean" } }, "required": [ - "token" + "key", + "nonce" ] }, - "TokenWithBackupCodesResponse": { + "ConnectedAccountSchema": { "type": "object", "properties": { - "token": { + "external_id": { "type": "string" }, - "backup_codes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BackupCode" - } - } - }, - "required": [ - "backup_codes", - "token" - ] - }, - "APIGuild": { - "type": "object", - "properties": { - "name": { + "user_id": { "type": "string" }, - "region": { - "type": "string" + "token_data": { + "$ref": "#/components/schemas/ConnectedAccountTokenData" }, - "insert": { - "type": "object", - "additionalProperties": false + "friend_sync": { + "type": "boolean" }, - "id": { + "name": { "type": "string" }, - "icon": { - "type": "string" + "revoked": { + "type": "boolean" }, - "parent": { - "type": "string" + "show_activity": { + "type": "integer" }, - "owner_id": { + "type": { "type": "string" }, - "nsfw": { + "verified": { "type": "boolean" }, - "invites": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invite" - } + "visibility": { + "type": "integer" }, - "voice_states": { + "integrations": { "type": "array", "items": { - "$ref": "#/components/schemas/VoiceState" + "type": "string" } }, - "webhooks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Webhook" - } + "metadata_": {}, + "metadata_visibility": { + "type": "integer" }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - } + "two_way_link": { + "type": "boolean" + } + }, + "required": [ + "external_id", + "name", + "type", + "user_id" + ] + }, + "ConnectionCallbackSchema": { + "type": "object", + "properties": { + "code": { + "type": "string" }, - "banner": { + "state": { "type": "string" }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Channel" - } + "insecure": { + "type": "boolean" }, - "system_channel_id": { - "type": "string", - "nullable": true + "friend_sync": { + "type": "boolean" }, - "rules_channel_id": { - "type": "string", - "nullable": true + "openid_params": {} + }, + "required": [ + "friend_sync", + "insecure", + "state" + ] + }, + "ConnectionUpdateSchema": { + "type": "object", + "properties": { + "visibility": { + "type": "boolean" }, - "splash": { - "type": "string" + "show_activity": { + "type": "boolean" }, - "description": { + "metadata_visibility": { + "type": "boolean" + } + } + }, + "DmChannelCreateSchema": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "features": { + "recipients": { "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", - "nullable": true - }, - "afk_timeout": { - "type": "integer" - }, - "afk_channel_id": { - "type": "string", - "nullable": true - }, - "preferred_locale": { - "type": "string" - }, - "premium_progress_bar_enabled": { - "type": "boolean" - }, - "discovery_splash": { + "recipient_id": { "type": "string" }, - "bans": { + "access_tokens": { "type": "array", "items": { - "$ref": "#/components/schemas/Ban" + "type": "string" } + } + } + }, + "EmailDomainLookupSchema": { + "type": "object", + "properties": { + "allow_multiple_guilds": { + "type": "boolean" }, - "primary_category_id": { + "email": { "type": "string" }, - "large": { + "use_verification_code": { "type": "boolean" }, - "max_members": { - "type": "integer" + "guild_id": { + "type": "string" + } + }, + "required": [ + "allow_multiple_guilds", + "email", + "use_verification_code" + ] + }, + "EmailDomainLookupVerifyCodeSchema": { + "type": "object", + "properties": { + "email": { + "type": "string" }, - "max_presences": { - "type": "integer" + "guild_id": { + "type": "string" }, - "max_video_channel_users": { - "type": "integer" + "code": { + "type": "string" + } + }, + "required": [ + "code", + "email", + "guild_id" + ] + }, + "EmojiCreateSchema": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - "member_count": { - "type": "integer" + "image": { + "type": "string" }, - "presence_count": { - "type": "integer" + "require_colons": { + "type": "boolean", + "nullable": true }, - "members": { + "roles": { "type": "array", "items": { - "$ref": "#/components/schemas/Member" + "type": "string" } - }, - "template_id": { + } + }, + "required": [ + "image" + ] + }, + "EmojiModifySchema": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "emojis": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Emoji" - } - }, - "stickers": { + "roles": { "type": "array", "items": { - "$ref": "#/components/schemas/Sticker" + "type": "string" } + } + } + }, + "ForgotPasswordSchema": { + "type": "object", + "properties": { + "login": { + "type": "string" }, - "mfa_level": { - "type": "integer" - }, - "premium_subscription_count": { - "type": "integer" - }, - "premium_tier": { - "type": "integer" - }, - "unavailable": { - "type": "boolean" - }, - "welcome_screen": { - "$ref": "#/components/schemas/GuildWelcomeScreen", - "description": "DEPRECATED: Look at the new Guild onboarding screens." - }, - "widget_channel_id": { + "captcha_key": { "type": "string" - }, - "widget_enabled": { - "type": "boolean" - }, - "nsfw_level": { - "type": "integer" - }, - "permissions": { - "type": "integer" - }, - "channel_ordering": { + } + }, + "required": [ + "login" + ] + }, + "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": [ - "bans", - "channel_ordering", - "channels", - "emojis", - "features", - "id", - "insert", - "invites", - "members", - "name", - "nsfw", - "premium_progress_bar_enabled", - "public_updates_channel_id", - "roles", - "stickers", - "unavailable", - "voice_states", - "webhooks", - "welcome_screen", - "widget_enabled" + "sticker_ids" ] }, - "APIPublicUser": { + "GuildCreateSchema": { "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```", - "type": "string" - }, - "premium_since": { - "type": "string", - "format": "date-time" - }, - "avatar": { + "name": { + "maxLength": 100, "type": "string" }, - "banner": { + "region": { "type": "string" }, - "bio": { - "type": "string" + "icon": { + "type": "string", + "nullable": true }, - "theme_colors": { + "channels": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/ChannelModifySchema" } }, - "pronouns": { + "system_channel_id": { "type": "string" }, - "username": { + "rules_channel_id": { "type": "string" }, - "discriminator": { + "guild_template_code": { "type": "string" }, - "public_flags": { - "type": "integer" - }, - "accent_color": { - "type": "integer" - }, - "bot": { + "staff_only": { "type": "boolean" - }, - "premium_type": { - "type": "integer" - }, - "badge_ids": { - "type": "array", - "items": { - "type": "string" + } + } + }, + "GuildSubscriptionsBulkSchema": { + "type": "object", + "properties": { + "subscriptions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/GuildSubscriptionSchema" } } }, "required": [ - "bio", - "bot", - "discriminator", - "id", - "premium_since", - "premium_type", - "public_flags", - "username" + "subscriptions" ] }, - "APIPrivateUser": { + "GuildSubscriptionSchema": { "type": "object", "properties": { - "email": { - "type": "string" + "channels": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "integer" + } + } + } }, - "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```", - "type": "string" + "activities": { + "type": "boolean" }, - "flags": { - "type": "integer" + "threads": { + "type": "boolean" }, - "verified": { + "typing": { + "const": true, "type": "boolean" }, - "premium_since": { - "type": "string", - "format": "date-time" + "members": { + "type": "array", + "items": { + "type": "string" + } }, - "avatar": { + "member_updates": { + "type": "boolean" + }, + "thread_member_lists": { + "type": "array", + "items": {} + } + } + }, + "GuildTemplateCreateSchema": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "avatar": { + "type": "string", + "nullable": true + } + }, + "required": [ + "name" + ] + }, + "GuildUpdateSchema": { + "type": "object", + "properties": { "banner": { - "type": "string" + "type": "string", + "nullable": true }, - "bio": { + "splash": { + "type": "string", + "nullable": true + }, + "description": { "type": "string" }, - "theme_colors": { + "features": { "type": "array", "items": { - "type": "integer" + "type": "string" } }, - "pronouns": { - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "public_flags": { + "verification_level": { "type": "integer" }, - "accent_color": { + "default_message_notifications": { "type": "integer" }, - "bot": { - "type": "boolean" + "system_channel_flags": { + "type": "integer" }, - "premium_type": { + "explicit_content_filter": { "type": "integer" }, - "badge_ids": { - "type": "array", - "items": { - "type": "string" - } + "public_updates_channel_id": { + "type": "string" }, - "mfa_enabled": { - "type": "boolean" + "afk_timeout": { + "type": "integer" }, - "phone": { + "afk_channel_id": { "type": "string" }, - "nsfw_allowed": { - "type": "boolean" + "preferred_locale": { + "type": "string" }, - "premium": { + "premium_progress_bar_enabled": { "type": "boolean" }, - "purchased_flags": { - "type": "integer" - }, - "premium_usage_flags": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "settings": { - "$ref": "#/components/schemas/UserSettingsSchema" - } - }, - "required": [ - "bio", - "bot", - "disabled", - "discriminator", - "flags", - "id", - "mfa_enabled", - "nsfw_allowed", - "premium", - "premium_since", - "premium_type", - "premium_usage_flags", - "public_flags", - "purchased_flags", - "username", - "verified" - ] - }, - "APIGuildArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/APIGuild" - } - }, - "APIDMChannelArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DmChannelDTO" - } - }, - "APIBackupCodeArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BackupCode" - } - }, - "UserUpdateResponse": { - "type": "object", - "properties": { - "newToken": { + "discovery_splash": { "type": "string" }, - "email": { - "type": "string" + "safety_alerts_channel_id": { + "type": "string", + "nullable": true }, - "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```", + "name": { + "maxLength": 100, "type": "string" }, - "flags": { - "type": "integer" - }, - "verified": { - "type": "boolean" + "region": { + "type": "string" }, - "premium_since": { + "icon": { "type": "string", - "format": "date-time" + "nullable": true }, - "avatar": { + "system_channel_id": { "type": "string" }, - "banner": { + "rules_channel_id": { "type": "string" }, - "bio": { + "guild_template_code": { "type": "string" }, - "theme_colors": { + "staff_only": { + "type": "boolean" + } + } + }, + "GuildUpdateWelcomeScreenSchema": { + "type": "object", + "properties": { + "welcome_channels": { "type": "array", "items": { - "type": "integer" + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel_id", + "description" + ] } }, - "pronouns": { + "enabled": { + "type": "boolean" + }, + "description": { + "type": "string" + } + } + }, + "HubWaitlistSignupSchema": { + "type": "object", + "properties": { + "email": { "type": "string" }, - "username": { + "school": { + "type": "string" + } + }, + "required": [ + "email", + "school" + ] + }, + "InviteCreateSchema": { + "type": "object", + "properties": { + "target_user_id": { "type": "string" }, - "discriminator": { + "target_type": { "type": "string" }, - "public_flags": { + "validate": { + "type": "string" + }, + "max_age": { "type": "integer" }, - "accent_color": { + "max_uses": { "type": "integer" }, - "bot": { + "temporary": { "type": "boolean" }, - "premium_type": { + "unique": { + "type": "boolean" + }, + "target_user": { + "type": "string" + }, + "target_user_type": { "type": "integer" }, - "badge_ids": { + "flags": { + "type": "integer" + } + } + }, + "LocalizedStringSchema": { + "type": "object", + "properties": { + "default": { + "type": "string" + }, + "localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "default" + ] + }, + "AccountStandingResponse": { + "type": "object", + "properties": { + "classifications": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Classification" } }, - "mfa_enabled": { - "type": "boolean" - }, - "phone": { - "type": "string" + "guild_classifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildClassification" + } }, - "nsfw_allowed": { - "type": "boolean" + "account_standing": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/AccountStandingState" + } + }, + "additionalProperties": false, + "required": [ + "state" + ] }, - "premium": { + "is_dsa_eligible": { "type": "boolean" }, - "purchased_flags": { - "type": "integer" + "username": { + "type": "string" }, - "premium_usage_flags": { - "type": "integer" + "discriminator": { + "type": "string" }, - "disabled": { + "is_appeal_eligible": { "type": "boolean" }, - "settings": { - "$ref": "#/components/schemas/UserSettingsSchema" + "appeal_eligibility": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AppealEligibility" + } } }, "required": [ - "bio", - "bot", - "disabled", + "account_standing", + "appeal_eligibility", + "classifications", "discriminator", - "flags", - "id", - "mfa_enabled", - "nsfw_allowed", - "premium", - "premium_since", - "premium_type", - "premium_usage_flags", - "public_flags", - "purchased_flags", - "username", - "verified" + "guild_classifications", + "is_appeal_eligible", + "is_dsa_eligible", + "username" ] }, - "ApplicationDetectableResponse": { - "type": "array", - "items": {} - }, - "ApplicationEntitlementsResponse": { - "type": "array", - "items": {} - }, - "ApplicationSkusResponse": { - "type": "array", - "items": {} - }, - "APIApplicationArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Application" - } - }, - "APIBansArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GuildBansResponse" - } - }, - "APIInviteArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invite" - } - }, - "APIMessageArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - } - }, - "APIWebhookArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Webhook" - } - }, - "APIDiscoveryCategoryArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Categories" - } - }, - "APIGeneralConfiguration": { + "APIErrorResponse": { "type": "object", "properties": { - "instanceName": { - "type": "string", - "default": "Spacebar Instance" - }, - "instanceDescription": { - "type": "string", - "default": "This is a Spacebar instance made in the pre-release days", - "nullable": true - }, - "frontPage": { - "type": "string", - "default": null, - "nullable": true + "code": { + "type": "integer" }, - "tosPage": { - "type": "string", - "default": null, - "nullable": true + "message": { + "type": "string" }, - "correspondenceEmail": { - "type": "string", - "default": null, - "nullable": true + "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" }, - "correspondenceUserID": { - "type": "string", - "default": null, - "nullable": true + "captcha_sitekey": { + "type": "string" }, - "image": { - "type": "string", - "default": null, - "nullable": true + "captcha_service": { + "type": "string" + } + }, + "required": [ + "captcha_key", + "captcha_service", + "captcha_sitekey" + ] + }, + "APIErrorOrCaptchaResponse": { + "anyOf": [ + { + "$ref": "#/components/schemas/APIErrorResponse" }, - "instanceId": { + { + "$ref": "#/components/schemas/CaptchaRequiredResponse" + } + ] + }, + "BackupCodesChallengeResponse": { + "type": "object", + "properties": { + "nonce": { "type": "string" }, - "autoCreateBotUsers": { - "type": "boolean", - "default": false + "regenerate_nonce": { + "type": "string" } }, "required": [ - "autoCreateBotUsers", - "correspondenceEmail", - "correspondenceUserID", - "frontPage", - "image", - "instanceDescription", - "instanceId", - "instanceName", - "tosPage" + "nonce", + "regenerate_nonce" ] }, - "APIChannelArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Channel" - } - }, - "APIEmojiArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Emoji" - } + "ClaimedQuestsResponseSchema": { + "type": "object", + "properties": { + "quests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClaimedQuestSchema" + } + } + }, + "required": [ + "quests" + ] }, - "APIMemberArray": { + "CollectiblesCategoriesResponse": { "type": "array", "items": { - "$ref": "#/components/schemas/Member" + "$ref": "#/components/schemas/CollectibleCategorySchema" } }, - "APIPublicMember": { + "CollectibleCategorySchema": { "type": "object", "properties": { - "id": { + "sku_id": { + "description": "The SKU ID of the collectible category", "type": "string" }, - "guild_id": { + "store_listing_id": { + "description": "The store listing ID associated with the collectible category", "type": "string" }, - "mute": { - "type": "boolean" - }, - "deaf": { - "type": "boolean" - }, - "nick": { + "banner_text_color": { + "description": "The color of the banner text as a hexadecimal color string", "type": "string" }, - "joined_at": { - "type": "string", - "format": "date-time" - }, - "pending": { - "type": "boolean" + "catalog_banner_asset": { + "description": "The catalog banner asset", + "$ref": "#/components/schemas/CollectibleAssetConfigSchema" }, - "premium_since": { - "type": "integer" + "hero_banner_asset": { + "description": "The hero banner asset", + "$ref": "#/components/schemas/CollectibleAssetConfigSchema" }, - "avatar": { + "featured_block_body": { + "description": "The body text for the featured block", "type": "string" }, - "banner": { + "featured_block_url": { + "description": "The URL of the featured block image", "type": "string" }, - "bio": { - "type": "string" + "hero_banner_config_asset": { + "description": "The hero banner asset. might be legacy in favor of hero_banner_asset?", + "$ref": "#/components/schemas/CollectibleBannerAssetSchema" }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } + "hero_banner_display_config": { + "description": "The display configuration for the hero banner", + "$ref": "#/components/schemas/CollectibleBannerAssetSchema" }, - "pronouns": { + "hero_banner_config": { + "description": "The display configuration for the hero banner. might be legacy in favor of hero_banner_display_config?", + "$ref": "#/components/schemas/CollectibleBannerAssetSchema" + }, + "hero_block_title": { + "description": "The title text for the hero block", "type": "string" }, - "communication_disabled_until": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] + "hero_logo_display_config": { + "description": "The display configuration for the hero logo", + "$ref": "#/components/schemas/CollectibleAssetConfigSchema" }, - "user": { - "$ref": "#/components/schemas/PublicUser" + "hero_logo_url": { + "description": "The URL of the hero logo image", + "type": "string" }, - "roles": { + "hero_ranking": { + "description": "The popularity ranking of SKU IDs within the collectible category", "type": "array", "items": { "type": "string" } - } - }, - "required": [ - "banner", - "bio", - "communication_disabled_until", - "deaf", - "guild_id", - "id", - "joined_at", - "mute", - "pending", - "roles", - "user" - ] - }, - "APIGuildWithJoinedAt": { - "type": "object", - "properties": { - "joined_at": { + }, + "hero_rive_url": { + "description": "The URL of the Rive hero animation", "type": "string" }, - "id": { + "logo_url": { + "description": "The URL of the logo image", "type": "string" }, - "name": { + "mobile_banner_url": { + "description": "The URL of the mobile banner image", "type": "string" }, - "primary_category_id": { + "mobile_bg_url": { + "description": "The URL of the mobile background image", "type": "string" }, - "large": { - "type": "boolean" - }, - "max_members": { - "type": "integer" - }, - "max_presences": { - "type": "integer" - }, - "max_video_channel_users": { - "type": "integer" - }, - "member_count": { - "type": "integer" - }, - "presence_count": { - "type": "integer" + "mobile_hero_block_title": { + "description": "The title text for the mobile hero block", + "type": "string" }, - "template_id": { + "mobile_products_title": { + "description": "The title text for the mobile products section", "type": "string" }, - "mfa_level": { - "type": "integer" + "mobile_summary": { + "description": "The summary text for the mobile products section", + "type": "string" }, - "owner_id": { + "name": { + "description": "The name of the collectible category", "type": "string" }, - "premium_subscription_count": { - "type": "integer" + "pdp_bg_url": { + "description": "The URL of the product display page background image", + "type": "string" }, - "premium_tier": { - "type": "integer" + "products": { + "description": "The list of products in the collectible category", + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectibleProductSchema" + } }, - "welcome_screen": { - "$ref": "#/components/schemas/GuildWelcomeScreen" + "styles": { + "$ref": "#/components/schemas/CollectibleStyleSchema", + "description": "The colors to use in the client" }, - "widget_channel_id": { + "summary": { + "description": "A description of the collectible category", "type": "string" }, - "widget_enabled": { - "type": "boolean" - }, - "nsfw_level": { - "type": "integer" + "unpublished_at": { + "description": "The time at which the collectible category should be unpublished", + "type": "string", + "nullable": true }, - "nsfw": { - "type": "boolean" + "wide_banner_asset": { + "description": "The wide banner asset config", + "$ref": "#/components/schemas/CollectibleAssetConfigSchema" }, - "parent": { + "wide_banner_body": { + "description": "The body text for the wide banner", "type": "string" }, - "region": { + "wide_banner_title": { + "description": "The title text for the wide banner", "type": "string" }, - "icon": { + "logo": { + "description": "The ID of the logo image", "type": "string", "nullable": true }, - "banner": { + "mobile_bg": { + "description": "The ID of the mobile background image", "type": "string", "nullable": true }, - "system_channel_id": { - "type": "string" - }, - "rules_channel_id": { - "type": "string" - }, - "guild_template_code": { - "type": "string" - }, - "staff_only": { - "type": "boolean" - }, - "splash": { + "pdp_bg": { + "description": "The ID of the product display page background image", "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" + "mobile_banner": { + "description": "The ID of the mobile banner image", + "type": "string", + "nullable": true }, - "public_updates_channel_id": { + "featured_block": { "type": "string" }, - "afk_timeout": { - "type": "integer" - }, - "afk_channel_id": { - "type": "string" + "hero_logo": { + "description": "The ID of the hero logo image", + "type": "string", + "nullable": true }, - "preferred_locale": { - "type": "string" + "hero_banner_url": { + "description": "The URL of the hero banner", + "type": "string", + "nullable": true }, - "premium_progress_bar_enabled": { - "type": "boolean" + "hero_banner_animated_url": { + "description": "The URL of the animated hero banner", + "type": "string", + "nullable": true }, - "discovery_splash": { - "type": "string" + "catalog_banner_url": { + "description": "The URL of the catalog banner", + "type": "string", + "nullable": true }, - "safety_alerts_channel_id": { + "wide_banner_url": { + "description": "The URL of the wide banner", "type": "string", "nullable": true } }, "required": [ - "id", - "joined_at", - "large", - "max_members", - "max_presences", - "max_video_channel_users", - "member_count", - "mfa_level", + "hero_ranking", + "logo_url", + "mobile_summary", "name", - "nsfw", - "nsfw_level", - "owner_id", - "parent", - "premium_subscription_count", - "premium_tier", - "presence_count", - "primary_category_id", - "template_id", - "welcome_screen", - "widget_channel_id", - "widget_enabled" + "pdp_bg_url", + "products", + "sku_id", + "store_listing_id", + "styles", + "summary", + "unpublished_at" ] }, - "APIRoleArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - } - }, - "APIStickerArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sticker" - } - }, - "APITemplateArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Template" - } - }, - "APIGuildVoiceRegion": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GuildVoiceRegion" - } - }, - "APILimitsConfiguration": { + "CollectiblesMarketingResponse": { "type": "object", "properties": { - "user": { - "$ref": "#/components/schemas/UserLimits" - }, - "guild": { - "$ref": "#/components/schemas/GuildLimits" - }, - "message": { - "$ref": "#/components/schemas/MessageLimits" - }, - "channel": { - "$ref": "#/components/schemas/ChannelLimits" - }, - "rate": { - "$ref": "#/components/schemas/RateLimits" - }, - "absoluteRate": { - "$ref": "#/components/schemas/GlobalRateLimits" + "marketings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/CollectiblesMarketingItem" + } } }, "required": [ - "absoluteRate", - "channel", - "guild", - "message", - "rate", - "user" + "marketings" ] }, - "APIStickerPackArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StickerPack" - } - }, - "APIConnectionsConfiguration": { - "type": "object" - }, - "UpdatesResponse": { + "CollectiblesShopResponse": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "pub_date": { - "type": "string" + "shop_blocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnyCollectiblesShopBlock" + } }, - "url": { - "type": "string" + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectibleCategorySchema" + } }, - "notes": { - "type": "string", - "nullable": true + "user_discounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectibleUserDiscountSchema" + } } }, "required": [ - "name", - "notes", - "pub_date", - "url" + "categories", + "shop_blocks" ] }, - "UploadAttachmentResponseSchema": { + "DiscoverableGuildsResponse": { "type": "object", "properties": { - "attachments": { + "total": { + "type": "integer" + }, + "guilds": { "type": "array", "items": { - "$ref": "#/components/schemas/UploadAttachmentResponse" + "$ref": "#/components/schemas/Guild" } + }, + "offset": { + "type": "integer" + }, + "limit": { + "type": "integer" } }, "required": [ - "attachments" + "guilds", + "limit", + "offset", + "total" ] }, - "UploadAttachmentResponse": { + "DmMessagesResponseSchema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PartialMessage" + } + }, + "EmailDomainLookupResponse": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "upload_url": { - "type": "string" - }, - "upload_filename": { - "type": "string" + "guilds_info": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HubGuild" + } }, - "original_content_type": { - "type": "string" + "has_matching_guild": { + "type": "boolean" } }, "required": [ - "upload_filename", - "upload_url" + "guilds_info", + "has_matching_guild" ] }, - "UserNoteResponse": { + "EmailDomainLookupVerifyCodeResponse": { "type": "object", "properties": { - "note": { - "type": "string" - }, - "note_user_id": { - "type": "string" + "guild": { + "$ref": "#/components/schemas/Guild" }, - "user_id": { - "type": "string" + "joined": { + "type": "boolean" } }, "required": [ - "note", - "note_user_id", - "user_id" + "guild", + "joined" ] }, - "UserProfileResponse": { + "EmojiSourceResponse": { "type": "object", "properties": { - "user": { - "$ref": "#/components/schemas/PublicUser" - }, - "connected_accounts": { - "$ref": "#/components/schemas/PublicConnectedAccount" - }, - "premium_guild_since": { - "type": "string", - "format": "date-time" - }, - "premium_since": { - "type": "string", - "format": "date-time" + "type": { + "enum": [ + "APPLICATION", + "GUILD" + ], + "type": "string" }, - "mutual_guilds": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "nick": { - "type": "string" - } + "guild": { + "anyOf": [ + { + "$ref": "#/components/schemas/EmojiGuild" }, - "additionalProperties": false, - "required": [ - "id" - ] - } - }, - "premium_type": { - "type": "integer" - }, - "profile_themes_experiment_bucket": { - "type": "integer" - }, - "user_profile": { - "$ref": "#/components/schemas/UserProfile" - }, - "guild_member": { - "$ref": "#/components/schemas/PublicMember" - }, - "guild_member_profile": { - "$ref": "#/components/schemas/PublicMemberProfile" + { + "type": "null" + } + ] }, - "badges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Badge" - } + "application": { + "anyOf": [ + { + "$ref": "#/components/schemas/EmojiApplication" + }, + { + "type": "null" + } + ] } }, "required": [ - "badges", - "connected_accounts", - "mutual_guilds", - "premium_type", - "profile_themes_experiment_bucket", - "user", - "user_profile" + "type" ] }, - "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" - ] - } - }, - "UserRelationshipsResponse": { + "GatewayBotResponse": { "type": "object", "properties": { - "id": { + "url": { "type": "string" }, - "type": { - "$ref": "#/components/schemas/RelationshipType" - }, - "nickname": { - "type": "null" + "shards": { + "type": "integer" }, - "user": { - "$ref": "#/components/schemas/PublicUser" + "session_start_limit": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset_after": { + "type": "integer" + }, + "max_concurrency": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "max_concurrency", + "remaining", + "reset_after", + "total" + ] } }, "required": [ - "id", - "nickname", - "type", - "user" + "session_start_limit", + "shards", + "url" ] }, - "WebAuthnCreateResponse": { + "GatewayResponse": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "id": { + "url": { "type": "string" } }, "required": [ - "id", - "name" - ] - }, - "WebhookCreateResponse": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/User" - }, - "hook": { - "$ref": "#/components/schemas/Webhook" - } - }, - "required": [ - "hook", - "user" + "url" ] }, - "AckBulkSchema": { + "GenerateRegistrationTokensResponse": { "type": "object", "properties": { - "read_states": { + "tokens": { "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" - ] + "type": "string" } } }, "required": [ - "read_states" + "tokens" ] }, - "ActivitySchema": { + "GuildBansResponse": { "type": "object", "properties": { - "afk": { - "type": "boolean" - }, - "status": { - "$ref": "#/components/schemas/Status" - }, - "activities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Activity" - } + "reason": { + "type": "string", + "nullable": true }, - "since": { - "type": "integer" + "user": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "avatar": { + "type": [ + "null", + "string" + ] + }, + "public_flags": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "avatar", + "discriminator", + "id", + "public_flags", + "username" + ] } }, "required": [ - "status" + "reason", + "user" ] }, - "ApplicationAuthorizeSchema": { + "GuildCreateResponse": { "type": "object", "properties": { - "authorize": { - "type": "boolean" - }, - "guild_id": { + "id": { "type": "string" }, - "permissions": { + "name": { "type": "string" }, - "captcha_key": { + "primary_category_id": { "type": "string" }, - "code": { - "minLength": 6, - "maxLength": 6, + "large": { + "type": "boolean" + }, + "max_members": { + "type": "integer" + }, + "max_presences": { + "type": "integer" + }, + "max_video_channel_users": { + "type": "integer" + }, + "member_count": { + "type": "integer" + }, + "presence_count": { + "type": "integer" + }, + "template_id": { "type": "string" - } - }, - "required": [ - "authorize", - "guild_id", - "permissions" - ] - }, - "AutomodMentionSpamRuleSchema": { - "type": "object", - "properties": { - "mention_total_limit": { + }, + "mfa_level": { "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 + "owner_id": { + "type": "string" }, - "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 + "premium_subscription_count": { + "type": "integer" }, - "keyword_filter": { - "type": "array", - "items": [ - { - "type": "string" - } - ], - "minItems": 1, - "maxItems": 1 + "premium_tier": { + "type": "integer" }, - "regex_patterns": { - "type": "array", - "items": [ - { - "type": "string" - } - ], - "minItems": 1, - "maxItems": 1 - } - }, - "required": [ - "allow_list", - "keyword_filter", - "regex_patterns" - ] - }, - "AutomodRuleSchema": { - "type": "object", - "properties": { - "creator_id": { + "welcome_screen": { + "$ref": "#/components/schemas/GuildWelcomeScreen" + }, + "widget_channel_id": { "type": "string" }, - "enabled": { + "widget_enabled": { "type": "boolean" }, - "event_type": { + "nsfw_level": { "type": "integer" }, - "exempt_channels": { - "type": "array", - "items": [ - { - "type": "string" - } - ], - "minItems": 1, - "maxItems": 1 + "nsfw": { + "type": "boolean" }, - "exempt_roles": { + "parent": { + "type": "string" + }, + "region": { + "type": "string" + }, + "features": { "type": "array", - "items": [ - { - "type": "string" - } - ], - "minItems": 1, - "maxItems": 1 + "items": { + "type": "string" + } }, - "guild_id": { + "icon": { + "type": "string", + "nullable": true + }, + "banner": { + "type": "string", + "nullable": true + }, + "system_channel_id": { "type": "string" }, - "name": { + "rules_channel_id": { "type": "string" }, - "position": { + "guild_template_code": { + "type": "string" + }, + "staff_only": { + "type": "boolean" + }, + "splash": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string" + }, + "verification_level": { "type": "integer" }, - "trigger_type": { + "default_message_notifications": { "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": { + "system_channel_flags": { "type": "integer" }, - "delete_message_days": { + "explicit_content_filter": { "type": "integer" }, - "reason": { - "type": "string" - } - } - }, - "BanModeratorSchema": { - "type": "object", - "properties": { - "id": { + "public_updates_channel_id": { "type": "string" }, - "user_id": { - "type": "string" + "afk_timeout": { + "type": "integer" }, - "guild_id": { + "afk_channel_id": { "type": "string" }, - "executor_id": { + "preferred_locale": { "type": "string" }, - "reason": { + "premium_progress_bar_enabled": { + "type": "boolean" + }, + "discovery_splash": { "type": "string" + }, + "safety_alerts_channel_id": { + "type": "string", + "nullable": true } }, "required": [ - "executor_id", - "guild_id", "id", - "user_id" + "name", + "nsfw", + "welcome_screen", + "widget_enabled" ] }, - "BanRegistrySchema": { + "GuildDiscoveryRequirementsResponse": { "type": "object", "properties": { - "id": { + "guild_id": { "type": "string" }, - "user_id": { - "type": "string" + "safe_environment": { + "type": "boolean" }, - "guild_id": { - "type": "string" + "healthy": { + "type": "boolean" }, - "executor_id": { - "type": "string" + "health_score_pending": { + "type": "boolean" }, - "ip": { - "type": "string" + "size": { + "type": "boolean" }, - "reason": { - "type": "string" + "nsfw_properties": {}, + "protected": { + "type": "boolean" + }, + "sufficient": { + "type": "boolean" + }, + "sufficient_without_grace_period": { + "type": "boolean" + }, + "valid_rules_channel": { + "type": "boolean" + }, + "retention_healthy": { + "type": "boolean" + }, + "engagement_healthy": { + "type": "boolean" + }, + "age": { + "type": "boolean" + }, + "minimum_age": { + "type": "integer" + }, + "health_score": { + "type": "object", + "properties": { + "avg_nonnew_participators": { + "type": "integer" + }, + "avg_nonnew_communicators": { + "type": "integer" + }, + "num_intentful_joiners": { + "type": "integer" + }, + "perc_ret_w1_intentful": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "avg_nonnew_communicators", + "avg_nonnew_participators", + "num_intentful_joiners", + "perc_ret_w1_intentful" + ] + }, + "minimum_size": { + "type": "integer" } }, "required": [ - "executor_id", + "age", + "engagement_healthy", "guild_id", - "id", - "user_id" + "health_score", + "health_score_pending", + "healthy", + "minimum_age", + "minimum_size", + "nsfw_properties", + "protected", + "retention_healthy", + "safe_environment", + "size", + "sufficient", + "sufficient_without_grace_period", + "valid_rules_channel" ] }, - "BotModifySchema": { + "GuildMessagesSearchResponse": { "type": "object", "properties": { - "avatar": { - "type": "string" + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildMessagesSearchMessage" + } }, - "username": { - "type": "string" + "total_results": { + "type": "integer" } - } + }, + "required": [ + "messages", + "total_results" + ] }, - "BulkBanSchema": { + "GuildPruneResponse": { "type": "object", "properties": { - "user_ids": { + "pruned": { + "type": "integer" + } + }, + "required": [ + "pruned" + ] + }, + "GuildPurgeResponse": { + "type": "object", + "properties": { + "purged": { + "type": "integer" + } + }, + "required": [ + "purged" + ] + }, + "GuildRecommendationsResponse": { + "type": "object", + "properties": { + "recommended_guilds": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Guild" } }, - "delete_message_seconds": { - "type": "integer" + "load_id": { + "type": "string" } }, "required": [ - "user_ids" + "load_id", + "recommended_guilds" ] }, - "BulkDeleteSchema": { - "type": "object", - "properties": { - "messages": { + "GuildVanityUrlResponse": { + "anyOf": [ + { + "$ref": "#/components/schemas/GuildVanityUrl" + }, + { + "$ref": "#/components/schemas/GuildVanityUrlNoInvite" + }, + { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/GuildVanityUrl" } } + ] + }, + "GuildVanityUrlCreateResponse": { + "type": "object", + "properties": { + "code": { + "type": "string" + } }, "required": [ - "messages" + "code" ] }, - "ChannelModifySchema": { + "GuildWidgetJsonResponse": { "type": "object", "properties": { + "id": { + "type": "string" + }, "name": { - "maxLength": 100, "type": "string" }, - "type": { - "enum": [ - 0, - 1, - 10, - 11, - 12, - 13, - 14, - 15, + "instant_invite": { + "type": "string" + }, + "channels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "position" + ] + } + }, + "members": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "avatar": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/components/schemas/ClientStatus" + }, + "avatar_url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "avatar", + "avatar_url", + "discriminator", + "id", + "status", + "username" + ] + } + }, + "presence_count": { + "type": "integer" + } + }, + "required": [ + "channels", + "id", + "instant_invite", + "members", + "name", + "presence_count" + ] + }, + "GuildWidgetSettingsResponse": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "channel_id": { + "anyOf": [ + { + "$ref": "#/components/schemas/Snowflake" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "channel_id", + "enabled" + ] + }, + "HubDirectoryEntriesResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HubDirectoryEntry" + } + }, + "HubWaitlistSignupResponse": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "email_domain": { + "type": "string" + }, + "school": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "email", + "email_domain", + "school", + "user_id" + ] + }, + "InstanceDomainsResponse": { + "type": "object", + "properties": { + "admin": { + "type": "string" + }, + "api": { + "type": "string" + }, + "apiEndpoint": { + "type": "string" + }, + "cdn": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "defaultApiVersion": { + "type": "string" + } + }, + "required": [ + "api", + "apiEndpoint", + "cdn", + "defaultApiVersion", + "gateway" + ] + }, + "InstancePingResponse": { + "type": "object", + "properties": { + "ping": { + "type": "string", + "const": "pong!" + }, + "instance": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "image": { + "type": [ + "null", + "string" + ] + }, + "correspondenceEmail": { + "type": [ + "null", + "string" + ] + }, + "correspondenceUserID": { + "type": [ + "null", + "string" + ] + }, + "frontPage": { + "type": [ + "null", + "string" + ] + }, + "tosPage": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "correspondenceEmail", + "correspondenceUserID", + "description", + "frontPage", + "id", + "image", + "name", + "tosPage" + ] + } + }, + "required": [ + "instance", + "ping" + ] + }, + "InstanceStatsResponse": { + "type": "object", + "properties": { + "counts": { + "type": "object", + "properties": { + "user": { + "type": "integer" + }, + "guild": { + "type": "integer" + }, + "message": { + "type": "integer" + }, + "members": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "guild", + "members", + "message", + "user" + ] + } + }, + "required": [ + "counts" + ] + }, + "LocationMetadataResponse": { + "type": "object", + "properties": { + "consent_required": { + "type": "boolean" + }, + "country_code": { + "type": "string" + }, + "promotional_email_opt_in": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "const": true + }, + "pre_checked": { + "type": "boolean", + "const": false + } + }, + "additionalProperties": false, + "required": [ + "pre_checked", + "required" + ] + } + }, + "required": [ + "consent_required", + "country_code", + "promotional_email_opt_in" + ] + }, + "MemberJoinGuildResponse": { + "type": "object", + "properties": { + "guild": { + "$ref": "#/components/schemas/GuildCreateResponse" + }, + "emojis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Emoji" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + }, + "stickers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sticker" + } + } + }, + "required": [ + "emojis", + "guild", + "roles", + "stickers" + ] + }, + "OAuthAuthorizeResponse": { + "type": "object", + "properties": { + "location": { + "type": "string" + } + }, + "required": [ + "location" + ] + }, + "PreloadMessagesResponseSchema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "QuestClaimRewardResponseSchema": { + "type": "object", + "properties": { + "claimed_at": { + "type": "string" + }, + "entitlement_expiration_metadata": { + "$ref": "#/components/schemas/Record" + }, + "entitlements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitlementSchema" + } + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "code", + "message" + ] + } + } + }, + "required": [ + "claimed_at", + "entitlement_expiration_metadata", + "entitlements", + "errors" + ] + }, + "QuestConfigResponseSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "config_version": { + "type": "integer" + }, + "starts_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + }, + "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestFeature" + } + }, + "application": { + "$ref": "#/components/schemas/QuestApplicationSchema" + }, + "assets": { + "type": "object", + "properties": { + "hero": { + "type": [ + "null", + "string" + ] + }, + "hero_video": { + "type": [ + "null", + "string" + ] + }, + "quest_bar_hero": { + "type": [ + "null", + "string" + ] + }, + "quest_bar_hero_video": { + "type": [ + "null", + "string" + ] + }, + "game_tile": { + "type": [ + "null", + "string" + ] + }, + "game_tile_dark": { + "type": [ + "null", + "string" + ] + }, + "game_tile_light": { + "type": [ + "null", + "string" + ] + }, + "logotype": { + "type": [ + "null", + "string" + ] + }, + "logotype_dark": { + "type": [ + "null", + "string" + ] + }, + "logotype_light": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "game_tile", + "game_tile_dark", + "game_tile_light", + "hero", + "logotype", + "logotype_dark", + "logotype_light", + "quest_bar_hero" + ] + }, + "colors": { + "type": "object", + "properties": { + "primary": { + "type": "string" + }, + "secondary": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "primary", + "secondary" + ] + }, + "messages": { + "type": "object", + "properties": { + "quest_name": { + "type": "string" + }, + "game_title": { + "type": "string" + }, + "game_publisher": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "game_publisher", + "game_title", + "quest_name" + ] + }, + "task_config": {}, + "task_config_v2": { + "$ref": "#/components/schemas/QuestTaskConfigV2Schema" + }, + "rewards_config": { + "$ref": "#/components/schemas/QuestRewardConfigSchema" + }, + "share_policy": { + "$ref": "#/components/schemas/QuestSharePolicy" + }, + "cta_config": { + "type": "object", + "properties": { + "button_label": { + "type": "string" + }, + "link": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "android": { + "type": "object", + "properties": { + "android_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "android_app_id" + ] + }, + "ios": { + "type": "object", + "properties": { + "ios_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ios_app_id" + ] + } + }, + "additionalProperties": false, + "required": [ + "button_label", + "link" + ] + } + }, + "required": [ + "application", + "assets", + "colors", + "config_version", + "cta_config", + "expires_at", + "features", + "id", + "messages", + "rewards_config", + "share_policy", + "starts_at", + "task_config_v2" + ] + }, + "QuestPlacementResponseSchema": { + "type": "object", + "properties": { + "request_id": { + "type": "string" + }, + "quest": { + "anyOf": [ + { + "$ref": "#/components/schemas/QuestSchema" + }, + { + "type": "null" + } + ] + }, + "ad_identifiers": { + "anyOf": [ + { + "$ref": "#/components/schemas/QuestAdIdentifiersSchema" + }, + { + "type": "null" + } + ] + }, + "ad_context": { + "anyOf": [ + { + "type": "object", + "properties": { + "is_campaign_ias_enabled": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "is_campaign_ias_enabled" + ] + }, + { + "type": "null" + } + ] + }, + "response_ttl_seconds": { + "type": "integer" + }, + "metadata_raw": { + "type": "string", + "nullable": true + } + }, + "required": [ + "ad_context", + "ad_identifiers", + "metadata_raw", + "quest", + "request_id", + "response_ttl_seconds" + ] + }, + "QuestRewardCodeResponseSchema": { + "type": "object", + "properties": { + "quest_id": { + "type": "string" + }, + "code": { + "type": "string" + }, + "platform": { + "$ref": "#/components/schemas/QuestPlatformType" + }, + "user_id": { + "type": "string" + }, + "claimed_at": { + "type": "string" + }, + "tier": { + "type": "integer", + "nullable": true + } + }, + "required": [ + "claimed_at", + "code", + "platform", + "quest_id", + "tier", + "user_id" + ] + }, + "QuestsResponseSchema": { + "type": "object", + "properties": { + "excluded_quests": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "replacement_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + } + }, + "quest_enrollment_blocked_until": {}, + "quests": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestSchema" + } + } + }, + "required": [ + "excluded_quests", + "quest_enrollment_blocked_until", + "quests" + ] + }, + "QuestUserStatusResponseSchema": { + "type": "object", + "properties": { + "user_id": { + "type": "string" + }, + "quest_id": { + "type": "string" + }, + "enrolled_at": { + "type": "string", + "nullable": true + }, + "completed_at": { + "type": "string", + "nullable": true + }, + "claimed_at": { + "type": "string", + "nullable": true + }, + "claimed_tier": { + "type": "integer", + "nullable": true + }, + "last_stream_heartbeat_at": { + "type": "string", + "nullable": true + }, + "stream_progress_seconds": { + "type": "integer" + }, + "dismissed_quest_content": { + "type": "integer" + }, + "progress": { + "$ref": "#/components/schemas/Record" + } + }, + "required": [ + "claimed_at", + "completed_at", + "enrolled_at", + "quest_id", + "stream_progress_seconds", + "user_id" + ] + }, + "RefreshUrlsResponse": { + "type": "object", + "properties": { + "refreshed_urls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RefreshedUrl" + } + } + }, + "required": [ + "refreshed_urls" + ] + }, + "SettingsProtoResponse": { + "type": "object", + "properties": { + "settings": { + "type": "string" + } + }, + "required": [ + "settings" + ] + }, + "SettingsProtoUpdateResponse": { + "type": "object", + "properties": { + "out_of_date": { + "type": "boolean" + }, + "settings": { + "type": "string" + } + }, + "required": [ + "settings" + ] + }, + "SettingsProtoJsonResponse": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "required": [ + "settings" + ] + }, + "SettingsProtoUpdateJsonResponse": { + "type": "object", + "properties": { + "out_of_date": { + "type": "boolean" + }, + "settings": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "required": [ + "settings" + ] + }, + "TeamListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "TenorGifResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" + }, + "src": { + "type": "string" + }, + "gif_src": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "preview": { + "type": "string" + } + }, + "required": [ + "gif_src", + "height", + "id", + "preview", + "src", + "title", + "url", + "width" + ] + }, + "TenorTrendingResponse": { + "type": "object", + "properties": { + "categories": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "object", + "properties": { + "searchterm": { + "type": "string" + }, + "path": { + "type": "string" + }, + "image": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "image", + "name", + "path", + "searchterm" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "tags" + ] + }, + "gifs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenorGifResponse" + } + } + }, + "required": [ + "categories", + "gifs" + ] + }, + "TenorGifsResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenorGifResponse" + } + }, + "TokenResponse": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/UserSettings" + } + }, + "required": [ + "settings", + "token" + ] + }, + "TokenOnlyResponse": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ] + }, + "TokenWithBackupCodesResponse": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "backup_codes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BackupCode" + } + } + }, + "required": [ + "backup_codes", + "token" + ] + }, + "APIGuild": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "insert": { + "type": "object", + "additionalProperties": false + }, + "id": { + "type": "string" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "type": "string" + }, + "parent": { + "type": "string" + }, + "owner_id": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "invites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invite" + } + }, + "voice_states": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VoiceState" + } + }, + "webhooks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Webhook" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + }, + "banner": { + "type": "string" + }, + "channels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Channel" + } + }, + "members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Member" + } + }, + "system_channel_id": { + "type": "string", + "nullable": true + }, + "rules_channel_id": { + "type": "string", + "nullable": true + }, + "splash": { + "type": "string" + }, + "description": { + "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", + "nullable": true + }, + "afk_timeout": { + "type": "integer" + }, + "afk_channel_id": { + "type": "string", + "nullable": true + }, + "preferred_locale": { + "type": "string" + }, + "premium_progress_bar_enabled": { + "type": "boolean" + }, + "discovery_splash": { + "type": "string" + }, + "bans": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ban" + } + }, + "primary_category_id": { + "type": "string" + }, + "large": { + "type": "boolean" + }, + "max_members": { + "type": "integer" + }, + "max_presences": { + "type": "integer" + }, + "max_video_channel_users": { + "type": "integer" + }, + "member_count": { + "type": "integer" + }, + "presence_count": { + "type": "integer" + }, + "template_id": { + "type": "string" + }, + "emojis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Emoji" + } + }, + "stickers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sticker" + } + }, + "mfa_level": { + "type": "integer" + }, + "premium_subscription_count": { + "type": "integer" + }, + "premium_tier": { + "type": "integer" + }, + "unavailable": { + "type": "boolean" + }, + "welcome_screen": { + "$ref": "#/components/schemas/GuildWelcomeScreen", + "description": "DEPRECATED: Look at the new Guild onboarding screens." + }, + "widget_channel_id": { + "type": "string" + }, + "widget_enabled": { + "type": "boolean" + }, + "nsfw_level": { + "type": "integer" + }, + "permissions": { + "type": "integer" + }, + "channel_ordering": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "bans", + "channel_ordering", + "channels", + "emojis", + "features", + "id", + "insert", + "invites", + "members", + "name", + "nsfw", + "premium_progress_bar_enabled", + "public_updates_channel_id", + "roles", + "stickers", + "unavailable", + "voice_states", + "webhooks", + "welcome_screen", + "widget_enabled" + ] + }, + "APIPublicUser": { + "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```", + "type": "string" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "accent_color": { + "type": "integer" + }, + "bot": { + "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "premium_type", + "public_flags", + "username" + ] + }, + "APIPrivateUser": { + "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```", + "type": "string" + }, + "flags": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "accent_color": { + "type": "integer" + }, + "bot": { + "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "mfa_enabled": { + "type": "boolean" + }, + "phone": { + "type": "string" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "premium": { + "type": "boolean" + }, + "purchased_flags": { + "type": "integer" + }, + "premium_usage_flags": { + "type": "integer" + }, + "settings": { + "$ref": "#/components/schemas/UserSettingsSchema" + } + }, + "required": [ + "bio", + "bot", + "disabled", + "discriminator", + "flags", + "id", + "mfa_enabled", + "nsfw_allowed", + "premium", + "premium_since", + "premium_type", + "premium_usage_flags", + "public_flags", + "purchased_flags", + "username", + "verified" + ] + }, + "APIGuildArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/APIGuild" + } + }, + "APIDMChannelArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DmChannelDTO" + } + }, + "APIBackupCodeArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BackupCode" + } + }, + "UserUpdateResponse": { + "type": "object", + "properties": { + "newToken": { + "type": "string" + }, + "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```", + "type": "string" + }, + "flags": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "accent_color": { + "type": "integer" + }, + "bot": { + "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "mfa_enabled": { + "type": "boolean" + }, + "phone": { + "type": "string" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "premium": { + "type": "boolean" + }, + "purchased_flags": { + "type": "integer" + }, + "premium_usage_flags": { + "type": "integer" + }, + "settings": { + "$ref": "#/components/schemas/UserSettingsSchema" + } + }, + "required": [ + "bio", + "bot", + "disabled", + "discriminator", + "flags", + "id", + "mfa_enabled", + "nsfw_allowed", + "premium", + "premium_since", + "premium_type", + "premium_usage_flags", + "public_flags", + "purchased_flags", + "username", + "verified" + ] + }, + "ApplicationDetectableResponse": { + "type": "array", + "items": {} + }, + "ApplicationEntitlementsResponse": { + "type": "array", + "items": {} + }, + "ApplicationSkusResponse": { + "type": "array", + "items": {} + }, + "APIApplicationArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Application" + } + }, + "APIBansArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildBansResponse" + } + }, + "APIInviteArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Invite" + } + }, + "APIMessageArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + } + }, + "APIWebhookArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Webhook" + } + }, + "APIDiscoveryCategoryArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Categories" + } + }, + "APIGeneralConfiguration": { + "type": "object", + "properties": { + "instanceName": { + "type": "string", + "default": "Spacebar Instance" + }, + "serverName": { + "type": "string", + "default": null, + "nullable": true + }, + "instanceDescription": { + "type": "string", + "default": "This is a Spacebar instance made in the pre-release days", + "nullable": true + }, + "frontPage": { + "type": "string", + "default": null, + "nullable": true + }, + "tosPage": { + "type": "string", + "default": null, + "nullable": true + }, + "correspondenceEmail": { + "type": "string", + "default": null, + "nullable": true + }, + "correspondenceUserID": { + "type": "string", + "default": null, + "nullable": true + }, + "image": { + "type": "string", + "default": null, + "nullable": true + }, + "instanceId": { + "type": "string" + }, + "autoCreateBotUsers": { + "type": "boolean", + "default": false + } + }, + "required": [ + "autoCreateBotUsers", + "correspondenceEmail", + "correspondenceUserID", + "frontPage", + "image", + "instanceDescription", + "instanceId", + "instanceName", + "serverName", + "tosPage" + ] + }, + "APIChannelArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Channel" + } + }, + "APIEmojiArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Emoji" + } + }, + "APIMemberArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Member" + } + }, + "APIPublicMember": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "mute": { + "type": "boolean" + }, + "deaf": { + "type": "boolean" + }, + "nick": { + "type": "string" + }, + "joined_at": { + "type": "string", + "format": "date-time" + }, + "pending": { + "type": "boolean" + }, + "premium_since": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "communication_disabled_until": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "user": { + "$ref": "#/components/schemas/PublicUser" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "banner", + "bio", + "communication_disabled_until", + "deaf", + "guild_id", + "id", + "joined_at", + "mute", + "pending", + "roles", + "user" + ] + }, + "APIGuildWithJoinedAt": { + "type": "object", + "properties": { + "joined_at": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "primary_category_id": { + "type": "string" + }, + "large": { + "type": "boolean" + }, + "max_members": { + "type": "integer" + }, + "max_presences": { + "type": "integer" + }, + "max_video_channel_users": { + "type": "integer" + }, + "member_count": { + "type": "integer" + }, + "presence_count": { + "type": "integer" + }, + "template_id": { + "type": "string" + }, + "mfa_level": { + "type": "integer" + }, + "owner_id": { + "type": "string" + }, + "premium_subscription_count": { + "type": "integer" + }, + "premium_tier": { + "type": "integer" + }, + "welcome_screen": { + "$ref": "#/components/schemas/GuildWelcomeScreen" + }, + "widget_channel_id": { + "type": "string" + }, + "widget_enabled": { + "type": "boolean" + }, + "nsfw_level": { + "type": "integer" + }, + "nsfw": { + "type": "boolean" + }, + "parent": { + "type": "string" + }, + "region": { + "type": "string" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "type": "string", + "nullable": true + }, + "banner": { + "type": "string", + "nullable": true + }, + "system_channel_id": { + "type": "string" + }, + "rules_channel_id": { + "type": "string" + }, + "guild_template_code": { + "type": "string" + }, + "staff_only": { + "type": "boolean" + }, + "splash": { + "type": "string", + "nullable": true + }, + "description": { + "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 + } + }, + "required": [ + "id", + "joined_at", + "large", + "max_members", + "max_presences", + "max_video_channel_users", + "member_count", + "mfa_level", + "name", + "nsfw", + "nsfw_level", + "owner_id", + "parent", + "premium_subscription_count", + "premium_tier", + "presence_count", + "primary_category_id", + "template_id", + "welcome_screen", + "widget_channel_id", + "widget_enabled" + ] + }, + "APIRoleArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + }, + "APIStickerArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sticker" + } + }, + "APITemplateArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Template" + } + }, + "APIGuildVoiceRegion": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildVoiceRegion" + } + }, + "APILimitsConfiguration": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/UserLimits" + }, + "guild": { + "$ref": "#/components/schemas/GuildLimits" + }, + "message": { + "$ref": "#/components/schemas/MessageLimits" + }, + "channel": { + "$ref": "#/components/schemas/ChannelLimits" + }, + "rate": { + "$ref": "#/components/schemas/RateLimits" + }, + "absoluteRate": { + "$ref": "#/components/schemas/GlobalRateLimits" + } + }, + "required": [ + "absoluteRate", + "channel", + "guild", + "message", + "rate", + "user" + ] + }, + "APIStickerPackArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StickerPack" + } + }, + "APIConnectionsConfiguration": { + "type": "object" + }, + "UpdatesResponse": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "pub_date": { + "type": "string" + }, + "url": { + "type": "string" + }, + "notes": { + "type": "string", + "nullable": true + } + }, + "required": [ + "name", + "notes", + "pub_date", + "url" + ] + }, + "UploadAttachmentResponseSchema": { + "type": "object", + "properties": { + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UploadAttachmentResponse" + } + } + }, + "required": [ + "attachments" + ] + }, + "UploadAttachmentResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "upload_url": { + "type": "string" + }, + "upload_filename": { + "type": "string" + }, + "original_content_type": { + "type": "string" + } + }, + "required": [ + "upload_filename", + "upload_url" + ] + }, + "UserNoteResponse": { + "type": "object", + "properties": { + "note": { + "type": "string" + }, + "note_user_id": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "required": [ + "note", + "note_user_id", + "user_id" + ] + }, + "UserProfileResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/PublicUser" + }, + "connected_accounts": { + "$ref": "#/components/schemas/PublicConnectedAccount" + }, + "premium_guild_since": { + "type": "string", + "format": "date-time" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "mutual_guilds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "nick": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] + } + }, + "premium_type": { + "type": "integer" + }, + "profile_themes_experiment_bucket": { + "type": "integer" + }, + "user_profile": { + "$ref": "#/components/schemas/UserProfile" + }, + "guild_member": { + "$ref": "#/components/schemas/PublicMember" + }, + "guild_member_profile": { + "$ref": "#/components/schemas/PublicMemberProfile" + }, + "badges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Badge" + } + } + }, + "required": [ + "badges", + "connected_accounts", + "mutual_guilds", + "premium_type", + "profile_themes_experiment_bucket", + "user", + "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": { + "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" + ] + } + }, + "VirtualCurrencyResponseSchema": { + "type": "object", + "properties": { + "balance": { + "type": "integer" + } + }, + "required": [ + "balance" + ] + }, + "WebAuthnCreateResponse": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + }, + "WebhookCreateResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "hook": { + "$ref": "#/components/schemas/Webhook" + } + }, + "required": [ + "hook", + "user" + ] + }, + "CreateApplicationSKUResponseSchema": { + "type": "object", + "properties": { + "skus": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SKU" + } + }, + "store_listings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StoreListingSchema" + } + } + }, + "required": [ + "skus", + "store_listings" + ] + }, + "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" + }, + "communication_disabled_until": { + "type": "string", + "nullable": true + } + } + }, + "MemberNickChangeSchema": { + "type": "object", + "properties": { + "nick": { + "type": "string" + } + }, + "required": [ + "nick" + ] + }, + "MessageAcknowledgeSchema": { + "type": "object", + "properties": { + "manual": { + "type": "boolean" + }, + "mention_count": { + "type": "integer" + }, + "flags": { + "enum": [ + 0, + 1, + 2, + 4 + ], + "type": "number" + }, + "last_viewed": { + "type": "integer" + }, + "token": { + "type": "string" + } + } + }, + "AcknowledgeDeleteSchema": { + "type": "object", + "properties": { + "read_state_type": { + "enum": [ + 0, + 1, 2, - 255, 3, - 33, - 34, - 35, 4, - 5, - 6, - 64, - 7, - 8, - 9 + 5 ], "type": "number" }, - "topic": { + "version": { + "type": "integer" + } + } + }, + "MessageCreateSchema": { + "type": "object", + "properties": { + "type": { + "type": "integer" + }, + "content": { "type": "string" }, - "icon": { - "type": "string", - "nullable": true + "mobile_network_type": { + "type": "string" }, - "bitrate": { - "type": "integer" + "nonce": { + "type": "string" }, - "user_limit": { - "type": "integer" + "channel_id": { + "type": "string" }, - "rate_limit_per_user": { - "type": "integer" + "tts": { + "type": "boolean" }, - "position": { + "flags": { "type": "integer" }, - "permission_overwrites": { + "embeds": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { + "$ref": "#/components/schemas/Embed" + } + }, + "embed": { + "$ref": "#/components/schemas/Embed" + }, + "allowed_mentions": { + "type": "object", + "properties": { + "parse": { + "type": "array", + "items": { "type": "string" - }, - "type": { - "$ref": "#/components/schemas/ChannelPermissionOverwriteType" - }, - "allow": { + } + }, + "roles": { + "type": "array", + "items": { "type": "string" - }, - "deny": { + } + }, + "users": { + "type": "array", + "items": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "allow", - "deny", - "id", - "type" + "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" + }, + "type": { + "type": "integer" + } + }, + "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" + ] + } ] } }, - "parent_id": { - "type": "string" + "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" + }, + "interaction": { + "$ref": "#/components/schemas/MessageInteractionSchema" + }, + "interaction_metadata": { + "$ref": "#/components/schemas/MessageInteractionSchema" + } + } + }, + "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" + ] + }, + "MessageInteractionSchema": { + "type": "object", + "properties": { "id": { "type": "string" }, - "nsfw": { - "type": "boolean" + "type": { + "$ref": "#/components/schemas/InteractionType" }, - "rtc_region": { + "name": { "type": "string" }, - "default_auto_archive_duration": { - "type": "integer" - }, - "default_reaction_emoji": { - "type": "string", - "nullable": true + "command_type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" }, - "flags": { + "ephemerality_reason": { "type": "integer" }, - "default_thread_rate_limit_per_user": { - "type": "integer" + "user": { + "$ref": "#/components/schemas/PublicUser" }, - "video_quality_mode": { - "type": "integer" - } - } - }, - "ChannelPermissionOverwriteSchema": { - "type": "object", - "properties": { - "allow": { + "user_id": { "type": "string" }, - "deny": { - "type": "string" + "authorizing_integration_owners": { + "type": "object", + "properties": {}, + "additionalProperties": true }, - "id": { - "type": "string" + "original_response_message_id": { + "description": "A container for useful snowflake-related methods.", + "$ref": "#/components/schemas/Snowflake" }, - "type": { - "$ref": "#/components/schemas/ChannelPermissionOverwriteType" + "interacted_message_id": { + "description": "A container for useful snowflake-related methods.", + "$ref": "#/components/schemas/Snowflake" + }, + "triggering_interaction_metadata": { + "$ref": "#/components/schemas/MessageInteractionSchema" + }, + "target_user": { + "$ref": "#/components/schemas/PublicUser" + }, + "target_message_id": { + "description": "A container for useful snowflake-related methods.", + "$ref": "#/components/schemas/Snowflake" } }, "required": [ - "allow", - "deny", "id", + "name", "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": { + "MessageEditSchema": { "type": "object", "properties": { - "key": { - "type": "string" + "embed": { + "$ref": "#/components/schemas/Embed" }, - "nonce": { + "file": { + "type": "object", + "properties": { + "filename": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filename" + ] + }, + "flags": { + "type": "integer" + }, + "channel_id": { "type": "string" }, - "regenerate": { - "type": "boolean" - } - }, - "required": [ - "key", - "nonce" - ] - }, - "ConnectedAccountSchema": { - "type": "object", - "properties": { - "external_id": { + "content": { "type": "string" }, - "user_id": { + "mobile_network_type": { "type": "string" }, - "token_data": { - "$ref": "#/components/schemas/ConnectedAccountTokenData" + "nonce": { + "type": "string" }, - "friend_sync": { + "tts": { "type": "boolean" }, - "name": { + "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" + }, + "type": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "message_id" + ] + }, + "payload_json": { "type": "string" }, - "revoked": { - "type": "boolean" + "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" + } + ] }, - "show_activity": { - "type": "integer" + "components": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActionRowComponent" + } + }, + { + "type": "null" + } + ] }, - "type": { - "type": "string" + "poll": { + "$ref": "#/components/schemas/PollCreationSchema" }, - "verified": { + "enforce_nonce": { "type": "boolean" }, - "visibility": { - "type": "integer" - }, - "integrations": { + "applied_tags": { "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": { + "thread_name": { "type": "string" }, - "state": { + "avatar_url": { "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" + "interaction": { + "$ref": "#/components/schemas/MessageInteractionSchema" }, - "metadata_visibility": { - "type": "boolean" + "interaction_metadata": { + "$ref": "#/components/schemas/MessageInteractionSchema" } } }, - "DmChannelCreateSchema": { + "MfaCodesSchema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "recipients": { - "type": "array", - "items": { - "type": "string" - } - }, - "recipient_id": { + "password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "access_tokens": { - "type": "array", - "items": { - "type": "string" - } + "regenerate": { + "type": "boolean" } - } + }, + "required": [ + "password" + ] }, - "EmailDomainLookupSchema": { + "ModifyGuildStickerSchema": { "type": "object", "properties": { - "allow_multiple_guilds": { - "type": "boolean" - }, - "email": { + "name": { + "minLength": 2, + "maxLength": 30, "type": "string" }, - "use_verification_code": { - "type": "boolean" + "description": { + "maxLength": 100, + "type": "string" }, - "guild_id": { + "tags": { + "maxLength": 200, "type": "string" } }, "required": [ - "allow_multiple_guilds", - "email", - "use_verification_code" + "name", + "tags" ] }, - "EmailDomainLookupVerifyCodeSchema": { + "PasswordResetSchema": { "type": "object", "properties": { - "email": { - "type": "string" - }, - "guild_id": { + "password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "code": { + "token": { "type": "string" } }, "required": [ - "code", - "email", - "guild_id" + "password", + "token" ] }, - "EmojiCreateSchema": { + "PreloadMessagesRequestSchema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "image": { - "type": "string" - }, - "require_colons": { - "type": "boolean", - "nullable": true - }, - "roles": { + "channels": { "type": "array", "items": { "type": "string" @@ -4557,866 +7496,783 @@ } }, "required": [ - "image" + "channels" ] }, - "EmojiModifySchema": { + "PruneSchema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } + "days": { + "type": "integer" } - } + }, + "required": [ + "days" + ] }, - "ForgotPasswordSchema": { + "PurgeSchema": { "type": "object", "properties": { - "login": { + "before": { "type": "string" }, - "captcha_key": { + "after": { "type": "string" } }, "required": [ - "login" + "after", + "before" ] }, - "GreetRequestSchema": { + "RefreshUrlsRequestSchema": { "type": "object", "properties": { - "sticker_ids": { + "attachment_urls": { "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" + "attachment_urls" ] }, - "GuildCreateSchema": { + "RegisterSchema": { "type": "object", "properties": { - "name": { - "maxLength": 100, + "username": { + "minLength": 2, "type": "string" }, - "region": { + "password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "icon": { - "type": "string", - "nullable": true + "consent": { + "type": "boolean" }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChannelModifySchema" - } + "email": { + "format": "email", + "type": "string" + }, + "fingerprint": { + "type": "string" }, - "system_channel_id": { + "invite": { "type": "string" }, - "rules_channel_id": { + "date_of_birth": { "type": "string" }, - "guild_template_code": { + "gift_code_sku_id": { "type": "string" }, - "staff_only": { + "captcha_key": { + "type": "string" + }, + "promotional_email_opt_in": { + "type": "boolean" + }, + "unique_username_registration": { "type": "boolean" + }, + "global_name": { + "type": "string" + } + }, + "required": [ + "consent", + "username" + ] + }, + "RelationshipPatchSchema": { + "type": "object", + "properties": { + "nickname": { + "type": "string" } } }, - "GuildSubscriptionsBulkSchema": { + "RelationshipPostSchema": { "type": "object", "properties": { - "subscriptions": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/GuildSubscriptionSchema" - } + "discriminator": { + "type": "string" + }, + "username": { + "type": "string" } }, "required": [ - "subscriptions" + "discriminator", + "username" ] }, - "GuildSubscriptionSchema": { + "RelationshipPutSchema": { "type": "object", "properties": { - "channels": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { + "type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" + } + } + }, + "RequestGuildMembersSchema": { + "type": "object", + "properties": { + "guild_id": { + "anyOf": [ + { "type": "array", - "items": { - "type": "integer" - } + "items": [ + { + "type": "string" + } + ], + "minItems": 1, + "maxItems": 1 + }, + { + "type": "string" } - } - }, - "members": { - "type": "array", - "items": { - "type": "string" - } + ] }, - "activities": { - "type": "boolean" + "query": { + "type": "string" }, - "threads": { - "type": "boolean" + "limit": { + "type": "integer" }, - "typing": { - "const": true, + "presences": { "type": "boolean" }, - "member_updates": { - "type": "boolean" + "user_ids": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] }, - "thread_member_lists": { - "type": "array", - "items": {} - } - } - }, - "GuildTemplateCreateSchema": { - "type": "object", - "properties": { - "name": { + "nonce": { "type": "string" - }, - "avatar": { - "type": "string", - "nullable": true } }, "required": [ - "name" + "guild_id" ] }, - "GuildUpdateSchema": { + "RoleModifySchema": { "type": "object", "properties": { - "banner": { - "type": "string", - "nullable": true - }, - "splash": { - "type": "string", - "nullable": true - }, - "description": { + "name": { "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": { + "permissions": { "type": "string" }, - "afk_timeout": { + "color": { "type": "integer" }, - "afk_channel_id": { - "type": "string" - }, - "preferred_locale": { - "type": "string" - }, - "premium_progress_bar_enabled": { + "hoist": { "type": "boolean" }, - "discovery_splash": { - "type": "string" + "mentionable": { + "type": "boolean" }, - "safety_alerts_channel_id": { - "type": "string", - "nullable": true + "position": { + "type": "integer" }, - "name": { - "maxLength": 100, + "icon": { "type": "string" }, - "region": { + "unicode_emoji": { "type": "string" }, - "icon": { - "type": "string", - "nullable": true + "colors": { + "type": "object", + "properties": { + "primary_color": { + "type": "integer" + }, + "secondary_color": { + "type": [ + "null", + "integer" + ] + }, + "tertiary_color": { + "type": [ + "null", + "integer" + ] + } + }, + "additionalProperties": false, + "required": [ + "primary_color" + ] + } + } + }, + "RolePositionUpdateSchema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "position": { + "type": "integer" + } }, - "system_channel_id": { + "additionalProperties": false, + "required": [ + "id", + "position" + ] + } + }, + "SelectProtocolSchema": { + "type": "object", + "properties": { + "protocol": { + "enum": [ + "udp", + "webrtc" + ], "type": "string" }, - "rules_channel_id": { - "type": "string" + "data": { + "anyOf": [ + { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "mode": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "address", + "mode", + "port" + ] + }, + { + "type": "string" + } + ] }, - "guild_template_code": { + "sdp": { "type": "string" }, - "staff_only": { - "type": "boolean" - } - } - }, - "GuildUpdateWelcomeScreenSchema": { - "type": "object", - "properties": { - "welcome_channels": { + "codecs": { "type": "array", "items": { "type": "object", "properties": { - "channel_id": { + "name": { + "enum": [ + "H264", + "VP8", + "VP9", + "opus" + ], "type": "string" }, - "description": { + "type": { + "enum": [ + "audio", + "video" + ], "type": "string" }, - "emoji_id": { - "type": "string" + "priority": { + "type": "integer" }, - "emoji_name": { - "type": "string" + "payload_type": { + "type": "integer" + }, + "rtx_payload_type": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "channel_id", - "description" + "name", + "payload_type", + "priority", + "type" ] } }, - "enabled": { - "type": "boolean" - }, - "description": { + "rtc_connection_id": { "type": "string" } - } + }, + "required": [ + "data", + "protocol" + ] }, - "HubWaitlistSignupSchema": { + "SettingsProtoUpdateSchema": { "type": "object", "properties": { - "email": { + "settings": { "type": "string" }, - "school": { - "type": "string" + "required_data_version": { + "type": "integer" } }, "required": [ - "email", - "school" + "settings" ] }, - "InviteCreateSchema": { + "SettingsProtoUpdateJsonSchema": { "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" + "settings": { + "$ref": "#/components/schemas/JsonValue" }, - "flags": { + "required_data_version": { "type": "integer" } - } + }, + "required": [ + "settings" + ] }, - "MFAResponse": { + "TeamCreateSchema": { "type": "object", "properties": { - "ticket": { + "name": { "type": "string" - }, - "mfa": { - "type": "boolean", - "const": true - }, - "sms": { - "type": "boolean", - "const": false - }, - "token": { - "type": "null" } }, "required": [ - "mfa", - "sms", - "ticket", - "token" + "name" ] }, - "WebAuthnResponse": { + "TemplateCreateSchema": { "type": "object", "properties": { - "webauthn": { + "name": { "type": "string" }, - "ticket": { + "description": { "type": "string" - }, - "mfa": { - "type": "boolean", - "const": true - }, - "sms": { - "type": "boolean", - "const": false - }, - "token": { - "type": "null" } }, "required": [ - "mfa", - "sms", - "ticket", - "token", - "webauthn" + "name" ] }, - "LoginResponse": { - "anyOf": [ - { - "$ref": "#/components/schemas/TokenResponse" - }, - { - "$ref": "#/components/schemas/MFAResponse" + "TemplateModifySchema": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - { - "$ref": "#/components/schemas/WebAuthnResponse" + "description": { + "type": "string" } + }, + "required": [ + "name" ] }, - "LoginSchema": { + "TotpDisableSchema": { "type": "object", "properties": { - "login": { + "code": { + "minLength": 6, + "maxLength": 6, "type": "string" - }, + } + }, + "required": [ + "code" + ] + }, + "TotpEnableSchema": { + "type": "object", + "properties": { "password": { "minLength": 1, "maxLength": 72, "type": "string" }, - "undelete": { - "type": "boolean" - }, - "captcha_key": { - "type": "string" - }, - "login_source": { + "code": { + "minLength": 6, + "maxLength": 6, "type": "string" }, - "gift_code_sku_id": { + "secret": { "type": "string" } }, "required": [ - "login", "password" ] }, - "MemberChangeProfileSchema": { + "TotpSchema": { "type": "object", "properties": { - "banner": { - "type": "string", - "nullable": true - }, - "nick": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "pronouns": { + "code": { "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": { + "ticket": { "type": "string" }, - "avatar": { + "gift_code_sku_id": { "type": "string", "nullable": true }, - "bio": { - "type": "string" - }, - "communication_disabled_until": { + "login_source": { "type": "string", "nullable": true } - } + }, + "required": [ + "code", + "ticket" + ] }, - "MemberNickChangeSchema": { + "UploadAttachmentRequestSchema": { "type": "object", "properties": { - "nick": { - "type": "string" + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UploadAttachmentRequest" + } } }, "required": [ - "nick" + "files" ] }, - "MessageAcknowledgeSchema": { + "UserDeleteSchema": { "type": "object", "properties": { - "manual": { - "type": "boolean" - }, - "mention_count": { - "type": "integer" - }, - "flags": { - "enum": [ - 0, - 1, - 2, - 4 - ], - "type": "number" - }, - "last_viewed": { - "type": "integer" - }, - "token": { + "user_id": { "type": "string" } - } + }, + "required": [ + "user_id" + ] }, - "AcknowledgeDeleteSchema": { + "UserGuildSettingsSchema": { "type": "object", "properties": { - "read_state_type": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "type": "number" + "channel_overrides": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ChannelOverride" + } }, "version": { "type": "integer" - } - } - }, - "MessageCreateSchema": { - "type": "object", - "properties": { - "type": { + }, + "message_notifications": { "type": "integer" }, - "content": { - "type": "string" + "mobile_push": { + "type": "boolean" }, - "mobile_network_type": { - "type": "string" + "mute_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MuteConfig" + }, + { + "type": "null" + } + ] }, - "nonce": { - "type": "string" + "muted": { + "type": "boolean" }, - "channel_id": { - "type": "string" + "suppress_everyone": { + "type": "boolean" }, - "tts": { + "suppress_roles": { "type": "boolean" }, + "guild_id": { + "type": "string", + "nullable": true + }, "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" - }, - "type": { - "type": "integer" - } - }, - "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" - ] - } - ] - } + "mute_scheduled_events": { + "type": "boolean" }, - "sticker_ids": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] + "hide_muted_channels": { + "type": "boolean" }, - "components": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionRowComponent" - } - }, - { - "type": "null" - } - ] + "notify_highlights": { + "const": 0, + "type": "number" + } + } + }, + "UserModifySchema": { + "type": "object", + "properties": { + "username": { + "minLength": 2, + "type": "string" }, - "poll": { - "$ref": "#/components/schemas/PollCreationSchema" + "avatar": { + "type": "string", + "nullable": true }, - "enforce_nonce": { - "type": "boolean" + "bio": { + "type": "string" }, - "applied_tags": { - "type": "array", - "items": { - "type": "string" - } + "accent_color": { + "type": "integer" }, - "thread_name": { + "banner": { + "type": "string", + "nullable": true + }, + "password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "avatar_url": { + "new_password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "interaction": { - "$ref": "#/components/schemas/MessageInteractionSchema" + "code": { + "minLength": 6, + "maxLength": 6, + "type": "string" }, - "interaction_metadata": { - "$ref": "#/components/schemas/MessageInteractionSchema" + "email": { + "format": "email", + "type": "string" + }, + "discriminator": { + "minLength": 4, + "maxLength": 4, + "type": "string" } } }, - "PollCreationSchema": { + "UserNoteUpdateSchema": { "type": "object", "properties": { - "question": { - "$ref": "#/components/schemas/PollMedia" + "note": { + "type": "string" + } + }, + "required": [ + "note" + ] + }, + "UserProfileModifySchema": { + "type": "object", + "properties": { + "bio": { + "type": "string" }, - "answers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PollAnswer" - } + "accent_color": { + "type": "integer", + "nullable": true }, - "duration": { - "type": "integer" + "banner": { + "type": "string", + "nullable": true }, - "allow_multiselect": { - "type": "boolean" + "pronouns": { + "type": "string" }, - "layout_type": { - "type": "integer" + "theme_colors": { + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array", + "minItems": 2, + "maxItems": 2 + } + } + }, + "VanityUrlSchema": { + "type": "object", + "properties": { + "code": { + "minLength": 1, + "maxLength": 20, + "type": "string" + } + } + }, + "VerifyEmailSchema": { + "type": "object", + "properties": { + "captcha_key": { + "type": "string", + "nullable": true + }, + "token": { + "type": "string" } }, "required": [ - "answers", - "question" + "token" ] }, - "MessageInteractionSchema": { + "VoiceStateUpdateSchema": { "type": "object", "properties": { - "id": { + "guild_id": { "type": "string" }, - "type": { - "$ref": "#/components/schemas/InteractionType" - }, - "name": { + "channel_id": { "type": "string" }, - "command_type": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "number" + "self_mute": { + "type": "boolean" }, - "ephemerality_reason": { - "type": "integer" + "self_deaf": { + "type": "boolean" }, - "user": { - "$ref": "#/components/schemas/PublicUser" + "self_video": { + "type": "boolean" }, - "user_id": { + "preferred_region": { "type": "string" }, - "authorizing_integration_owners": { - "type": "object", - "properties": {}, - "additionalProperties": true - }, - "original_response_message_id": { - "description": "A container for useful snowflake-related methods.", - "$ref": "#/components/schemas/Snowflake" + "request_to_speak_timestamp": { + "type": "string", + "format": "date-time" }, - "interacted_message_id": { - "description": "A container for useful snowflake-related methods.", - "$ref": "#/components/schemas/Snowflake" + "suppress": { + "type": "boolean" }, - "triggering_interaction_metadata": { - "$ref": "#/components/schemas/MessageInteractionSchema" + "flags": { + "type": "integer" + } + }, + "required": [ + "self_deaf", + "self_mute" + ] + }, + "GenerateWebAuthnCredentialsSchema": { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + }, + "CreateWebAuthnCredentialSchema": { + "type": "object", + "properties": { + "credential": { + "type": "string" }, - "target_user": { - "$ref": "#/components/schemas/PublicUser" + "name": { + "type": "string" }, - "target_message_id": { - "description": "A container for useful snowflake-related methods.", - "$ref": "#/components/schemas/Snowflake" + "ticket": { + "type": "string" } }, "required": [ - "id", + "credential", "name", - "type" + "ticket" ] }, - "MessageEditSchema": { + "WebAuthnPostSchema": { + "anyOf": [ + { + "$ref": "#/components/schemas/GenerateWebAuthnCredentialsSchema" + }, + { + "$ref": "#/components/schemas/CreateWebAuthnCredentialSchema" + } + ] + }, + "WebAuthnTotpSchema": { "type": "object", "properties": { - "embed": { - "$ref": "#/components/schemas/Embed" - }, - "file": { - "type": "object", - "properties": { - "filename": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filename" - ] - }, - "flags": { - "type": "integer" + "code": { + "type": "string" }, - "channel_id": { + "ticket": { + "type": "string" + } + }, + "required": [ + "code", + "ticket" + ] + }, + "WebhookCreateSchema": { + "type": "object", + "properties": { + "name": { + "maxLength": 80, "type": "string" }, + "avatar": { + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "WebhookExecuteSchema": { + "type": "object", + "properties": { "content": { "type": "string" }, - "mobile_network_type": { + "username": { "type": "string" }, - "nonce": { + "avatar_url": { "type": "string" }, "tts": { @@ -5455,6 +8311,57 @@ }, "additionalProperties": false }, + "components": { + "type": "array", + "items": {} + }, + "file": { + "type": "object", + "properties": { + "filename": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filename" + ] + }, + "payload_json": { + "type": "string" + }, + "attachments": { + "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filename", + "id" + ] + } + }, + "flags": { + "type": "integer" + }, + "thread_name": { + "type": "string" + }, + "applied_tags": { + "type": "array", + "items": { + "type": "string" + } + }, "message_reference": { "type": "object", "properties": { @@ -5469,9 +8376,6 @@ }, "fail_if_not_exists": { "type": "boolean" - }, - "type": { - "type": "integer" } }, "additionalProperties": false, @@ -5479,1104 +8383,1760 @@ "message_id" ] }, - "payload_json": { - "type": "string" - }, - "attachments": { - "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion", + "sticker_ids": { "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" - ] - } - ] + "type": "string" } }, - "sticker_ids": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] + "nonce": { + "type": "string" }, - "components": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ActionRowComponent" - } - }, - { - "type": "null" - } - ] + "enforce_nonce": { + "type": "boolean" }, "poll": { "$ref": "#/components/schemas/PollCreationSchema" + } + } + }, + "WebhookUpdateSchema": { + "type": "object", + "properties": { + "name": { + "type": "string" }, - "enforce_nonce": { + "avatar": { + "type": "string" + }, + "channel_id": { + "type": "string" + } + } + }, + "WidgetModifySchema": { + "type": "object", + "properties": { + "enabled": { "type": "boolean" }, - "applied_tags": { + "channel_id": { + "type": "string" + } + }, + "required": [ + "channel_id", + "enabled" + ] + }, + "SKUSystemRequirementSchema": { + "type": "object", + "properties": { + "ram": { + "description": "The amount of RAM in megabytes", + "type": "integer" + }, + "disk": { + "description": "The amount of disk space in megabytes", + "type": "integer" + }, + "operating_system_version": { + "description": "The required operating system version", + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "cpu": { + "description": "The required CPU", + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "gpu": { + "description": "The required GPU", + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "sound_card": { + "description": "The required sound card", + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "directx": { + "description": "The required DirectX version", + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "network": { + "description": "The required network connectivity status", + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "notes": { + "description": "Additional notes", + "$ref": "#/components/schemas/LocalizedStringSchema" + } + } + }, + "SKUSystemRequirementsSchema": { + "type": "object", + "properties": { + "minimum": { + "description": "The minimum system requirements", + "$ref": "#/components/schemas/SKUSystemRequirementSchema" + }, + "recommended": { + "description": "The recommended system requirements", + "$ref": "#/components/schemas/SKUSystemRequirementSchema" + } + } + }, + "StoreCarouselItemSchema": { + "type": "object", + "properties": { + "youtube_video_id": { + "description": "The YouTube video ID for the item", + "type": "string" + }, + "asset_id": { + "description": "The store asset ID for the item", + "type": "string" + }, + "thumbnail_asset_id": { + "description": "The store asset ID for the thumbnail", + "type": "string" + }, + "background_asset_id": { + "description": "The store asset ID for the background", + "type": "string" + }, + "label": { + "description": "The label for the item", + "type": "string" + }, + "label_icon_asset_id": { + "description": "The store asset ID for the label icon", + "type": "string" + } + } + }, + "SocialLayerMetadataSchema": { + "type": "object", + "properties": { + "carousel_items": { + "description": "The carousel items for the listing", "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/StoreCarouselItemSchema" } }, - "thread_name": { + "label": { + "description": "The label for the listing", "type": "string" }, - "avatar_url": { + "expires_at": { + "description": "When the listing expires", + "type": "string", + "nullable": true + }, + "card_image_asset_id": { + "description": "The store asset ID for the card image", "type": "string" }, - "interaction": { - "$ref": "#/components/schemas/MessageInteractionSchema" + "card_background_image_asset_id": { + "description": "The store asset ID for the card background image", + "type": "string" + } + }, + "required": [ + "carousel_items", + "expires_at", + "label" + ] + }, + "SKUTenantMetadataSchema": { + "type": "object", + "properties": { + "guild_monetization": { + "description": "Guild monetization data", + "$ref": "#/components/schemas/SKUGuildMonetizationMetadataSchema" + }, + "social_layer": { + "description": "Social layer game item data", + "$ref": "#/components/schemas/SocialLayerMetadataSchema" + } + } + }, + "CollectibleBannerAssetSchema": { + "type": "object", + "properties": { + "background_style": { + "description": "The CSS the web client should use", + "type": "string", + "nullable": true + }, + "desktop_max_height": { + "description": "Max height of the banner on desktop", + "type": "integer", + "nullable": true + }, + "mobile_max_height": { + "description": "Max height of the banner on mobile", + "type": "integer", + "nullable": true + }, + "responsive": { + "description": "Whether the banner is responsive", + "type": "boolean", + "nullable": true + } + }, + "required": [ + "background_style", + "responsive" + ] + }, + "CollectibleItemAssetsSchema": { + "type": "object", + "properties": { + "static_image_url": { + "description": "The URL for the static image of the collectible", + "type": "string" }, - "interaction_metadata": { - "$ref": "#/components/schemas/MessageInteractionSchema" + "animated_image_url": { + "description": "The URL for the animated image of the collectible (in APNG format)", + "type": "string" + }, + "video_url": { + "description": "The URL for the video of the collectible", + "type": "string" } - } + }, + "required": [ + "animated_image_url", + "static_image_url" + ] }, - "MfaCodesSchema": { + "CollectibleAvatarDecorationSchema": { "type": "object", "properties": { - "password": { - "minLength": 1, - "maxLength": 72, + "type": { + "$ref": "#/components/schemas/CollectibleItemType", + "description": "The type of collectible" + }, + "id": { + "description": "The ID of the avatar decoration", "type": "string" }, - "regenerate": { - "type": "boolean" + "sku_id": { + "description": "The SKU ID of the avatar decoration", + "type": "string" + }, + "asset": { + "description": "The asset hash of the avatar decoration", + "type": "string" + }, + "assets": { + "$ref": "#/components/schemas/CollectibleItemAssetsSchema", + "description": "The URLs for the static and animated images of the avatar decoration" + }, + "label": { + "description": "The avatar decoration accessibility description", + "type": "string" } }, "required": [ - "password" + "asset", + "assets", + "id", + "label", + "sku_id", + "type" ] }, - "ModifyGuildStickerSchema": { + "CollectibleProfileEffectSchema": { "type": "object", "properties": { - "name": { - "minLength": 2, - "maxLength": 30, + "type": { + "$ref": "#/components/schemas/CollectibleItemType", + "description": "The type of collectible" + }, + "id": { + "description": "The ID of the profile effect", + "type": "string" + }, + "sku_id": { + "description": "The ID of the profile effect SKU", + "type": "string" + }, + "title": { + "description": "The title of the profile effect", "type": "string" }, "description": { - "maxLength": 100, + "description": "The description of the profile effect", "type": "string" }, - "tags": { - "maxLength": 200, + "accessibilityLabel": { + "description": "An accessible description of the profile effect", + "type": "string" + }, + "animationType": { + "$ref": "#/components/schemas/CollectibleProfileEffectAnimationType", + "description": "The type of animation used by the profile effect" + }, + "thumbnailPreviewSrc": { + "description": "The URL of the profile effect's thumbnail preview image (in APNG format)", + "type": "string" + }, + "reducedMotionSrc": { + "description": "A URL of the profile effect with reduced motion (in APNG format)", + "type": "string" + }, + "staticFrameSrc": { + "description": "The URL of the static frame of the profile effect (in PNG format)", "type": "string" + }, + "effects": { + "description": "The animation frames for the profile effect", + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectibleProfileEffectAnimation" + } } }, "required": [ - "name", - "tags" + "accessibilityLabel", + "animationType", + "description", + "effects", + "id", + "reducedMotionSrc", + "sku_id", + "staticFrameSrc", + "thumbnailPreviewSrc", + "title", + "type" ] }, - "PasswordResetSchema": { + "CollectibleNameplateSchema": { "type": "object", "properties": { - "password": { - "minLength": 1, - "maxLength": 72, + "type": { + "$ref": "#/components/schemas/CollectibleItemType", + "description": "The type of collectible" + }, + "id": { + "description": "The ID of the nameplate", "type": "string" }, - "token": { + "sku_id": { + "description": "The SKU ID of the nameplate", + "type": "string" + }, + "palette": { + "$ref": "#/components/schemas/CollectibleNameplateColorPalette", + "description": "The nameplate's color palette" + }, + "asset": { + "description": "The nameplate asset path", + "type": "string" + }, + "assets": { + "$ref": "#/components/schemas/CollectibleItemAssetsSchema", + "description": "The URLs for the static and animated images of the nameplate" + }, + "label": { + "description": "The nameplate accessibility description", "type": "string" } }, "required": [ - "password", - "token" + "asset", + "assets", + "id", + "label", + "palette", + "sku_id", + "type" ] }, - "PreloadMessagesRequestSchema": { + "CollectibleStyleSchema": { "type": "object", "properties": { - "channels": { + "background_colors": { + "description": "An array of background colors", "type": "array", "items": { - "type": "string" + "type": "integer" + } + }, + "button_colors": { + "description": "An array of button colors", + "type": "array", + "items": { + "type": "integer" + } + }, + "confetti_colors": { + "description": "An array of confetti colors", + "type": "array", + "items": { + "type": "integer" } } }, "required": [ - "channels" + "background_colors", + "button_colors", + "confetti_colors" ] }, - "PruneSchema": { + "UnitPriceSchema": { "type": "object", "properties": { - "days": { + "currency": { + "description": "The lower-cased ISO 4217 currency code", + "type": "string" + }, + "amount": { + "description": "The price amount in the smallest currency unit", + "type": "integer" + }, + "exponent": { + "description": "The exponent to convert the amount to the displayed currency unit", "type": "integer" } }, "required": [ - "days" + "amount", + "currency", + "exponent" ] }, - "PurgeSchema": { + "CountryPricesSchema": { "type": "object", "properties": { - "before": { + "country_code": { + "description": "The ISO 3166-1 alpha-2 country code", "type": "string" }, - "after": { - "type": "string" + "prices": { + "description": "The prices for the plan in the given country", + "type": "array", + "items": { + "$ref": "#/components/schemas/UnitPriceSchema" + } } }, "required": [ - "after", - "before" + "country_code", + "prices" ] }, - "RefreshUrlsRequestSchema": { + "SubscriptionPricesSchema": { "type": "object", "properties": { - "attachment_urls": { - "type": "array", - "items": { - "type": "string" - } + "country_prices": { + "$ref": "#/components/schemas/CountryPricesSchema", + "description": "The prices for the plan for the given country" + }, + "payment_source_prices": { + "description": "The prices for the plan per user payment source ID", + "$ref": "#/components/schemas/Record" } }, "required": [ - "attachment_urls" + "country_prices" ] }, - "RegisterSchema": { + "CollectibleAssetConfigSchema": { "type": "object", "properties": { - "username": { - "minLength": 2, + "animated": { + "description": "The URL of the animated image (in APNG format)", + "type": "string", + "nullable": true + }, + "static": { + "description": "The URL of the static image", + "type": "string" + } + }, + "required": [ + "animated", + "static" + ] + }, + "HeroShopBlockSchema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" + }, + "category_sku_id": { + "description": "The collectible category SKU ID", "type": "string" }, - "password": { - "minLength": 1, - "maxLength": 72, + "category_store_listing_id": { + "description": "The collectible category store listing ID", "type": "string" }, - "consent": { - "type": "boolean" + "banner_asset": { + "$ref": "#/components/schemas/CollectibleAssetConfigSchema", + "description": "The banner asset" }, - "email": { - "format": "email", + "banner_display_config": { + "$ref": "#/components/schemas/CollectibleBannerAssetSchema", + "description": "The display configuration" + }, + "banner_text_color": { + "description": "The hex color code for the banner text", "type": "string" }, - "fingerprint": { + "hero_logo_url": { + "description": "The URL of the hero logo image", "type": "string" }, - "invite": { + "hero_rive_url": { + "description": "The URL of the hero Rive animation", "type": "string" }, - "date_of_birth": { + "logo_display_config": { + "$ref": "#/components/schemas/CollectibleBannerAssetSchema", + "description": "The shop block logo display config" + }, + "logo_url": { + "description": "The URL of the hero logo image", "type": "string" }, - "gift_code_sku_id": { + "name": { + "description": "The name of the shop block", "type": "string" }, - "captcha_key": { + "mobile_title": { + "description": "The title to be displayed on mobile devices", "type": "string" }, - "promotional_email_opt_in": { - "type": "boolean" + "mobile_summary": { + "description": "The summary to be displayed on mobile devices", + "type": "string" }, - "unique_username_registration": { - "type": "boolean" + "mobile_products_title": { + "description": "The products title to be displayed on mobile devices", + "type": "string" }, - "global_name": { + "mobile_hero_url": { + "description": "The URL of the mobile hero banner image", + "type": "string" + }, + "mobile_hero_animated_url": { + "description": "The URL of the mobile animated hero banner image", + "type": "string" + }, + "ranked_sku_ids": { + "description": "The SKU IDs ranked by popularity in the collectible category", + "type": "array", + "items": { + "type": "string" + } + }, + "summary": { + "description": "A description of the collectible category", "type": "string" + }, + "unpublished_at": { + "description": "When the collectible category should be unpublished", + "type": "string", + "nullable": true } }, "required": [ - "consent", - "username" + "banner_asset", + "banner_display_config", + "category_sku_id", + "category_store_listing_id", + "hero_logo_url", + "logo_display_config", + "logo_url", + "name", + "ranked_sku_ids", + "summary", + "type", + "unpublished_at" ] }, - "RelationshipPostSchema": { + "SubBlockSchema": { "type": "object", "properties": { - "discriminator": { + "type": { + "$ref": "#/components/schemas/ShopSubBlockType", + "description": "The subblock type" + }, + "category_store_listing_id": { + "description": "The collectible category store listing ID", "type": "string" }, - "username": { + "asset_url": { + "description": "The URL of the shop block asset", + "type": "string" + }, + "banner_text_color": { + "description": "The hex color code of the banner text", + "type": "string", + "nullable": true + }, + "banner_url": { + "description": "The URL of the banner image", + "type": "string" + }, + "body_text": { + "description": "The body text of the shop block", + "type": "string", + "nullable": true + }, + "name": { + "description": "The name of the shop block", "type": "string" + }, + "unpublished_at": { + "description": "When the collectible category should be unpublished", + "type": "string", + "nullable": true } }, "required": [ - "discriminator", - "username" + "asset_url", + "banner_text_color", + "banner_url", + "body_text", + "category_store_listing_id", + "name", + "type", + "unpublished_at" ] }, - "RelationshipPatchSchema": { + "FeaturedShopBlockSchema": { "type": "object", "properties": { - "nickname": { - "type": "string" + "subblocks": { + "description": "The list of sub-blocks in the featured shop block", + "type": "array", + "items": { + "$ref": "#/components/schemas/SubBlockSchema" + } + }, + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" } - } + }, + "required": [ + "subblocks", + "type" + ] }, - "RelationshipPutSchema": { + "SortedSKUIDsSchema": { "type": "object", "properties": { - "type": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "number" + "popular": { + "description": "The SKU IDs sorted by popularity", + "type": "array", + "items": { + "type": "string" + } + }, + "recommended": { + "description": "The SKU IDs sorted by recommendation", + "type": "array", + "items": { + "type": "string" + } } - } + }, + "required": [ + "popular", + "recommended" + ] }, - "RequestGuildMembersSchema": { + "FeedShopBlockSchema": { "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" + "ranked_sku_ids": { + "description": "All SKU IDs ranked by popularity", + "type": "array", + "items": { + "type": "string" + } }, - "user_ids": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "string" - } - ] + "sorted_sku_ids": { + "$ref": "#/components/schemas/SortedSKUIDsSchema", + "description": "The sorted SKU IDs" }, - "nonce": { - "type": "string" + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" } }, "required": [ - "guild_id" + "ranked_sku_ids", + "sorted_sku_ids", + "type" ] }, - "RoleModifySchema": { + "WideBannerShopBlockSchema": { "type": "object", "properties": { - "name": { + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" + }, + "category_store_listing_id": { + "description": "The collectible category store listing ID", "type": "string" }, - "permissions": { + "banner_asset": { + "$ref": "#/components/schemas/CollectibleAssetConfigSchema", + "description": "The banner asset" + }, + "logo_url": { + "description": "The URL of the wide banner logo image", "type": "string" }, - "color": { - "type": "integer" + "title": { + "description": "The title of the wide banner", + "type": "string" }, - "hoist": { - "type": "boolean" + "body": { + "description": "The body text of the wide banner", + "type": "string" }, - "mentionable": { - "type": "boolean" + "banner_text_color": { + "description": "The hex color code of the banner text", + "type": "string", + "nullable": true }, - "position": { - "type": "integer" + "disable_cta": { + "description": "Whether to disable the CTA for the wide banner", + "type": "boolean" }, - "icon": { + "cta_text": { + "description": "The CTA text for the wide banner", "type": "string" }, - "unicode_emoji": { + "cta_route": { + "description": "The CTA route for the wide banner", "type": "string" }, - "colors": { - "type": "object", - "properties": { - "primary_color": { - "type": "integer" - }, - "secondary_color": { - "type": [ - "null", - "integer" - ] - }, - "tertiary_color": { - "type": [ - "null", - "integer" - ] - } - }, - "additionalProperties": false, - "required": [ - "primary_color" - ] - } - } - }, - "RolePositionUpdateSchema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "position": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "id", - "position" - ] - } - }, - "SelectProtocolSchema": { - "type": "object", - "properties": { - "protocol": { - "enum": [ - "udp", - "webrtc" - ], - "type": "string" + "is_dismissible": { + "description": "Whether the wide banner is dismissible", + "type": "boolean" }, - "data": { - "anyOf": [ - { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "port": { - "type": "integer" - }, - "mode": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "address", - "mode", - "port" - ] - }, - { - "type": "string" - } - ] + "dismissible_content_version": { + "description": "The version of the dismissible content", + "type": "integer" }, - "sdp": { + "wide_banner_url": { + "description": "The URL of the wide banner image", "type": "string" }, - "codecs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "enum": [ - "H264", - "VP8", - "VP9", - "opus" - ], - "type": "string" - }, - "type": { - "enum": [ - "audio", - "video" - ], - "type": "string" - }, - "priority": { - "type": "integer" - }, - "payload_type": { - "type": "integer" - }, - "rtx_payload_type": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "payload_type", - "priority", - "type" - ] - } - }, - "rtc_connection_id": { + "wide_banner_animated_url": { + "description": "The URL of the animated wide banner image", "type": "string" } }, "required": [ - "data", - "protocol" + "banner_asset", + "banner_text_color", + "body", + "category_store_listing_id", + "cta_route", + "cta_text", + "disable_cta", + "dismissible_content_version", + "is_dismissible", + "logo_url", + "title", + "type", + "wide_banner_url" ] }, - "SettingsProtoUpdateSchema": { + "ShelfShopBlockSchema": { "type": "object", "properties": { - "settings": { + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" + }, + "category_sku_id": { + "description": "The collectible category SKU ID", + "type": "string" + }, + "name": { + "description": "The name of the shop block", "type": "string" }, - "required_data_version": { - "type": "integer" + "ranked_sku_ids": { + "description": "The SKU IDs ranked by popularity in the collectible category", + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "settings" + "name", + "ranked_sku_ids", + "type" ] }, - "SettingsProtoUpdateJsonSchema": { + "CountdownTimerShopBlockSchema": { "type": "object", "properties": { - "settings": { - "$ref": "#/components/schemas/JsonValue" + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" }, - "required_data_version": { - "type": "integer" + "title": { + "description": "The title of the countdown timer", + "type": "string" + }, + "body": { + "description": "The body text of the countdown timer", + "type": "string" + }, + "banner_url": { + "description": "The URL of the countdown timer banner", + "type": "string" + }, + "end_time": { + "description": "The end time of the countdown timer", + "type": "string" + }, + "text_color": { + "description": "The hex color code of the text", + "type": "string" } }, "required": [ - "settings" + "banner_url", + "body", + "end_time", + "text_color", + "title", + "type" ] }, - "TeamCreateSchema": { + "ImmersiveBannerShopBlockSchema": { "type": "object", "properties": { - "name": { + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" + }, + "title": { + "description": "The title of the immersive banner", + "type": "string" + }, + "body": { + "description": "The body text of the immersive banner", + "type": "string" + }, + "help_center_url": { + "description": "The URL to the help center article", + "type": "string" + }, + "text_color": { + "description": "The hex color code of the text", "type": "string" + }, + "end_time": { + "description": "The end time of the immersive banner", + "type": "string", + "nullable": true + }, + "banner_asset": { + "$ref": "#/components/schemas/CollectibleAssetConfigSchema", + "description": "The banner asset" } }, "required": [ - "name" + "banner_asset", + "body", + "end_time", + "help_center_url", + "text_color", + "title", + "type" ] }, - "TemplateCreateSchema": { + "RewardHeroShopBlockSchema": { "type": "object", "properties": { + "type": { + "$ref": "#/components/schemas/ShopBlockType", + "description": "The shop block type" + }, + "category_sku_id": { + "description": "The collectible category SKU ID", + "type": "string" + }, + "category_store_listing_id": { + "description": "The collectible category store listing ID", + "type": "string" + }, "name": { + "description": "The name of the shop block", "type": "string" }, - "description": { + "summary": { + "description": "A description of the collectible category", + "type": "string" + }, + "banner_asset": { + "$ref": "#/components/schemas/CollectibleAssetConfigSchema", + "description": "The banner asset" + }, + "logo_url": { + "description": "The URL of the hero logo image", + "type": "string" + }, + "title": { + "description": "The title of the reward hero shop block", + "type": "string" + }, + "banner_text_color": { + "description": "The hex color code for the banner text", + "type": "string" + }, + "banner_display_config": { + "$ref": "#/components/schemas/CollectibleBannerAssetSchema", + "description": "The display configuration" + }, + "hero_rive_url": { + "description": "The URL of the hero Rive animation", + "type": "string" + }, + "logo_display_config": { + "$ref": "#/components/schemas/CollectibleBannerAssetSchema", + "description": "The shop block logo display config" + }, + "mobile_title": { + "description": "The title to be displayed on mobile devices", + "type": "string" + }, + "mobile_summary": { + "description": "The summary to be displayed on mobile devices", + "type": "string" + }, + "mobile_products_title": { + "description": "The products title to be displayed on mobile devices", + "type": "string" + }, + "hero_banner_url": { + "description": "The URL of the hero banner image", + "type": "string" + }, + "hero_banner_animated_url": { + "description": "The URL of the hero animated banner image", + "type": "string" + }, + "hero_logo_url": { + "description": "The URL of the hero logo image", + "type": "string" + }, + "mobile_hero_url": { + "description": "The URL of the mobile hero banner image", + "type": "string" + }, + "mobile_hero_animated_url": { + "description": "The URL of the mobile animated hero banner image", + "type": "string" + }, + "ranked_sku_ids": { + "description": "The SKU IDs ranked by popularity in the collectible category", + "type": "array", + "items": { + "type": "string" + } + }, + "unpublished_at": { + "description": "When the collectible category should be unpublished", + "type": "string", + "nullable": true + }, + "reward_sku_id": { + "description": "The SKU ID of the reward collectible", "type": "string" } }, "required": [ - "name" + "banner_asset", + "banner_display_config", + "category_store_listing_id", + "hero_banner_animated_url", + "hero_banner_url", + "hero_logo_url", + "logo_display_config", + "logo_url", + "name", + "ranked_sku_ids", + "reward_sku_id", + "summary", + "title", + "type", + "unpublished_at" ] }, - "TemplateModifySchema": { + "CollectibleUserDiscountSchema": { "type": "object", "properties": { - "name": { - "type": "string" + "amount": { + "description": "How much the discount is", + "type": "integer" }, - "description": { + "discount_id": { + "description": "The discount ID", "type": "string" + }, + "expires_at": { + "description": "When the discount expires", + "type": "string", + "nullable": true } }, "required": [ - "name" + "amount", + "discount_id", + "expires_at" ] }, - "TotpDisableSchema": { + "CreateApplicationSKUSchema": { "type": "object", "properties": { - "code": { - "minLength": 6, - "maxLength": 6, + "name": { "type": "string" + }, + "sku_type": { + "$ref": "#/components/schemas/SKUType" + }, + "product_line": { + "enum": [ + 1, + 10, + 11, + 12, + 13, + 14, + 2, + 3, + 4, + 5, + 6, + 7, + 9 + ], + "type": "number" } }, "required": [ - "code" + "name", + "sku_type" ] }, - "TotpEnableSchema": { + "StoreAssetSchema": { "type": "object", "properties": { - "password": { - "minLength": 1, - "maxLength": 72, + "id": { + "description": "The ID of the asset", "type": "string" }, - "code": { - "minLength": 6, - "maxLength": 6, + "size": { + "description": "The size of the asset in bytes", + "type": "integer" + }, + "mime_type": { + "description": "The asset's media type", "type": "string" }, - "secret": { + "filename": { + "description": "The filename of the asset", "type": "string" + }, + "width": { + "description": "The width of the asset in pixels", + "type": "integer" + }, + "height": { + "description": "The height of the asset in pixels", + "type": "integer" } }, "required": [ - "password" + "filename", + "height", + "id", + "mime_type", + "size", + "width" ] }, - "TotpSchema": { + "StoreListingIconSchema": { "type": "object", "properties": { - "code": { - "type": "string" + "type": { + "$ref": "#/components/schemas/StoreListingIconType", + "description": "The type of icon" }, - "ticket": { + "store_asset_id": { + "description": "The store asset ID for the icon", "type": "string" }, - "gift_code_sku_id": { - "type": "string", - "nullable": true - }, - "login_source": { - "type": "string", - "nullable": true + "emoji": { + "description": "The unicode emoji for the icon", + "type": "string" } }, "required": [ - "code", - "ticket" + "emoji", + "store_asset_id", + "type" ] }, - "UploadAttachmentRequestSchema": { + "StoreListingBenefitSchema": { "type": "object", "properties": { - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UploadAttachmentRequest" - } + "id": { + "description": "The ID of the benefit", + "type": "string" + }, + "name": { + "description": "The name of the benefit", + "type": "string" + }, + "description": { + "description": "The description of the benefit", + "type": "string" + }, + "icon": { + "$ref": "#/components/schemas/StoreListingIconSchema", + "description": "The icon for the benefit" } }, "required": [ - "files" + "description", + "icon", + "id", + "name" ] }, - "UserDeleteSchema": { + "StoreNoteSchema": { "type": "object", "properties": { - "user_id": { + "user": { + "description": "The user who made the note", + "anyOf": [ + { + "$ref": "#/components/schemas/Partial" + }, + { + "type": "null" + } + ] + }, + "content": { + "description": "The note content", "type": "string" } }, "required": [ - "user_id" + "content", + "user" ] }, - "UserGuildSettingsSchema": { + "StoreListingSchema": { + "description": "Store listing objects can either be localized or unlocalized. Localized listings only serialize strings and pricing for the user's location, while unlocalized listings serialize all strings and pricing for all locales. All objects serialized in the listing inherit this behavior.", "type": "object", "properties": { - "channel_overrides": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ChannelOverride" + "id": { + "description": "The ID of the listing", + "type": "string" + }, + "sku": { + "$ref": "#/components/schemas/SKU", + "description": "The SKU associated with the listing" + }, + "child_skus": { + "description": "The child SKUs associated with the category listing", + "type": "array", + "items": { + "$ref": "#/components/schemas/SKU" } }, - "version": { - "type": "integer" + "alternative_skus": { + "description": "Alternative SKUs for the listing", + "type": "array", + "items": { + "$ref": "#/components/schemas/SKU" + } }, - "message_notifications": { - "type": "integer" + "summary": { + "$ref": "#/components/schemas/LocalizedStringSchema", + "description": "A summary of the listing" }, - "mobile_push": { - "type": "boolean" + "description": { + "description": "A description of the listing", + "$ref": "#/components/schemas/LocalizedStringSchema" }, - "mute_config": { + "tagline": { + "description": "A tagline for the listing", "anyOf": [ { - "$ref": "#/components/schemas/MuteConfig" + "$ref": "#/components/schemas/LocalizedStringSchema" }, { "type": "null" } ] }, - "muted": { - "type": "boolean" + "flavor_text": { + "description": "Flavor text for the listing", + "type": "string", + "nullable": true }, - "suppress_everyone": { - "type": "boolean" + "benefits": { + "description": "The benefits of the listing", + "type": "array", + "items": { + "$ref": "#/components/schemas/StoreListingBenefitSchema" + } }, - "suppress_roles": { + "published": { + "description": "Whether the listing is published", "type": "boolean" }, - "guild_id": { - "type": "string", - "nullable": true + "carousel_items": { + "description": "The carousel items for the listing", + "type": "array", + "items": { + "$ref": "#/components/schemas/StoreCarouselItemSchema" + } }, - "flags": { - "type": "integer" + "staff_notes": { + "description": "Notes from staff about the listing", + "$ref": "#/components/schemas/StoreNoteSchema" }, - "mute_scheduled_events": { - "type": "boolean" + "guild": { + "description": "The public guild associated with the listing", + "anyOf": [ + { + "$ref": "#/components/schemas/Partial" + }, + { + "type": "null" + } + ] }, - "hide_muted_channels": { - "type": "boolean" + "assets": { + "description": "The store assets for the listing", + "type": "array", + "items": { + "$ref": "#/components/schemas/StoreAssetSchema" + } }, - "notify_highlights": { - "const": 0, - "type": "number" - } - } - }, - "UserModifySchema": { - "type": "object", - "properties": { - "username": { - "minLength": 2, - "type": "string" + "thumbnail": { + "description": "The thumbnail for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "avatar": { - "type": "string", - "nullable": true + "preview_video": { + "description": "The preview video for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "bio": { - "type": "string" + "header_background": { + "description": "The header background for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "accent_color": { - "type": "integer" + "header_logo_dark_theme": { + "description": "The dark theme header logo for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "banner": { - "type": "string", - "nullable": true + "header_logo_light_theme": { + "description": "The light theme header logo for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "password": { - "minLength": 1, - "maxLength": 72, - "type": "string" + "box_art": { + "description": "The box art for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "new_password": { - "minLength": 1, - "maxLength": 72, - "type": "string" + "hero_background": { + "description": "The hero background for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "code": { - "minLength": 6, - "maxLength": 6, - "type": "string" + "hero_video": { + "description": "The hero video for the listing", + "$ref": "#/components/schemas/StoreAssetSchema" }, - "email": { - "format": "email", + "entitlement_branch_id": { + "description": "The application branch ID granted by the listing", + "type": "string", + "nullable": true + }, + "published_at": { + "description": "When the listing was published", "type": "string" }, - "discriminator": { - "minLength": 4, - "maxLength": 4, + "unpublished_at": { + "description": "When the listing was unpublished", "type": "string" + }, + "powerup_metadata": { + "description": "The guild powerup metadata for the listing", + "$ref": "#/components/schemas/Partial" } - } + }, + "required": [ + "id", + "sku", + "summary" + ] }, - "UserNoteUpdateSchema": { + "ApplicationExecutableSchema": { "type": "object", "properties": { - "note": { + "os": { + "description": "The operating system the executable can be found on", + "type": "string" + }, + "name": { + "description": "The name of the executable", "type": "string" + }, + "is_launcher": { + "description": "Whether the executable is for a game launcher", + "type": "boolean" } }, "required": [ - "note" + "is_launcher", + "name", + "os" ] }, - "UserProfileModifySchema": { + "ApplicationSKUSchema": { "type": "object", "properties": { - "bio": { - "type": "string" - }, - "accent_color": { - "type": "integer", + "id": { + "description": "The ID of the game", + "type": "string", "nullable": true }, - "banner": { + "sku": { + "description": "The SKU of the game", "type": "string", "nullable": true }, - "pronouns": { - "type": "string" - }, - "theme_colors": { - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "type": "array", - "minItems": 2, - "maxItems": 2 + "distributor": { + "$ref": "#/components/schemas/ApplicationSKUDistributor", + "description": "The distributor of the game" } - } + }, + "required": [ + "distributor", + "id", + "sku" + ] }, - "VanityUrlSchema": { + "ApplicationCompanySchema": { "type": "object", "properties": { - "code": { - "minLength": 1, - "maxLength": 20, + "id": { + "description": "The ID of the company", "type": "string" - } - } - }, - "VerifyEmailSchema": { - "type": "object", - "properties": { - "captcha_key": { - "type": "string", - "nullable": true }, - "token": { + "name": { + "description": "The name of the company", "type": "string" } }, "required": [ - "token" + "id", + "name" ] }, - "VoiceStateUpdateSchema": { + "ApplicationInstallParamsSchema": { "type": "object", "properties": { - "guild_id": { - "type": "string" - }, - "channel_id": { - "type": "string" - }, - "self_mute": { - "type": "boolean" - }, - "self_deaf": { - "type": "boolean" - }, - "self_video": { - "type": "boolean" + "scopes": { + "description": "The scopes to authorize the integration with", + "type": "array", + "items": { + "type": "string" + } }, - "preferred_region": { + "permissions": { + "description": "The permissions to request for the application's bot integration role", "type": "string" - }, - "request_to_speak_timestamp": { - "type": "string", - "format": "date-time" - }, - "suppress": { - "type": "boolean" - }, - "flags": { - "type": "integer" } }, "required": [ - "self_deaf", - "self_mute" + "permissions", + "scopes" ] }, - "GenerateWebAuthnCredentialsSchema": { + "ApplicationIntegrationTypeConfigurationSchema": { "type": "object", "properties": { - "password": { - "type": "string" + "oauth2_install_params": { + "description": "The default in-app authorization link for the installation context", + "$ref": "#/components/schemas/ApplicationInstallParamsSchema" } - }, - "required": [ - "password" - ] + } }, - "CreateWebAuthnCredentialSchema": { + "CreateSKUSchema": { "type": "object", "properties": { - "credential": { + "type": { + "$ref": "#/components/schemas/SKUType", + "description": "The type of SKU" + }, + "application_id": { + "description": "The ID of the application the SKU belongs to", "type": "string" }, "name": { - "type": "string" + "description": "The name of the SKU (1-256 characters)", + "anyOf": [ + { + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + { + "type": "string" + } + ] }, - "ticket": { + "flags": { + "description": "The SKU flags (only AVAILABLE can be set)\nSKUFlags bitfield", + "type": "integer" + }, + "legal_notice": { + "description": "The legal notice for the SKU (max 1024 characters)", + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "dependent_sku_id": { + "description": "The ID of the prerequisite required to buy this SKU", "type": "string" - } - }, - "required": [ - "credential", - "name", - "ticket" - ] - }, - "WebAuthnPostSchema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GenerateWebAuthnCredentialsSchema" }, - { - "$ref": "#/components/schemas/CreateWebAuthnCredentialSchema" - } - ] - }, - "WebAuthnTotpSchema": { - "type": "object", - "properties": { - "code": { - "type": "string" + "bundled_skus": { + "description": "The IDs of the SKUs that are included when purchasing this SKU", + "type": "array", + "items": { + "type": "string" + } + }, + "access_type": { + "description": "The access level of the SKU", + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "manifest_labels": { + "description": "The IDs of the manifest labels associated with the SKU", + "type": "array", + "items": { + "type": "string" + } + }, + "features": { + "description": "The features of the SKU", + "type": "array", + "items": { + "$ref": "#/components/schemas/SKUFeature" + } + }, + "locales": { + "description": "The locales the SKU is available in", + "type": "array", + "items": { + "type": "string" + } + }, + "genres": { + "description": "The genres of the SKU", + "type": "array", + "items": { + "$ref": "#/components/schemas/SKUGenre" + } + }, + "content_ratings": { + "description": "The content ratings of the SKU per agency", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SKUContentRatingSchema" + } + }, + "system_requirements": { + "description": "The system requirements for each operating system the SKU supports", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SKUSystemRequirementsSchema" + } + }, + "price_tier": { + "description": "The base price of the SKU", + "type": "integer" }, - "ticket": { - "type": "string" - } - }, - "required": [ - "code", - "ticket" - ] - }, - "WebhookCreateSchema": { - "type": "object", - "properties": { - "name": { - "maxLength": 80, - "type": "string" + "price": { + "description": "Localized pricing overrides per lower-cased ISO 4217 currency code", + "type": "object", + "additionalProperties": { + "type": "integer" + } }, - "avatar": { + "sale_price_tier": { + "description": "The sale price of the SKU", + "type": "integer" + }, + "sale_price": { + "description": "Localized sale pricing overrides per lower-cased ISO 4217 currency code", + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "release_date": { + "description": "When the SKU will be released", "type": "string" } }, "required": [ - "name" + "application_id", + "name", + "type" ] }, - "WebhookExecuteSchema": { + "IdentifySchema": { "type": "object", "properties": { - "content": { - "type": "string" - }, - "username": { - "type": "string" - }, - "avatar_url": { + "token": { "type": "string" }, - "tts": { - "type": "boolean" - }, - "embeds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Embed" - } - }, - "allowed_mentions": { + "properties": { "type": "object", "properties": { - "parse": { - "type": "array", - "items": { - "type": "string" - } + "os": { + "type": "string" }, - "roles": { - "type": "array", - "items": { - "type": "string" - } + "browser": { + "type": "string" }, - "users": { - "type": "array", - "items": { - "type": "string" - } + "device": { + "type": "string" }, - "replied_user": { + "system_locale": { + "type": "string" + }, + "has_client_mods": { + "type": "boolean" + }, + "browser_user_agent": { + "type": "string" + }, + "browser_version": { + "type": "string" + }, + "os_version": { + "type": "string" + }, + "referrer": { + "type": "string" + }, + "referring_domain": { + "type": "string" + }, + "referrer_current": { + "type": "string" + }, + "referring_domain_current": { + "type": "string" + }, + "release_channel": { + "enum": [ + "canary", + "dev", + "ptb", + "stable" + ], + "type": "string" + }, + "client_build_number": { + "type": "integer" + }, + "client_event_source": { + "type": "null" + }, + "client_launch_id": { + "type": "string" + }, + "launch_signature": { + "type": "string" + }, + "client_app_state": { + "type": "string" + }, + "is_fast_connect": { "type": "boolean" + }, + "gateway_connect_reasons": { + "type": "string" + }, + "$os": { + "type": "string" + }, + "$browser": { + "type": "string" + }, + "$device": { + "type": "string" } }, "additionalProperties": false }, - "components": { - "type": "array", - "items": {} - }, - "file": { - "type": "object", - "properties": { - "filename": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filename" - ] + "intents": { + "type": "number" }, - "payload_json": { - "type": "string" + "presence": { + "$ref": "#/components/schemas/ActivitySchema" }, - "attachments": { - "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "filename": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filename", - "id" - ] - } + "compress": { + "type": "boolean" }, - "flags": { + "large_threshold": { "type": "integer" }, - "thread_name": { - "type": "string" + "largeThreshold": { + "type": "integer" }, - "applied_tags": { + "shard": { + "minItems": 2, + "maxItems": 2, "type": "array", "items": { - "type": "string" + "type": "number" } }, - "message_reference": { + "guild_subscriptions": { + "type": "boolean" + }, + "capabilities": { + "type": "integer" + }, + "client_state": { "type": "object", "properties": { - "message_id": { - "type": "string" + "guild_hashes": {}, + "highest_last_message_id": { + "type": "integer" }, - "channel_id": { + "read_state_version": { + "type": "integer" + }, + "user_guild_settings_version": { + "type": "integer" + }, + "user_settings_version": { + "type": "integer" + }, + "useruser_guild_settings_version": { + "type": "integer" + }, + "private_channels_version": { + "type": "integer" + }, + "guild_versions": {}, + "api_code_version": { + "type": "integer" + }, + "initial_guild_id": { "type": "string" + } + }, + "additionalProperties": false + }, + "clientState": { + "type": "object", + "properties": { + "guildHashes": {}, + "highestLastMessageId": { + "type": "integer" + }, + "readStateVersion": { + "type": "integer" + }, + "userGuildSettingsVersion": { + "type": "integer" + }, + "useruserGuildSettingsVersion": { + "type": "integer" + }, + "guildVersions": {}, + "apiCodeVersion": { + "type": "integer" }, - "guild_id": { + "initialGuildId": { "type": "string" - }, - "fail_if_not_exists": { - "type": "boolean" } }, - "additionalProperties": false, - "required": [ - "message_id" - ] - }, - "sticker_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "nonce": { - "type": "string" - }, - "enforce_nonce": { - "type": "boolean" + "additionalProperties": false }, - "poll": { - "$ref": "#/components/schemas/PollCreationSchema" + "v": { + "type": "integer" } - } + }, + "required": [ + "properties", + "token" + ] }, - "WebhookUpdateSchema": { + "StreamCreateSchema": { "type": "object", "properties": { - "name": { + "type": { + "enum": [ + "call", + "guild" + ], "type": "string" }, - "avatar": { + "channel_id": { "type": "string" }, - "channel_id": { + "guild_id": { + "type": "string" + }, + "preferred_region": { "type": "string" } - } + }, + "required": [ + "channel_id", + "type" + ] }, - "WidgetModifySchema": { + "StreamDeleteSchema": { "type": "object", "properties": { - "enabled": { - "type": "boolean" - }, - "channel_id": { + "stream_key": { "type": "string" } }, "required": [ - "channel_id", - "enabled" + "stream_key" + ] + }, + "StreamWatchSchema": { + "type": "object", + "properties": { + "stream_key": { + "type": "string" + } + }, + "required": [ + "stream_key" ] }, "VoiceIdentifySchema": { @@ -6909,6 +10469,17 @@ "user_sessions" ] }, + "CreateFingerprintResponse": { + "type": "object", + "properties": { + "fingerprint": { + "type": "string" + } + }, + "required": [ + "fingerprint" + ] + }, "ApplicationCommandOption": { "type": "object", "properties": { @@ -7003,6 +10574,44 @@ 2 ] }, + "GuildPremiumFeatures": { + "type": "object", + "properties": { + "features": { + "description": "Enabled powerup-specific guild features", + "type": "array", + "items": { + "type": "string" + } + }, + "additional_emoji_slots": { + "description": "The number of additional emoji slots available to the guild", + "type": "integer" + }, + "additional_sticker_slots": { + "description": "The number of additional sticker slots available to the guild", + "type": "integer" + }, + "additional_sound_slots": { + "description": "The number of additional soundboard slots available to the guild", + "type": "integer" + } + }, + "required": [ + "additional_emoji_slots", + "additional_sound_slots", + "additional_sticker_slots", + "features" + ] + }, + "GuildPowerupCategoryType": { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, "ErrorList": { "type": "object" }, @@ -7728,6 +11337,10 @@ "type": "string" } }, + "currency": { + "type": "integer", + "default": 0 + }, "id": { "type": "string" } @@ -7737,6 +11350,7 @@ "bot", "connected_accounts", "created_at", + "currency", "data", "deleted", "desktop", @@ -9635,16 +13249,13 @@ "default": [] }, "rpc_application_state": { - "type": "integer", - "default": 0 + "$ref": "#/components/schemas/RPCApplicationState" }, "store_application_state": { - "type": "integer", - "default": 1 + "$ref": "#/components/schemas/StoreApplicationState" }, "verification_state": { - "type": "integer", - "default": 1 + "$ref": "#/components/schemas/ApplicationVerificationState" }, "interactions_endpoint_url": { "type": "string" @@ -9658,12 +13269,11 @@ "default": false }, "discoverability_state": { - "type": "integer", - "default": 1 + "$ref": "#/components/schemas/ApplicationDiscoverabilityState" }, "discovery_eligibility_flags": { "type": "integer", - "default": 2240 + "default": 0 }, "bot": { "$ref": "#/components/schemas/User" @@ -9711,6 +13321,189 @@ "custom_install_url": { "type": "string" }, + "splash": { + "type": "string" + }, + "primary_sku_id": { + "type": "string" + }, + "eula_id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "executables": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationExecutableSchema" + } + }, + "third_party_skus": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationSKUSchema" + } + }, + "overlay": { + "type": "boolean", + "default": false + }, + "overlay_methods": { + "type": "integer" + }, + "overlay_warn": { + "type": "boolean", + "default": false + }, + "overlay_compatibility_hook": { + "type": "boolean", + "default": false + }, + "developers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationCompanySchema" + } + }, + "publishers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationCompanySchema" + } + }, + "rpc_origins": { + "type": "array", + "items": { + "type": "string" + } + }, + "deeplink_uri": { + "type": "string" + }, + "bot_disabled": { + "type": "boolean", + "default": false + }, + "bot_quarantined": { + "type": "boolean", + "default": false + }, + "bot_approximate_guild_count": { + "type": "integer" + }, + "approximate_guild_count": { + "type": "integer" + }, + "approximate_user_install_count": { + "type": "integer" + }, + "approximate_user_authorization_count": { + "type": "integer" + }, + "internal_guild_restriction": { + "enum": [ + 1, + 2, + 3 + ], + "type": "number" + }, + "role_connections_verification_url": { + "type": "string", + "default": null, + "nullable": true + }, + "interactions_version": { + "$ref": "#/components/schemas/ApplicationInteractionsVersion" + }, + "interactions_event_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationEventWebhooksType" + }, + "default": [] + }, + "event_webhooks_status": { + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "event_webhooks_url": { + "type": "string" + }, + "event_webhooks_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationEventWebhooksType" + } + }, + "explicit_content_filter": { + "type": "integer", + "default": 0 + }, + "integration_types_config": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/components/schemas/ApplicationIntegrationTypeConfigurationSchema" + } + } + }, + "connection_entrypoint_url": { + "type": "string" + }, + "is_verified": { + "type": "boolean", + "default": false + }, + "creator_monetization_state": { + "type": "integer", + "default": 0 + }, + "is_discoverable": { + "type": "boolean", + "default": false + }, + "is_monetized": { + "type": "boolean", + "default": false + }, + "storefront_available": { + "type": "boolean", + "default": false + }, + "monetization_state": { + "$ref": "#/components/schemas/ApplicationMonetizationState" + }, + "monetization_eligibility_flags": { + "type": "integer", + "default": 0 + }, + "max_participants": { + "type": "integer" + }, + "embedded_activity_config": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "approved_consoles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationApprovableConsoleType" + }, + "default": [] + }, "team": { "$ref": "#/components/schemas/Team" }, @@ -9719,24 +13512,136 @@ } }, "required": [ + "approved_consoles", + "creator_monetization_state", "description", "discoverability_state", "discovery_eligibility_flags", + "explicit_content_filter", "flags", "hook", "id", "integration_public", "integration_require_code_grant", + "interactions_event_types", + "interactions_version", + "is_discoverable", + "is_monetized", + "is_verified", + "monetization_state", "name", "owner", "redirect_uris", + "role_connections_verification_url", "rpc_application_state", "store_application_state", + "storefront_available", "summary", "verification_state", "verify_key" ] }, + "RPCApplicationState": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + "StoreApplicationState": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "ApplicationVerificationState": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6 + ] + }, + "ApplicationDiscoverabilityState": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5 + ] + }, + "ApplicationSKUDistributor": { + "description": "[Distributor Type](https://docs.discord.food/resources/application#distributor-type)\n\nFIELD\tTYPE\tDESCRIPTION\n\nid\t?string\tThe ID of the game\n\nsku\t?string\tThe SKU of the game\n\ndistributor\tstring\tThe [distributor](https://docs.discord.food/resources/application#distributor-type) of the game\n\nTypeScript", + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ] + }, + "ApplicationInteractionsVersion": { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + "ApplicationEventWebhooksType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ] + }, + "ApplicationMonetizationState": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ] + }, + "ApplicationApprovableConsoleType": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ] + }, "Team": { "type": "object", "properties": { @@ -10206,550 +14111,905 @@ "type": { "$ref": "#/components/schemas/MessageComponentType.ActionRow" }, - "components": { + "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": { - "anyOf": [ - { - "$ref": "#/components/schemas/ButtonComponent" - }, - { - "$ref": "#/components/schemas/SelectMenuComponent" - }, - { - "$ref": "#/components/schemas/StringSelectMenuComponent" - }, - { - "$ref": "#/components/schemas/TextInputComponent" - } - ] + "$ref": "#/components/schemas/SelectMenuDefaultOption" } + }, + "min_values": { + "type": "integer" + }, + "max_values": { + "type": "integer" + }, + "disabled": { + "type": "boolean" } }, "required": [ - "components", + "custom_id", + "options", "type" ] }, - "MessageComponentType.ActionRow": { + "MessageComponentType.StringSelect": { "type": "number", - "const": 1 + "const": 3 }, - "ButtonComponent": { + "SelectMenuOption": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/MessageComponentType.Button" + "label": { + "type": "string" }, - "style": { - "$ref": "#/components/schemas/ButtonStyle" + "value": { + "type": "string" }, - "label": { + "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" }, - "sku_id": { - "type": "string" + "style": { + "$ref": "#/components/schemas/TextInputStyle" }, - "url": { + "label": { "type": "string" }, - "disabled": { + "min_length": { + "type": "integer" + }, + "max_length": { + "type": "integer" + }, + "required": { "type": "boolean" + }, + "value": { + "type": "string" + }, + "placeholder": { + "type": "string" } }, "required": [ + "custom_id", + "label", "style", "type" ] }, - "MessageComponentType.Button": { + "MessageComponentType.TextInput": { "type": "number", - "const": 2 + "const": 4 }, - "ButtonStyle": { + "TextInputStyle": { "type": "number", "enum": [ 1, - 2, - 3, - 4, - 5, - 6 + 2 ] }, - "SelectMenuComponent": { + "Poll": { "type": "object", "properties": { - "type": { - "enum": [ - 3, - 5, - 6, - 7, - 8 - ], - "type": "number" - }, - "custom_id": { - "type": "string" + "question": { + "$ref": "#/components/schemas/PollMedia" }, - "channel_types": { + "answers": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/PollAnswer" } }, - "placeholder": { + "expiry": { + "type": "string", + "format": "date-time" + }, + "allow_multiselect": { + "type": "boolean" + }, + "results": { + "$ref": "#/components/schemas/PollResult" + } + }, + "required": [ + "allow_multiselect", + "answers", + "expiry", + "question" + ] + }, + "PollMedia": { + "type": "object", + "properties": { + "text": { "type": "string" }, - "default_values": { + "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": { + "is_finalized": { + "type": "boolean" + }, + "answer_counts": { "type": "array", "items": { - "$ref": "#/components/schemas/SelectMenuDefaultOption" + "$ref": "#/components/schemas/PollAnswerCount" } + } + }, + "required": [ + "answer_counts", + "is_finalized" + ] + }, + "PollAnswerCount": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "min_values": { - "type": "integer" - }, - "max_values": { + "count": { "type": "integer" }, - "disabled": { + "me_voted": { "type": "boolean" } }, "required": [ - "custom_id", - "type" + "count", + "id", + "me_voted" + ] + }, + "MessageSnapshot": { + "type": "object", + "properties": { + "message": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "edited_timestamp": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "mentions": { + "type": "array", + "items": { + "type": "string" + } + }, + "mention_roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attachment" + } + }, + "embeds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Embed" + } + }, + "type": { + "$ref": "#/components/schemas/MessageType" + }, + "flags": { + "type": "integer" + }, + "components": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageComponent" + } + }, + "resolved": { + "type": "array", + "items": { + "type": "object", + "properties": {}, + "additionalProperties": true + } + }, + "sticker_items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sticker" + } + } + }, + "additionalProperties": false, + "required": [ + "content", + "embeds", + "flags", + "mention_roles", + "mentions", + "timestamp", + "type" + ] + } + }, + "required": [ + "message" ] }, - "SelectMenuDefaultOption": { + "MessageComponent": { "type": "object", "properties": { - "id": { - "type": "string" - }, "type": { - "enum": [ - "channel", - "role", - "user" - ], - "type": "string" + "$ref": "#/components/schemas/MessageComponentType" } }, "required": [ - "id", "type" ] }, - "StringSelectMenuComponent": { + "MessageComponentType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ] + }, + "InteractionGuild": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/MessageComponentType.StringSelect" - }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SelectMenuOption" - } - }, - "custom_id": { + "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```", "type": "string" }, - "channel_types": { + "features": { "type": "array", "items": { - "type": "integer" + "type": "string" } }, - "placeholder": { + "locale": { "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" + "features", + "id", + "locale" ] }, - "MessageComponentType.StringSelect": { - "type": "number", - "const": 3 - }, - "SelectMenuOption": { + "PublicMember": { "type": "object", "properties": { - "label": { - "type": "string" - }, - "value": { + "id": { "type": "string" }, - "description": { + "guild_id": { "type": "string" }, - "emoji": { - "$ref": "#/components/schemas/PartialEmoji" + "mute": { + "type": "boolean" }, - "default": { + "deaf": { "type": "boolean" - } - }, - "required": [ - "label", - "value" - ] - }, - "TextInputComponent": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/MessageComponentType.TextInput" }, - "custom_id": { + "nick": { "type": "string" }, - "style": { - "$ref": "#/components/schemas/TextInputStyle" - }, - "label": { - "type": "string" + "joined_at": { + "type": "string", + "format": "date-time" }, - "min_length": { - "type": "integer" + "pending": { + "type": "boolean" }, - "max_length": { + "premium_since": { "type": "integer" }, - "required": { - "type": "boolean" + "avatar": { + "type": "string" }, - "value": { + "banner": { "type": "string" }, - "placeholder": { + "bio": { "type": "string" - } - }, - "required": [ - "custom_id", - "label", - "style", - "type" - ] - }, - "MessageComponentType.TextInput": { - "type": "number", - "const": 4 - }, - "TextInputStyle": { - "type": "number", - "enum": [ - 1, - 2 - ] - }, - "Poll": { - "type": "object", - "properties": { - "question": { - "$ref": "#/components/schemas/PollMedia" }, - "answers": { + "theme_colors": { "type": "array", "items": { - "$ref": "#/components/schemas/PollAnswer" + "type": "integer" } }, - "expiry": { - "type": "string", - "format": "date-time" + "pronouns": { + "type": "string" }, - "allow_multiselect": { - "type": "boolean" + "communication_disabled_until": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] }, - "results": { - "$ref": "#/components/schemas/PollResult" + "user": { + "$ref": "#/components/schemas/PublicUser" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "allow_multiselect", - "answers", - "expiry", - "question" + "banner", + "bio", + "communication_disabled_until", + "deaf", + "guild_id", + "id", + "joined_at", + "mute", + "pending", + "roles", + "user" ] }, - "PollMedia": { + "PublicUser": { "type": "object", "properties": { - "text": { + "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```", "type": "string" }, - "emoji": { - "$ref": "#/components/schemas/PartialEmoji" - } - } - }, - "PollAnswer": { - "type": "object", - "properties": { - "answer_id": { + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { "type": "string" }, - "poll_media": { - "$ref": "#/components/schemas/PollMedia" - } - }, - "required": [ - "poll_media" - ] - }, - "PollResult": { - "type": "object", - "properties": { - "is_finalized": { - "type": "boolean" + "banner": { + "type": "string" + }, + "bio": { + "type": "string" }, - "answer_counts": { + "theme_colors": { "type": "array", "items": { - "$ref": "#/components/schemas/PollAnswerCount" + "type": "integer" } - } - }, - "required": [ - "answer_counts", - "is_finalized" - ] - }, - "PollAnswerCount": { - "type": "object", - "properties": { - "id": { + }, + "pronouns": { "type": "string" }, - "count": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { "type": "integer" }, - "me_voted": { + "accent_color": { + "type": "integer" + }, + "bot": { "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "count", + "bio", + "bot", + "discriminator", "id", - "me_voted" + "premium_since", + "premium_type", + "public_flags", + "username" ] }, - "MessageSnapshot": { - "type": "object", - "properties": { - "message": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - }, - "edited_timestamp": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "mentions": { - "type": "array", - "items": { - "type": "string" - } - }, - "mention_roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Attachment" - } - }, - "embeds": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Embed" - } - }, - "type": { - "$ref": "#/components/schemas/MessageType" - }, - "flags": { - "type": "integer" - }, - "components": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MessageComponent" - } - }, - "resolved": { - "type": "array", - "items": { - "type": "object", - "properties": {}, - "additionalProperties": true - } - }, - "sticker_items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sticker" - } - } - }, - "additionalProperties": false, - "required": [ - "content", - "embeds", - "flags", - "mention_roles", - "mentions", - "timestamp", - "type" - ] - } - }, - "required": [ - "message" + "Snowflake": { + "description": "A container for useful snowflake-related methods.", + "type": "object" + }, + "QuestRewardType": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5 ] }, - "MessageComponent": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/MessageComponentType" - } - }, - "required": [ - "type" + "QuestAssignmentMethod": { + "type": "number", + "enum": [ + 1, + 2 ] }, - "MessageComponentType": { + "QuestPlatformType": { "type": "number", "enum": [ 0, 1, 2, 3, + 4 + ] + }, + "QuestEventType": { + "type": "string", + "enum": [ + "STREAM_ON_DESKTOP", + "PLAY_ON_DESKTOP", + "PLAY_ON_XBOX", + "PLAY_ON_PLAYSTATION", + "PLAY_ON_DESKTOP_V2", + "WATCH_VIDEO", + "WATCH_VIDEO_ON_MOBILE", + "PLAY_ACTIVITY", + "ACHIEVEMENT_IN_GAME", + "ACHIEVEMENT_IN_ACTIVITY" + ] + }, + "QuestJoinOperator": { + "type": "string", + "enum": [ + "and", + "or" + ] + }, + "QuestFeature": { + "type": "number", + "enum": [ + 1, + 3, 4, 5, 6, 7, - 8 + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34 ] }, - "InteractionGuild": { + "QuestSharePolicy": { + "type": "string", + "enum": [ + "shareable_everywhere", + "not_shareable" + ] + }, + "EntitlementType": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ] + }, + "SKU": { "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```", + "type": { + "$ref": "#/components/schemas/SKUType" + }, + "application_id": { + "type": "string" + }, + "application": { + "$ref": "#/components/schemas/Application" + }, + "product_line": { + "$ref": "#/components/schemas/SKUProductLine" + }, + "product_id": { + "type": "string" + }, + "flags": { + "type": "integer", + "default": 0 + }, + "name": { + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "summary": { + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "description": { + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "legal_notice": { + "$ref": "#/components/schemas/LocalizedStringSchema" + }, + "slug": { + "type": "string" + }, + "thumbnail_asset_id": { "type": "string" }, + "dependent_sku_id": { + "type": "string", + "nullable": true + }, + "bundled_skus": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SKU" + } + }, + "bundled_sku_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "access_type": { + "$ref": "#/components/schemas/SKUAccessType" + }, + "manifest_labels": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, "features": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SKUFeature" + } + }, + "locales": { "type": "array", "items": { "type": "string" } }, - "locale": { - "type": "string" - } - }, - "required": [ - "features", - "id", - "locale" - ] - }, - "PublicMember": { - "type": "object", - "properties": { - "id": { - "type": "string" + "genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SKUGenre" + } }, - "guild_id": { - "type": "string" + "available_regions": { + "type": "array", + "items": { + "type": "string" + } }, - "mute": { - "type": "boolean" + "content_rating": { + "$ref": "#/components/schemas/SKUContentRatingSchema" }, - "deaf": { - "type": "boolean" + "content_rating_agency": { + "enum": [ + 1, + 2 + ], + "type": "number" }, - "nick": { - "type": "string" + "content_ratings": { + "$ref": "#/components/schemas/Record" }, - "joined_at": { - "type": "string", - "format": "date-time" + "system_requirements": { + "$ref": "#/components/schemas/Record" }, - "pending": { - "type": "boolean" + "price": { + "anyOf": [ + { + "$ref": "#/components/schemas/Record" + }, + { + "$ref": "#/components/schemas/SKUPriceSchema" + } + ] }, - "premium_since": { + "price_tier": { "type": "integer" }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" + "sale_price_tier": { + "type": "integer" }, - "bio": { - "type": "string" + "sale_price": { + "$ref": "#/components/schemas/Record" }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } + "created_at": { + "type": "string", + "format": "date-time" }, - "pronouns": { - "type": "string" + "updated_at": { + "type": "string", + "format": "date-time" }, - "communication_disabled_until": { + "release_date": { "anyOf": [ { "type": "string", @@ -10760,98 +15020,273 @@ } ] }, - "user": { - "$ref": "#/components/schemas/PublicUser" + "preorder_approximate_release_date": { + "type": "string" }, - "roles": { + "preorder_released_at": { + "type": "string" + }, + "external_purchase_url": { + "type": "string" + }, + "external_sku_strategies": { + "$ref": "#/components/schemas/Record" + }, + "eligible_payment_gateways": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/BillingPaymentGateway" } + }, + "premium": { + "type": "boolean" + }, + "show_age_gate": { + "type": "boolean" + }, + "restricted": { + "type": "boolean" + }, + "exclusive": { + "type": "boolean" + }, + "deleted": { + "type": "boolean", + "default": false + }, + "tenant_metadata": { + "$ref": "#/components/schemas/SKUTenantMetadataSchema" + }, + "powerup_metadata": { + "$ref": "#/components/schemas/SKUGuildPowerupMetadataSchema" + }, + "id": { + "type": "string" } }, "required": [ - "banner", - "bio", - "communication_disabled_until", - "deaf", - "guild_id", + "access_type", + "application", + "application_id", + "created_at", + "features", + "flags", "id", - "joined_at", - "mute", - "pending", - "roles", - "user" + "name", + "premium", + "product_line", + "show_age_gate", + "slug", + "type", + "updated_at" + ] + }, + "SKUType": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6 + ] + }, + "SKUProductLine": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 9, + 10, + 11, + 12, + 13, + 14 + ] + }, + "SKUAccessType": { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + "SKUFeature": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ] + }, + "SKUGenre": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69 ] }, - "PublicUser": { - "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```", - "type": "string" - }, - "premium_since": { - "type": "string", - "format": "date-time" - }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "public_flags": { - "type": "integer" - }, - "accent_color": { - "type": "integer" - }, - "bot": { - "type": "boolean" - }, - "premium_type": { - "type": "integer" - }, - "badge_ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "bio", - "bot", - "discriminator", - "id", - "premium_since", - "premium_type", - "public_flags", - "username" + "SKUContentRating": { + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "number" + }, + "SKUContentDescriptor": { + "enum": [ + 1, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 2, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 3, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 4, + 40, + 41, + 42, + 43, + 5, + 6, + 7, + 8, + 9 + ], + "type": "number" + }, + "SKUExternalSKUStrategyType": { + "type": "number", + "enum": [ + 1, + 2 ] }, - "Snowflake": { - "description": "A container for useful snowflake-related methods.", - "type": "object" + "BillingPaymentGateway": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9 + ] }, "GameActivity": { "type": "object", @@ -10952,174 +15387,40 @@ } } }, - "Classification": { + "AllowedMentions": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "classification_type": { - "$ref": "#/components/schemas/ClassificationType" - }, - "description": { - "type": "string" - }, - "explainer_link": { - "type": "string" - }, - "actions": { + "parse": { "type": "array", "items": { - "$ref": "#/components/schemas/ClassificationAction" + "enum": [ + "everyone", + "roles", + "users" + ], + "type": "string" } }, - "max_expiration_time": { - "type": "string" - }, - "flagged_content": { - "type": "array", - "items": {} - }, - "appeal_status": { - "$ref": "#/components/schemas/AppealStatus" - }, - "is_coppa": { - "type": "boolean" - }, - "is_spam": { - "type": "boolean" - }, - "appeal_ingestion_type": { - "$ref": "#/components/schemas/AppealIngestionType" - } - }, - "required": [ - "actions", - "appeal_ingestion_type", - "appeal_status", - "classification_type", - "description", - "explainer_link", - "flagged_content", - "id", - "is_coppa", - "is_spam", - "max_expiration_time" - ] - }, - "ClassificationType": { - "type": "number", - "enum": [ - 1, - 100, - 200, - 210, - 220, - 230, - 240, - 250, - 280, - 290, - 310, - 320, - 390, - 600, - 650, - 711, - 720, - 3010, - 3030, - 4000, - 4010, - 4130, - 4140, - 5010, - 5090, - 5305, - 5411, - 5440, - 5485 - ] - }, - "ClassificationAction": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "action_type": { - "$ref": "#/components/schemas/ClassificationActionType" - }, - "descriptions": { + "roles": { "type": "array", "items": { "type": "string" } - } - }, - "required": [ - "action_type", - "descriptions", - "id" - ] - }, - "ClassificationActionType": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 20, - 22 - ] - }, - "AppealStatus": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/AppealStatusValue" - } - }, - "required": [ - "status" - ] - }, - "AppealStatusValue": { - "type": "number", - "enum": [ - 1, - 2, - 3 - ] - }, - "AppealIngestionType": { - "type": "number", - "enum": [ - 0, - 1, - 2 - ] + }, + "users": { + "type": "array", + "items": { + "type": "string" + } + }, + "replied_user": { + "type": "boolean" + } + } }, - "GuildClassification": { + "Classification": { "type": "object", "properties": { - "guild_metadata": { - "$ref": "#/components/schemas/GuildMetadata" - }, "id": { "type": "string" }, @@ -11166,452 +15467,358 @@ "description", "explainer_link", "flagged_content", - "guild_metadata", "id", "is_coppa", "is_spam", "max_expiration_time" ] }, - "GuildMetadata": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "member_type": { - "$ref": "#/components/schemas/GuildMemberType" - } - }, - "required": [ - "member_type", - "name" - ] - }, - "GuildMemberType": { + "ClassificationType": { "type": "number", "enum": [ 1, - 2 - ] - }, - "AccountStandingState": { - "type": "number", - "enum": [ 100, 200, - 300, - 400, - 500 - ] - }, - "AppealEligibility": { - "type": "number", - "enum": [ - 1, - 2, - 3 - ] - }, - "CollectiblesCategoryItem": { - "type": "object", - "properties": { - "sku_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "store_listing_id": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "unpublished_at": { - "type": "string", - "nullable": true - }, - "styles": { - "$ref": "#/components/schemas/CollectiblesCategoryStyle" - }, - "logo": { - "type": "string" - }, - "hero_ranking": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "mobile_bg": { - "type": "string", - "nullable": true - }, - "pdp_bg": { - "type": "string", - "nullable": true - }, - "success_modal_bg": { - "type": "string", - "nullable": true - }, - "mobile_banner": { - "type": "string", - "nullable": true - }, - "featured_block": { - "type": "string", - "nullable": true - }, - "hero_banner": { - "type": "string", - "nullable": true - }, - "wide_banner": { - "type": "string", - "nullable": true - }, - "hero_logo": { - "type": "string", - "nullable": true - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CollectiblesCategoryProductItem" - } - }, - "banner_asset": { - "$ref": "#/components/schemas/StaticAnimatedAsset" - }, - "hero_banner_asset": { - "$ref": "#/components/schemas/StaticAnimatedAsset" - } - }, - "required": [ - "banner", - "featured_block", - "hero_banner", - "hero_logo", - "hero_ranking", - "logo", - "mobile_banner", - "mobile_bg", - "name", - "pdp_bg", - "products", - "sku_id", - "store_listing_id", - "styles", - "success_modal_bg", - "summary", - "unpublished_at", - "wide_banner" - ] - }, - "CollectiblesCategoryStyle": { - "type": "object", - "properties": { - "background_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "button_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "confetti_colors": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "required": [ - "background_colors", - "button_colors", - "confetti_colors" - ] - }, - "CollectiblesCategoryProductItem": { - "type": "object", - "properties": { - "sku_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "store_listing_id": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "unpublished_at": { - "type": "string", - "nullable": true - }, - "styles": { - "$ref": "#/components/schemas/CollectiblesCategoryStyle" - }, - "prices": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "country_prices": { - "$ref": "#/components/schemas/CountryPrice" - } - }, - "additionalProperties": false, - "required": [ - "country_prices" - ] - } - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductItem" - } - }, - "type": { - "type": "integer" - }, - "premium_type": { - "type": "integer" - }, - "category_sku_id": { - "type": "string" - }, - "google_sku_ids": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "variants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductItemVariant" - } - } - }, - "required": [ - "banner", - "category_sku_id", - "google_sku_ids", - "items", - "name", - "premium_type", - "prices", - "sku_id", - "store_listing_id", - "styles", - "summary", - "type", - "unpublished_at" + 210, + 220, + 230, + 240, + 250, + 280, + 290, + 310, + 320, + 390, + 600, + 650, + 711, + 720, + 3010, + 3030, + 4000, + 4010, + 4130, + 4140, + 5010, + 5090, + 5305, + 5411, + 5440, + 5485 ] }, - "CountryPrice": { + "ClassificationAction": { "type": "object", "properties": { - "country_code": { + "id": { "type": "string" }, - "prices": { + "action_type": { + "$ref": "#/components/schemas/ClassificationActionType" + }, + "descriptions": { "type": "array", "items": { - "$ref": "#/components/schemas/PriceEntry" + "type": "string" } } }, "required": [ - "country_code", - "prices" + "action_type", + "descriptions", + "id" + ] + }, + "ClassificationActionType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 20, + 22 ] }, - "PriceEntry": { + "AppealStatus": { "type": "object", "properties": { - "amount": { - "type": "integer" - }, - "currency": { - "type": "string" - }, - "exponent": { - "type": "integer" + "status": { + "$ref": "#/components/schemas/AppealStatusValue" } }, "required": [ - "amount", - "currency", - "exponent" + "status" + ] + }, + "AppealStatusValue": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ] + }, + "AppealIngestionType": { + "type": "number", + "enum": [ + 0, + 1, + 2 ] }, - "ProductItem": { + "GuildClassification": { "type": "object", "properties": { - "type": { - "type": "integer" + "guild_metadata": { + "$ref": "#/components/schemas/GuildMetadata" }, "id": { "type": "string" }, - "sku_id": { - "type": "string" + "classification_type": { + "$ref": "#/components/schemas/ClassificationType" }, - "asset": { + "description": { "type": "string" }, - "label": { + "explainer_link": { "type": "string" }, - "palette": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassificationAction" + } + }, + "max_expiration_time": { "type": "string" + }, + "flagged_content": { + "type": "array", + "items": {} + }, + "appeal_status": { + "$ref": "#/components/schemas/AppealStatus" + }, + "is_coppa": { + "type": "boolean" + }, + "is_spam": { + "type": "boolean" + }, + "appeal_ingestion_type": { + "$ref": "#/components/schemas/AppealIngestionType" } }, "required": [ + "actions", + "appeal_ingestion_type", + "appeal_status", + "classification_type", + "description", + "explainer_link", + "flagged_content", + "guild_metadata", "id", - "sku_id", - "type" + "is_coppa", + "is_spam", + "max_expiration_time" ] }, - "ProductItemVariant": { + "GuildMetadata": { "type": "object", "properties": { - "sku_id": { - "type": "string" - }, "name": { "type": "string" }, - "name_localizations": { - "type": "null" - }, - "summary": { + "icon": { "type": "string" }, - "summary_localizations": { - "type": "null" + "member_type": { + "$ref": "#/components/schemas/GuildMemberType" + } + }, + "required": [ + "member_type", + "name" + ] + }, + "GuildMemberType": { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + "AccountStandingState": { + "type": "number", + "enum": [ + 100, + 200, + 300, + 400, + 500 + ] + }, + "AppealEligibility": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ] + }, + "CollectibleItemType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 100, + 1000, + 2000, + 3000 + ] + }, + "AnyCollectibleItem": { + "anyOf": [ + { + "$ref": "#/components/schemas/CollectibleAvatarDecorationSchema" }, - "store_listing_id": { - "type": "string" + { + "$ref": "#/components/schemas/CollectibleProfileEffectSchema" }, - "banner": { + { + "$ref": "#/components/schemas/CollectibleNameplateSchema" + } + ] + }, + "CollectibleProfileEffectAnimationType": { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + "CollectibleProfileEffectAnimation": { + "type": "object", + "properties": { + "src": { + "description": "The URL of the animation image (in APNG format)", "type": "string" }, - "unpublished_at": { - "type": "string", - "nullable": true - }, - "styles": { - "$ref": "#/components/schemas/CollectiblesCategoryStyle" - }, - "prices": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "country_prices": { - "$ref": "#/components/schemas/CountryPrice" - } - }, - "additionalProperties": false, - "required": [ - "country_prices" - ] - } + "loop": { + "description": "Whether the animation frame should loop", + "type": "boolean" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductItem" - } + "height": { + "description": "The height of the animation image", + "type": "integer" }, - "type": { + "width": { + "description": "The width of the animation image", "type": "integer" }, - "premium_type": { + "duration": { + "description": "The duration of the animation frame (in milliseconds)", "type": "integer" }, - "category_sku_id": { - "type": "string" + "start": { + "description": "The start time of the animation frame (in milliseconds)", + "type": "integer" }, - "google_sku_ids": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "loopDelay": { + "description": "The delay between loops of the animation frame (in milliseconds)", + "type": "integer" }, - "base_variant_sku_id": { - "type": "string" + "position": { + "$ref": "#/components/schemas/CollectibleProfileEffectPosition", + "description": "The position of the animation frame" }, - "base_variant_name": { - "type": "string" + "zIndex": { + "description": "The z-index of the animation frame", + "type": "integer" }, - "variant_label": { - "type": "string" + "randomizedSources": { + "description": "The sources to randomize the src from", + "type": "array", + "items": { + "$ref": "#/components/schemas/CollectibleProfileEffectSource" + } + } + }, + "required": [ + "duration", + "height", + "loop", + "loopDelay", + "position", + "randomizedSources", + "src", + "start", + "width", + "zIndex" + ] + }, + "CollectibleProfileEffectPosition": { + "type": "object", + "properties": { + "x": { + "description": "The x-coordinate of the animation frame", + "type": "integer" }, - "variant_value": { - "type": "string" + "y": { + "description": "The y-coordinate of the animation frame", + "type": "integer" } }, "required": [ - "base_variant_name", - "base_variant_sku_id", - "category_sku_id", - "items", - "name", - "name_localizations", - "premium_type", - "prices", - "sku_id", - "store_listing_id", - "summary", - "summary_localizations", - "type", - "variant_label", - "variant_value" + "x", + "y" ] }, - "StaticAnimatedAsset": { + "CollectibleProfileEffectSource": { "type": "object", "properties": { - "animated": { - "type": "string", - "nullable": true - }, - "static": { + "src": { + "description": "The URL of the animation image (in APNG format)", "type": "string" } }, "required": [ - "animated", - "static" + "src" + ] + }, + "CollectibleNameplateColorPalette": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ] }, "CollectiblesMarketingItem": { @@ -11637,172 +15844,54 @@ "version" ] }, - "AnyShopBlock": { + "AnyCollectiblesShopBlock": { "anyOf": [ { - "$ref": "#/components/schemas/ItemRowShopBlock" + "$ref": "#/components/schemas/HeroShopBlockSchema" }, { - "$ref": "#/components/schemas/BundleTileRowShopBlock" + "$ref": "#/components/schemas/SubBlockSchema" }, { - "$ref": "#/components/schemas/ItemCollectionShopBlock" - } - ] - }, - "ItemRowShopBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer", - "const": 0 - }, - "category_sku_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "category_store_listing_id": { - "type": "string" + "$ref": "#/components/schemas/FeaturedShopBlockSchema" }, - "banner_asset": { - "$ref": "#/components/schemas/StaticAnimatedAsset" + { + "$ref": "#/components/schemas/FeedShopBlockSchema" }, - "logo_url": { - "type": "string" + { + "$ref": "#/components/schemas/WideBannerShopBlockSchema" }, - "unpublished_at": { - "type": "string", - "nullable": true + { + "$ref": "#/components/schemas/ShelfShopBlockSchema" }, - "summary": { - "type": "string" + { + "$ref": "#/components/schemas/CountdownTimerShopBlockSchema" }, - "ranked_sku_ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "banner_asset", - "category_sku_id", - "category_store_listing_id", - "logo_url", - "name", - "ranked_sku_ids", - "summary", - "type", - "unpublished_at" - ] - }, - "BundleTileRowShopBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer", - "const": 1 + { + "$ref": "#/components/schemas/ImmersiveBannerShopBlockSchema" }, - "subblocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShopBlockSubBlock" - } + { + "$ref": "#/components/schemas/RewardHeroShopBlockSchema" } - }, - "required": [ - "subblocks", - "type" ] }, - "ShopBlockSubBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer" - }, - "category_store_listing_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "unpublished_at": { - "type": "string", - "nullable": true - }, - "banner_url": { - "type": "string" - }, - "body_text": { - "type": "string", - "nullable": true - }, - "banner_text_color": { - "type": "integer", - "nullable": true - } - }, - "required": [ - "banner_text_color", - "banner_url", - "body_text", - "category_store_listing_id", - "name", - "type", - "unpublished_at" + "ShopBlockType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 ] }, - "ItemCollectionShopBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer", - "const": 2 - }, - "ranked_sku_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "sorted_sku_ids": { - "type": "object", - "properties": { - "recommended": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "popular": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "popular", - "recommended" - ] - } - }, - "required": [ - "ranked_sku_ids", - "sorted_sku_ids", - "type" - ] + "ShopSubBlockType": { + "description": "A category subblock\n\nValue: 0\nName: CATEGORY", + "type": "number", + "const": 0 }, "PartialMessage": { "description": "https://docs.discord.food/resources/message#partial-message-structure", @@ -12315,7 +16404,7 @@ "length": { "type": "integer" }, - "__@unscopables@700": { + "__@unscopables@703": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -12444,17 +16533,17 @@ "remove": { "type": "boolean" }, - "__@iterator@698": { + "__@iterator@670": { "type": "boolean" }, - "__@unscopables@700": { + "__@unscopables@703": { "type": "boolean" } } } }, "required": [ - "__@unscopables@700", + "__@unscopables@703", "length" ] }, @@ -12979,36 +17068,12 @@ "id" ] }, - "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" - } - } + "StoreListingIconType": { + "type": "number", + "enum": [ + 1, + 2 + ] } } }, @@ -13094,6 +17159,9 @@ { "name": "policies" }, + { + "name": "quests" + }, { "name": "read-states" }, @@ -13623,6 +17691,30 @@ ] } }, + "/users/@me/virtual-currency/balance/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VirtualCurrencyResponseSchema" + } + } + } + } + }, + "tags": [ + "users" + ] + } + }, "/users/@me/settings/": { "get": { "security": [ @@ -15969,11 +20061,39 @@ } }, "tags": [ - "teams" + "teams" + ] + } + }, + "/store/skus/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Creates a new SKU. Returns the created SKU object on success. Requires an application with access to the store or monetization. User must be the owner of the application or member of the owning team.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSKUSchema" + } + } + } + }, + "responses": { + "default": { + "description": "No description available" + } + }, + "tags": [ + "store" ] } }, - "/store/published-listings/skus/{sku_id}": { + "/store/published-listings/skus/{sku_id}/subscription-plans/": { "get": { "security": [ { @@ -16001,7 +20121,7 @@ ] } }, - "/store/published-listings/skus/{sku_id}/subscription-plans/": { + "/store/published-listings/skus/{sku_id}/": { "get": { "security": [ { @@ -16351,9 +20471,305 @@ } } } - }, + }, + "tags": [ + "read-states" + ] + } + }, + "/quests/decision/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns the sponsored quest that should be shown to the user in a specific placement.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestPlacementResponseSchema" + } + } + } + } + }, + "parameters": [ + { + "name": "placement", + "in": "query", + "schema": { + "type": "number" + }, + "description": "The quest placement area to get the quest for" + }, + { + "name": "client_heartbeat_session_id", + "in": "query", + "schema": { + "type": "string" + }, + "description": "A client-generated UUID representing the current persisted analytics heartbeat" + } + ], + "tags": [ + "quests" + ] + } + }, + "/quests/@me/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns information on the current quests for the current user.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestsResponseSchema" + } + } + } + } + }, + "tags": [ + "quests" + ] + } + }, + "/quests/@me/claimed": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns information on the claimed quests for the current user.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClaimedQuestsResponseSchema" + } + } + } + } + }, + "tags": [ + "quests" + ] + } + }, + "/quests/{quest_id}/video-progress/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Tells the server to update the value field of the current video task. Used for keeping track of how long the video has been watched for, and for checking if the user has met the task duration requirement. Returns a quest user status object on success. Fires a Quests User Status Update Gateway event.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestVideoProgressRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestVideoProgressResponseSchema" + } + } + } + } + }, + "parameters": [ + { + "name": "quest_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "quest_id" + } + ], + "tags": [ + "quests" + ] + } + }, + "/quests/{quest_id}/reward-code/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Retrieves the reward code for the specified platform. Returns a quest reward code object on success.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestRewardCodeResponseSchema" + } + } + } + } + }, + "parameters": [ + { + "name": "quest_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "quest_id" + } + ], + "tags": [ + "quests" + ] + } + }, + "/quests/{quest_id}/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns a quest config object for the specified quest. Quest must be currently active.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestConfigResponseSchema" + } + } + } + } + }, + "parameters": [ + { + "name": "quest_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "quest_id" + } + ], + "tags": [ + "quests" + ] + } + }, + "/quests/{quest_id}/enroll/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Accepts a quest and returns a quest user status object. Fires a Quests User Status Update Gateway event.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestEnrollRequestSchema" + } + } + } + }, + "responses": { + "default": { + "description": "No description available" + } + }, + "parameters": [ + { + "name": "quest_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "quest_id" + } + ], + "tags": [ + "quests" + ] + } + }, + "/quests/{quest_id}/claim-reward/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Claims the quest's rewards, setting the completed_at and claimed_at fields of the quest user status to the current timestamp. Fires a Quests User Status Update Gateway event.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestClaimRewardRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestClaimRewardResponseSchema" + } + } + } + } + }, + "parameters": [ + { + "name": "quest_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "quest_id" + } + ], "tags": [ - "read-states" + "quests" ] } }, @@ -18307,6 +22723,44 @@ ] } }, + "/guilds/{guild_id}/shield.svg/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "responses": { + "200": { + "description": "No description available" + }, + "404": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIErrorResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "guild_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "guild_id" + } + ], + "tags": [ + "guilds" + ] + } + }, "/guilds/{guild_id}/roles/member-counts/": { "get": { "security": [ @@ -19816,42 +24270,6 @@ ] } }, - "/guilds/{guild_id}/force-recount/": { - "post": { - "x-right-required": "MANAGE_GUILDS", - "security": [ - { - "bearer": [] - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIGuild" - } - } - } - } - }, - "parameters": [ - { - "name": "guild_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "guild_id" - } - ], - "tags": [ - "guilds" - ] - } - }, "/guilds/{guild_id}/emojis/": { "get": { "security": [ @@ -21487,65 +25905,236 @@ "in": "path", "required": true, "schema": { - "type": "string" + "type": "string" + }, + "description": "connection_id" + } + ], + "tags": [ + "connections" + ] + } + }, + "/collectibles-shop/": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns the list of collectible categories available in the store.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectiblesShopResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "country_code", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The user's ISO 3166-1 alpha-2 country code" + }, + { + "name": "tab", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The tab to retrieve" + }, + { + "name": "shop_home_config", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The shop home configuration override" + }, + { + "name": "include_bundles", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include bundles" + }, + { + "name": "include_dynamic_blocks", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include dynamic blocks" + }, + { + "name": "include_nameplates_on_mobile", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include nameplates on mobile" + }, + { + "name": "include_unpublished", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include unpublished categories. Restricted to staff" + }, + { + "name": "no_cache", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to bypass the cache. Restricted to staff" + }, + { + "name": "payment_gateway", + "in": "query", + "required": false, + "schema": { + "type": "number" + }, + "description": "The payment gateway enum value of the payment source" + }, + { + "name": "skip_num_categories", + "in": "query", + "required": false, + "schema": { + "type": "number" + }, + "description": "The number of categories to skip" + }, + { + "name": "variants_return_style", + "in": "query", + "required": false, + "schema": { + "type": "number" + }, + "description": "\tThe variant style to return" + } + ], + "tags": [ + "collectibles-shop" + ] + } + }, + "/collectibles-categories/v2": { + "get": { + "security": [ + { + "bearer": [] + } + ], + "description": "Returns the collectible categories available in the store.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectiblesCategoriesResponse" + } + } + } + } + }, + "parameters": [ + { + "name": "country_code", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The user's ISO 3166-1 alpha-2 country code" + }, + { + "name": "include_bundles", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include bundles" + }, + { + "name": "include_nameplates_on_mobile", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include nameplates on mobile" + }, + { + "name": "include_unpublished", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to include unpublished categories. Restricted to staff" + }, + { + "name": "no_cache", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + }, + "description": "Whether to bypass the cache. Restricted to staff" + }, + { + "name": "payment_gateway", + "in": "query", + "required": false, + "schema": { + "type": "number" + }, + "description": "The payment gateway enum value of the payment source" + }, + { + "name": "skip_num_categories", + "in": "query", + "required": false, + "schema": { + "type": "number" }, - "description": "connection_id" - } - ], - "tags": [ - "connections" - ] - } - }, - "/collectibles-shop/": { - "get": { - "security": [ - { - "bearer": [] - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CollectiblesShopResponse" - } - } - } + "description": "The number of categories to skip" }, - "204": { - "description": "No description available" - } - }, - "tags": [ - "collectibles-shop" - ] - } - }, - "/collectibles-categories/": { - "get": { - "security": [ { - "bearer": [] + "name": "variants_return_style", + "in": "query", + "required": false, + "schema": { + "type": "number" + }, + "description": "\tThe variant style to return" } ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CollectiblesCategoriesResponse" - } - } - } - }, - "204": { - "description": "No description available" - } - }, "tags": [ "collectibles-categories" ] @@ -22545,56 +27134,6 @@ ] } }, - "/channels/{channel_id}/messages/{message_id}/threads/": { - "post": { - "security": [ - { - "bearer": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageThreadCreationSchema" - } - } - } - }, - "responses": { - "200": { - "description": "No description available" - }, - "403": { - "description": "No description available" - } - }, - "parameters": [ - { - "name": "channel_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "channel_id" - }, - { - "name": "message_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "message_id" - } - ], - "tags": [ - "channels" - ] - } - }, "/channels/{channel_id}/messages/{message_id}/reactions/": { "delete": { "x-permission-required": "MANAGE_MESSAGES", @@ -24001,74 +28540,6 @@ ] } }, - "/auth/passwordless/start/": { - "post": { - "security": [ - { - "bearer": [] - } - ], - "responses": { - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIErrorOrCaptchaResponse" - } - } - } - } - }, - "tags": [ - "auth" - ] - } - }, - "/auth/passwordless/finish/": { - "post": { - "security": [ - { - "bearer": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebAuthnSSOSchema" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenResponse" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIErrorResponse" - } - } - } - } - }, - "tags": [ - "auth" - ] - } - }, "/auth/mfa/webauthn/": { "post": { "requestBody": { @@ -24340,50 +28811,6 @@ ] } }, - "/auth/conditional/finish/": { - "post": { - "security": [ - { - "bearer": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebAuthnSSOSchema" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenResponse" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/APIErrorResponse" - } - } - } - } - }, - "tags": [ - "auth" - ] - } - }, "/attachments/refresh-urls/": { "post": { "security": [ @@ -24590,6 +29017,52 @@ ] } }, + "/applications/{application_id}/storefront/product/": { + "post": { + "security": [ + { + "bearer": [] + } + ], + "description": "Create a new SKU for an application", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApplicationSKUSchema" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApplicationSKUResponseSchema" + } + } + } + } + }, + "parameters": [ + { + "name": "application_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "application_id" + } + ], + "tags": [ + "applications" + ] + } + }, "/applications/{application_id}/skus/": { "get": { "security": [ diff --git a/assets/schemas.json b/assets/schemas.json index f691b79e86..d0568a44da 100644 --- a/assets/schemas.json +++ b/assets/schemas.json @@ -1,17 +1,4 @@ { - "CreateFingerprintResponse": { - "type": "object", - "properties": { - "fingerprint": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "fingerprint" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "ApplicationCommandSchema": { "type": "object", "properties": { @@ -289,2133 +276,5076 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "FieldErrorResponse": { + "SKUGuildPowerupMetadataSchema": { "type": "object", "properties": { - "code": { + "boost_price": { + "description": "The number of boosts the powerup costs", "type": "integer" }, - "message": { + "purchase_limit": { + "description": "The maximum number of entitlements a guild can have for the powerup", + "type": "integer" + }, + "guild_features": { + "$ref": "#/definitions/GuildPremiumFeatures", + "description": "The features granted by the powerup" + }, + "category_type": { + "$ref": "#/definitions/GuildPowerupCategoryType", + "description": "The type of guild powerup" + }, + "static_image_url": { + "description": "URL of the static banner image for the powerup", "type": "string" }, - "errors": { - "$ref": "#/definitions/ErrorList" - } - }, - "additionalProperties": false, - "required": [ - "code", - "errors", - "message" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "AbuseIpDbBlacklistResponse": { - "type": "object", - "properties": { - "meta": { - "type": "object", - "properties": { - "generatedAt": { - "type": "string", - "default": "2020-09-24T19:54:11+00:00" - } - }, - "additionalProperties": false, - "required": [ - "generatedAt" - ] + "animated_image_url": { + "description": "URL of the animated banner image for the powerup", + "type": "string" }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ipAddress": { - "type": "string", - "default": "5.188.10.179" - }, - "abuseConfidenceScore": { - "type": "integer", - "default": 100 - }, - "lastReportedAt": { - "type": "string", - "default": "2020-09-24T19:17:02+00:00" - } - }, - "additionalProperties": false, - "required": [ - "abuseConfidenceScore", - "ipAddress", - "lastReportedAt" - ] - }, - "default": [ - { - "ipAddress": "5.188.10.179", - "abuseConfidenceScore": 100, - "lastReportedAt": "2020-09-24T19:17:02+00:00" - }, - { - "ipAddress": "185.222.209.14", - "abuseConfidenceScore": 100, - "lastReportedAt": "2020-09-24T19:17:02+00:00" - }, - { - "ipAddress": "191.96.249.183", - "abuseConfidenceScore": 100, - "lastReportedAt": "2020-09-24T19:17:01+00:00" - } + "store_removal_date": { + "description": "When the powerup will be removed from the store", + "type": [ + "null", + "string" ] } }, "additionalProperties": false, "required": [ - "data", - "meta" + "animated_image_url", + "boost_price", + "category_type", + "guild_features", + "purchase_limit", + "static_image_url" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InteractionSchema": { + "StoredEmailResponse": { "type": "object", "properties": { - "type": { - "$ref": "#/definitions/InteractionType" + "Content-Type": { + "type": "string" }, - "application_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```", + "From": { "type": "string" }, - "guild_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```", + "Message-Id": { "type": "string" }, - "channel_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```", + "Mime-Version": { "type": "string" }, - "message_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```", + "Subject": { "type": "string" }, - "message_flags": { - "type": "integer" + "To": { + "type": "string" }, - "session_id": { + "sender": { "type": "string" }, - "data": { - "$ref": "#/definitions/InteractionData" + "recipients": { + "type": "string" }, - "files": { + "from": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "body-html": { + "type": "string" + }, + "body-plain": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "content-type": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "content-type", + "name", + "size", + "url" + ] + } + ], + "minItems": 1, + "maxItems": 1 + }, + "content-id-map": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "message-headers": { "type": "array", "items": { - "type": "object", - "properties": {}, - "additionalProperties": true + "type": "array", + "items": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "minItems": 2, + "maxItems": 2 } }, - "nonce": { + "stripped-html": { "type": "string" }, - "analytics_location": { + "stripped-text": { "type": "string" }, - "section_name": { + "stripped-signature": { "type": "string" }, - "source": { + "Content-Transfer-Encoding": { + "type": "string" + }, + "X-Mailgun-Tag": { + "type": "string" + }, + "X-Mailgun-Template-Name": { + "type": "string" + }, + "X-Mailgun-Template-Variables": { + "type": "string" + }, + "X-Mailgun-Deliver-By": { "type": "string" } }, "additionalProperties": false, "required": [ - "application_id", - "channel_id", - "data", - "type" + "Content-Type", + "From", + "Message-Id", + "Mime-Version", + "Subject", + "To", + "body-html", + "body-plain", + "message-headers", + "recipients", + "sender", + "stripped-html", + "stripped-signature", + "stripped-text" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InteractionCallbackSchema": { + "MessagesQueueStatusAPIResponse": { "type": "object", "properties": { - "type": { - "$ref": "#/definitions/InteractionCallbackType" + "regular": { + "type": "object", + "properties": { + "is_disabled": { + "type": "boolean" + }, + "disabled": { + "type": "object", + "properties": { + "until": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "reason", + "until" + ] + } + }, + "additionalProperties": false, + "required": [ + "disabled", + "is_disabled" + ] }, - "data": { - "$ref": "#/definitions/Message" + "scheduled": { + "type": "object", + "properties": { + "is_disabled": { + "type": "boolean" + }, + "disabled": { + "type": "object", + "properties": { + "until": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "reason", + "until" + ] + } + }, + "additionalProperties": false, + "required": [ + "disabled", + "is_disabled" + ] } }, "additionalProperties": false, "required": [ - "data", - "type" + "regular", + "scheduled" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InteractionCreateSchema": { + "SubaccountSendingLimitResponse": { "type": "object", "properties": { - "version": { + "limit": { "type": "integer" }, - "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```", - "type": "string" - }, - "application_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```", - "type": "string" - }, - "type": { - "$ref": "#/definitions/InteractionType" - }, - "token": { - "type": "string" - }, - "data": { - "type": "object", - "properties": {}, - "additionalProperties": true - }, - "guild": { - "$ref": "#/definitions/InteractionGuild" - }, - "guild_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```", - "type": "string" + "current": { + "type": "integer" }, - "guild_locale": { + "period": { "type": "string" - }, - "channel": { - "$ref": "#/definitions/Channel" - }, - "channel_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```", - "type": "string" - }, - "member": { - "$ref": "#/definitions/PublicMember" - }, - "user": { - "$ref": "#/definitions/PublicUser" - }, - "locale": { - "type": "string" - }, - "message": { - "$ref": "#/definitions/Message" - }, - "app_permissions": { - "type": "string" - }, - "entitlements": { - "type": "array", - "items": { - "type": "object", - "properties": {}, - "additionalProperties": true - } - }, - "entitlement_sku_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "authorizing_integration_owners": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "type": "string" - } - } - }, - "context": { - "type": "integer" - }, - "attachment_size_limit": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "app_permissions", - "application_id", - "attachment_size_limit", - "id", - "token", - "type", - "version" + "current", + "limit", + "period" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ApplicationCreateSchema": { + "SubaccountSetSendingLimitResponse": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "team_id": { - "type": "string" + "success": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "name" + "success" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ApplicationModifySchema": { + "SubaccountDestroyResponse": { "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": { + "message": { "type": "string" } }, "additionalProperties": false, + "required": [ + "message" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "SendableApplicationCommandDataSchema": { + "ActivateDomainKeyResponse": { "type": "object", "properties": { - "id": { - "$ref": "#/definitions/Snowflake" - }, - "type": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "number" - }, - "name": { + "message": { "type": "string" }, - "version": { - "$ref": "#/definitions/Snowflake" - }, - "application_command": { - "type": "object", - "properties": {}, - "additionalProperties": true + "authority": { + "type": "string" }, - "options": { - "type": "array", - "items": { - "$ref": "#/definitions/ApplicationCommandOption" - } + "selector": { + "type": "string" }, - "target_id": { - "description": "A container for useful snowflake-related methods.", - "$ref": "#/definitions/Snowflake" + "active": { + "type": "boolean" }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": {}, - "additionalProperties": true - } + "status": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "id", - "name", - "version" + "active", + "authority", + "message", + "selector", + "status" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "SendableMessageComponentDataSchema": { + "DeactivateDomainKeyResponse": { "type": "object", "properties": { - "component_type": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8 - ], - "type": "number" + "message": { + "type": "string" }, - "type": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "number" + "authority": { + "type": "string" }, - "custom_id": { + "selector": { "type": "string" }, - "values": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/Snowflake" - } - } - ] + "active": { + "type": "boolean" + }, + "status": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "custom_id" + "active", + "authority", + "message", + "selector", + "status" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "SendableModalSubmitDataSchema": { + "FieldErrorResponse": { "type": "object", "properties": { - "id": { - "$ref": "#/definitions/Snowflake" + "code": { + "type": "integer" }, - "custom_id": { + "message": { "type": "string" }, - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/UploadAttachmentRequestSchema" - } + "errors": { + "$ref": "#/definitions/ErrorList" } }, "additionalProperties": false, "required": [ - "custom_id", - "id" + "code", + "errors", + "message" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildProfileResponse": { + "AbuseIpDbBlacklistResponse": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" + "meta": { + "type": "object", + "properties": { + "generatedAt": { + "type": "string", + "default": "2020-09-24T19:54:11+00:00" + } + }, + "additionalProperties": false, + "required": [ + "generatedAt" + ] }, - "icon_hash": { - "type": [ - "null", - "string" + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ipAddress": { + "type": "string", + "default": "5.188.10.179" + }, + "abuseConfidenceScore": { + "type": "integer", + "default": 100 + }, + "lastReportedAt": { + "type": "string", + "default": "2020-09-24T19:17:02+00:00" + } + }, + "additionalProperties": false, + "required": [ + "abuseConfidenceScore", + "ipAddress", + "lastReportedAt" + ] + }, + "default": [ + { + "ipAddress": "5.188.10.179", + "abuseConfidenceScore": 100, + "lastReportedAt": "2020-09-24T19:17:02+00:00" + }, + { + "ipAddress": "185.222.209.14", + "abuseConfidenceScore": 100, + "lastReportedAt": "2020-09-24T19:17:02+00:00" + }, + { + "ipAddress": "191.96.249.183", + "abuseConfidenceScore": 100, + "lastReportedAt": "2020-09-24T19:17:01+00:00" + } ] + } + }, + "additionalProperties": false, + "required": [ + "data", + "meta" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InteractionSchema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/InteractionType" }, - "member_count": { - "type": "integer" - }, - "online_count": { - "type": "integer" - }, - "description": { + "application_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```", "type": "string" }, - "brand_color_primary": { + "guild_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```", "type": "string" }, - "banner_hash": { - "type": [ - "null", - "string" - ] - }, - "game_application_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "game_activity": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/GameActivity" - } - }, - "tag": { - "type": [ - "null", - "string" - ] - }, - "badge": { - "$ref": "#/definitions/GuildBadgeType" - }, - "badge_color_primary": { + "channel_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```", "type": "string" }, - "badge_color_secondary": { + "message_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```", "type": "string" }, - "badge_hash": { + "message_flags": { + "type": "integer" + }, + "session_id": { "type": "string" }, - "traits": { - "type": "array", - "items": { - "$ref": "#/definitions/GuildTrait" - } + "data": { + "$ref": "#/definitions/InteractionData" }, - "features": { + "files": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": {}, + "additionalProperties": true } }, - "visibility": { - "$ref": "#/definitions/GuildVisibilityLevel" + "nonce": { + "type": "string" }, - "custom_banner_hash": { - "type": [ - "null", - "string" - ] + "analytics_location": { + "type": "string" }, - "premium_subscription_count": { - "type": "integer" + "section_name": { + "type": "string" }, - "premium_tier": { - "type": "integer" + "source": { + "type": "string" } }, "additionalProperties": false, "required": [ - "badge", - "badge_color_primary", - "badge_color_secondary", - "badge_hash", - "banner_hash", - "brand_color_primary", - "custom_banner_hash", - "description", - "features", - "game_activity", - "game_application_ids", - "icon_hash", - "id", - "member_count", - "name", - "online_count", - "premium_subscription_count", - "premium_tier", - "tag", - "traits", - "visibility" + "application_id", + "channel_id", + "data", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildAvailableSchema": { + "InteractionCallbackSchema": { "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```", - "type": "string" + "type": { + "$ref": "#/definitions/InteractionCallbackType" }, - "available": { - "type": "boolean" + "data": { + "$ref": "#/definitions/Message" } }, "additionalProperties": false, "required": [ - "available", - "id" + "data", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InstanceUserDeleteSchema": { - "$ref": "#/definitions/InstanceUserDeleteSchemaContent", - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserSettingsUpdateSchema": { + "InteractionCreateSchema": { "type": "object", "properties": { - "afk_timeout": { + "version": { "type": "integer" }, - "allow_accessibility_detection": { - "type": "boolean" - }, - "animate_emoji": { - "type": "boolean" + "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```", + "type": "string" }, - "animate_stickers": { - "type": "integer" + "application_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```", + "type": "string" }, - "contact_sync_enabled": { - "type": "boolean" + "type": { + "$ref": "#/definitions/InteractionType" }, - "convert_emoticons": { - "type": "boolean" + "token": { + "type": "string" }, - "custom_status": { - "anyOf": [ - { - "$ref": "#/definitions/CustomStatus" - }, - { - "type": "null" - } - ] + "data": { + "type": "object", + "properties": {}, + "additionalProperties": true }, - "default_guilds_restricted": { - "type": "boolean" + "guild": { + "$ref": "#/definitions/InteractionGuild" }, - "detect_platform_accounts": { - "type": "boolean" + "guild_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```", + "type": "string" }, - "developer_mode": { - "type": "boolean" + "guild_locale": { + "type": "string" }, - "disable_games_tab": { - "type": "boolean" + "channel": { + "$ref": "#/definitions/Channel" }, - "enable_tts_command": { - "type": "boolean" + "channel_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```", + "type": "string" }, - "explicit_content_filter": { - "type": "integer" + "member": { + "$ref": "#/definitions/PublicMember" }, - "friend_discovery_flags": { - "type": "integer" + "user": { + "$ref": "#/definitions/PublicUser" }, - "friend_source_flags": { - "$ref": "#/definitions/FriendSourceFlags" + "locale": { + "type": "string" }, - "gateway_connected": { - "type": "boolean" + "message": { + "$ref": "#/definitions/Message" }, - "gif_auto_play": { - "type": "boolean" + "app_permissions": { + "type": "string" }, - "guild_folders": { + "entitlements": { "type": "array", "items": { - "$ref": "#/definitions/GuildFolder" + "type": "object", + "properties": {}, + "additionalProperties": true } }, - "guild_positions": { + "entitlement_sku_ids": { "type": "array", "items": { "type": "string" } }, - "inline_attachment_media": { - "type": "boolean" - }, - "inline_embed_media": { - "type": "boolean" - }, - "locale": { - "type": "string" - }, - "message_display_compact": { - "type": "boolean" - }, - "native_phone_integration_enabled": { - "type": "boolean" - }, - "render_embeds": { - "type": "boolean" - }, - "render_reactions": { - "type": "boolean" - }, - "restricted_guilds": { - "type": "array", - "items": { - "type": "string" + "authorizing_integration_owners": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "string" + } } }, - "show_current_game": { - "type": "boolean" + "context": { + "type": "integer" }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], + "attachment_size_limit": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "app_permissions", + "application_id", + "attachment_size_limit", + "id", + "token", + "type", + "version" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationCreateSchema": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "stream_notifications_enabled": { - "type": "boolean" - }, - "theme": { - "enum": [ - "dark", - "light" - ], + "team_id": { "type": "string" - }, - "timezone_offset": { - "type": "integer" - }, - "view_nsfw_guilds": { - "type": "boolean" } }, "additionalProperties": false, + "required": [ + "name" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserSettingsSchema": { + "ApplicationModifySchema": { "type": "object", "properties": { - "afk_timeout": { - "type": "integer" + "description": { + "type": "string" }, - "allow_accessibility_detection": { - "type": "boolean" + "icon": { + "type": "string" }, - "animate_emoji": { - "type": "boolean" + "cover_image": { + "type": "string" }, - "animate_stickers": { - "type": "integer" + "interactions_endpoint_url": { + "type": "string" }, - "contact_sync_enabled": { - "type": "boolean" + "max_participants": { + "type": [ + "null", + "integer" + ] }, - "convert_emoticons": { - "type": "boolean" + "name": { + "type": "string" }, - "custom_status": { - "anyOf": [ - { - "$ref": "#/definitions/CustomStatus" - }, - { - "type": "null" - } - ] + "privacy_policy_url": { + "type": "string" }, - "default_guilds_restricted": { - "type": "boolean" + "role_connections_verification_url": { + "type": "string" }, - "detect_platform_accounts": { - "type": "boolean" + "tags": { + "type": "array", + "items": { + "type": "string" + } }, - "developer_mode": { - "type": "boolean" + "terms_of_service_url": { + "type": "string" }, - "disable_games_tab": { + "bot_public": { "type": "boolean" }, - "enable_tts_command": { + "bot_require_code_grant": { "type": "boolean" }, - "explicit_content_filter": { + "flags": { "type": "integer" }, - "friend_discovery_flags": { - "type": "integer" + "custom_install_url": { + "type": "string" }, - "friend_source_flags": { - "$ref": "#/definitions/FriendSourceFlags" + "guild_id": { + "type": "string" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SendableApplicationCommandDataSchema": { + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/Snowflake" }, - "gateway_connected": { - "type": "boolean" + "type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" }, - "gif_auto_play": { - "type": "boolean" + "name": { + "type": "string" }, - "guild_folders": { + "version": { + "$ref": "#/definitions/Snowflake" + }, + "application_command": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "options": { "type": "array", "items": { - "$ref": "#/definitions/GuildFolder" + "$ref": "#/definitions/ApplicationCommandOption" } }, - "guild_positions": { + "target_id": { + "description": "A container for useful snowflake-related methods.", + "$ref": "#/definitions/Snowflake" + }, + "attachments": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": {}, + "additionalProperties": true } + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "version" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SendableMessageComponentDataSchema": { + "type": "object", + "properties": { + "component_type": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "type": "number" }, - "inline_attachment_media": { - "type": "boolean" - }, - "inline_embed_media": { - "type": "boolean" + "type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" }, - "locale": { + "custom_id": { "type": "string" }, - "message_display_compact": { - "type": "boolean" - }, - "native_phone_integration_enabled": { - "type": "boolean" - }, - "render_embeds": { - "type": "boolean" + "values": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/Snowflake" + } + } + ] + } + }, + "additionalProperties": false, + "required": [ + "custom_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SendableModalSubmitDataSchema": { + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/Snowflake" }, - "render_reactions": { - "type": "boolean" + "custom_id": { + "type": "string" }, - "restricted_guilds": { + "attachments": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/UploadAttachmentRequestSchema" } - }, - "show_current_game": { - "type": "boolean" - }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], - "type": "string" - }, - "stream_notifications_enabled": { - "type": "boolean" - }, - "theme": { - "enum": [ - "dark", - "light" - ], - "type": "string" - }, - "timezone_offset": { - "type": "integer" - }, - "view_nsfw_guilds": { - "type": "boolean" } }, "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" + "custom_id", + "id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "IdentifySchema": { + "QuestRewardSchema": { "type": "object", "properties": { - "token": { + "type": { + "$ref": "#/definitions/QuestRewardType" + }, + "sku_id": { "type": "string" }, - "properties": { + "asset": { + "type": "string" + }, + "asset_video": { + "type": [ + "null", + "string" + ] + }, + "messages": { "type": "object", "properties": { - "os": { - "type": "string" - }, - "os_atch": { - "type": "string" - }, - "browser": { - "type": "string" - }, - "device": { - "type": "string" - }, - "$os": { - "type": "string" - }, - "$browser": { - "type": "string" - }, - "$device": { - "type": "string" - }, - "browser_user_agent": { - "type": "string" - }, - "browser_version": { - "type": "string" - }, - "os_version": { - "type": "string" - }, - "referrer": { - "type": "string" - }, - "referring_domain": { - "type": "string" - }, - "referrer_current": { - "type": "string" - }, - "referring_domain_current": { - "type": "string" - }, - "release_channel": { - "enum": [ - "canary", - "dev", - "ptb", - "stable" - ], - "type": "string" - }, - "client_build_number": { - "type": "integer" - }, - "client_event_source": { + "name": { "type": "string" }, - "client_version": { + "name_with_article": { "type": "string" }, - "system_locale": { - "type": "string" + "redemption_instructions_by_platform": { + "$ref": "#/definitions/Record" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "name", + "name_with_article", + "redemption_instructions_by_platform" + ] }, - "intents": { - "type": "bigint" + "approximate_count": { + "type": [ + "null", + "integer" + ] }, - "presence": { - "$ref": "#/definitions/ActivitySchema" + "redemption_link": { + "type": [ + "null", + "string" + ] }, - "compress": { - "type": "boolean" + "expires_at": { + "type": [ + "null", + "string" + ] }, - "large_threshold": { + "expires_at_premium": { + "type": [ + "null", + "string" + ] + }, + "expiration_mode": { + "enum": [ + 1, + 2, + 3 + ], + "type": "number" + }, + "orb_quantity": { "type": "integer" }, - "largeThreshold": { + "quantity": { "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "messages", + "sku_id", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestRewardConfigSchema": { + "type": "object", + "properties": { + "assignment_method": { + "$ref": "#/definitions/QuestAssignmentMethod" }, - "shard": { - "minItems": 2, - "maxItems": 2, + "platforms": { "type": "array", "items": { - "type": "bigint" + "$ref": "#/definitions/QuestPlatformType" } }, - "guild_subscriptions": { - "type": "boolean" + "rewards": { + "type": "array", + "items": { + "$ref": "#/definitions/QuestRewardSchema" + } }, - "capabilities": { - "type": "integer" + "rewards_expire_at": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "assignment_method", + "platforms", + "rewards", + "rewards_expire_at" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestApplicationSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "client_state": { - "type": "object", - "properties": { - "guild_hashes": {}, - "highest_last_message_id": { - "type": "integer" - }, - "read_state_version": { - "type": "integer" - }, - "user_guild_settings_version": { - "type": "integer" - }, - "user_settings_version": { - "type": "integer" - }, - "useruser_guild_settings_version": { - "type": "integer" - }, - "private_channels_version": { - "type": "integer" - }, - "guild_versions": {}, - "api_code_version": { - "type": "integer" - }, - "initial_guild_id": { - "type": "string" - } - }, - "additionalProperties": false - }, - "clientState": { - "type": "object", - "properties": { - "guildHashes": {}, - "highestLastMessageId": { - "type": "integer" - }, - "readStateVersion": { - "type": "integer" - }, - "userGuildSettingsVersion": { - "type": "integer" - }, - "useruserGuildSettingsVersion": { - "type": "integer" - }, - "guildVersions": {}, - "apiCodeVersion": { - "type": "integer" - }, - "initialGuildId": { - "type": "string" - } - }, - "additionalProperties": false + "link": { + "type": "string" }, - "v": { - "type": "integer" + "name": { + "type": "string" } }, "additionalProperties": false, "required": [ - "properties", - "token" + "id", + "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "StreamCreateSchema": { + "QuestVideoAssetSchema": { "type": "object", "properties": { - "type": { - "enum": [ - "call", - "guild" - ], + "url": { "type": "string" }, - "channel_id": { - "type": "string" + "width": { + "type": "integer" }, - "guild_id": { - "type": "string" + "height": { + "type": "integer" }, - "preferred_region": { + "thumbnail": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "channel_id", - "type" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "StreamDeleteSchema": { - "type": "object", - "properties": { - "stream_key": { + }, + "caption": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "stream_key" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "StreamWatchSchema": { - "type": "object", - "properties": { - "stream_key": { + }, + "transcript": { "type": "string" } }, "additionalProperties": false, "required": [ - "stream_key" + "height", + "thumbnail", + "url", + "width" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIErrorResponse": { + "QuestTaskSchema": { "type": "object", "properties": { - "code": { - "type": "integer" + "type": { + "$ref": "#/definitions/QuestEventType" }, - "message": { - "type": "string" + "target": { + "type": "integer" }, - "errors": { + "assets": { "type": "object", - "additionalProperties": { + "properties": { + "video": { + "$ref": "#/definitions/QuestVideoAssetSchema" + }, + "video_low_res": { + "$ref": "#/definitions/QuestVideoAssetSchema" + }, + "video_hls": { + "$ref": "#/definitions/QuestVideoAssetSchema" + } + }, + "additionalProperties": false, + "required": [ + "video" + ] + }, + "applications": { + "type": "array", + "items": { "type": "object", "properties": { - "_errors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "code": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "message" - ] - } + "id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "_errors" + "id" ] } - } - }, - "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" - } - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "AccountStandingResponse": { - "type": "object", - "properties": { - "classifications": { - "type": "array", - "items": { - "$ref": "#/definitions/Classification" - } }, - "guild_classifications": { + "external_ids": { "type": "array", "items": { - "$ref": "#/definitions/GuildClassification" + "type": "string" } }, - "account_standing": { + "messages": { "type": "object", "properties": { - "state": { - "$ref": "#/definitions/AccountStandingState" + "video_title": { + "type": "string" + }, + "task_title": { + "type": "string" + }, + "task_description": { + "type": "string" } }, - "additionalProperties": false, - "required": [ - "state" - ] - }, - "is_dsa_eligible": { - "type": "boolean" - }, - "username": { - "type": "string" + "additionalProperties": false }, - "discriminator": { + "event_name": { "type": "string" - }, - "is_appeal_eligible": { - "type": "boolean" - }, - "appeal_eligibility": { - "type": "array", - "items": { - "$ref": "#/definitions/AppealEligibility" - } } }, "additionalProperties": false, "required": [ - "account_standing", - "appeal_eligibility", - "classifications", - "discriminator", - "guild_classifications", - "is_appeal_eligible", - "is_dsa_eligible", - "username" + "target", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "BackupCodesChallengeResponse": { + "QuestTaskConfigV2Schema": { "type": "object", "properties": { - "nonce": { - "type": "string" + "join_operator": { + "$ref": "#/definitions/QuestJoinOperator" }, - "regenerate_nonce": { - "type": "string" + "tasks": { + "$ref": "#/definitions/Partial>" } }, "additionalProperties": false, "required": [ - "nonce", - "regenerate_nonce" + "join_operator", + "tasks" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CollectiblesCategoriesResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/CollectiblesCategoryItem" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "CollectiblesMarketingResponse": { + "QuestConfigSchema": { "type": "object", "properties": { - "marketings": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CollectiblesMarketingItem" + "id": { + "type": "string" + }, + "config_version": { + "type": "integer" + }, + "starts_at": { + "type": "string" + }, + "expires_at": { + "type": "string" + }, + "features": { + "type": "array", + "items": { + "$ref": "#/definitions/QuestFeature" } + }, + "application": { + "$ref": "#/definitions/QuestApplicationSchema" + }, + "assets": { + "type": "object", + "properties": { + "hero": { + "type": [ + "null", + "string" + ] + }, + "hero_video": { + "type": [ + "null", + "string" + ] + }, + "quest_bar_hero": { + "type": [ + "null", + "string" + ] + }, + "quest_bar_hero_video": { + "type": [ + "null", + "string" + ] + }, + "game_tile": { + "type": [ + "null", + "string" + ] + }, + "game_tile_dark": { + "type": [ + "null", + "string" + ] + }, + "game_tile_light": { + "type": [ + "null", + "string" + ] + }, + "logotype": { + "type": [ + "null", + "string" + ] + }, + "logotype_dark": { + "type": [ + "null", + "string" + ] + }, + "logotype_light": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "game_tile", + "game_tile_dark", + "game_tile_light", + "hero", + "logotype", + "logotype_dark", + "logotype_light", + "quest_bar_hero" + ] + }, + "colors": { + "type": "object", + "properties": { + "primary": { + "type": "string" + }, + "secondary": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "primary", + "secondary" + ] + }, + "messages": { + "type": "object", + "properties": { + "quest_name": { + "type": "string" + }, + "game_title": { + "type": "string" + }, + "game_publisher": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "game_publisher", + "game_title", + "quest_name" + ] + }, + "task_config": {}, + "task_config_v2": { + "$ref": "#/definitions/QuestTaskConfigV2Schema" + }, + "rewards_config": { + "$ref": "#/definitions/QuestRewardConfigSchema" + }, + "share_policy": { + "$ref": "#/definitions/QuestSharePolicy" + }, + "cta_config": { + "type": "object", + "properties": { + "button_label": { + "type": "string" + }, + "link": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "android": { + "type": "object", + "properties": { + "android_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "android_app_id" + ] + }, + "ios": { + "type": "object", + "properties": { + "ios_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ios_app_id" + ] + } + }, + "additionalProperties": false, + "required": [ + "button_label", + "link" + ] } }, "additionalProperties": false, "required": [ - "marketings" + "application", + "assets", + "colors", + "config_version", + "cta_config", + "expires_at", + "features", + "id", + "messages", + "rewards_config", + "share_policy", + "starts_at", + "task_config_v2" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CollectiblesShopResponse": { + "QuestUserStatusProgressSchema": { "type": "object", "properties": { - "shop_blocks": { - "type": "array", - "items": { - "$ref": "#/definitions/AnyShopBlock" - } + "value": { + "type": "integer" }, - "categories": { - "type": "array", - "items": { - "$ref": "#/definitions/CollectiblesCategoryItem" - } + "event_name": { + "$ref": "#/definitions/QuestEventType" + }, + "updated_at": { + "type": "string" + }, + "completed_at": { + "type": [ + "null", + "string" + ] + }, + "heartbeat": { + "anyOf": [ + { + "type": "object", + "properties": { + "last_beat_at": { + "type": "string" + }, + "expires_at": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "expires_at", + "last_beat_at" + ] + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "required": [ - "categories", - "shop_blocks" + "completed_at", + "event_name", + "heartbeat", + "updated_at", + "value" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "DiscoverableGuildsResponse": { + "QuestUserStatusSchema": { "type": "object", "properties": { - "total": { - "type": "integer" + "user_id": { + "type": "string" }, - "guilds": { - "type": "array", - "items": { - "$ref": "#/definitions/Guild" - } + "quest_id": { + "type": "string" }, - "offset": { + "enrolled_at": { + "type": [ + "null", + "string" + ] + }, + "completed_at": { + "type": [ + "null", + "string" + ] + }, + "claimed_at": { + "type": [ + "null", + "string" + ] + }, + "claimed_tier": { + "type": [ + "null", + "integer" + ] + }, + "last_stream_heartbeat_at": { + "type": [ + "null", + "string" + ] + }, + "stream_progress_seconds": { "type": "integer" }, - "limit": { + "dismissed_quest_content": { "type": "integer" + }, + "progress": { + "$ref": "#/definitions/Record" } }, "additionalProperties": false, "required": [ - "guilds", - "limit", - "offset", - "total" + "claimed_at", + "completed_at", + "enrolled_at", + "quest_id", + "stream_progress_seconds", + "user_id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "DmMessagesResponseSchema": { - "type": "array", - "items": { - "$ref": "#/definitions/PartialMessage" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "EmailDomainLookupResponse": { + "ClaimedQuestSchema": { "type": "object", "properties": { - "guilds_info": { - "type": "array", - "items": { - "$ref": "#/definitions/HubGuild" - } + "id": { + "type": "string" }, - "has_matching_guild": { - "type": "boolean" + "config": { + "$ref": "#/definitions/QuestConfigSchema" + }, + "user_status": { + "$ref": "#/definitions/QuestUserStatusSchema" } }, "additionalProperties": false, "required": [ - "guilds_info", - "has_matching_guild" + "config", + "id", + "user_status" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmailDomainLookupVerifyCodeResponse": { + "QuestAdIdentifiersSchema": { "type": "object", "properties": { - "guild": { - "$ref": "#/definitions/Guild" + "campaign_id": { + "type": "string" }, - "joined": { + "ad_set_id": { + "type": "string" + }, + "ad_id": { + "type": "string" + }, + "creative_id": { + "type": "string" + }, + "creative_type": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ad_id", + "ad_set_id", + "campaign_id", + "creative_id", + "creative_type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestClaimRewardRequestSchema": { + "type": "object", + "properties": { + "location": { + "type": "integer" + }, + "platform": { + "$ref": "#/definitions/QuestPlatformType" + } + }, + "additionalProperties": false, + "required": [ + "location", + "platform" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestEnrollRequestSchema": { + "type": "object", + "properties": { + "location": { + "type": "integer" + }, + "is_targeted": { "type": "boolean" + }, + "metadata_raw": { + "type": [ + "null", + "string" + ] + }, + "metadata_sealed": { + "type": [ + "null", + "string" + ] } }, "additionalProperties": false, "required": [ - "guild", - "joined" + "location" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmojiSourceResponse": { + "QuestEntitlementExpirationMetadataSchema": { "type": "object", "properties": { - "type": { - "enum": [ - "APPLICATION", - "GUILD" - ], + "extended": { + "type": "boolean" + }, + "extendable": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "extendable", + "extended" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestRewardCodeSchema": { + "type": "object", + "properties": { + "quest_id": { "type": "string" }, - "guild": { - "anyOf": [ - { - "$ref": "#/definitions/EmojiGuild" - }, - { - "type": "null" - } - ] + "code": { + "type": "string" }, - "application": { - "anyOf": [ - { - "$ref": "#/definitions/EmojiApplication" - }, - { - "type": "null" - } + "platform": { + "$ref": "#/definitions/QuestPlatformType" + }, + "user_id": { + "type": "string" + }, + "claimed_at": { + "type": "string" + }, + "tier": { + "type": [ + "null", + "integer" ] } }, "additionalProperties": false, "required": [ - "type" + "claimed_at", + "code", + "platform", + "quest_id", + "tier", + "user_id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GatewayBotResponse": { + "QuestSchema": { "type": "object", "properties": { - "url": { + "id": { "type": "string" }, - "shards": { - "type": "integer" + "config": { + "$ref": "#/definitions/QuestConfigSchema" }, - "session_start_limit": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "remaining": { - "type": "integer" - }, - "reset_after": { - "type": "integer" + "preview": { + "type": "boolean" + }, + "targeted_content": { + "type": "array", + "items": {} + }, + "user_status": { + "anyOf": [ + { + "$ref": "#/definitions/QuestUserStatusSchema" }, - "max_concurrency": { - "type": "integer" + { + "type": "null" } - }, - "additionalProperties": false, - "required": [ - "max_concurrency", - "remaining", - "reset_after", - "total" ] } }, "additionalProperties": false, "required": [ - "session_start_limit", - "shards", - "url" + "config", + "id", + "preview", + "targeted_content", + "user_status" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GatewayResponse": { + "QuestVideoProgressRequestSchema": { "type": "object", "properties": { - "url": { - "type": "string" + "timestamp": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "url" + "timestamp" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GenerateRegistrationTokensResponse": { + "EntitlementQuestRewardMetadataSchema": { "type": "object", "properties": { - "tokens": { - "type": "array", - "items": { - "type": "string" - } + "tag": { + "$ref": "#/definitions/QuestRewardType" + }, + "reward_code": { + "$ref": "#/definitions/QuestRewardCodeSchema" } }, "additionalProperties": false, "required": [ - "tokens" + "tag" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildBansResponse": { + "EntitlementTenantMetadataSchema": { "type": "object", "properties": { - "reason": { - "type": [ - "null", - "string" - ] - }, - "user": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "id": { - "type": "string" - }, - "avatar": { - "type": [ - "null", - "string" - ] - }, - "public_flags": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "avatar", - "discriminator", - "id", - "public_flags", - "username" - ] + "quest_rewards": { + "$ref": "#/definitions/EntitlementQuestRewardMetadataSchema" } }, "additionalProperties": false, "required": [ - "reason", - "user" + "quest_rewards" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildCreateResponse": { + "EntitlementSchema": { "type": "object", "properties": { "id": { "type": "string" }, - "name": { - "type": "string" + "type": { + "$ref": "#/definitions/EntitlementType" }, - "primary_category_id": { + "sku_id": { "type": "string" }, - "large": { - "type": "boolean" - }, - "max_members": { - "type": "integer" - }, - "max_presences": { - "type": "integer" - }, - "max_video_channel_users": { - "type": "integer" - }, - "member_count": { - "type": "integer" - }, - "presence_count": { - "type": "integer" - }, - "template_id": { + "application_id": { "type": "string" }, - "mfa_level": { - "type": "integer" - }, - "owner_id": { + "user_id": { "type": "string" }, - "premium_subscription_count": { - "type": "integer" - }, - "premium_tier": { - "type": "integer" + "user": { + "$ref": "#/definitions/Partial" }, - "welcome_screen": { - "$ref": "#/definitions/GuildWelcomeScreen" + "guild_id": { + "type": "string" }, - "widget_channel_id": { + "parent_id": { "type": "string" }, - "widget_enabled": { + "deleted": { "type": "boolean" }, - "nsfw_level": { - "type": "integer" - }, - "nsfw": { + "consumed": { "type": "boolean" }, - "parent": { - "type": "string" + "branches": { + "type": "array", + "items": { + "type": "string" + } }, - "region": { - "type": "string" + "starts_at": { + "type": [ + "null", + "string" + ] }, - "icon": { + "ends_at": { "type": [ "null", "string" ] }, - "banner": { + "promotion_id": { "type": [ "null", "string" ] }, - "system_channel_id": { + "subscription_id": { "type": "string" }, - "rules_channel_id": { + "gift_code_flags": { + "type": "bigint" + }, + "gift_code_batch_id": { "type": "string" }, - "guild_template_code": { + "gifter_user_id": { "type": "string" }, - "staff_only": { - "type": "boolean" + "gift_style": { + "enum": [ + 1, + 10, + 11, + 12, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "type": "number" }, - "splash": { + "fulfillment_status": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "type": "number" + }, + "fulfilled_at": { + "type": "string" + }, + "source_type": { + "enum": [ + 1, + 11, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "type": "number" + }, + "tenant_metadata": { + "$ref": "#/definitions/Record" + }, + "sku": { + "$ref": "#/definitions/SKU" + }, + "subscription_plan": { + "$ref": "#/definitions/Partial" + } + }, + "additionalProperties": false, + "required": [ + "application_id", + "deleted", + "ends_at", + "gift_code_flags", + "id", + "promotion_id", + "sku_id", + "starts_at", + "type", + "user_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildProfileResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "icon_hash": { "type": [ "null", "string" ] }, + "member_count": { + "type": "integer" + }, + "online_count": { + "type": "integer" + }, "description": { "type": "string" }, - "features": { + "brand_color_primary": { + "type": "string" + }, + "banner_hash": { + "type": [ + "null", + "string" + ] + }, + "game_application_ids": { "type": "array", "items": { "type": "string" } }, - "verification_level": { - "type": "integer" - }, - "default_message_notifications": { - "type": "integer" + "game_activity": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/GameActivity" + } }, - "system_channel_flags": { - "type": "integer" + "tag": { + "type": [ + "null", + "string" + ] }, - "explicit_content_filter": { - "type": "integer" + "badge": { + "$ref": "#/definitions/GuildBadgeType" }, - "public_updates_channel_id": { + "badge_color_primary": { "type": "string" }, - "afk_timeout": { - "type": "integer" - }, - "afk_channel_id": { + "badge_color_secondary": { "type": "string" }, - "preferred_locale": { + "badge_hash": { "type": "string" }, - "premium_progress_bar_enabled": { - "type": "boolean" + "traits": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildTrait" + } }, - "discovery_splash": { - "type": "string" + "features": { + "type": "array", + "items": { + "type": "string" + } }, - "safety_alerts_channel_id": { + "visibility": { + "$ref": "#/definitions/GuildVisibilityLevel" + }, + "custom_banner_hash": { "type": [ "null", "string" ] + }, + "premium_subscription_count": { + "type": "integer" + }, + "premium_tier": { + "type": "integer" } }, "additionalProperties": false, "required": [ + "badge", + "badge_color_primary", + "badge_color_secondary", + "badge_hash", + "banner_hash", + "brand_color_primary", + "custom_banner_hash", + "description", + "features", + "game_activity", + "game_application_ids", + "icon_hash", "id", + "member_count", "name", - "nsfw", - "welcome_screen", - "widget_enabled" + "online_count", + "premium_subscription_count", + "premium_tier", + "tag", + "traits", + "visibility" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildDiscoveryRequirementsResponse": { + "GuildAvailableSchema": { "type": "object", "properties": { - "guild_id": { + "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```", "type": "string" }, - "safe_environment": { + "available": { "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "available", + "id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InstanceUserDeleteSchema": { + "$ref": "#/definitions/InstanceUserDeleteSchemaContent", + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserSettingsUpdateSchema": { + "type": "object", + "properties": { + "afk_timeout": { + "type": "integer" }, - "healthy": { + "allow_accessibility_detection": { "type": "boolean" }, - "health_score_pending": { + "animate_emoji": { "type": "boolean" }, - "size": { - "type": "boolean" + "animate_stickers": { + "type": "integer" }, - "nsfw_properties": {}, - "protected": { + "contact_sync_enabled": { "type": "boolean" }, - "sufficient": { + "convert_emoticons": { "type": "boolean" }, - "sufficient_without_grace_period": { + "custom_status": { + "anyOf": [ + { + "$ref": "#/definitions/CustomStatus" + }, + { + "type": "null" + } + ] + }, + "default_guilds_restricted": { "type": "boolean" }, - "valid_rules_channel": { + "detect_platform_accounts": { "type": "boolean" }, - "retention_healthy": { + "developer_mode": { "type": "boolean" }, - "engagement_healthy": { + "disable_games_tab": { "type": "boolean" }, - "age": { + "enable_tts_command": { "type": "boolean" }, - "minimum_age": { + "explicit_content_filter": { "type": "integer" }, - "health_score": { - "type": "object", - "properties": { - "avg_nonnew_participators": { - "type": "integer" - }, - "avg_nonnew_communicators": { - "type": "integer" - }, - "num_intentful_joiners": { - "type": "integer" - }, - "perc_ret_w1_intentful": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "avg_nonnew_communicators", - "avg_nonnew_participators", - "num_intentful_joiners", - "perc_ret_w1_intentful" - ] - }, - "minimum_size": { + "friend_discovery_flags": { "type": "integer" - } + }, + "friend_source_flags": { + "$ref": "#/definitions/FriendSourceFlags" + }, + "gateway_connected": { + "type": "boolean" + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildFolder" + } + }, + "guild_positions": { + "type": "array", + "items": { + "type": "string" + } + }, + "inline_attachment_media": { + "type": "boolean" + }, + "inline_embed_media": { + "type": "boolean" + }, + "locale": { + "type": "string" + }, + "message_display_compact": { + "type": "boolean" + }, + "native_phone_integration_enabled": { + "type": "boolean" + }, + "render_embeds": { + "type": "boolean" + }, + "render_reactions": { + "type": "boolean" + }, + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } + }, + "show_current_game": { + "type": "boolean" + }, + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], + "type": "string" + }, + "stream_notifications_enabled": { + "type": "boolean" + }, + "theme": { + "enum": [ + "dark", + "light" + ], + "type": "string" + }, + "timezone_offset": { + "type": "integer" + }, + "view_nsfw_guilds": { + "type": "boolean" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserSettingsSchema": { + "type": "object", + "properties": { + "afk_timeout": { + "type": "integer" + }, + "allow_accessibility_detection": { + "type": "boolean" + }, + "animate_emoji": { + "type": "boolean" + }, + "animate_stickers": { + "type": "integer" + }, + "contact_sync_enabled": { + "type": "boolean" + }, + "convert_emoticons": { + "type": "boolean" + }, + "custom_status": { + "anyOf": [ + { + "$ref": "#/definitions/CustomStatus" + }, + { + "type": "null" + } + ] + }, + "default_guilds_restricted": { + "type": "boolean" + }, + "detect_platform_accounts": { + "type": "boolean" + }, + "developer_mode": { + "type": "boolean" + }, + "disable_games_tab": { + "type": "boolean" + }, + "enable_tts_command": { + "type": "boolean" + }, + "explicit_content_filter": { + "type": "integer" + }, + "friend_discovery_flags": { + "type": "integer" + }, + "friend_source_flags": { + "$ref": "#/definitions/FriendSourceFlags" + }, + "gateway_connected": { + "type": "boolean" + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildFolder" + } + }, + "guild_positions": { + "type": "array", + "items": { + "type": "string" + } + }, + "inline_attachment_media": { + "type": "boolean" + }, + "inline_embed_media": { + "type": "boolean" + }, + "locale": { + "type": "string" + }, + "message_display_compact": { + "type": "boolean" + }, + "native_phone_integration_enabled": { + "type": "boolean" + }, + "render_embeds": { + "type": "boolean" + }, + "render_reactions": { + "type": "boolean" + }, + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } + }, + "show_current_game": { + "type": "boolean" + }, + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], + "type": "string" + }, + "stream_notifications_enabled": { + "type": "boolean" + }, + "theme": { + "enum": [ + "dark", + "light" + ], + "type": "string" + }, + "timezone_offset": { + "type": "integer" + }, + "view_nsfw_guilds": { + "type": "boolean" + } + }, + "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" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUContentRatingSchema": { + "type": "object", + "properties": { + "rating": { + "$ref": "#/definitions/SKUContentRating", + "description": "The content rating" + }, + "descriptors": { + "description": "The content descriptors", + "type": "array", + "items": { + "$ref": "#/definitions/SKUContentDescriptor" + } + } + }, + "additionalProperties": false, + "required": [ + "descriptors", + "rating" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUExternalSKUStrategySchema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/SKUExternalSKUStrategyType", + "description": "The type of external SKU strategy" + }, + "metadata": { + "description": "Additional metadata for the external SKU strategy", + "$ref": "#/definitions/Record" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUGameServerPowerupMetadataSchema": { + "type": "object", + "properties": { + "boost_price": { + "description": "The number of boosts the powerup costs", + "type": "integer" + }, + "purchase_limit": { + "description": "The maximum number of entitlements a guild can have for the powerup", + "type": "integer" + }, + "guild_features": { + "$ref": "#/definitions/GuildPremiumFeatures", + "description": "The features granted by the powerup" + }, + "category_type": { + "$ref": "#/definitions/GuildPowerupCategoryType", + "description": "The type of guild powerup" + }, + "available_providers": { + "description": "The available providers", + "type": "array", + "items": { + "type": "string", + "const": "shockbyte" + } + }, + "memory": { + "description": "The amount of RAM in megabytes that the game server provides", + "type": "integer" + }, + "cpu": { + "description": "The amount of CPU cores that the game server provides", + "type": "integer" + }, + "storage": { + "description": "The amount of storage in gigabytes that the game server provides", + "type": "integer" + }, + "max_slots": { + "description": "Maximum amount of players that can connect to the game server", + "type": "integer" + }, + "memory_string": { + "description": "Human-readable amount of RAM that the game server provides", + "type": "string" + }, + "player_string": { + "description": "Human-readable maximum amount of players that can connect to the game server", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "available_providers", + "boost_price", + "category_type", + "cpu", + "guild_features", + "max_slots", + "memory", + "memory_string", + "player_string", + "purchase_limit", + "storage" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUGuildMonetizationMetadataSchema": { + "type": "object", + "properties": { + "powerup": { + "description": "Guild powerup metadata", + "$ref": "#/definitions/SKUGuildPowerupMetadataSchema" + }, + "game_server": { + "description": "Game server powerup metadata", + "$ref": "#/definitions/SKUGameServerPowerupMetadataSchema" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUPremiumPriceSchema": { + "type": "object", + "properties": { + "amount": { + "description": "The price amount in the smallest currency unit", + "type": "integer" + }, + "percentage": { + "description": "The percentage discount for premium users", + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "amount", + "percentage" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUPriceSchema": { + "type": "object", + "properties": { + "currency": { + "description": "The lower-cased ISO 4217 currency code", + "type": "string" + }, + "currency_exponent": { + "description": "The exponent to convert the amount to the displayed currency unit", + "type": "integer" + }, + "amount": { + "description": "The price amount in the smallest currency unit", + "type": "integer" + }, + "sale_amount": { + "description": "The sale price amount in the smallest currency unit", + "type": "integer" + }, + "sale_percentage": { + "description": "The percentage discount of the sale price", + "type": "integer" + }, + "premium": { + "description": "The price for premium users per premium type", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/SKUPremiumPriceSchema" + } + } + } + }, + "additionalProperties": false, + "required": [ + "amount", + "currency", + "currency_exponent" + ], + "$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" + ], + "$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" + ], + "$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": "integer" + }, + "delete_message_days": { + "type": "integer" + }, + "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, + "$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" + ], + "$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" + ], + "$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" + } + }, + "recipient_id": { + "type": "string" + }, + "access_tokens": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "$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" + ], + "$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, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildSubscriptionsBulkSchema": { + "type": "object", + "properties": { + "subscriptions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/GuildSubscriptionSchema" + } + } + }, + "additionalProperties": false, + "required": [ + "subscriptions" + ], + "$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#" + }, + "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#" + }, + "LocalizedStringSchema": { + "type": "object", + "properties": { + "default": { + "type": "string" + }, + "localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "default" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AccountStandingResponse": { + "type": "object", + "properties": { + "classifications": { + "type": "array", + "items": { + "$ref": "#/definitions/Classification" + } + }, + "guild_classifications": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildClassification" + } + }, + "account_standing": { + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/AccountStandingState" + } + }, + "additionalProperties": false, + "required": [ + "state" + ] + }, + "is_dsa_eligible": { + "type": "boolean" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "is_appeal_eligible": { + "type": "boolean" + }, + "appeal_eligibility": { + "type": "array", + "items": { + "$ref": "#/definitions/AppealEligibility" + } + } + }, + "additionalProperties": false, + "required": [ + "account_standing", + "appeal_eligibility", + "classifications", + "discriminator", + "guild_classifications", + "is_appeal_eligible", + "is_dsa_eligible", + "username" + ], + "$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" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "BackupCodesChallengeResponse": { + "type": "object", + "properties": { + "nonce": { + "type": "string" + }, + "regenerate_nonce": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "nonce", + "regenerate_nonce" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ClaimedQuestsResponseSchema": { + "type": "object", + "properties": { + "quests": { + "type": "array", + "items": { + "$ref": "#/definitions/ClaimedQuestSchema" + } + } + }, + "additionalProperties": false, + "required": [ + "quests" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectiblesCategoriesResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/CollectibleCategorySchema" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleCategorySchema": { + "type": "object", + "properties": { + "sku_id": { + "description": "The SKU ID of the collectible category", + "type": "string" + }, + "store_listing_id": { + "description": "The store listing ID associated with the collectible category", + "type": "string" + }, + "banner_text_color": { + "description": "The color of the banner text as a hexadecimal color string", + "type": "string" + }, + "catalog_banner_asset": { + "description": "The catalog banner asset", + "$ref": "#/definitions/CollectibleAssetConfigSchema" + }, + "hero_banner_asset": { + "description": "The hero banner asset", + "$ref": "#/definitions/CollectibleAssetConfigSchema" + }, + "featured_block_body": { + "description": "The body text for the featured block", + "type": "string" + }, + "featured_block_url": { + "description": "The URL of the featured block image", + "type": "string" + }, + "hero_banner_config_asset": { + "description": "The hero banner asset. might be legacy in favor of hero_banner_asset?", + "$ref": "#/definitions/CollectibleBannerAssetSchema" + }, + "hero_banner_display_config": { + "description": "The display configuration for the hero banner", + "$ref": "#/definitions/CollectibleBannerAssetSchema" + }, + "hero_banner_config": { + "description": "The display configuration for the hero banner. might be legacy in favor of hero_banner_display_config?", + "$ref": "#/definitions/CollectibleBannerAssetSchema" + }, + "hero_block_title": { + "description": "The title text for the hero block", + "type": "string" + }, + "hero_logo_display_config": { + "description": "The display configuration for the hero logo", + "$ref": "#/definitions/CollectibleAssetConfigSchema" + }, + "hero_logo_url": { + "description": "The URL of the hero logo image", + "type": "string" + }, + "hero_ranking": { + "description": "The popularity ranking of SKU IDs within the collectible category", + "type": "array", + "items": { + "type": "string" + } + }, + "hero_rive_url": { + "description": "The URL of the Rive hero animation", + "type": "string" + }, + "logo_url": { + "description": "The URL of the logo image", + "type": "string" + }, + "mobile_banner_url": { + "description": "The URL of the mobile banner image", + "type": "string" + }, + "mobile_bg_url": { + "description": "The URL of the mobile background image", + "type": "string" + }, + "mobile_hero_block_title": { + "description": "The title text for the mobile hero block", + "type": "string" + }, + "mobile_products_title": { + "description": "The title text for the mobile products section", + "type": "string" + }, + "mobile_summary": { + "description": "The summary text for the mobile products section", + "type": "string" + }, + "name": { + "description": "The name of the collectible category", + "type": "string" + }, + "pdp_bg_url": { + "description": "The URL of the product display page background image", + "type": "string" + }, + "products": { + "description": "The list of products in the collectible category", + "type": "array", + "items": { + "$ref": "#/definitions/CollectibleProductSchema" + } + }, + "styles": { + "$ref": "#/definitions/CollectibleStyleSchema", + "description": "The colors to use in the client" + }, + "summary": { + "description": "A description of the collectible category", + "type": "string" + }, + "unpublished_at": { + "description": "The time at which the collectible category should be unpublished", + "type": [ + "null", + "string" + ] + }, + "wide_banner_asset": { + "description": "The wide banner asset config", + "$ref": "#/definitions/CollectibleAssetConfigSchema" + }, + "wide_banner_body": { + "description": "The body text for the wide banner", + "type": "string" + }, + "wide_banner_title": { + "description": "The title text for the wide banner", + "type": "string" + }, + "logo": { + "description": "The ID of the logo image", + "type": [ + "null", + "string" + ] + }, + "mobile_bg": { + "description": "The ID of the mobile background image", + "type": [ + "null", + "string" + ] + }, + "pdp_bg": { + "description": "The ID of the product display page background image", + "type": [ + "null", + "string" + ] + }, + "mobile_banner": { + "description": "The ID of the mobile banner image", + "type": [ + "null", + "string" + ] + }, + "featured_block": { + "type": "string" + }, + "hero_logo": { + "description": "The ID of the hero logo image", + "type": [ + "null", + "string" + ] + }, + "hero_banner_url": { + "description": "The URL of the hero banner", + "type": [ + "null", + "string" + ] + }, + "hero_banner_animated_url": { + "description": "The URL of the animated hero banner", + "type": [ + "null", + "string" + ] + }, + "catalog_banner_url": { + "description": "The URL of the catalog banner", + "type": [ + "null", + "string" + ] + }, + "wide_banner_url": { + "description": "The URL of the wide banner", + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "hero_ranking", + "logo_url", + "mobile_summary", + "name", + "pdp_bg_url", + "products", + "sku_id", + "store_listing_id", + "styles", + "summary", + "unpublished_at" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectiblesMarketingResponse": { + "type": "object", + "properties": { + "marketings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CollectiblesMarketingItem" + } + } + }, + "additionalProperties": false, + "required": [ + "marketings" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectiblesShopResponse": { + "type": "object", + "properties": { + "shop_blocks": { + "type": "array", + "items": { + "$ref": "#/definitions/AnyCollectiblesShopBlock" + } + }, + "categories": { + "type": "array", + "items": { + "$ref": "#/definitions/CollectibleCategorySchema" + } + }, + "user_discounts": { + "type": "array", + "items": { + "$ref": "#/definitions/CollectibleUserDiscountSchema" + } + } + }, + "additionalProperties": false, + "required": [ + "categories", + "shop_blocks" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "DiscoverableGuildsResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "guilds": { + "type": "array", + "items": { + "$ref": "#/definitions/Guild" + } + }, + "offset": { + "type": "integer" + }, + "limit": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "guilds", + "limit", + "offset", + "total" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "DmMessagesResponseSchema": { + "type": "array", + "items": { + "$ref": "#/definitions/PartialMessage" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "EmailDomainLookupResponse": { + "type": "object", + "properties": { + "guilds_info": { + "type": "array", + "items": { + "$ref": "#/definitions/HubGuild" + } + }, + "has_matching_guild": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "guilds_info", + "has_matching_guild" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "EmailDomainLookupVerifyCodeResponse": { + "type": "object", + "properties": { + "guild": { + "$ref": "#/definitions/Guild" + }, + "joined": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "guild", + "joined" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "EmojiSourceResponse": { + "type": "object", + "properties": { + "type": { + "enum": [ + "APPLICATION", + "GUILD" + ], + "type": "string" + }, + "guild": { + "anyOf": [ + { + "$ref": "#/definitions/EmojiGuild" + }, + { + "type": "null" + } + ] + }, + "application": { + "anyOf": [ + { + "$ref": "#/definitions/EmojiApplication" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GatewayBotResponse": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "shards": { + "type": "integer" + }, + "session_start_limit": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "remaining": { + "type": "integer" + }, + "reset_after": { + "type": "integer" + }, + "max_concurrency": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "max_concurrency", + "remaining", + "reset_after", + "total" + ] + } + }, + "additionalProperties": false, + "required": [ + "session_start_limit", + "shards", + "url" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GatewayResponse": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "url" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GenerateRegistrationTokensResponse": { + "type": "object", + "properties": { + "tokens": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "tokens" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildBansResponse": { + "type": "object", + "properties": { + "reason": { + "type": [ + "null", + "string" + ] + }, + "user": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "id": { + "type": "string" + }, + "avatar": { + "type": [ + "null", + "string" + ] + }, + "public_flags": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "avatar", + "discriminator", + "id", + "public_flags", + "username" + ] + } + }, + "additionalProperties": false, + "required": [ + "reason", + "user" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildCreateResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "primary_category_id": { + "type": "string" + }, + "large": { + "type": "boolean" + }, + "max_members": { + "type": "integer" + }, + "max_presences": { + "type": "integer" + }, + "max_video_channel_users": { + "type": "integer" + }, + "member_count": { + "type": "integer" + }, + "presence_count": { + "type": "integer" + }, + "template_id": { + "type": "string" + }, + "mfa_level": { + "type": "integer" + }, + "owner_id": { + "type": "string" + }, + "premium_subscription_count": { + "type": "integer" + }, + "premium_tier": { + "type": "integer" + }, + "welcome_screen": { + "$ref": "#/definitions/GuildWelcomeScreen" + }, + "widget_channel_id": { + "type": "string" + }, + "widget_enabled": { + "type": "boolean" + }, + "nsfw_level": { + "type": "integer" + }, + "nsfw": { + "type": "boolean" + }, + "parent": { + "type": "string" + }, + "region": { + "type": "string" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "banner": { + "type": [ + "null", + "string" + ] + }, + "system_channel_id": { + "type": "string" + }, + "rules_channel_id": { + "type": "string" + }, + "guild_template_code": { + "type": "string" + }, + "staff_only": { + "type": "boolean" + }, + "splash": { + "type": [ + "null", + "string" + ] + }, + "description": { + "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" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "nsfw", + "welcome_screen", + "widget_enabled" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildDiscoveryRequirementsResponse": { + "type": "object", + "properties": { + "guild_id": { + "type": "string" + }, + "safe_environment": { + "type": "boolean" + }, + "healthy": { + "type": "boolean" + }, + "health_score_pending": { + "type": "boolean" + }, + "size": { + "type": "boolean" + }, + "nsfw_properties": {}, + "protected": { + "type": "boolean" + }, + "sufficient": { + "type": "boolean" + }, + "sufficient_without_grace_period": { + "type": "boolean" + }, + "valid_rules_channel": { + "type": "boolean" + }, + "retention_healthy": { + "type": "boolean" + }, + "engagement_healthy": { + "type": "boolean" + }, + "age": { + "type": "boolean" + }, + "minimum_age": { + "type": "integer" + }, + "health_score": { + "type": "object", + "properties": { + "avg_nonnew_participators": { + "type": "integer" + }, + "avg_nonnew_communicators": { + "type": "integer" + }, + "num_intentful_joiners": { + "type": "integer" + }, + "perc_ret_w1_intentful": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "avg_nonnew_communicators", + "avg_nonnew_participators", + "num_intentful_joiners", + "perc_ret_w1_intentful" + ] + }, + "minimum_size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "age", + "engagement_healthy", + "guild_id", + "health_score", + "health_score_pending", + "healthy", + "minimum_age", + "minimum_size", + "nsfw_properties", + "protected", + "retention_healthy", + "safe_environment", + "size", + "sufficient", + "sufficient_without_grace_period", + "valid_rules_channel" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildMessagesSearchResponse": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildMessagesSearchMessage" + } + }, + "total_results": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "messages", + "total_results" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildPruneResponse": { + "type": "object", + "properties": { + "pruned": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "pruned" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildPurgeResponse": { + "type": "object", + "properties": { + "purged": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "purged" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildRecommendationsResponse": { + "type": "object", + "properties": { + "recommended_guilds": { + "type": "array", + "items": { + "$ref": "#/definitions/Guild" + } + }, + "load_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "load_id", + "recommended_guilds" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildVanityUrlResponse": { + "anyOf": [ + { + "$ref": "#/definitions/GuildVanityUrl" + }, + { + "$ref": "#/definitions/GuildVanityUrlNoInvite" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/GuildVanityUrl" + } + } + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildVanityUrlCreateResponse": { + "type": "object", + "properties": { + "code": { + "type": "string" + } }, "additionalProperties": false, "required": [ - "age", - "engagement_healthy", - "guild_id", - "health_score", - "health_score_pending", - "healthy", - "minimum_age", - "minimum_size", - "nsfw_properties", - "protected", - "retention_healthy", - "safe_environment", - "size", - "sufficient", - "sufficient_without_grace_period", - "valid_rules_channel" + "code" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildMessagesSearchResponse": { + "GuildWidgetJsonResponse": { "type": "object", "properties": { - "messages": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "instant_invite": { + "type": "string" + }, + "channels": { "type": "array", "items": { - "$ref": "#/definitions/GuildMessagesSearchMessage" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "position" + ] } }, - "total_results": { + "members": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "avatar": { + "type": [ + "null", + "string" + ] + }, + "status": { + "$ref": "#/definitions/ClientStatus" + }, + "avatar_url": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "avatar", + "avatar_url", + "discriminator", + "id", + "status", + "username" + ] + } + }, + "presence_count": { "type": "integer" } }, "additionalProperties": false, "required": [ - "messages", - "total_results" + "channels", + "id", + "instant_invite", + "members", + "name", + "presence_count" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildWidgetSettingsResponse": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "channel_id": { + "anyOf": [ + { + "$ref": "#/definitions/Snowflake" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "channel_id", + "enabled" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "HubDirectoryEntriesResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/HubDirectoryEntry" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "HubWaitlistSignupResponse": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "email_domain": { + "type": "string" + }, + "school": { + "type": "string" + }, + "user_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "email", + "email_domain", + "school", + "user_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InstanceDomainsResponse": { + "type": "object", + "properties": { + "admin": { + "type": "string" + }, + "api": { + "type": "string" + }, + "apiEndpoint": { + "type": "string" + }, + "cdn": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "defaultApiVersion": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "api", + "apiEndpoint", + "cdn", + "defaultApiVersion", + "gateway" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InstancePingResponse": { + "type": "object", + "properties": { + "ping": { + "type": "string", + "const": "pong!" + }, + "instance": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "image": { + "type": [ + "null", + "string" + ] + }, + "correspondenceEmail": { + "type": [ + "null", + "string" + ] + }, + "correspondenceUserID": { + "type": [ + "null", + "string" + ] + }, + "frontPage": { + "type": [ + "null", + "string" + ] + }, + "tosPage": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "correspondenceEmail", + "correspondenceUserID", + "description", + "frontPage", + "id", + "image", + "name", + "tosPage" + ] + } + }, + "additionalProperties": false, + "required": [ + "instance", + "ping" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildPruneResponse": { + "InstanceStatsResponse": { "type": "object", "properties": { - "pruned": { - "type": "integer" + "counts": { + "type": "object", + "properties": { + "user": { + "type": "integer" + }, + "guild": { + "type": "integer" + }, + "message": { + "type": "integer" + }, + "members": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "guild", + "members", + "message", + "user" + ] } }, "additionalProperties": false, "required": [ - "pruned" + "counts" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildPurgeResponse": { + "LocationMetadataResponse": { "type": "object", "properties": { - "purged": { - "type": "integer" + "consent_required": { + "type": "boolean" + }, + "country_code": { + "type": "string" + }, + "promotional_email_opt_in": { + "type": "object", + "properties": { + "required": { + "type": "boolean", + "const": true + }, + "pre_checked": { + "type": "boolean", + "const": false + } + }, + "additionalProperties": false, + "required": [ + "pre_checked", + "required" + ] } }, "additionalProperties": false, "required": [ - "purged" + "consent_required", + "country_code", + "promotional_email_opt_in" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildRecommendationsResponse": { + "MemberJoinGuildResponse": { "type": "object", "properties": { - "recommended_guilds": { + "guild": { + "$ref": "#/definitions/GuildCreateResponse" + }, + "emojis": { "type": "array", "items": { - "$ref": "#/definitions/Guild" + "$ref": "#/definitions/Emoji" } }, - "load_id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "load_id", - "recommended_guilds" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildVanityUrlResponse": { - "anyOf": [ - { - "$ref": "#/definitions/GuildVanityUrl" - }, - { - "$ref": "#/definitions/GuildVanityUrlNoInvite" + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } }, - { + "stickers": { "type": "array", "items": { - "$ref": "#/definitions/GuildVanityUrl" + "$ref": "#/definitions/Sticker" } } + }, + "additionalProperties": false, + "required": [ + "emojis", + "guild", + "roles", + "stickers" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildVanityUrlCreateResponse": { + "OAuthAuthorizeResponse": { "type": "object", "properties": { - "code": { + "location": { "type": "string" } }, "additionalProperties": false, "required": [ - "code" + "location" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildWidgetJsonResponse": { + "PreloadMessagesResponseSchema": { + "type": "array", + "items": { + "$ref": "#/definitions/Message" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestClaimRewardResponseSchema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { + "claimed_at": { "type": "string" }, - "instant_invite": { - "type": "string" + "entitlement_expiration_metadata": { + "$ref": "#/definitions/Record" }, - "channels": { + "entitlements": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "position": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "id", - "name", - "position" - ] + "$ref": "#/definitions/EntitlementSchema" } }, - "members": { + "errors": { "type": "array", "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { + "message": { "type": "string" }, - "avatar": { - "type": [ - "null", - "string" - ] - }, - "status": { - "$ref": "#/definitions/ClientStatus" - }, - "avatar_url": { - "type": "string" + "code": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "avatar", - "avatar_url", - "discriminator", - "id", - "status", - "username" + "code", + "message" ] } - }, - "presence_count": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "channels", - "id", - "instant_invite", - "members", - "name", - "presence_count" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildWidgetSettingsResponse": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "channel_id": { - "anyOf": [ - { - "$ref": "#/definitions/Snowflake" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "channel_id", - "enabled" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "HubDirectoryEntriesResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/HubDirectoryEntry" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "HubWaitlistSignupResponse": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "email_domain": { - "type": "string" - }, - "school": { - "type": "string" - }, - "user_id": { - "type": "string" } }, "additionalProperties": false, "required": [ - "email", - "email_domain", - "school", - "user_id" + "claimed_at", + "entitlement_expiration_metadata", + "entitlements", + "errors" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InstanceDomainsResponse": { + "QuestConfigResponseSchema": { "type": "object", "properties": { - "admin": { + "id": { "type": "string" }, - "api": { - "type": "string" + "config_version": { + "type": "integer" }, - "apiEndpoint": { + "starts_at": { "type": "string" }, - "cdn": { + "expires_at": { "type": "string" }, - "gateway": { - "type": "string" + "features": { + "type": "array", + "items": { + "$ref": "#/definitions/QuestFeature" + } }, - "defaultApiVersion": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "api", - "apiEndpoint", - "cdn", - "defaultApiVersion", - "gateway" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "InstancePingResponse": { - "type": "object", - "properties": { - "ping": { - "type": "string", - "const": "pong!" + "application": { + "$ref": "#/definitions/QuestApplicationSchema" }, - "instance": { + "assets": { "type": "object", "properties": { - "id": { - "type": "string" + "hero": { + "type": [ + "null", + "string" + ] }, - "name": { - "type": "string" + "hero_video": { + "type": [ + "null", + "string" + ] }, - "description": { + "quest_bar_hero": { "type": [ "null", "string" ] }, - "image": { + "quest_bar_hero_video": { "type": [ "null", "string" ] }, - "correspondenceEmail": { + "game_tile": { "type": [ "null", "string" ] }, - "correspondenceUserID": { + "game_tile_dark": { "type": [ "null", "string" ] }, - "frontPage": { + "game_tile_light": { "type": [ "null", "string" ] }, - "tosPage": { + "logotype": { + "type": [ + "null", + "string" + ] + }, + "logotype_dark": { + "type": [ + "null", + "string" + ] + }, + "logotype_light": { "type": [ "null", "string" @@ -2424,148 +5354,323 @@ }, "additionalProperties": false, "required": [ - "correspondenceEmail", - "correspondenceUserID", - "description", - "frontPage", - "id", - "image", - "name", - "tosPage" + "game_tile", + "game_tile_dark", + "game_tile_light", + "hero", + "logotype", + "logotype_dark", + "logotype_light", + "quest_bar_hero" + ] + }, + "colors": { + "type": "object", + "properties": { + "primary": { + "type": "string" + }, + "secondary": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "primary", + "secondary" + ] + }, + "messages": { + "type": "object", + "properties": { + "quest_name": { + "type": "string" + }, + "game_title": { + "type": "string" + }, + "game_publisher": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "game_publisher", + "game_title", + "quest_name" + ] + }, + "task_config": {}, + "task_config_v2": { + "$ref": "#/definitions/QuestTaskConfigV2Schema" + }, + "rewards_config": { + "$ref": "#/definitions/QuestRewardConfigSchema" + }, + "share_policy": { + "$ref": "#/definitions/QuestSharePolicy" + }, + "cta_config": { + "type": "object", + "properties": { + "button_label": { + "type": "string" + }, + "link": { + "type": "string" + }, + "subtitle": { + "type": "string" + }, + "android": { + "type": "object", + "properties": { + "android_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "android_app_id" + ] + }, + "ios": { + "type": "object", + "properties": { + "ios_app_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ios_app_id" + ] + } + }, + "additionalProperties": false, + "required": [ + "button_label", + "link" ] } }, "additionalProperties": false, "required": [ - "instance", - "ping" + "application", + "assets", + "colors", + "config_version", + "cta_config", + "expires_at", + "features", + "id", + "messages", + "rewards_config", + "share_policy", + "starts_at", + "task_config_v2" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InstanceStatsResponse": { + "QuestPlacementResponseSchema": { "type": "object", "properties": { - "counts": { - "type": "object", - "properties": { - "user": { - "type": "integer" + "request_id": { + "type": "string" + }, + "quest": { + "anyOf": [ + { + "$ref": "#/definitions/QuestSchema" }, - "guild": { - "type": "integer" + { + "type": "null" + } + ] + }, + "ad_identifiers": { + "anyOf": [ + { + "$ref": "#/definitions/QuestAdIdentifiersSchema" }, - "message": { - "type": "integer" + { + "type": "null" + } + ] + }, + "ad_context": { + "anyOf": [ + { + "type": "object", + "properties": { + "is_campaign_ias_enabled": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "is_campaign_ias_enabled" + ] }, - "members": { - "type": "integer" + { + "type": "null" } - }, - "additionalProperties": false, - "required": [ - "guild", - "members", - "message", - "user" + ] + }, + "response_ttl_seconds": { + "type": "integer" + }, + "metadata_raw": { + "type": [ + "null", + "string" ] } }, "additionalProperties": false, "required": [ - "counts" + "ad_context", + "ad_identifiers", + "metadata_raw", + "quest", + "request_id", + "response_ttl_seconds" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "LocationMetadataResponse": { + "QuestRewardCodeResponseSchema": { "type": "object", "properties": { - "consent_required": { - "type": "boolean" + "quest_id": { + "type": "string" }, - "country_code": { + "code": { "type": "string" }, - "promotional_email_opt_in": { - "type": "object", - "properties": { - "required": { - "type": "boolean", - "const": true - }, - "pre_checked": { - "type": "boolean", - "const": false - } - }, - "additionalProperties": false, - "required": [ - "pre_checked", - "required" + "platform": { + "$ref": "#/definitions/QuestPlatformType" + }, + "user_id": { + "type": "string" + }, + "claimed_at": { + "type": "string" + }, + "tier": { + "type": [ + "null", + "integer" ] } }, "additionalProperties": false, "required": [ - "consent_required", - "country_code", - "promotional_email_opt_in" + "claimed_at", + "code", + "platform", + "quest_id", + "tier", + "user_id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "MemberJoinGuildResponse": { + "QuestsResponseSchema": { "type": "object", "properties": { - "guild": { - "$ref": "#/definitions/GuildCreateResponse" - }, - "emojis": { - "type": "array", - "items": { - "$ref": "#/definitions/Emoji" - } - }, - "roles": { + "excluded_quests": { "type": "array", "items": { - "$ref": "#/definitions/Role" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "replacement_id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] } }, - "stickers": { + "quest_enrollment_blocked_until": {}, + "quests": { "type": "array", "items": { - "$ref": "#/definitions/Sticker" + "$ref": "#/definitions/QuestSchema" } } }, "additionalProperties": false, "required": [ - "emojis", - "guild", - "roles", - "stickers" + "excluded_quests", + "quest_enrollment_blocked_until", + "quests" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "OAuthAuthorizeResponse": { + "QuestUserStatusResponseSchema": { "type": "object", "properties": { - "location": { + "user_id": { + "type": "string" + }, + "quest_id": { "type": "string" + }, + "enrolled_at": { + "type": [ + "null", + "string" + ] + }, + "completed_at": { + "type": [ + "null", + "string" + ] + }, + "claimed_at": { + "type": [ + "null", + "string" + ] + }, + "claimed_tier": { + "type": [ + "null", + "integer" + ] + }, + "last_stream_heartbeat_at": { + "type": [ + "null", + "string" + ] + }, + "stream_progress_seconds": { + "type": "integer" + }, + "dismissed_quest_content": { + "type": "integer" + }, + "progress": { + "$ref": "#/definitions/Record" } }, "additionalProperties": false, "required": [ - "location" + "claimed_at", + "completed_at", + "enrolled_at", + "quest_id", + "stream_progress_seconds", + "user_id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PreloadMessagesResponseSchema": { - "type": "array", - "items": { - "$ref": "#/definitions/Message" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, "RefreshUrlsResponse": { "type": "object", "properties": { @@ -2814,6 +5919,12 @@ "id": { "type": "string" }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, "icon": { "type": "string" }, @@ -2859,6 +5970,12 @@ "$ref": "#/definitions/Channel" } }, + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/Member" + } + }, "system_channel_id": { "type": [ "null", @@ -2877,12 +5994,6 @@ "description": { "type": "string" }, - "features": { - "type": "array", - "items": { - "type": "string" - } - }, "verification_level": { "type": "integer" }, @@ -2946,12 +6057,6 @@ "presence_count": { "type": "integer" }, - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/Member" - } - }, "template_id": { "type": "string" }, @@ -3004,36 +6109,247 @@ }, "additionalProperties": false, "required": [ - "bans", - "channel_ordering", - "channels", - "emojis", - "features", + "bans", + "channel_ordering", + "channels", + "emojis", + "features", + "id", + "insert", + "invites", + "members", + "name", + "nsfw", + "premium_progress_bar_enabled", + "public_updates_channel_id", + "roles", + "stickers", + "unavailable", + "voice_states", + "webhooks", + "welcome_screen", + "widget_enabled" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIPublicUser": { + "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```", + "type": "string" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "accent_color": { + "type": "integer" + }, + "bot": { + "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "premium_type", + "public_flags", + "username" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIPrivateUser": { + "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```", + "type": "string" + }, + "flags": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "accent_color": { + "type": "integer" + }, + "bot": { + "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "mfa_enabled": { + "type": "boolean" + }, + "phone": { + "type": "string" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "premium": { + "type": "boolean" + }, + "purchased_flags": { + "type": "integer" + }, + "premium_usage_flags": { + "type": "integer" + }, + "settings": { + "$ref": "#/definitions/UserSettingsSchema" + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "disabled", + "discriminator", + "flags", "id", - "insert", - "invites", - "members", - "name", - "nsfw", - "premium_progress_bar_enabled", - "public_updates_channel_id", - "roles", - "stickers", - "unavailable", - "voice_states", - "webhooks", - "welcome_screen", - "widget_enabled" + "mfa_enabled", + "nsfw_allowed", + "premium", + "premium_since", + "premium_type", + "premium_usage_flags", + "public_flags", + "purchased_flags", + "username", + "verified" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIPublicUser": { + "APIGuildArray": { + "type": "array", + "items": { + "$ref": "#/definitions/APIGuild" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIDMChannelArray": { + "type": "array", + "items": { + "$ref": "#/definitions/DmChannelDTO" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIBackupCodeArray": { + "type": "array", + "items": { + "$ref": "#/definitions/BackupCode" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserUpdateResponse": { "type": "object", "properties": { + "newToken": { + "type": "string" + }, "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```", "type": "string" }, + "flags": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "verified": { + "type": "boolean" + }, "premium_since": { "type": "string", "format": "date-time" @@ -3079,41 +6395,236 @@ "items": { "type": "string" } + }, + "mfa_enabled": { + "type": "boolean" + }, + "phone": { + "type": "string" + }, + "nsfw_allowed": { + "type": "boolean" + }, + "premium": { + "type": "boolean" + }, + "purchased_flags": { + "type": "integer" + }, + "premium_usage_flags": { + "type": "integer" + }, + "settings": { + "$ref": "#/definitions/UserSettingsSchema" } }, "additionalProperties": false, "required": [ "bio", "bot", + "disabled", "discriminator", + "flags", "id", + "mfa_enabled", + "nsfw_allowed", + "premium", "premium_since", "premium_type", + "premium_usage_flags", "public_flags", - "username" + "purchased_flags", + "username", + "verified" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationDetectableResponse": { + "type": "array", + "items": {}, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationEntitlementsResponse": { + "type": "array", + "items": {}, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationSkusResponse": { + "type": "array", + "items": {}, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIApplicationArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Application" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIBansArray": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildBansResponse" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIInviteArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Invite" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIMessageArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Message" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIWebhookArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Webhook" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIDiscoveryCategoryArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Categories" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIGeneralConfiguration": { + "type": "object", + "properties": { + "instanceName": { + "type": "string", + "default": "Spacebar Instance" + }, + "serverName": { + "type": [ + "null", + "string" + ], + "default": null + }, + "instanceDescription": { + "type": [ + "null", + "string" + ], + "default": "This is a Spacebar instance made in the pre-release days" + }, + "frontPage": { + "type": [ + "null", + "string" + ], + "default": null + }, + "tosPage": { + "type": [ + "null", + "string" + ], + "default": null + }, + "correspondenceEmail": { + "type": [ + "null", + "string" + ], + "default": null + }, + "correspondenceUserID": { + "type": [ + "null", + "string" + ], + "default": null + }, + "image": { + "type": [ + "null", + "string" + ], + "default": null + }, + "instanceId": { + "type": "string" + }, + "autoCreateBotUsers": { + "type": "boolean", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "autoCreateBotUsers", + "correspondenceEmail", + "correspondenceUserID", + "frontPage", + "image", + "instanceDescription", + "instanceId", + "instanceName", + "serverName", + "tosPage" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIPrivateUser": { + "APIChannelArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Channel" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIEmojiArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Emoji" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIMemberArray": { + "type": "array", + "items": { + "$ref": "#/definitions/Member" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "APIPublicMember": { + "additionalProperties": false, "type": "object", "properties": { - "email": { + "id": { "type": "string" }, - "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```", + "guild_id": { "type": "string" }, - "flags": { - "type": "integer" + "mute": { + "type": "boolean" }, - "verified": { + "deaf": { "type": "boolean" }, - "premium_since": { + "nick": { + "type": "string" + }, + "joined_at": { "type": "string", "format": "date-time" }, + "pending": { + "type": "boolean" + }, + "premium_since": { + "type": "integer" + }, "avatar": { "type": "string" }, @@ -3132,1196 +6643,1296 @@ "pronouns": { "type": "string" }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "public_flags": { - "type": "integer" - }, - "accent_color": { - "type": "integer" - }, - "bot": { - "type": "boolean" + "communication_disabled_until": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] }, - "premium_type": { - "type": "integer" + "user": { + "$ref": "#/definitions/PublicUser" }, - "badge_ids": { + "roles": { "type": "array", "items": { "type": "string" } - }, - "mfa_enabled": { - "type": "boolean" - }, - "phone": { - "type": "string" - }, - "nsfw_allowed": { - "type": "boolean" - }, - "premium": { - "type": "boolean" - }, - "purchased_flags": { - "type": "integer" - }, - "premium_usage_flags": { - "type": "integer" - }, - "disabled": { - "type": "boolean" - }, - "settings": { - "$ref": "#/definitions/UserSettingsSchema" } }, - "additionalProperties": false, "required": [ + "banner", "bio", - "bot", - "disabled", - "discriminator", - "flags", + "communication_disabled_until", + "deaf", + "guild_id", "id", - "mfa_enabled", - "nsfw_allowed", - "premium", - "premium_since", - "premium_type", - "premium_usage_flags", - "public_flags", - "purchased_flags", - "username", - "verified" + "joined_at", + "mute", + "pending", + "roles", + "user" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIGuildArray": { - "type": "array", - "items": { - "$ref": "#/definitions/APIGuild" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "APIDMChannelArray": { - "type": "array", - "items": { - "$ref": "#/definitions/DmChannelDTO" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "APIBackupCodeArray": { - "type": "array", - "items": { - "$ref": "#/definitions/BackupCode" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserUpdateResponse": { + "APIGuildWithJoinedAt": { "type": "object", "properties": { - "newToken": { + "joined_at": { "type": "string" }, - "email": { + "id": { "type": "string" }, - "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```", + "name": { "type": "string" }, - "flags": { - "type": "integer" + "primary_category_id": { + "type": "string" }, - "verified": { + "large": { "type": "boolean" }, - "premium_since": { - "type": "string", - "format": "date-time" + "max_members": { + "type": "integer" }, - "avatar": { - "type": "string" + "max_presences": { + "type": "integer" }, - "banner": { - "type": "string" + "max_video_channel_users": { + "type": "integer" }, - "bio": { - "type": "string" + "member_count": { + "type": "integer" }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } + "presence_count": { + "type": "integer" }, - "pronouns": { + "template_id": { "type": "string" }, - "username": { - "type": "string" + "mfa_level": { + "type": "integer" }, - "discriminator": { + "owner_id": { "type": "string" }, - "public_flags": { + "premium_subscription_count": { "type": "integer" }, - "accent_color": { + "premium_tier": { "type": "integer" }, - "bot": { + "welcome_screen": { + "$ref": "#/definitions/GuildWelcomeScreen" + }, + "widget_channel_id": { + "type": "string" + }, + "widget_enabled": { "type": "boolean" }, - "premium_type": { + "nsfw_level": { "type": "integer" }, - "badge_ids": { + "nsfw": { + "type": "boolean" + }, + "parent": { + "type": "string" + }, + "region": { + "type": "string" + }, + "features": { "type": "array", "items": { "type": "string" } }, - "mfa_enabled": { - "type": "boolean" + "icon": { + "type": [ + "null", + "string" + ] }, - "phone": { + "banner": { + "type": [ + "null", + "string" + ] + }, + "system_channel_id": { "type": "string" }, - "nsfw_allowed": { - "type": "boolean" + "rules_channel_id": { + "type": "string" }, - "premium": { + "guild_template_code": { + "type": "string" + }, + "staff_only": { "type": "boolean" }, - "purchased_flags": { + "splash": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": "string" + }, + "verification_level": { "type": "integer" }, - "premium_usage_flags": { + "default_message_notifications": { "type": "integer" }, - "disabled": { + "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" }, - "settings": { - "$ref": "#/definitions/UserSettingsSchema" + "discovery_splash": { + "type": "string" + }, + "safety_alerts_channel_id": { + "type": [ + "null", + "string" + ] } }, "additionalProperties": false, "required": [ - "bio", - "bot", - "disabled", - "discriminator", - "flags", "id", - "mfa_enabled", - "nsfw_allowed", - "premium", - "premium_since", - "premium_type", - "premium_usage_flags", - "public_flags", - "purchased_flags", - "username", - "verified" + "joined_at", + "large", + "max_members", + "max_presences", + "max_video_channel_users", + "member_count", + "mfa_level", + "name", + "nsfw", + "nsfw_level", + "owner_id", + "parent", + "premium_subscription_count", + "premium_tier", + "presence_count", + "primary_category_id", + "template_id", + "welcome_screen", + "widget_channel_id", + "widget_enabled" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ApplicationDetectableResponse": { - "type": "array", - "items": {}, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ApplicationEntitlementsResponse": { - "type": "array", - "items": {}, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ApplicationSkusResponse": { - "type": "array", - "items": {}, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "APIApplicationArray": { - "type": "array", - "items": { - "$ref": "#/definitions/Application" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "APIBansArray": { - "type": "array", - "items": { - "$ref": "#/definitions/GuildBansResponse" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "APIInviteArray": { + "APIRoleArray": { "type": "array", "items": { - "$ref": "#/definitions/Invite" + "$ref": "#/definitions/Role" }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIMessageArray": { + "APIStickerArray": { "type": "array", "items": { - "$ref": "#/definitions/Message" + "$ref": "#/definitions/Sticker" }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIWebhookArray": { + "APITemplateArray": { "type": "array", "items": { - "$ref": "#/definitions/Webhook" + "$ref": "#/definitions/Template" }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIDiscoveryCategoryArray": { + "APIGuildVoiceRegion": { "type": "array", "items": { - "$ref": "#/definitions/Categories" + "$ref": "#/definitions/GuildVoiceRegion" }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIGeneralConfiguration": { + "APILimitsConfiguration": { "type": "object", "properties": { - "instanceName": { - "type": "string", - "default": "Spacebar Instance" - }, - "instanceDescription": { - "type": [ - "null", - "string" - ], - "default": "This is a Spacebar instance made in the pre-release days" - }, - "frontPage": { - "type": [ - "null", - "string" - ], - "default": null - }, - "tosPage": { - "type": [ - "null", - "string" - ], - "default": null + "user": { + "$ref": "#/definitions/UserLimits" }, - "correspondenceEmail": { - "type": [ - "null", - "string" - ], - "default": null + "guild": { + "$ref": "#/definitions/GuildLimits" }, - "correspondenceUserID": { - "type": [ - "null", - "string" - ], - "default": null + "message": { + "$ref": "#/definitions/MessageLimits" }, - "image": { - "type": [ - "null", - "string" - ], - "default": null + "channel": { + "$ref": "#/definitions/ChannelLimits" }, - "instanceId": { - "type": "string" + "rate": { + "$ref": "#/definitions/RateLimits" }, - "autoCreateBotUsers": { - "type": "boolean", - "default": false + "absoluteRate": { + "$ref": "#/definitions/GlobalRateLimits" } }, "additionalProperties": false, "required": [ - "autoCreateBotUsers", - "correspondenceEmail", - "correspondenceUserID", - "frontPage", - "image", - "instanceDescription", - "instanceId", - "instanceName", - "tosPage" + "absoluteRate", + "channel", + "guild", + "message", + "rate", + "user" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIChannelArray": { - "type": "array", - "items": { - "$ref": "#/definitions/Channel" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "APIEmojiArray": { + "APIStickerPackArray": { "type": "array", "items": { - "$ref": "#/definitions/Emoji" + "$ref": "#/definitions/StickerPack" }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIMemberArray": { - "type": "array", - "items": { - "$ref": "#/definitions/Member" - }, + "APIConnectionsConfiguration": { + "type": "object", + "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIPublicMember": { - "additionalProperties": false, + "UpdatesResponse": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "mute": { - "type": "boolean" - }, - "deaf": { - "type": "boolean" - }, - "nick": { - "type": "string" - }, - "joined_at": { - "type": "string", - "format": "date-time" - }, - "pending": { - "type": "boolean" - }, - "premium_since": { - "type": "integer" - }, - "avatar": { - "type": "string" - }, - "banner": { + "name": { "type": "string" }, - "bio": { + "pub_date": { "type": "string" }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { + "url": { "type": "string" }, - "communication_disabled_until": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } + "notes": { + "type": [ + "null", + "string" ] - }, - "user": { - "$ref": "#/definitions/PublicUser" - }, - "roles": { + } + }, + "additionalProperties": false, + "required": [ + "name", + "notes", + "pub_date", + "url" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UploadAttachmentResponseSchema": { + "type": "object", + "properties": { + "attachments": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/UploadAttachmentResponse" } } }, + "additionalProperties": false, "required": [ - "banner", - "bio", - "communication_disabled_until", - "deaf", - "guild_id", - "id", - "joined_at", - "mute", - "pending", - "roles", - "user" + "attachments" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIGuildWithJoinedAt": { + "UploadAttachmentResponse": { "type": "object", "properties": { - "joined_at": { - "type": "string" - }, "id": { "type": "string" }, - "name": { - "type": "string" - }, - "primary_category_id": { - "type": "string" - }, - "large": { - "type": "boolean" - }, - "max_members": { - "type": "integer" - }, - "max_presences": { - "type": "integer" - }, - "max_video_channel_users": { - "type": "integer" - }, - "member_count": { - "type": "integer" - }, - "presence_count": { - "type": "integer" - }, - "template_id": { - "type": "string" - }, - "mfa_level": { - "type": "integer" - }, - "owner_id": { - "type": "string" - }, - "premium_subscription_count": { - "type": "integer" - }, - "premium_tier": { - "type": "integer" - }, - "welcome_screen": { - "$ref": "#/definitions/GuildWelcomeScreen" - }, - "widget_channel_id": { + "upload_url": { "type": "string" }, - "widget_enabled": { - "type": "boolean" - }, - "nsfw_level": { - "type": "integer" - }, - "nsfw": { - "type": "boolean" - }, - "parent": { + "upload_filename": { "type": "string" }, - "region": { + "original_content_type": { "type": "string" - }, - "icon": { - "type": [ - "null", - "string" - ] - }, - "banner": { - "type": [ - "null", - "string" - ] - }, - "system_channel_id": { + } + }, + "additionalProperties": false, + "required": [ + "upload_filename", + "upload_url" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserNoteResponse": { + "type": "object", + "properties": { + "note": { "type": "string" }, - "rules_channel_id": { + "note_user_id": { "type": "string" }, - "guild_template_code": { + "user_id": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "note", + "note_user_id", + "user_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserProfileResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/PublicUser" }, - "staff_only": { - "type": "boolean" + "connected_accounts": { + "$ref": "#/definitions/PublicConnectedAccount" }, - "splash": { - "type": [ - "null", - "string" - ] + "premium_guild_since": { + "type": "string", + "format": "date-time" }, - "description": { - "type": "string" + "premium_since": { + "type": "string", + "format": "date-time" }, - "features": { + "mutual_guilds": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "nick": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id" + ] } }, - "verification_level": { + "premium_type": { "type": "integer" }, - "default_message_notifications": { + "profile_themes_experiment_bucket": { "type": "integer" }, - "system_channel_flags": { - "type": "integer" + "user_profile": { + "$ref": "#/definitions/UserProfile" }, - "explicit_content_filter": { - "type": "integer" + "guild_member": { + "$ref": "#/definitions/PublicMember" }, - "public_updates_channel_id": { + "guild_member_profile": { + "$ref": "#/definitions/PublicMemberProfile" + }, + "badges": { + "type": "array", + "items": { + "$ref": "#/definitions/Badge" + } + } + }, + "additionalProperties": false, + "required": [ + "badges", + "connected_accounts", + "mutual_guilds", + "premium_type", + "profile_themes_experiment_bucket", + "user", + "user_profile" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserRelationshipsResponse": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "afk_timeout": { - "type": "integer" + "type": { + "$ref": "#/definitions/RelationshipType" }, - "afk_channel_id": { - "type": "string" + "nickname": { + "type": "null" }, - "preferred_locale": { + "user": { + "$ref": "#/definitions/PublicUser" + } + }, + "additionalProperties": false, + "required": [ + "id", + "nickname", + "type", + "user" + ], + "$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#" + }, + "VirtualCurrencyResponseSchema": { + "type": "object", + "properties": { + "balance": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "balance" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "WebAuthnCreateResponse": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "premium_progress_bar_enabled": { - "type": "boolean" - }, - "discovery_splash": { + "id": { "type": "string" - }, - "safety_alerts_channel_id": { - "type": [ - "null", - "string" - ] } }, "additionalProperties": false, "required": [ "id", - "joined_at", - "large", - "max_members", - "max_presences", - "max_video_channel_users", - "member_count", - "mfa_level", - "name", - "nsfw", - "nsfw_level", - "owner_id", - "parent", - "premium_subscription_count", - "premium_tier", - "presence_count", - "primary_category_id", - "template_id", - "welcome_screen", - "widget_channel_id", - "widget_enabled" + "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIRoleArray": { - "type": "array", - "items": { - "$ref": "#/definitions/Role" + "WebhookCreateResponse": { + "type": "object", + "properties": { + "user": { + "$ref": "#/definitions/User" + }, + "hook": { + "$ref": "#/definitions/Webhook" + } }, + "additionalProperties": false, + "required": [ + "hook", + "user" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIStickerArray": { - "type": "array", - "items": { - "$ref": "#/definitions/Sticker" + "CreateApplicationSKUResponseSchema": { + "type": "object", + "properties": { + "skus": { + "type": "array", + "items": { + "$ref": "#/definitions/SKU" + } + }, + "store_listings": { + "type": "array", + "items": { + "$ref": "#/definitions/StoreListingSchema" + } + } }, + "additionalProperties": false, + "required": [ + "skus", + "store_listings" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APITemplateArray": { - "type": "array", - "items": { - "$ref": "#/definitions/Template" + "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#" }, - "APIGuildVoiceRegion": { - "type": "array", - "items": { - "$ref": "#/definitions/GuildVoiceRegion" + "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#" }, - "APILimitsConfiguration": { + "LoginResponse": { + "anyOf": [ + { + "$ref": "#/definitions/TokenResponse" + }, + { + "$ref": "#/definitions/MFAResponse" + }, + { + "$ref": "#/definitions/WebAuthnResponse" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "LoginSchema": { "type": "object", "properties": { - "user": { - "$ref": "#/definitions/UserLimits" + "login": { + "type": "string" }, - "guild": { - "$ref": "#/definitions/GuildLimits" + "password": { + "minLength": 1, + "maxLength": 72, + "type": "string" }, - "message": { - "$ref": "#/definitions/MessageLimits" + "undelete": { + "type": "boolean" }, - "channel": { - "$ref": "#/definitions/ChannelLimits" + "captcha_key": { + "type": "string" }, - "rate": { - "$ref": "#/definitions/RateLimits" + "login_source": { + "type": "string" }, - "absoluteRate": { - "$ref": "#/definitions/GlobalRateLimits" + "gift_code_sku_id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "absoluteRate", - "channel", - "guild", - "message", - "rate", - "user" + "login", + "password" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "APIStickerPackArray": { - "type": "array", - "items": { - "$ref": "#/definitions/StickerPack" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "APIConnectionsConfiguration": { + "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#" }, - "UpdatesResponse": { + "MemberChangeSchema": { "type": "object", "properties": { - "name": { - "type": "string" + "roles": { + "type": "array", + "items": { + "type": "string" + } }, - "pub_date": { + "nick": { "type": "string" }, - "url": { + "avatar": { + "type": [ + "null", + "string" + ] + }, + "bio": { "type": "string" }, - "notes": { + "communication_disabled_until": { "type": [ "null", "string" ] } }, - "additionalProperties": false, - "required": [ - "name", - "notes", - "pub_date", - "url" - ], + "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "UploadAttachmentResponseSchema": { + "MemberNickChangeSchema": { "type": "object", "properties": { - "attachments": { - "type": "array", - "items": { - "$ref": "#/definitions/UploadAttachmentResponse" - } + "nick": { + "type": "string" } }, "additionalProperties": false, "required": [ - "attachments" + "nick" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "UploadAttachmentResponse": { + "MessageAcknowledgeSchema": { "type": "object", "properties": { - "id": { - "type": "string" + "manual": { + "type": "boolean" }, - "upload_url": { - "type": "string" + "mention_count": { + "type": "integer" }, - "upload_filename": { - "type": "string" + "flags": { + "enum": [ + 0, + 1, + 2, + 4 + ], + "type": "number" }, - "original_content_type": { + "last_viewed": { + "type": "integer" + }, + "token": { "type": "string" } }, "additionalProperties": false, - "required": [ - "upload_filename", - "upload_url" - ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserNoteResponse": { + "AcknowledgeDeleteSchema": { "type": "object", "properties": { - "note": { - "type": "string" - }, - "note_user_id": { - "type": "string" + "read_state_type": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "type": "number" }, - "user_id": { - "type": "string" + "version": { + "type": "integer" } }, "additionalProperties": false, - "required": [ - "note", - "note_user_id", - "user_id" - ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserProfileResponse": { + "MessageCreateSchema": { "type": "object", "properties": { - "user": { - "$ref": "#/definitions/PublicUser" + "type": { + "type": "integer" }, - "connected_accounts": { - "$ref": "#/definitions/PublicConnectedAccount" + "content": { + "type": "string" }, - "premium_guild_since": { - "type": "string", - "format": "date-time" + "mobile_network_type": { + "type": "string" }, - "premium_since": { - "type": "string", - "format": "date-time" + "nonce": { + "type": "string" }, - "mutual_guilds": { + "channel_id": { + "type": "string" + }, + "tts": { + "type": "boolean" + }, + "flags": { + "type": "integer" + }, + "embeds": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { + "$ref": "#/definitions/Embed" + } + }, + "embed": { + "$ref": "#/definitions/Embed" + }, + "allowed_mentions": { + "type": "object", + "properties": { + "parse": { + "type": "array", + "items": { "type": "string" - }, - "nick": { + } + }, + "roles": { + "type": "array", + "items": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "id" + "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" + }, + "type": { + "type": "integer" + } + }, + "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" + ] + } ] } }, - "premium_type": { - "type": "integer" - }, - "profile_themes_experiment_bucket": { - "type": "integer" + "sticker_ids": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, - "user_profile": { - "$ref": "#/definitions/UserProfile" + "components": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ActionRowComponent" + } + }, + { + "type": "null" + } + ] }, - "guild_member": { - "$ref": "#/definitions/PublicMember" + "poll": { + "$ref": "#/definitions/PollCreationSchema" }, - "guild_member_profile": { - "$ref": "#/definitions/PublicMemberProfile" + "enforce_nonce": { + "type": "boolean" }, - "badges": { + "applied_tags": { "type": "array", "items": { - "$ref": "#/definitions/Badge" - } - } - }, - "additionalProperties": false, - "required": [ - "badges", - "connected_accounts", - "mutual_guilds", - "premium_type", - "profile_themes_experiment_bucket", - "user", - "user_profile" - ], - "$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": { - "id": { + "thread_name": { "type": "string" }, - "type": { - "$ref": "#/definitions/RelationshipType" - }, - "nickname": { - "type": "null" - }, - "user": { - "$ref": "#/definitions/PublicUser" - } - }, - "additionalProperties": false, - "required": [ - "id", - "nickname", - "type", - "user" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "WebAuthnCreateResponse": { - "type": "object", - "properties": { - "name": { + "avatar_url": { "type": "string" }, - "id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id", - "name" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "WebhookCreateResponse": { - "type": "object", - "properties": { - "user": { - "$ref": "#/definitions/User" + "interaction": { + "$ref": "#/definitions/MessageInteractionSchema" }, - "hook": { - "$ref": "#/definitions/Webhook" + "interaction_metadata": { + "$ref": "#/definitions/MessageInteractionSchema" } }, "additionalProperties": false, - "required": [ - "hook", - "user" - ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "AckBulkSchema": { + "PollCreationSchema": { "type": "object", "properties": { - "read_states": { + "question": { + "$ref": "#/definitions/PollMedia" + }, + "answers": { "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" - ] + "$ref": "#/definitions/PollAnswer" } - } - }, - "additionalProperties": false, - "required": [ - "read_states" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ActivitySchema": { - "type": "object", - "properties": { - "afk": { - "type": "boolean" }, - "status": { - "$ref": "#/definitions/Status" + "duration": { + "type": "integer" }, - "activities": { - "type": "array", - "items": { - "$ref": "#/definitions/Activity" - } + "allow_multiselect": { + "type": "boolean" }, - "since": { + "layout_type": { "type": "integer" } }, "additionalProperties": false, "required": [ - "status" + "answers", + "question" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ApplicationAuthorizeSchema": { + "MessageInteractionSchema": { "type": "object", "properties": { - "authorize": { - "type": "boolean" - }, - "guild_id": { + "id": { "type": "string" }, - "permissions": { - "type": "string" + "type": { + "$ref": "#/definitions/InteractionType" }, - "captcha_key": { + "name": { "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": { + "command_type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" + }, + "ephemerality_reason": { "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 + "user": { + "$ref": "#/definitions/PublicUser" }, - "presets": { - "type": "array", - "items": [ - { - "type": "integer" - } - ], - "minItems": 1, - "maxItems": 1 + "user_id": { + "type": "string" + }, + "authorizing_integration_owners": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "original_response_message_id": { + "description": "A container for useful snowflake-related methods.", + "$ref": "#/definitions/Snowflake" + }, + "interacted_message_id": { + "description": "A container for useful snowflake-related methods.", + "$ref": "#/definitions/Snowflake" + }, + "triggering_interaction_metadata": { + "$ref": "#/definitions/MessageInteractionSchema" + }, + "target_user": { + "$ref": "#/definitions/PublicUser" + }, + "target_message_id": { + "description": "A container for useful snowflake-related methods.", + "$ref": "#/definitions/Snowflake" } }, "additionalProperties": false, "required": [ - "allow_list", - "presets" + "id", + "name", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "AutomodCustomWordsRuleSchema": { + "MessageEditSchema": { "type": "object", "properties": { - "allow_list": { - "type": "array", - "items": [ - { - "type": "string" - } - ], - "minItems": 1, - "maxItems": 1 + "embed": { + "$ref": "#/definitions/Embed" }, - "keyword_filter": { - "type": "array", - "items": [ - { + "file": { + "type": "object", + "properties": { + "filename": { "type": "string" } - ], - "minItems": 1, - "maxItems": 1 + }, + "additionalProperties": false, + "required": [ + "filename" + ] }, - "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": { + "flags": { + "type": "integer" + }, + "channel_id": { "type": "string" }, - "enabled": { - "type": "boolean" + "content": { + "type": "string" }, - "event_type": { - "type": "integer" + "mobile_network_type": { + "type": "string" }, - "exempt_channels": { + "nonce": { + "type": "string" + }, + "tts": { + "type": "boolean" + }, + "embeds": { "type": "array", - "items": [ - { - "type": "string" + "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" } - ], - "minItems": 1, - "maxItems": 1 + }, + "additionalProperties": false }, - "exempt_roles": { - "type": "array", - "items": [ - { + "message_reference": { + "type": "object", + "properties": { + "message_id": { + "type": "string" + }, + "channel_id": { "type": "string" + }, + "guild_id": { + "type": "string" + }, + "fail_if_not_exists": { + "type": "boolean" + }, + "type": { + "type": "integer" } - ], - "minItems": 1, - "maxItems": 1 - }, - "guild_id": { - "type": "string" + }, + "additionalProperties": false, + "required": [ + "message_id" + ] }, - "name": { + "payload_json": { "type": "string" }, - "position": { - "type": "integer" - }, - "trigger_type": { - "type": "integer" + "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" + ] + } + ] + } }, - "trigger_metadata": { + "sticker_ids": { "anyOf": [ { - "$ref": "#/definitions/AutomodMentionSpamRuleSchema" + "type": "array", + "items": { + "type": "string" + } }, { - "$ref": "#/definitions/AutomodSuspectedSpamRuleSchema" - }, + "type": "null" + } + ] + }, + "components": { + "anyOf": [ { - "$ref": "#/definitions/AutomodCommonlyFlaggedWordsRuleSchema" + "type": "array", + "items": { + "$ref": "#/definitions/ActionRowComponent" + } }, { - "$ref": "#/definitions/AutomodCustomWordsRuleSchema" + "type": "null" } ] - } - }, - "additionalProperties": false, - "required": [ - "creator_id", - "enabled", - "event_type", - "exempt_channels", - "exempt_roles", - "guild_id", - "name", - "position", - "trigger_metadata", - "trigger_type" - ], + }, + "poll": { + "$ref": "#/definitions/PollCreationSchema" + }, + "enforce_nonce": { + "type": "boolean" + }, + "applied_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "thread_name": { + "type": "string" + }, + "avatar_url": { + "type": "string" + }, + "interaction": { + "$ref": "#/definitions/MessageInteractionSchema" + }, + "interaction_metadata": { + "$ref": "#/definitions/MessageInteractionSchema" + } + }, + "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "BackupCodesChallengeSchema": { + "MfaCodesSchema": { "type": "object", "properties": { "password": { "minLength": 1, "maxLength": 72, "type": "string" + }, + "regenerate": { + "type": "boolean" } }, "additionalProperties": false, @@ -4330,117 +7941,99 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "BanCreateSchema": { + "ModifyGuildStickerSchema": { "type": "object", "properties": { - "delete_message_seconds": { - "type": "integer" + "name": { + "minLength": 2, + "maxLength": 30, + "type": "string" }, - "delete_message_days": { - "type": "integer" + "description": { + "maxLength": 100, + "type": "string" }, - "reason": { + "tags": { + "maxLength": 200, "type": "string" } }, "additionalProperties": false, + "required": [ + "name", + "tags" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "BanModeratorSchema": { + "PasswordResetSchema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "user_id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "executor_id": { + "password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "reason": { + "token": { "type": "string" } }, "additionalProperties": false, "required": [ - "executor_id", - "guild_id", - "id", - "user_id" + "password", + "token" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "BanRegistrySchema": { + "PreloadMessagesRequestSchema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "user_id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "executor_id": { - "type": "string" - }, - "ip": { - "type": "string" - }, - "reason": { - "type": "string" + "channels": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "executor_id", - "guild_id", - "id", - "user_id" + "channels" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "BotModifySchema": { + "PruneSchema": { "type": "object", "properties": { - "avatar": { - "type": "string" - }, - "username": { - "type": "string" + "days": { + "type": "integer" } }, "additionalProperties": false, + "required": [ + "days" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "BulkBanSchema": { + "PurgeSchema": { "type": "object", "properties": { - "user_ids": { - "type": "array", - "items": { - "type": "string" - } + "before": { + "type": "string" }, - "delete_message_seconds": { - "type": "integer" + "after": { + "type": "string" } }, "additionalProperties": false, "required": [ - "user_ids" + "after", + "before" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "BulkDeleteSchema": { + "RefreshUrlsRequestSchema": { "type": "object", "properties": { - "messages": { + "attachment_urls": { "type": "array", "items": { "type": "string" @@ -4449,565 +8042,560 @@ }, "additionalProperties": false, "required": [ - "messages" + "attachment_urls" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ChannelModifySchema": { + "RegisterSchema": { "type": "object", "properties": { - "name": { - "maxLength": 100, + "username": { + "minLength": 2, "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": { + "password": { + "minLength": 1, + "maxLength": 72, "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" - ] - } + "consent": { + "type": "boolean" }, - "parent_id": { + "email": { + "format": "email", "type": "string" }, - "id": { + "fingerprint": { "type": "string" }, - "nsfw": { - "type": "boolean" + "invite": { + "type": "string" }, - "rtc_region": { + "date_of_birth": { "type": "string" }, - "default_auto_archive_duration": { - "type": "integer" + "gift_code_sku_id": { + "type": "string" }, - "default_reaction_emoji": { - "type": [ - "null", - "string" - ] + "captcha_key": { + "type": "string" }, - "flags": { - "type": "integer" + "promotional_email_opt_in": { + "type": "boolean" }, - "default_thread_rate_limit_per_user": { - "type": "integer" + "unique_username_registration": { + "type": "boolean" }, - "video_quality_mode": { - "type": "integer" + "global_name": { + "type": "string" } }, "additionalProperties": false, + "required": [ + "consent", + "username" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ChannelPermissionOverwriteSchema": { + "RelationshipPatchSchema": { "type": "object", "properties": { - "allow": { + "nickname": { "type": "string" - }, - "deny": { + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RelationshipPostSchema": { + "type": "object", + "properties": { + "discriminator": { "type": "string" }, - "id": { + "username": { "type": "string" - }, - "type": { - "$ref": "#/definitions/ChannelPermissionOverwriteType" } }, "additionalProperties": false, "required": [ - "allow", - "deny", - "id", - "type" + "discriminator", + "username" ], "$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" - ] + "RelationshipPutSchema": { + "type": "object", + "properties": { + "type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" + } }, + "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "CodesVerificationSchema": { + "RequestGuildMembersSchema": { "type": "object", "properties": { - "key": { - "type": "string" + "guild_id": { + "anyOf": [ + { + "type": "array", + "items": [ + { + "type": "string" + } + ], + "minItems": 1, + "maxItems": 1 + }, + { + "type": "string" + } + ] }, - "nonce": { + "query": { "type": "string" }, - "regenerate": { + "limit": { + "type": "integer" + }, + "presences": { "type": "boolean" + }, + "user_ids": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] + }, + "nonce": { + "type": "string" } }, "additionalProperties": false, "required": [ - "key", - "nonce" + "guild_id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ConnectedAccountSchema": { + "RoleModifySchema": { "type": "object", "properties": { - "external_id": { + "name": { "type": "string" }, - "user_id": { + "permissions": { "type": "string" }, - "token_data": { - "$ref": "#/definitions/ConnectedAccountTokenData" + "color": { + "type": "integer" }, - "friend_sync": { + "hoist": { "type": "boolean" }, - "name": { - "type": "string" - }, - "revoked": { + "mentionable": { "type": "boolean" }, - "show_activity": { + "position": { "type": "integer" }, - "type": { + "icon": { "type": "string" }, - "verified": { - "type": "boolean" - }, - "visibility": { - "type": "integer" + "unicode_emoji": { + "type": "string" }, - "integrations": { - "type": "array", - "items": { + "colors": { + "type": "object", + "properties": { + "primary_color": { + "type": "integer" + }, + "secondary_color": { + "type": [ + "null", + "integer" + ] + }, + "tertiary_color": { + "type": [ + "null", + "integer" + ] + } + }, + "additionalProperties": false, + "required": [ + "primary_color" + ] + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RolePositionUpdateSchema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "string" + }, + "position": { + "type": "integer" } }, - "metadata_": {}, - "metadata_visibility": { - "type": "integer" - }, - "two_way_link": { - "type": "boolean" - } + "additionalProperties": false, + "required": [ + "id", + "position" + ] }, - "additionalProperties": false, - "required": [ - "external_id", - "name", - "type", - "user_id" - ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ConnectionCallbackSchema": { + "SelectProtocolSchema": { "type": "object", "properties": { - "code": { + "protocol": { + "enum": [ + "udp", + "webrtc" + ], "type": "string" }, - "state": { - "type": "string" + "data": { + "anyOf": [ + { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "mode": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "address", + "mode", + "port" + ] + }, + { + "type": "string" + } + ] }, - "insecure": { - "type": "boolean" + "sdp": { + "type": "string" }, - "friend_sync": { - "type": "boolean" + "codecs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "enum": [ + "H264", + "VP8", + "VP9", + "opus" + ], + "type": "string" + }, + "type": { + "enum": [ + "audio", + "video" + ], + "type": "string" + }, + "priority": { + "type": "integer" + }, + "payload_type": { + "type": "integer" + }, + "rtx_payload_type": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "name", + "payload_type", + "priority", + "type" + ] + } }, - "openid_params": {} + "rtc_connection_id": { + "type": "string" + } }, "additionalProperties": false, "required": [ - "friend_sync", - "insecure", - "state" + "data", + "protocol" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ConnectionUpdateSchema": { + "SettingsProtoUpdateSchema": { "type": "object", "properties": { - "visibility": { - "type": "boolean" - }, - "show_activity": { - "type": "boolean" + "settings": { + "type": "string" }, - "metadata_visibility": { - "type": "boolean" + "required_data_version": { + "type": "integer" } }, "additionalProperties": false, + "required": [ + "settings" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "DmChannelCreateSchema": { + "SettingsProtoUpdateJsonSchema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "recipients": { - "type": "array", - "items": { - "type": "string" - } - }, - "recipient_id": { - "type": "string" + "settings": { + "$ref": "#/definitions/JsonValue" }, - "access_tokens": { - "type": "array", - "items": { - "type": "string" - } + "required_data_version": { + "type": "integer" } }, "additionalProperties": false, + "required": [ + "settings" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmailDomainLookupSchema": { + "TeamCreateSchema": { "type": "object", "properties": { - "allow_multiple_guilds": { - "type": "boolean" - }, - "email": { - "type": "string" - }, - "use_verification_code": { - "type": "boolean" - }, - "guild_id": { + "name": { "type": "string" } }, "additionalProperties": false, "required": [ - "allow_multiple_guilds", - "email", - "use_verification_code" + "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmailDomainLookupVerifyCodeSchema": { + "TemplateCreateSchema": { "type": "object", "properties": { - "email": { - "type": "string" - }, - "guild_id": { + "name": { "type": "string" }, - "code": { + "description": { "type": "string" } }, "additionalProperties": false, "required": [ - "code", - "email", - "guild_id" + "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmojiCreateSchema": { + "TemplateModifySchema": { "type": "object", "properties": { "name": { "type": "string" }, - "image": { + "description": { "type": "string" - }, - "require_colons": { - "type": [ - "null", - "boolean" - ] - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } } }, "additionalProperties": false, "required": [ - "image" + "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "EmojiModifySchema": { + "TotpDisableSchema": { "type": "object", "properties": { - "name": { + "code": { + "minLength": 6, + "maxLength": 6, "type": "string" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } } }, "additionalProperties": false, + "required": [ + "code" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ForgotPasswordSchema": { + "TotpEnableSchema": { "type": "object", "properties": { - "login": { + "password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "captcha_key": { + "code": { + "minLength": 6, + "maxLength": 6, + "type": "string" + }, + "secret": { "type": "string" } }, "additionalProperties": false, "required": [ - "login" + "password" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GreetRequestSchema": { + "TotpSchema": { "type": "object", "properties": { - "sticker_ids": { - "type": "array", - "items": { - "type": "string" - } + "code": { + "type": "string" }, - "allowed_mentions": { - "$ref": "#/definitions/AllowedMentions" + "ticket": { + "type": "string" }, - "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" + "gift_code_sku_id": { + "type": [ + "null", + "string" + ] + }, + "login_source": { + "type": [ + "null", + "string" ] } }, "additionalProperties": false, "required": [ - "sticker_ids" + "code", + "ticket" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildCreateSchema": { + "UploadAttachmentRequestSchema": { "type": "object", "properties": { - "name": { - "maxLength": 100, - "type": "string" - }, - "region": { - "type": "string" - }, - "icon": { - "type": [ - "null", - "string" - ] - }, - "channels": { + "files": { "type": "array", "items": { - "$ref": "#/definitions/ChannelModifySchema" + "$ref": "#/definitions/UploadAttachmentRequest" } - }, - "system_channel_id": { - "type": "string" - }, - "rules_channel_id": { - "type": "string" - }, - "guild_template_code": { - "type": "string" - }, - "staff_only": { - "type": "boolean" } }, "additionalProperties": false, + "required": [ + "files" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildSubscriptionsBulkSchema": { + "UserDeleteSchema": { "type": "object", "properties": { - "subscriptions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/GuildSubscriptionSchema" - } + "user_id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "subscriptions" + "user_id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildSubscriptionSchema": { + "UserGuildSettingsSchema": { "type": "object", "properties": { - "channels": { + "channel_overrides": { "type": "object", "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer" - } - } + "$ref": "#/definitions/ChannelOverride" } }, - "members": { - "type": "array", - "items": { - "type": "string" - } + "version": { + "type": "integer" + }, + "message_notifications": { + "type": "integer" + }, + "mobile_push": { + "type": "boolean" + }, + "mute_config": { + "anyOf": [ + { + "$ref": "#/definitions/MuteConfig" + }, + { + "type": "null" + } + ] }, - "activities": { + "muted": { "type": "boolean" }, - "threads": { + "suppress_everyone": { "type": "boolean" }, - "typing": { - "const": true, + "suppress_roles": { "type": "boolean" }, - "member_updates": { + "guild_id": { + "type": [ + "null", + "string" + ] + }, + "flags": { + "type": "integer" + }, + "mute_scheduled_events": { "type": "boolean" }, - "thread_member_lists": { - "type": "array", - "items": {} + "hide_muted_channels": { + "type": "boolean" + }, + "notify_highlights": { + "const": 0, + "type": "number" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildTemplateCreateSchema": { + "UserModifySchema": { "type": "object", "properties": { - "name": { + "username": { + "minLength": 2, "type": "string" }, "avatar": { @@ -5015,1023 +8603,1087 @@ "null", "string" ] - } - }, - "additionalProperties": false, - "required": [ - "name" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildUpdateSchema": { - "type": "object", - "properties": { - "banner": { - "type": [ - "null", - "string" - ] }, - "splash": { + "bio": { + "type": "string" + }, + "accent_color": { + "type": "integer" + }, + "banner": { "type": [ "null", "string" ] }, - "description": { + "password": { + "minLength": 1, + "maxLength": 72, "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": { + "new_password": { + "minLength": 1, + "maxLength": 72, "type": "string" }, - "afk_timeout": { - "type": "integer" - }, - "afk_channel_id": { + "code": { + "minLength": 6, + "maxLength": 6, "type": "string" }, - "preferred_locale": { + "email": { + "format": "email", "type": "string" }, - "premium_progress_bar_enabled": { - "type": "boolean" - }, - "discovery_splash": { + "discriminator": { + "minLength": 4, + "maxLength": 4, + "type": "string" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserNoteUpdateSchema": { + "type": "object", + "properties": { + "note": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "note" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserProfileModifySchema": { + "type": "object", + "properties": { + "bio": { "type": "string" }, - "safety_alerts_channel_id": { + "accent_color": { "type": [ "null", - "string" + "integer" ] }, - "name": { - "maxLength": 100, - "type": "string" - }, - "region": { - "type": "string" - }, - "icon": { + "banner": { "type": [ "null", "string" ] }, - "system_channel_id": { - "type": "string" - }, - "rules_channel_id": { - "type": "string" - }, - "guild_template_code": { + "pronouns": { "type": "string" }, - "staff_only": { - "type": "boolean" + "theme_colors": { + "items": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array", + "minItems": 2, + "maxItems": 2 } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildUpdateWelcomeScreenSchema": { + "VanityUrlSchema": { "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": { + "code": { + "minLength": 1, + "maxLength": 20, "type": "string" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "HubWaitlistSignupSchema": { + "VerifyEmailSchema": { "type": "object", "properties": { - "email": { - "type": "string" + "captcha_key": { + "type": [ + "null", + "string" + ] }, - "school": { + "token": { "type": "string" } }, "additionalProperties": false, "required": [ - "email", - "school" + "token" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InviteCreateSchema": { + "VoiceStateUpdateSchema": { "type": "object", "properties": { - "target_user_id": { - "type": "string" - }, - "target_type": { + "guild_id": { "type": "string" }, - "validate": { + "channel_id": { "type": "string" }, - "max_age": { - "type": "integer" - }, - "max_uses": { - "type": "integer" + "self_mute": { + "type": "boolean" }, - "temporary": { + "self_deaf": { "type": "boolean" }, - "unique": { + "self_video": { "type": "boolean" }, - "target_user": { + "preferred_region": { "type": "string" }, - "target_user_type": { - "type": "integer" + "request_to_speak_timestamp": { + "type": "string", + "format": "date-time" + }, + "suppress": { + "type": "boolean" }, "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" + "required": [ + "self_deaf", + "self_mute" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GenerateWebAuthnCredentialsSchema": { + "type": "object", + "properties": { + "password": { + "type": "string" } }, "additionalProperties": false, "required": [ - "mfa", - "sms", - "ticket", - "token" + "password" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "WebAuthnResponse": { + "CreateWebAuthnCredentialSchema": { "type": "object", "properties": { - "webauthn": { + "credential": { "type": "string" }, - "ticket": { + "name": { "type": "string" }, - "mfa": { - "type": "boolean", - "const": true - }, - "sms": { - "type": "boolean", - "const": false - }, - "token": { - "type": "null" + "ticket": { + "type": "string" } }, "additionalProperties": false, "required": [ - "mfa", - "sms", - "ticket", - "token", - "webauthn" + "credential", + "name", + "ticket" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "LoginResponse": { + "WebAuthnPostSchema": { "anyOf": [ { - "$ref": "#/definitions/TokenResponse" - }, - { - "$ref": "#/definitions/MFAResponse" + "$ref": "#/definitions/GenerateWebAuthnCredentialsSchema" }, { - "$ref": "#/definitions/WebAuthnResponse" + "$ref": "#/definitions/CreateWebAuthnCredentialSchema" } ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "LoginSchema": { + "WebAuthnTotpSchema": { "type": "object", "properties": { - "login": { - "type": "string" - }, - "password": { - "minLength": 1, - "maxLength": 72, + "code": { "type": "string" }, - "undelete": { - "type": "boolean" - }, - "captcha_key": { + "ticket": { "type": "string" - }, - "login_source": { + } + }, + "additionalProperties": false, + "required": [ + "code", + "ticket" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "WebhookCreateSchema": { + "type": "object", + "properties": { + "name": { + "maxLength": 80, "type": "string" }, - "gift_code_sku_id": { + "avatar": { "type": "string" } }, "additionalProperties": false, "required": [ - "login", - "password" + "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "MemberChangeProfileSchema": { + "WebhookExecuteSchema": { "type": "object", "properties": { - "banner": { - "type": [ - "null", - "string" - ] + "content": { + "type": "string" }, - "nick": { + "username": { "type": "string" }, - "bio": { + "avatar_url": { "type": "string" }, - "pronouns": { + "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 + }, + "components": { + "type": "array", + "items": {} + }, + "file": { + "type": "object", + "properties": { + "filename": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "filename" + ] + }, + "payload_json": { "type": "string" }, - "theme_colors": { - "items": [ - { - "type": "integer" + "attachments": { + "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "filename": { + "type": "string" + } }, - { - "type": "integer" + "additionalProperties": false, + "required": [ + "filename", + "id" + ] + } + }, + "flags": { + "type": "integer" + }, + "thread_name": { + "type": "string" + }, + "applied_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "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" + ] + }, + "sticker_ids": { "type": "array", - "minItems": 2, - "maxItems": 2 + "items": { + "type": "string" + } + }, + "nonce": { + "type": "string" + }, + "enforce_nonce": { + "type": "boolean" + }, + "poll": { + "$ref": "#/definitions/PollCreationSchema" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "MemberChangeSchema": { + "WebhookUpdateSchema": { "type": "object", "properties": { - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "nick": { + "name": { "type": "string" }, "avatar": { - "type": [ - "null", - "string" - ] - }, - "bio": { "type": "string" }, - "communication_disabled_until": { - "type": [ - "null", - "string" - ] + "channel_id": { + "type": "string" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "MemberNickChangeSchema": { + "WidgetModifySchema": { "type": "object", "properties": { - "nick": { + "enabled": { + "type": "boolean" + }, + "channel_id": { "type": "string" } }, "additionalProperties": false, "required": [ - "nick" + "channel_id", + "enabled" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "MessageAcknowledgeSchema": { + "SKUSystemRequirementSchema": { "type": "object", "properties": { - "manual": { - "type": "boolean" + "ram": { + "description": "The amount of RAM in megabytes", + "type": "integer" }, - "mention_count": { + "disk": { + "description": "The amount of disk space in megabytes", "type": "integer" }, - "flags": { - "enum": [ - 0, - 1, - 2, - 4 - ], - "type": "number" + "operating_system_version": { + "description": "The required operating system version", + "$ref": "#/definitions/LocalizedStringSchema" }, - "last_viewed": { - "type": "integer" + "cpu": { + "description": "The required CPU", + "$ref": "#/definitions/LocalizedStringSchema" }, - "token": { - "type": "string" + "gpu": { + "description": "The required GPU", + "$ref": "#/definitions/LocalizedStringSchema" + }, + "sound_card": { + "description": "The required sound card", + "$ref": "#/definitions/LocalizedStringSchema" + }, + "directx": { + "description": "The required DirectX version", + "$ref": "#/definitions/LocalizedStringSchema" + }, + "network": { + "description": "The required network connectivity status", + "$ref": "#/definitions/LocalizedStringSchema" + }, + "notes": { + "description": "Additional notes", + "$ref": "#/definitions/LocalizedStringSchema" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "AcknowledgeDeleteSchema": { + "SKUSystemRequirementsSchema": { "type": "object", "properties": { - "read_state_type": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "type": "number" + "minimum": { + "description": "The minimum system requirements", + "$ref": "#/definitions/SKUSystemRequirementSchema" }, - "version": { - "type": "integer" + "recommended": { + "description": "The recommended system requirements", + "$ref": "#/definitions/SKUSystemRequirementSchema" } }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "MessageCreateSchema": { + "StoreCarouselItemSchema": { "type": "object", "properties": { - "type": { - "type": "integer" - }, - "content": { + "youtube_video_id": { + "description": "The YouTube video ID for the item", "type": "string" }, - "mobile_network_type": { + "asset_id": { + "description": "The store asset ID for the item", "type": "string" }, - "nonce": { + "thumbnail_asset_id": { + "description": "The store asset ID for the thumbnail", "type": "string" }, - "channel_id": { + "background_asset_id": { + "description": "The store asset ID for the background", "type": "string" }, - "tts": { - "type": "boolean" - }, - "flags": { - "type": "integer" + "label": { + "description": "The label for the item", + "type": "string" }, - "embeds": { + "label_icon_asset_id": { + "description": "The store asset ID for the label icon", + "type": "string" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SocialLayerMetadataSchema": { + "type": "object", + "properties": { + "carousel_items": { + "description": "The carousel items for the listing", "type": "array", "items": { - "$ref": "#/definitions/Embed" + "$ref": "#/definitions/StoreCarouselItemSchema" } }, - "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 + "label": { + "description": "The label for the listing", + "type": "string" }, - "message_reference": { - "type": "object", - "properties": { - "message_id": { - "type": "string" - }, - "channel_id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "fail_if_not_exists": { - "type": "boolean" - }, - "type": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "message_id" + "expires_at": { + "description": "When the listing expires", + "type": [ + "null", + "string" ] }, - "payload_json": { + "card_image_asset_id": { + "description": "The store asset ID for the card image", "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" - ] - } - ] - } + "card_background_image_asset_id": { + "description": "The store asset ID for the card background image", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "carousel_items", + "expires_at", + "label" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUTenantMetadataSchema": { + "type": "object", + "properties": { + "guild_monetization": { + "description": "Guild monetization data", + "$ref": "#/definitions/SKUGuildMonetizationMetadataSchema" }, - "sticker_ids": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } + "social_layer": { + "description": "Social layer game item data", + "$ref": "#/definitions/SocialLayerMetadataSchema" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleBannerAssetSchema": { + "type": "object", + "properties": { + "background_style": { + "description": "The CSS the web client should use", + "type": [ + "null", + "string" ] }, - "components": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/ActionRowComponent" - } - }, - { - "type": "null" - } + "desktop_max_height": { + "description": "Max height of the banner on desktop", + "type": [ + "null", + "integer" ] }, - "poll": { - "$ref": "#/definitions/PollCreationSchema" - }, - "enforce_nonce": { - "type": "boolean" - }, - "applied_tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "thread_name": { - "type": "string" - }, - "avatar_url": { - "type": "string" - }, - "interaction": { - "$ref": "#/definitions/MessageInteractionSchema" + "mobile_max_height": { + "description": "Max height of the banner on mobile", + "type": [ + "null", + "integer" + ] }, - "interaction_metadata": { - "$ref": "#/definitions/MessageInteractionSchema" + "responsive": { + "description": "Whether the banner is responsive", + "type": [ + "null", + "boolean" + ] } }, "additionalProperties": false, + "required": [ + "background_style", + "responsive" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PollCreationSchema": { + "CollectibleItemAssetsSchema": { "type": "object", "properties": { - "question": { - "$ref": "#/definitions/PollMedia" - }, - "answers": { - "type": "array", - "items": { - "$ref": "#/definitions/PollAnswer" - } - }, - "duration": { - "type": "integer" + "static_image_url": { + "description": "The URL for the static image of the collectible", + "type": "string" }, - "allow_multiselect": { - "type": "boolean" + "animated_image_url": { + "description": "The URL for the animated image of the collectible (in APNG format)", + "type": "string" }, - "layout_type": { - "type": "integer" + "video_url": { + "description": "The URL for the video of the collectible", + "type": "string" } }, "additionalProperties": false, "required": [ - "answers", - "question" + "animated_image_url", + "static_image_url" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "MessageInteractionSchema": { + "CollectibleAvatarDecorationSchema": { "type": "object", "properties": { - "id": { - "type": "string" - }, "type": { - "$ref": "#/definitions/InteractionType" + "$ref": "#/definitions/CollectibleItemType", + "description": "The type of collectible" }, - "name": { + "id": { + "description": "The ID of the avatar decoration", "type": "string" }, - "command_type": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "number" - }, - "ephemerality_reason": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/PublicUser" - }, - "user_id": { + "sku_id": { + "description": "The SKU ID of the avatar decoration", "type": "string" }, - "authorizing_integration_owners": { - "type": "object", - "properties": {}, - "additionalProperties": true - }, - "original_response_message_id": { - "description": "A container for useful snowflake-related methods.", - "$ref": "#/definitions/Snowflake" - }, - "interacted_message_id": { - "description": "A container for useful snowflake-related methods.", - "$ref": "#/definitions/Snowflake" - }, - "triggering_interaction_metadata": { - "$ref": "#/definitions/MessageInteractionSchema" + "asset": { + "description": "The asset hash of the avatar decoration", + "type": "string" }, - "target_user": { - "$ref": "#/definitions/PublicUser" + "assets": { + "$ref": "#/definitions/CollectibleItemAssetsSchema", + "description": "The URLs for the static and animated images of the avatar decoration" }, - "target_message_id": { - "description": "A container for useful snowflake-related methods.", - "$ref": "#/definitions/Snowflake" + "label": { + "description": "The avatar decoration accessibility description", + "type": "string" } }, "additionalProperties": false, "required": [ + "asset", + "assets", "id", - "name", + "label", + "sku_id", "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "MessageEditSchema": { + "CollectibleProfileEffectSchema": { "type": "object", "properties": { - "embed": { - "$ref": "#/definitions/Embed" - }, - "file": { - "type": "object", - "properties": { - "filename": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filename" - ] - }, - "flags": { - "type": "integer" + "type": { + "$ref": "#/definitions/CollectibleItemType", + "description": "The type of collectible" }, - "channel_id": { + "id": { + "description": "The ID of the profile effect", "type": "string" }, - "content": { + "sku_id": { + "description": "The ID of the profile effect SKU", "type": "string" }, - "mobile_network_type": { + "title": { + "description": "The title of the profile effect", "type": "string" }, - "nonce": { + "description": { + "description": "The description of the profile effect", "type": "string" }, - "tts": { - "type": "boolean" + "accessibilityLabel": { + "description": "An accessible description of the profile effect", + "type": "string" }, - "embeds": { - "type": "array", - "items": { - "$ref": "#/definitions/Embed" - } + "animationType": { + "$ref": "#/definitions/CollectibleProfileEffectAnimationType", + "description": "The type of animation used by the profile effect" }, - "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 + "thumbnailPreviewSrc": { + "description": "The URL of the profile effect's thumbnail preview image (in APNG format)", + "type": "string" }, - "message_reference": { - "type": "object", - "properties": { - "message_id": { - "type": "string" - }, - "channel_id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "fail_if_not_exists": { - "type": "boolean" - }, - "type": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "message_id" - ] + "reducedMotionSrc": { + "description": "A URL of the profile effect with reduced motion (in APNG format)", + "type": "string" }, - "payload_json": { + "staticFrameSrc": { + "description": "The URL of the static frame of the profile effect (in PNG format)", "type": "string" }, - "attachments": { - "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion", + "effects": { + "description": "The animation frames for the profile effect", "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" - ] - } - ] + "$ref": "#/definitions/CollectibleProfileEffectAnimation" } + } + }, + "additionalProperties": false, + "required": [ + "accessibilityLabel", + "animationType", + "description", + "effects", + "id", + "reducedMotionSrc", + "sku_id", + "staticFrameSrc", + "thumbnailPreviewSrc", + "title", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleNameplateSchema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/CollectibleItemType", + "description": "The type of collectible" }, - "sticker_ids": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] + "id": { + "description": "The ID of the nameplate", + "type": "string" }, - "components": { - "anyOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/ActionRowComponent" - } - }, - { - "type": "null" - } - ] + "sku_id": { + "description": "The SKU ID of the nameplate", + "type": "string" }, - "poll": { - "$ref": "#/definitions/PollCreationSchema" + "palette": { + "$ref": "#/definitions/CollectibleNameplateColorPalette", + "description": "The nameplate's color palette" }, - "enforce_nonce": { - "type": "boolean" + "asset": { + "description": "The nameplate asset path", + "type": "string" }, - "applied_tags": { + "assets": { + "$ref": "#/definitions/CollectibleItemAssetsSchema", + "description": "The URLs for the static and animated images of the nameplate" + }, + "label": { + "description": "The nameplate accessibility description", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "asset", + "assets", + "id", + "label", + "palette", + "sku_id", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleStyleSchema": { + "type": "object", + "properties": { + "background_colors": { + "description": "An array of background colors", "type": "array", "items": { - "type": "string" + "type": "integer" } }, - "thread_name": { - "type": "string" + "button_colors": { + "description": "An array of button colors", + "type": "array", + "items": { + "type": "integer" + } }, - "avatar_url": { + "confetti_colors": { + "description": "An array of confetti colors", + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "background_colors", + "button_colors", + "confetti_colors" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UnitPriceSchema": { + "type": "object", + "properties": { + "currency": { + "description": "The lower-cased ISO 4217 currency code", "type": "string" }, - "interaction": { - "$ref": "#/definitions/MessageInteractionSchema" + "amount": { + "description": "The price amount in the smallest currency unit", + "type": "integer" }, - "interaction_metadata": { - "$ref": "#/definitions/MessageInteractionSchema" + "exponent": { + "description": "The exponent to convert the amount to the displayed currency unit", + "type": "integer" } }, "additionalProperties": false, + "required": [ + "amount", + "currency", + "exponent" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "MfaCodesSchema": { + "CountryPricesSchema": { "type": "object", "properties": { - "password": { - "minLength": 1, - "maxLength": 72, + "country_code": { + "description": "The ISO 3166-1 alpha-2 country code", "type": "string" }, - "regenerate": { - "type": "boolean" + "prices": { + "description": "The prices for the plan in the given country", + "type": "array", + "items": { + "$ref": "#/definitions/UnitPriceSchema" + } } }, "additionalProperties": false, "required": [ - "password" + "country_code", + "prices" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ModifyGuildStickerSchema": { + "SubscriptionPricesSchema": { "type": "object", "properties": { - "name": { - "minLength": 2, - "maxLength": 30, - "type": "string" - }, - "description": { - "maxLength": 100, - "type": "string" + "country_prices": { + "$ref": "#/definitions/CountryPricesSchema", + "description": "The prices for the plan for the given country" }, - "tags": { - "maxLength": 200, - "type": "string" + "payment_source_prices": { + "description": "The prices for the plan per user payment source ID", + "$ref": "#/definitions/Record" } }, "additionalProperties": false, "required": [ - "name", - "tags" + "country_prices" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PasswordResetSchema": { + "CollectibleAssetConfigSchema": { "type": "object", "properties": { - "password": { - "minLength": 1, - "maxLength": 72, - "type": "string" + "animated": { + "description": "The URL of the animated image (in APNG format)", + "type": [ + "null", + "string" + ] }, - "token": { + "static": { + "description": "The URL of the static image", "type": "string" } }, "additionalProperties": false, "required": [ - "password", - "token" + "animated", + "static" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PreloadMessagesRequestSchema": { + "HeroShopBlockSchema": { "type": "object", "properties": { - "channels": { + "type": { + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" + }, + "category_sku_id": { + "description": "The collectible category SKU ID", + "type": "string" + }, + "category_store_listing_id": { + "description": "The collectible category store listing ID", + "type": "string" + }, + "banner_asset": { + "$ref": "#/definitions/CollectibleAssetConfigSchema", + "description": "The banner asset" + }, + "banner_display_config": { + "$ref": "#/definitions/CollectibleBannerAssetSchema", + "description": "The display configuration" + }, + "banner_text_color": { + "description": "The hex color code for the banner text", + "type": "string" + }, + "hero_logo_url": { + "description": "The URL of the hero logo image", + "type": "string" + }, + "hero_rive_url": { + "description": "The URL of the hero Rive animation", + "type": "string" + }, + "logo_display_config": { + "$ref": "#/definitions/CollectibleBannerAssetSchema", + "description": "The shop block logo display config" + }, + "logo_url": { + "description": "The URL of the hero logo image", + "type": "string" + }, + "name": { + "description": "The name of the shop block", + "type": "string" + }, + "mobile_title": { + "description": "The title to be displayed on mobile devices", + "type": "string" + }, + "mobile_summary": { + "description": "The summary to be displayed on mobile devices", + "type": "string" + }, + "mobile_products_title": { + "description": "The products title to be displayed on mobile devices", + "type": "string" + }, + "mobile_hero_url": { + "description": "The URL of the mobile hero banner image", + "type": "string" + }, + "mobile_hero_animated_url": { + "description": "The URL of the mobile animated hero banner image", + "type": "string" + }, + "ranked_sku_ids": { + "description": "The SKU IDs ranked by popularity in the collectible category", "type": "array", "items": { "type": "string" } + }, + "summary": { + "description": "A description of the collectible category", + "type": "string" + }, + "unpublished_at": { + "description": "When the collectible category should be unpublished", + "type": [ + "null", + "string" + ] } }, "additionalProperties": false, "required": [ - "channels" + "banner_asset", + "banner_display_config", + "category_sku_id", + "category_store_listing_id", + "hero_logo_url", + "logo_display_config", + "logo_url", + "name", + "ranked_sku_ids", + "summary", + "type", + "unpublished_at" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PruneSchema": { + "SubBlockSchema": { "type": "object", "properties": { - "days": { - "type": "integer" + "type": { + "$ref": "#/definitions/ShopSubBlockType", + "description": "The subblock type" + }, + "category_store_listing_id": { + "description": "The collectible category store listing ID", + "type": "string" + }, + "asset_url": { + "description": "The URL of the shop block asset", + "type": "string" + }, + "banner_text_color": { + "description": "The hex color code of the banner text", + "type": [ + "null", + "string" + ] + }, + "banner_url": { + "description": "The URL of the banner image", + "type": "string" + }, + "body_text": { + "description": "The body text of the shop block", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "The name of the shop block", + "type": "string" + }, + "unpublished_at": { + "description": "When the collectible category should be unpublished", + "type": [ + "null", + "string" + ] } }, "additionalProperties": false, "required": [ - "days" + "asset_url", + "banner_text_color", + "banner_url", + "body_text", + "category_store_listing_id", + "name", + "type", + "unpublished_at" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PurgeSchema": { + "FeaturedShopBlockSchema": { "type": "object", "properties": { - "before": { - "type": "string" + "subblocks": { + "description": "The list of sub-blocks in the featured shop block", + "type": "array", + "items": { + "$ref": "#/definitions/SubBlockSchema" + } }, - "after": { - "type": "string" + "type": { + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" } }, "additionalProperties": false, "required": [ - "after", - "before" + "subblocks", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RefreshUrlsRequestSchema": { + "SortedSKUIDsSchema": { "type": "object", "properties": { - "attachment_urls": { + "popular": { + "description": "The SKU IDs sorted by popularity", + "type": "array", + "items": { + "type": "string" + } + }, + "recommended": { + "description": "The SKU IDs sorted by recommendation", "type": "array", "items": { "type": "string" @@ -6040,977 +9692,1157 @@ }, "additionalProperties": false, "required": [ - "attachment_urls" + "popular", + "recommended" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RegisterSchema": { + "FeedShopBlockSchema": { "type": "object", "properties": { - "username": { - "minLength": 2, - "type": "string" + "ranked_sku_ids": { + "description": "All SKU IDs ranked by popularity", + "type": "array", + "items": { + "type": "string" + } }, - "password": { - "minLength": 1, - "maxLength": 72, - "type": "string" + "sorted_sku_ids": { + "$ref": "#/definitions/SortedSKUIDsSchema", + "description": "The sorted SKU IDs" }, - "consent": { - "type": "boolean" + "type": { + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" + } + }, + "additionalProperties": false, + "required": [ + "ranked_sku_ids", + "sorted_sku_ids", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "WideBannerShopBlockSchema": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" }, - "email": { - "format": "email", + "category_store_listing_id": { + "description": "The collectible category store listing ID", "type": "string" }, - "fingerprint": { + "banner_asset": { + "$ref": "#/definitions/CollectibleAssetConfigSchema", + "description": "The banner asset" + }, + "logo_url": { + "description": "The URL of the wide banner logo image", "type": "string" }, - "invite": { + "title": { + "description": "The title of the wide banner", "type": "string" }, - "date_of_birth": { + "body": { + "description": "The body text of the wide banner", "type": "string" }, - "gift_code_sku_id": { + "banner_text_color": { + "description": "The hex color code of the banner text", + "type": [ + "null", + "string" + ] + }, + "disable_cta": { + "description": "Whether to disable the CTA for the wide banner", + "type": "boolean" + }, + "cta_text": { + "description": "The CTA text for the wide banner", "type": "string" }, - "captcha_key": { + "cta_route": { + "description": "The CTA route for the wide banner", "type": "string" }, - "promotional_email_opt_in": { + "is_dismissible": { + "description": "Whether the wide banner is dismissible", "type": "boolean" }, - "unique_username_registration": { - "type": "boolean" + "dismissible_content_version": { + "description": "The version of the dismissible content", + "type": "integer" }, - "global_name": { + "wide_banner_url": { + "description": "The URL of the wide banner image", + "type": "string" + }, + "wide_banner_animated_url": { + "description": "The URL of the animated wide banner image", "type": "string" } }, "additionalProperties": false, "required": [ - "consent", - "username" + "banner_asset", + "banner_text_color", + "body", + "category_store_listing_id", + "cta_route", + "cta_text", + "disable_cta", + "dismissible_content_version", + "is_dismissible", + "logo_url", + "title", + "type", + "wide_banner_url" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RelationshipPostSchema": { + "ShelfShopBlockSchema": { "type": "object", "properties": { - "discriminator": { + "type": { + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" + }, + "category_sku_id": { + "description": "The collectible category SKU ID", "type": "string" }, - "username": { + "name": { + "description": "The name of the shop block", "type": "string" + }, + "ranked_sku_ids": { + "description": "The SKU IDs ranked by popularity in the collectible category", + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "discriminator", - "username" + "name", + "ranked_sku_ids", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RelationshipPatchSchema": { + "CountdownTimerShopBlockSchema": { "type": "object", "properties": { - "nickname": { + "type": { + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" + }, + "title": { + "description": "The title of the countdown timer", + "type": "string" + }, + "body": { + "description": "The body text of the countdown timer", + "type": "string" + }, + "banner_url": { + "description": "The URL of the countdown timer banner", + "type": "string" + }, + "end_time": { + "description": "The end time of the countdown timer", + "type": "string" + }, + "text_color": { + "description": "The hex color code of the text", "type": "string" } }, "additionalProperties": false, + "required": [ + "banner_url", + "body", + "end_time", + "text_color", + "title", + "type" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RelationshipPutSchema": { + "ImmersiveBannerShopBlockSchema": { "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" - } - ] + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" }, - "query": { + "title": { + "description": "The title of the immersive banner", "type": "string" }, - "limit": { - "type": "integer" + "body": { + "description": "The body text of the immersive banner", + "type": "string" }, - "presences": { - "type": "boolean" + "help_center_url": { + "description": "The URL to the help center article", + "type": "string" }, - "user_ids": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "string" - } + "text_color": { + "description": "The hex color code of the text", + "type": "string" + }, + "end_time": { + "description": "The end time of the immersive banner", + "type": [ + "null", + "string" ] }, - "nonce": { - "type": "string" + "banner_asset": { + "$ref": "#/definitions/CollectibleAssetConfigSchema", + "description": "The banner asset" } }, "additionalProperties": false, "required": [ - "guild_id" + "banner_asset", + "body", + "end_time", + "help_center_url", + "text_color", + "title", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RoleModifySchema": { + "RewardHeroShopBlockSchema": { "type": "object", "properties": { + "type": { + "$ref": "#/definitions/ShopBlockType", + "description": "The shop block type" + }, + "category_sku_id": { + "description": "The collectible category SKU ID", + "type": "string" + }, + "category_store_listing_id": { + "description": "The collectible category store listing ID", + "type": "string" + }, "name": { + "description": "The name of the shop block", "type": "string" }, - "permissions": { + "summary": { + "description": "A description of the collectible category", "type": "string" }, - "color": { - "type": "integer" + "banner_asset": { + "$ref": "#/definitions/CollectibleAssetConfigSchema", + "description": "The banner asset" }, - "hoist": { - "type": "boolean" + "logo_url": { + "description": "The URL of the hero logo image", + "type": "string" }, - "mentionable": { - "type": "boolean" + "title": { + "description": "The title of the reward hero shop block", + "type": "string" }, - "position": { - "type": "integer" + "banner_text_color": { + "description": "The hex color code for the banner text", + "type": "string" }, - "icon": { + "banner_display_config": { + "$ref": "#/definitions/CollectibleBannerAssetSchema", + "description": "The display configuration" + }, + "hero_rive_url": { + "description": "The URL of the hero Rive animation", "type": "string" }, - "unicode_emoji": { + "logo_display_config": { + "$ref": "#/definitions/CollectibleBannerAssetSchema", + "description": "The shop block logo display config" + }, + "mobile_title": { + "description": "The title to be displayed on mobile devices", "type": "string" }, - "colors": { - "type": "object", - "properties": { - "primary_color": { - "type": "integer" - }, - "secondary_color": { - "type": [ - "null", - "integer" - ] - }, - "tertiary_color": { - "type": [ - "null", - "integer" - ] - } - }, - "additionalProperties": false, - "required": [ - "primary_color" - ] - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "RolePositionUpdateSchema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "position": { - "type": "integer" - } + "mobile_summary": { + "description": "The summary to be displayed on mobile devices", + "type": "string" }, - "additionalProperties": false, - "required": [ - "id", - "position" - ] - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "SelectProtocolSchema": { - "type": "object", - "properties": { - "protocol": { - "enum": [ - "udp", - "webrtc" - ], + "mobile_products_title": { + "description": "The products title to be displayed on mobile devices", "type": "string" }, - "data": { - "anyOf": [ - { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "port": { - "type": "integer" - }, - "mode": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "address", - "mode", - "port" - ] - }, - { - "type": "string" - } - ] + "hero_banner_url": { + "description": "The URL of the hero banner image", + "type": "string" + }, + "hero_banner_animated_url": { + "description": "The URL of the hero animated banner image", + "type": "string" }, - "sdp": { + "hero_logo_url": { + "description": "The URL of the hero logo image", "type": "string" }, - "codecs": { + "mobile_hero_url": { + "description": "The URL of the mobile hero banner image", + "type": "string" + }, + "mobile_hero_animated_url": { + "description": "The URL of the mobile animated hero banner image", + "type": "string" + }, + "ranked_sku_ids": { + "description": "The SKU IDs ranked by popularity in the collectible category", "type": "array", "items": { - "type": "object", - "properties": { - "name": { - "enum": [ - "H264", - "VP8", - "VP9", - "opus" - ], - "type": "string" - }, - "type": { - "enum": [ - "audio", - "video" - ], - "type": "string" - }, - "priority": { - "type": "integer" - }, - "payload_type": { - "type": "integer" - }, - "rtx_payload_type": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "name", - "payload_type", - "priority", - "type" - ] + "type": "string" } }, - "rtc_connection_id": { + "unpublished_at": { + "description": "When the collectible category should be unpublished", + "type": [ + "null", + "string" + ] + }, + "reward_sku_id": { + "description": "The SKU ID of the reward collectible", "type": "string" } }, "additionalProperties": false, "required": [ - "data", - "protocol" + "banner_asset", + "banner_display_config", + "category_store_listing_id", + "hero_banner_animated_url", + "hero_banner_url", + "hero_logo_url", + "logo_display_config", + "logo_url", + "name", + "ranked_sku_ids", + "reward_sku_id", + "summary", + "title", + "type", + "unpublished_at" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "SettingsProtoUpdateSchema": { + "CollectibleUserDiscountSchema": { "type": "object", "properties": { - "settings": { + "amount": { + "description": "How much the discount is", + "type": "integer" + }, + "discount_id": { + "description": "The discount ID", "type": "string" }, - "required_data_version": { - "type": "integer" + "expires_at": { + "description": "When the discount expires", + "type": [ + "null", + "string" + ] } }, "additionalProperties": false, "required": [ - "settings" + "amount", + "discount_id", + "expires_at" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "SettingsProtoUpdateJsonSchema": { + "CreateApplicationSKUSchema": { "type": "object", "properties": { - "settings": { - "$ref": "#/definitions/JsonValue" + "name": { + "type": "string" }, - "required_data_version": { - "type": "integer" + "sku_type": { + "$ref": "#/definitions/SKUType" + }, + "product_line": { + "enum": [ + 1, + 10, + 11, + 12, + 13, + 14, + 2, + 3, + 4, + 5, + 6, + 7, + 9 + ], + "type": "number" } }, "additionalProperties": false, "required": [ - "settings" + "name", + "sku_type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "TeamCreateSchema": { + "StoreAssetSchema": { "type": "object", "properties": { - "name": { + "id": { + "description": "The ID of the asset", + "type": "string" + }, + "size": { + "description": "The size of the asset in bytes", + "type": "integer" + }, + "mime_type": { + "description": "The asset's media type", + "type": "string" + }, + "filename": { + "description": "The filename of the asset", "type": "string" + }, + "width": { + "description": "The width of the asset in pixels", + "type": "integer" + }, + "height": { + "description": "The height of the asset in pixels", + "type": "integer" } }, "additionalProperties": false, "required": [ - "name" + "filename", + "height", + "id", + "mime_type", + "size", + "width" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "TemplateCreateSchema": { + "StoreListingIconSchema": { "type": "object", "properties": { - "name": { + "type": { + "$ref": "#/definitions/StoreListingIconType", + "description": "The type of icon" + }, + "store_asset_id": { + "description": "The store asset ID for the icon", "type": "string" }, - "description": { + "emoji": { + "description": "The unicode emoji for the icon", "type": "string" } }, "additionalProperties": false, "required": [ - "name" + "emoji", + "store_asset_id", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "TemplateModifySchema": { + "StoreListingBenefitSchema": { "type": "object", "properties": { + "id": { + "description": "The ID of the benefit", + "type": "string" + }, "name": { + "description": "The name of the benefit", "type": "string" }, "description": { + "description": "The description of the benefit", "type": "string" + }, + "icon": { + "$ref": "#/definitions/StoreListingIconSchema", + "description": "The icon for the benefit" } }, "additionalProperties": false, "required": [ + "description", + "icon", + "id", "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "TotpDisableSchema": { + "StoreNoteSchema": { "type": "object", "properties": { - "code": { - "minLength": 6, - "maxLength": 6, + "user": { + "description": "The user who made the note", + "anyOf": [ + { + "$ref": "#/definitions/Partial" + }, + { + "type": "null" + } + ] + }, + "content": { + "description": "The note content", "type": "string" } }, "additionalProperties": false, "required": [ - "code" + "content", + "user" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "TotpEnableSchema": { + "StoreListingSchema": { + "description": "Store listing objects can either be localized or unlocalized. Localized listings only serialize strings and pricing for the user's location, while unlocalized listings serialize all strings and pricing for all locales. All objects serialized in the listing inherit this behavior.", "type": "object", "properties": { - "password": { - "minLength": 1, - "maxLength": 72, + "id": { + "description": "The ID of the listing", "type": "string" }, - "code": { - "minLength": 6, - "maxLength": 6, - "type": "string" + "sku": { + "$ref": "#/definitions/SKU", + "description": "The SKU associated with the listing" }, - "secret": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "password" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "TotpSchema": { - "type": "object", - "properties": { - "code": { - "type": "string" + "child_skus": { + "description": "The child SKUs associated with the category listing", + "type": "array", + "items": { + "$ref": "#/definitions/SKU" + } }, - "ticket": { - "type": "string" + "alternative_skus": { + "description": "Alternative SKUs for the listing", + "type": "array", + "items": { + "$ref": "#/definitions/SKU" + } }, - "gift_code_sku_id": { - "type": [ - "null", - "string" + "summary": { + "$ref": "#/definitions/LocalizedStringSchema", + "description": "A summary of the listing" + }, + "description": { + "description": "A description of the listing", + "$ref": "#/definitions/LocalizedStringSchema" + }, + "tagline": { + "description": "A tagline for the listing", + "anyOf": [ + { + "$ref": "#/definitions/LocalizedStringSchema" + }, + { + "type": "null" + } ] }, - "login_source": { + "flavor_text": { + "description": "Flavor text for the listing", "type": [ "null", "string" ] - } - }, - "additionalProperties": false, - "required": [ - "code", - "ticket" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UploadAttachmentRequestSchema": { - "type": "object", - "properties": { - "files": { + }, + "benefits": { + "description": "The benefits of the listing", "type": "array", "items": { - "$ref": "#/definitions/UploadAttachmentRequest" - } - } - }, - "additionalProperties": false, - "required": [ - "files" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserDeleteSchema": { - "type": "object", - "properties": { - "user_id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "user_id" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserGuildSettingsSchema": { - "type": "object", - "properties": { - "channel_overrides": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ChannelOverride" + "$ref": "#/definitions/StoreListingBenefitSchema" } }, - "version": { - "type": "integer" + "published": { + "description": "Whether the listing is published", + "type": "boolean" }, - "message_notifications": { - "type": "integer" + "carousel_items": { + "description": "The carousel items for the listing", + "type": "array", + "items": { + "$ref": "#/definitions/StoreCarouselItemSchema" + } }, - "mobile_push": { - "type": "boolean" + "staff_notes": { + "description": "Notes from staff about the listing", + "$ref": "#/definitions/StoreNoteSchema" }, - "mute_config": { + "guild": { + "description": "The public guild associated with the listing", "anyOf": [ { - "$ref": "#/definitions/MuteConfig" + "$ref": "#/definitions/Partial" }, { "type": "null" } ] }, - "muted": { - "type": "boolean" - }, - "suppress_everyone": { - "type": "boolean" - }, - "suppress_roles": { - "type": "boolean" + "assets": { + "description": "The store assets for the listing", + "type": "array", + "items": { + "$ref": "#/definitions/StoreAssetSchema" + } }, - "guild_id": { - "type": [ - "null", - "string" - ] + "thumbnail": { + "description": "The thumbnail for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "flags": { - "type": "integer" + "preview_video": { + "description": "The preview video for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "mute_scheduled_events": { - "type": "boolean" + "header_background": { + "description": "The header background for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "hide_muted_channels": { - "type": "boolean" + "header_logo_dark_theme": { + "description": "The dark theme header logo for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "notify_highlights": { - "const": 0, - "type": "number" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserModifySchema": { - "type": "object", - "properties": { - "username": { - "minLength": 2, - "type": "string" + "header_logo_light_theme": { + "description": "The light theme header logo for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "avatar": { - "type": [ - "null", - "string" - ] + "box_art": { + "description": "The box art for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "bio": { - "type": "string" + "hero_background": { + "description": "The hero background for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "accent_color": { - "type": "integer" + "hero_video": { + "description": "The hero video for the listing", + "$ref": "#/definitions/StoreAssetSchema" }, - "banner": { + "entitlement_branch_id": { + "description": "The application branch ID granted by the listing", "type": [ "null", "string" ] }, - "password": { - "minLength": 1, - "maxLength": 72, - "type": "string" - }, - "new_password": { - "minLength": 1, - "maxLength": 72, - "type": "string" - }, - "code": { - "minLength": 6, - "maxLength": 6, + "published_at": { + "description": "When the listing was published", "type": "string" }, - "email": { - "format": "email", + "unpublished_at": { + "description": "When the listing was unpublished", "type": "string" }, - "discriminator": { - "minLength": 4, - "maxLength": 4, - "type": "string" + "powerup_metadata": { + "description": "The guild powerup metadata for the listing", + "$ref": "#/definitions/Partial" } }, "additionalProperties": false, + "required": [ + "id", + "sku", + "summary" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserNoteUpdateSchema": { + "ApplicationExecutableSchema": { "type": "object", "properties": { - "note": { + "os": { + "description": "The operating system the executable can be found on", "type": "string" + }, + "name": { + "description": "The name of the executable", + "type": "string" + }, + "is_launcher": { + "description": "Whether the executable is for a game launcher", + "type": "boolean" } }, "additionalProperties": false, "required": [ - "note" + "is_launcher", + "name", + "os" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "UserProfileModifySchema": { + "ApplicationSKUSchema": { "type": "object", "properties": { - "bio": { - "type": "string" - }, - "accent_color": { + "id": { + "description": "The ID of the game", "type": [ "null", - "integer" + "string" ] }, - "banner": { + "sku": { + "description": "The SKU of the game", "type": [ "null", "string" ] }, - "pronouns": { - "type": "string" - }, - "theme_colors": { - "items": [ - { - "type": "integer" - }, - { - "type": "integer" - } - ], - "type": "array", - "minItems": 2, - "maxItems": 2 + "distributor": { + "$ref": "#/definitions/ApplicationSKUDistributor", + "description": "The distributor of the game" } }, "additionalProperties": false, + "required": [ + "distributor", + "id", + "sku" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "VanityUrlSchema": { + "ApplicationCompanySchema": { "type": "object", "properties": { - "code": { - "minLength": 1, - "maxLength": 20, + "id": { + "description": "The ID of the company", "type": "string" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "VerifyEmailSchema": { - "type": "object", - "properties": { - "captcha_key": { - "type": [ - "null", - "string" - ] }, - "token": { + "name": { + "description": "The name of the company", "type": "string" } }, "additionalProperties": false, "required": [ - "token" + "id", + "name" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "VoiceStateUpdateSchema": { + "ApplicationInstallParamsSchema": { "type": "object", "properties": { - "guild_id": { - "type": "string" - }, - "channel_id": { - "type": "string" - }, - "self_mute": { - "type": "boolean" - }, - "self_deaf": { - "type": "boolean" - }, - "self_video": { - "type": "boolean" + "scopes": { + "description": "The scopes to authorize the integration with", + "type": "array", + "items": { + "type": "string" + } }, - "preferred_region": { + "permissions": { + "description": "The permissions to request for the application's bot integration role", "type": "string" - }, - "request_to_speak_timestamp": { - "type": "string", - "format": "date-time" - }, - "suppress": { - "type": "boolean" - }, - "flags": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "self_deaf", - "self_mute" + "permissions", + "scopes" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GenerateWebAuthnCredentialsSchema": { + "ApplicationIntegrationTypeConfigurationSchema": { "type": "object", "properties": { - "password": { - "type": "string" + "oauth2_install_params": { + "description": "The default in-app authorization link for the installation context", + "$ref": "#/definitions/ApplicationInstallParamsSchema" } }, "additionalProperties": false, - "required": [ - "password" - ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CreateWebAuthnCredentialSchema": { + "CreateSKUSchema": { "type": "object", "properties": { - "credential": { + "type": { + "$ref": "#/definitions/SKUType", + "description": "The type of SKU" + }, + "application_id": { + "description": "The ID of the application the SKU belongs to", "type": "string" }, "name": { - "type": "string" + "description": "The name of the SKU (1-256 characters)", + "anyOf": [ + { + "$ref": "#/definitions/LocalizedStringSchema" + }, + { + "type": "string" + } + ] }, - "ticket": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "credential", - "name", - "ticket" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "WebAuthnPostSchema": { - "anyOf": [ - { - "$ref": "#/definitions/GenerateWebAuthnCredentialsSchema" + "flags": { + "description": "The SKU flags (only AVAILABLE can be set)\nSKUFlags bitfield", + "type": "integer" }, - { - "$ref": "#/definitions/CreateWebAuthnCredentialSchema" - } - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "WebAuthnTotpSchema": { - "type": "object", - "properties": { - "code": { + "legal_notice": { + "description": "The legal notice for the SKU (max 1024 characters)", + "$ref": "#/definitions/LocalizedStringSchema" + }, + "dependent_sku_id": { + "description": "The ID of the prerequisite required to buy this SKU", "type": "string" }, - "ticket": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "code", - "ticket" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "WebhookCreateSchema": { - "type": "object", - "properties": { - "name": { - "maxLength": 80, - "type": "string" + "bundled_skus": { + "description": "The IDs of the SKUs that are included when purchasing this SKU", + "type": "array", + "items": { + "type": "string" + } + }, + "access_type": { + "description": "The access level of the SKU", + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "manifest_labels": { + "description": "The IDs of the manifest labels associated with the SKU", + "type": "array", + "items": { + "type": "string" + } + }, + "features": { + "description": "The features of the SKU", + "type": "array", + "items": { + "$ref": "#/definitions/SKUFeature" + } + }, + "locales": { + "description": "The locales the SKU is available in", + "type": "array", + "items": { + "type": "string" + } + }, + "genres": { + "description": "The genres of the SKU", + "type": "array", + "items": { + "$ref": "#/definitions/SKUGenre" + } + }, + "content_ratings": { + "description": "The content ratings of the SKU per agency", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SKUContentRatingSchema" + } + }, + "system_requirements": { + "description": "The system requirements for each operating system the SKU supports", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/SKUSystemRequirementsSchema" + } + }, + "price_tier": { + "description": "The base price of the SKU", + "type": "integer" }, - "avatar": { + "price": { + "description": "Localized pricing overrides per lower-cased ISO 4217 currency code", + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "sale_price_tier": { + "description": "The sale price of the SKU", + "type": "integer" + }, + "sale_price": { + "description": "Localized sale pricing overrides per lower-cased ISO 4217 currency code", + "type": "object", + "additionalProperties": { + "type": "integer" + } + }, + "release_date": { + "description": "When the SKU will be released", "type": "string" } }, "additionalProperties": false, "required": [ - "name" + "application_id", + "name", + "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "WebhookExecuteSchema": { + "IdentifySchema": { "type": "object", "properties": { - "content": { - "type": "string" - }, - "username": { - "type": "string" - }, - "avatar_url": { + "token": { "type": "string" }, - "tts": { - "type": "boolean" - }, - "embeds": { - "type": "array", - "items": { - "$ref": "#/definitions/Embed" - } - }, - "allowed_mentions": { + "properties": { "type": "object", "properties": { - "parse": { - "type": "array", - "items": { - "type": "string" - } + "os": { + "type": "string" }, - "roles": { - "type": "array", - "items": { - "type": "string" - } + "browser": { + "type": "string" }, - "users": { - "type": "array", - "items": { - "type": "string" - } + "device": { + "type": "string" }, - "replied_user": { + "system_locale": { + "type": "string" + }, + "has_client_mods": { + "type": "boolean" + }, + "browser_user_agent": { + "type": "string" + }, + "browser_version": { + "type": "string" + }, + "os_version": { + "type": "string" + }, + "referrer": { + "type": "string" + }, + "referring_domain": { + "type": "string" + }, + "referrer_current": { + "type": "string" + }, + "referring_domain_current": { + "type": "string" + }, + "release_channel": { + "enum": [ + "canary", + "dev", + "ptb", + "stable" + ], + "type": "string" + }, + "client_build_number": { + "type": "integer" + }, + "client_event_source": { + "type": "null" + }, + "client_launch_id": { + "type": "string" + }, + "launch_signature": { + "type": "string" + }, + "client_app_state": { + "type": "string" + }, + "is_fast_connect": { "type": "boolean" + }, + "gateway_connect_reasons": { + "type": "string" + }, + "$os": { + "type": "string" + }, + "$browser": { + "type": "string" + }, + "$device": { + "type": "string" } }, "additionalProperties": false }, - "components": { - "type": "array", - "items": {} - }, - "file": { - "type": "object", - "properties": { - "filename": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filename" - ] + "intents": { + "type": "bigint" }, - "payload_json": { - "type": "string" + "presence": { + "$ref": "#/definitions/ActivitySchema" }, - "attachments": { - "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "filename": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "filename", - "id" - ] - } + "compress": { + "type": "boolean" }, - "flags": { + "large_threshold": { "type": "integer" }, - "thread_name": { - "type": "string" + "largeThreshold": { + "type": "integer" }, - "applied_tags": { + "shard": { + "minItems": 2, + "maxItems": 2, "type": "array", "items": { - "type": "string" + "type": "bigint" } }, - "message_reference": { + "guild_subscriptions": { + "type": "boolean" + }, + "capabilities": { + "type": "integer" + }, + "client_state": { "type": "object", "properties": { - "message_id": { - "type": "string" + "guild_hashes": {}, + "highest_last_message_id": { + "type": "integer" }, - "channel_id": { - "type": "string" + "read_state_version": { + "type": "integer" }, - "guild_id": { - "type": "string" + "user_guild_settings_version": { + "type": "integer" }, - "fail_if_not_exists": { - "type": "boolean" + "user_settings_version": { + "type": "integer" + }, + "useruser_guild_settings_version": { + "type": "integer" + }, + "private_channels_version": { + "type": "integer" + }, + "guild_versions": {}, + "api_code_version": { + "type": "integer" + }, + "initial_guild_id": { + "type": "string" } }, - "additionalProperties": false, - "required": [ - "message_id" - ] - }, - "sticker_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "nonce": { - "type": "string" + "additionalProperties": false }, - "enforce_nonce": { - "type": "boolean" + "clientState": { + "type": "object", + "properties": { + "guildHashes": {}, + "highestLastMessageId": { + "type": "integer" + }, + "readStateVersion": { + "type": "integer" + }, + "userGuildSettingsVersion": { + "type": "integer" + }, + "useruserGuildSettingsVersion": { + "type": "integer" + }, + "guildVersions": {}, + "apiCodeVersion": { + "type": "integer" + }, + "initialGuildId": { + "type": "string" + } + }, + "additionalProperties": false }, - "poll": { - "$ref": "#/definitions/PollCreationSchema" + "v": { + "type": "integer" } }, "additionalProperties": false, + "required": [ + "properties", + "token" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "WebhookUpdateSchema": { + "StreamCreateSchema": { "type": "object", "properties": { - "name": { + "type": { + "enum": [ + "call", + "guild" + ], "type": "string" }, - "avatar": { + "channel_id": { "type": "string" }, - "channel_id": { + "guild_id": { + "type": "string" + }, + "preferred_region": { "type": "string" } }, "additionalProperties": false, + "required": [ + "channel_id", + "type" + ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "WidgetModifySchema": { + "StreamDeleteSchema": { "type": "object", "properties": { - "enabled": { - "type": "boolean" - }, - "channel_id": { + "stream_key": { "type": "string" } }, "additionalProperties": false, "required": [ - "channel_id", - "enabled" + "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#" }, @@ -7355,6 +11187,19 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "CreateFingerprintResponse": { + "type": "object", + "properties": { + "fingerprint": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "fingerprint" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ApplicationCommandOption": { "type": "object", "properties": { @@ -7458,6 +11303,47 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "GuildPremiumFeatures": { + "type": "object", + "properties": { + "features": { + "description": "Enabled powerup-specific guild features", + "type": "array", + "items": { + "type": "string" + } + }, + "additional_emoji_slots": { + "description": "The number of additional emoji slots available to the guild", + "type": "integer" + }, + "additional_sticker_slots": { + "description": "The number of additional sticker slots available to the guild", + "type": "integer" + }, + "additional_sound_slots": { + "description": "The number of additional soundboard slots available to the guild", + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "additional_emoji_slots", + "additional_sound_slots", + "additional_sticker_slots", + "features" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildPowerupCategoryType": { + "type": "number", + "enum": [ + 0, + 1, + 2 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ErrorList": { "type": "object", "additionalProperties": false, @@ -8202,6 +12088,10 @@ "type": "string" } }, + "currency": { + "type": "integer", + "default": 0 + }, "id": { "type": "string" } @@ -8212,6 +12102,7 @@ "bot", "connected_accounts", "created_at", + "currency", "data", "deleted", "desktop", @@ -10171,99 +14062,280 @@ "type": "boolean", "default": false }, - "verify_key": { - "type": "string" + "verify_key": { + "type": "string" + }, + "owner": { + "$ref": "#/definitions/User" + }, + "flags": { + "type": "integer", + "default": 0 + }, + "redirect_uris": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "rpc_application_state": { + "$ref": "#/definitions/RPCApplicationState" + }, + "store_application_state": { + "$ref": "#/definitions/StoreApplicationState" + }, + "verification_state": { + "$ref": "#/definitions/ApplicationVerificationState" + }, + "interactions_endpoint_url": { + "type": "string" + }, + "integration_public": { + "type": "boolean", + "default": true + }, + "integration_require_code_grant": { + "type": "boolean", + "default": false + }, + "discoverability_state": { + "$ref": "#/definitions/ApplicationDiscoverabilityState" + }, + "discovery_eligibility_flags": { + "type": "integer", + "default": 0 + }, + "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" + }, + "splash": { + "type": "string" + }, + "primary_sku_id": { + "type": "string" + }, + "eula_id": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "executables": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationExecutableSchema" + } + }, + "third_party_skus": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationSKUSchema" + } + }, + "overlay": { + "type": "boolean", + "default": false + }, + "overlay_methods": { + "type": "integer" + }, + "overlay_warn": { + "type": "boolean", + "default": false + }, + "overlay_compatibility_hook": { + "type": "boolean", + "default": false + }, + "developers": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCompanySchema" + } + }, + "publishers": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCompanySchema" + } + }, + "rpc_origins": { + "type": "array", + "items": { + "type": "string" + } + }, + "deeplink_uri": { + "type": "string" + }, + "bot_disabled": { + "type": "boolean", + "default": false + }, + "bot_quarantined": { + "type": "boolean", + "default": false + }, + "bot_approximate_guild_count": { + "type": "integer" + }, + "approximate_guild_count": { + "type": "integer" + }, + "approximate_user_install_count": { + "type": "integer" + }, + "approximate_user_authorization_count": { + "type": "integer" + }, + "internal_guild_restriction": { + "enum": [ + 1, + 2, + 3 + ], + "type": "number" }, - "owner": { - "$ref": "#/definitions/User" + "role_connections_verification_url": { + "type": [ + "null", + "string" + ], + "default": null }, - "flags": { - "type": "integer", - "default": 0 + "interactions_version": { + "$ref": "#/definitions/ApplicationInteractionsVersion" }, - "redirect_uris": { + "interactions_event_types": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ApplicationEventWebhooksType" }, "default": [] }, - "rpc_application_state": { + "event_webhooks_status": { + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "event_webhooks_url": { + "type": "string" + }, + "event_webhooks_types": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationEventWebhooksType" + } + }, + "explicit_content_filter": { "type": "integer", "default": 0 }, - "store_application_state": { - "type": "integer", - "default": 1 + "integration_types_config": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/ApplicationIntegrationTypeConfigurationSchema" + } + } }, - "verification_state": { + "connection_entrypoint_url": { + "type": "string" + }, + "is_verified": { + "type": "boolean", + "default": false + }, + "creator_monetization_state": { "type": "integer", - "default": 1 + "default": 0 }, - "interactions_endpoint_url": { - "type": "string" + "is_discoverable": { + "type": "boolean", + "default": false }, - "integration_public": { + "is_monetized": { "type": "boolean", - "default": true + "default": false }, - "integration_require_code_grant": { + "storefront_available": { "type": "boolean", "default": false }, - "discoverability_state": { - "type": "integer", - "default": 1 + "monetization_state": { + "$ref": "#/definitions/ApplicationMonetizationState" }, - "discovery_eligibility_flags": { + "monetization_eligibility_flags": { "type": "integer", - "default": 2240 + "default": 0 }, - "bot": { - "$ref": "#/definitions/User" + "max_participants": { + "type": "integer" }, - "tags": { + "embedded_activity_config": { + "type": "object", + "properties": {}, + "additionalProperties": true + }, + "approved_consoles": { "type": "array", "items": { - "type": "string" - } - }, - "cover_image": { - "type": "string" - }, - "install_params": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "items": { - "type": "string" - } - }, - "permissions": { - "type": "string" - } + "$ref": "#/definitions/ApplicationApprovableConsoleType" }, - "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" + "default": [] }, "team": { "$ref": "#/definitions/Team" @@ -10274,25 +14346,146 @@ }, "additionalProperties": false, "required": [ + "approved_consoles", + "creator_monetization_state", "description", "discoverability_state", "discovery_eligibility_flags", + "explicit_content_filter", "flags", "hook", "id", "integration_public", "integration_require_code_grant", + "interactions_event_types", + "interactions_version", + "is_discoverable", + "is_monetized", + "is_verified", + "monetization_state", "name", "owner", "redirect_uris", + "role_connections_verification_url", "rpc_application_state", "store_application_state", + "storefront_available", "summary", "verification_state", "verify_key" ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "RPCApplicationState": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "StoreApplicationState": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationVerificationState": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationDiscoverabilityState": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationSKUDistributor": { + "description": "[Distributor Type](https://docs.discord.food/resources/application#distributor-type)\n\nFIELD\tTYPE\tDESCRIPTION\n\nid\t?string\tThe ID of the game\n\nsku\t?string\tThe SKU of the game\n\ndistributor\tstring\tThe [distributor](https://docs.discord.food/resources/application#distributor-type) of the game\n\nTypeScript", + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationInteractionsVersion": { + "type": "number", + "enum": [ + 1, + 2 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationEventWebhooksType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationMonetizationState": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationApprovableConsoleType": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "Team": { "type": "object", "properties": { @@ -11477,30 +15670,65 @@ "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GameActivity": { - "type": "object", - "properties": { - "activity_level": { - "type": "integer" - }, - "activity_score": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "activity_level", - "activity_score" + "QuestRewardType": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildBadgeType": { + "QuestAssignmentMethod": { + "type": "number", + "enum": [ + 1, + 2 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestPlatformType": { "type": "number", "enum": [ 0, 1, 2, 3, + 4 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestEventType": { + "type": "string", + "enum": [ + "STREAM_ON_DESKTOP", + "PLAY_ON_DESKTOP", + "PLAY_ON_XBOX", + "PLAY_ON_PLAYSTATION", + "PLAY_ON_DESKTOP_V2", + "WATCH_VIDEO", + "WATCH_VIDEO_ON_MOBILE", + "PLAY_ACTIVITY", + "ACHIEVEMENT_IN_GAME", + "ACHIEVEMENT_IN_ACTIVITY" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestJoinOperator": { + "type": "string", + "enum": [ + "and", + "or" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "QuestFeature": { + "type": "number", + "enum": [ + 1, + 3, 4, 5, 6, @@ -11527,187 +15755,317 @@ 27, 28, 29, - 30 + 30, + 31, + 32, + 33, + 34 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildTrait": { - "type": "object", - "properties": { - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "emoji_name": { - "type": [ - "null", - "string" - ] - }, - "emoji_animated": { - "type": "boolean" - }, - "label": { - "type": "string" - }, - "position": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "emoji_animated", - "emoji_id", - "emoji_name", - "label", - "position" + "QuestSharePolicy": { + "type": "string", + "enum": [ + "shareable_everywhere", + "not_shareable" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildVisibilityLevel": { + "EntitlementType": { "type": "number", "enum": [ 1, 2, - 3 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InstanceUserDeleteSchemaContent": { + "SKU": { "type": "object", "properties": { - "reason": { + "type": { + "$ref": "#/definitions/SKUType" + }, + "application_id": { "type": "string" }, - "persistInstanceBan": { - "type": "boolean" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "Classification": { - "type": "object", - "properties": { - "id": { + "application": { + "$ref": "#/definitions/Application" + }, + "product_line": { + "$ref": "#/definitions/SKUProductLine" + }, + "product_id": { "type": "string" }, - "classification_type": { - "$ref": "#/definitions/ClassificationType" + "flags": { + "type": "integer", + "default": 0 + }, + "name": { + "$ref": "#/definitions/LocalizedStringSchema" + }, + "summary": { + "$ref": "#/definitions/LocalizedStringSchema" }, "description": { + "$ref": "#/definitions/LocalizedStringSchema" + }, + "legal_notice": { + "$ref": "#/definitions/LocalizedStringSchema" + }, + "slug": { "type": "string" }, - "explainer_link": { + "thumbnail_asset_id": { "type": "string" }, - "actions": { + "dependent_sku_id": { + "type": [ + "null", + "string" + ] + }, + "bundled_skus": { "type": "array", "items": { - "$ref": "#/definitions/ClassificationAction" + "$ref": "#/definitions/SKU" } }, - "max_expiration_time": { + "bundled_sku_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "access_type": { + "$ref": "#/definitions/SKUAccessType" + }, + "manifest_labels": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] + }, + "features": { + "type": "array", + "items": { + "$ref": "#/definitions/SKUFeature" + } + }, + "locales": { + "type": "array", + "items": { + "type": "string" + } + }, + "genres": { + "type": "array", + "items": { + "$ref": "#/definitions/SKUGenre" + } + }, + "available_regions": { + "type": "array", + "items": { + "type": "string" + } + }, + "content_rating": { + "$ref": "#/definitions/SKUContentRatingSchema" + }, + "content_rating_agency": { + "enum": [ + 1, + 2 + ], + "type": "number" + }, + "content_ratings": { + "$ref": "#/definitions/Record" + }, + "system_requirements": { + "$ref": "#/definitions/Record" + }, + "price": { + "anyOf": [ + { + "$ref": "#/definitions/Record" + }, + { + "$ref": "#/definitions/SKUPriceSchema" + } + ] + }, + "price_tier": { + "type": "integer" + }, + "sale_price_tier": { + "type": "integer" + }, + "sale_price": { + "$ref": "#/definitions/Record" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "release_date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "preorder_approximate_release_date": { "type": "string" }, - "flagged_content": { + "preorder_released_at": { + "type": "string" + }, + "external_purchase_url": { + "type": "string" + }, + "external_sku_strategies": { + "$ref": "#/definitions/Record" + }, + "eligible_payment_gateways": { "type": "array", - "items": {} + "items": { + "$ref": "#/definitions/BillingPaymentGateway" + } }, - "appeal_status": { - "$ref": "#/definitions/AppealStatus" + "premium": { + "type": "boolean" }, - "is_coppa": { + "show_age_gate": { "type": "boolean" }, - "is_spam": { + "restricted": { "type": "boolean" }, - "appeal_ingestion_type": { - "$ref": "#/definitions/AppealIngestionType" + "exclusive": { + "type": "boolean" + }, + "deleted": { + "type": "boolean", + "default": false + }, + "tenant_metadata": { + "$ref": "#/definitions/SKUTenantMetadataSchema" + }, + "powerup_metadata": { + "$ref": "#/definitions/SKUGuildPowerupMetadataSchema" + }, + "id": { + "type": "string" } }, "additionalProperties": false, "required": [ - "actions", - "appeal_ingestion_type", - "appeal_status", - "classification_type", - "description", - "explainer_link", - "flagged_content", + "access_type", + "application", + "application_id", + "created_at", + "features", + "flags", "id", - "is_coppa", - "is_spam", - "max_expiration_time" + "name", + "premium", + "product_line", + "show_age_gate", + "slug", + "type", + "updated_at" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ClassificationType": { + "SKUType": { "type": "number", "enum": [ 1, - 100, - 200, - 210, - 220, - 230, - 240, - 250, - 280, - 290, - 310, - 320, - 390, - 600, - 650, - 711, - 720, - 3010, - 3030, - 4000, - 4010, - 4130, - 4140, - 5010, - 5090, - 5305, - 5411, - 5440, - 5485 + 2, + 3, + 4, + 5, + 6 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUProductLine": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 9, + 10, + 11, + 12, + 13, + 14 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ClassificationAction": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "action_type": { - "$ref": "#/definitions/ClassificationActionType" - }, - "descriptions": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "action_type", - "descriptions", - "id" + "SKUAccessType": { + "type": "number", + "enum": [ + 1, + 2 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ClassificationActionType": { + "SKUFeature": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SKUGenre": { "type": "number", "enum": [ - 0, 1, 2, 3, @@ -11724,586 +16082,716 @@ 14, 15, 16, + 17, + 18, + 19, 20, - 22 + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "AppealStatus": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/AppealStatusValue" - } - }, - "additionalProperties": false, - "required": [ - "status" + "SKUContentRating": { + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6 ], + "type": "number", "$schema": "http://json-schema.org/draft-07/schema#" }, - "AppealStatusValue": { - "type": "number", + "SKUContentDescriptor": { "enum": [ 1, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, 2, - 3 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 3, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 4, + 40, + 41, + 42, + 43, + 5, + 6, + 7, + 8, + 9 ], + "type": "number", "$schema": "http://json-schema.org/draft-07/schema#" }, - "AppealIngestionType": { + "SKUExternalSKUStrategyType": { "type": "number", "enum": [ - 0, 1, 2 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildClassification": { - "type": "object", - "properties": { - "guild_metadata": { - "$ref": "#/definitions/GuildMetadata" - }, - "id": { - "type": "string" - }, - "classification_type": { - "$ref": "#/definitions/ClassificationType" - }, - "description": { - "type": "string" - }, - "explainer_link": { - "type": "string" - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/ClassificationAction" - } - }, - "max_expiration_time": { - "type": "string" - }, - "flagged_content": { - "type": "array", - "items": {} - }, - "appeal_status": { - "$ref": "#/definitions/AppealStatus" - }, - "is_coppa": { - "type": "boolean" - }, - "is_spam": { - "type": "boolean" - }, - "appeal_ingestion_type": { - "$ref": "#/definitions/AppealIngestionType" - } - }, - "additionalProperties": false, - "required": [ - "actions", - "appeal_ingestion_type", - "appeal_status", - "classification_type", - "description", - "explainer_link", - "flagged_content", - "guild_metadata", - "id", - "is_coppa", - "is_spam", - "max_expiration_time" + "BillingPaymentGateway": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 8, + 9 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildMetadata": { + "GameActivity": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "icon": { - "type": "string" + "activity_level": { + "type": "integer" }, - "member_type": { - "$ref": "#/definitions/GuildMemberType" + "activity_score": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "member_type", - "name" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildMemberType": { - "type": "number", - "enum": [ - 1, - 2 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "AccountStandingState": { - "type": "number", - "enum": [ - 100, - 200, - 300, - 400, - 500 + "activity_level", + "activity_score" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "AppealEligibility": { + "GuildBadgeType": { "type": "number", "enum": [ + 0, 1, 2, - 3 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CollectiblesCategoryItem": { + "GuildTrait": { "type": "object", "properties": { - "sku_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "store_listing_id": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "unpublished_at": { - "type": [ - "null", - "string" - ] - }, - "styles": { - "$ref": "#/definitions/CollectiblesCategoryStyle" - }, - "logo": { - "type": "string" - }, - "hero_ranking": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "mobile_bg": { - "type": [ - "null", - "string" - ] - }, - "pdp_bg": { - "type": [ - "null", - "string" - ] - }, - "success_modal_bg": { - "type": [ - "null", - "string" - ] - }, - "mobile_banner": { - "type": [ - "null", - "string" - ] - }, - "featured_block": { - "type": [ - "null", - "string" - ] - }, - "hero_banner": { - "type": [ - "null", - "string" - ] - }, - "wide_banner": { + "emoji_id": { "type": [ "null", "string" ] }, - "hero_logo": { + "emoji_name": { "type": [ "null", "string" ] }, - "products": { - "type": "array", - "items": { - "$ref": "#/definitions/CollectiblesCategoryProductItem" - } + "emoji_animated": { + "type": "boolean" }, - "banner_asset": { - "$ref": "#/definitions/StaticAnimatedAsset" + "label": { + "type": "string" }, - "hero_banner_asset": { - "$ref": "#/definitions/StaticAnimatedAsset" + "position": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "banner", - "featured_block", - "hero_banner", - "hero_logo", - "hero_ranking", - "logo", - "mobile_banner", - "mobile_bg", - "name", - "pdp_bg", - "products", - "sku_id", - "store_listing_id", - "styles", - "success_modal_bg", - "summary", - "unpublished_at", - "wide_banner" + "emoji_animated", + "emoji_id", + "emoji_name", + "label", + "position" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildVisibilityLevel": { + "type": "number", + "enum": [ + 1, + 2, + 3 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CollectiblesCategoryStyle": { + "InstanceUserDeleteSchemaContent": { "type": "object", "properties": { - "background_colors": { + "reason": { + "type": "string" + }, + "persistInstanceBan": { + "type": "boolean" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AllowedMentions": { + "type": "object", + "properties": { + "parse": { "type": "array", "items": { - "type": "integer" + "enum": [ + "everyone", + "roles", + "users" + ], + "type": "string" } }, - "button_colors": { + "roles": { "type": "array", "items": { - "type": "integer" + "type": "string" } }, - "confetti_colors": { + "users": { "type": "array", "items": { - "type": "integer" + "type": "string" } + }, + "replied_user": { + "type": "boolean" } }, "additionalProperties": false, - "required": [ - "background_colors", - "button_colors", - "confetti_colors" - ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CollectiblesCategoryProductItem": { + "Classification": { "type": "object", "properties": { - "sku_id": { - "type": "string" - }, - "name": { + "id": { "type": "string" }, - "summary": { - "type": "string" + "classification_type": { + "$ref": "#/definitions/ClassificationType" }, - "store_listing_id": { + "description": { "type": "string" }, - "banner": { + "explainer_link": { "type": "string" }, - "unpublished_at": { - "type": [ - "null", - "string" - ] - }, - "styles": { - "$ref": "#/definitions/CollectiblesCategoryStyle" - }, - "prices": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "country_prices": { - "$ref": "#/definitions/CountryPrice" - } - }, - "additionalProperties": false, - "required": [ - "country_prices" - ] - } - }, - "items": { + "actions": { "type": "array", "items": { - "$ref": "#/definitions/ProductItem" + "$ref": "#/definitions/ClassificationAction" } }, - "type": { - "type": "integer" + "max_expiration_time": { + "type": "string" }, - "premium_type": { - "type": "integer" + "flagged_content": { + "type": "array", + "items": {} }, - "category_sku_id": { - "type": "string" + "appeal_status": { + "$ref": "#/definitions/AppealStatus" }, - "google_sku_ids": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "is_coppa": { + "type": "boolean" }, - "variants": { - "type": "array", - "items": { - "$ref": "#/definitions/ProductItemVariant" - } + "is_spam": { + "type": "boolean" + }, + "appeal_ingestion_type": { + "$ref": "#/definitions/AppealIngestionType" } }, "additionalProperties": false, "required": [ - "banner", - "category_sku_id", - "google_sku_ids", - "items", - "name", - "premium_type", - "prices", - "sku_id", - "store_listing_id", - "styles", - "summary", - "type", - "unpublished_at" + "actions", + "appeal_ingestion_type", + "appeal_status", + "classification_type", + "description", + "explainer_link", + "flagged_content", + "id", + "is_coppa", + "is_spam", + "max_expiration_time" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ClassificationType": { + "type": "number", + "enum": [ + 1, + 100, + 200, + 210, + 220, + 230, + 240, + 250, + 280, + 290, + 310, + 320, + 390, + 600, + 650, + 711, + 720, + 3010, + 3030, + 4000, + 4010, + 4130, + 4140, + 5010, + 5090, + 5305, + 5411, + 5440, + 5485 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CountryPrice": { + "ClassificationAction": { "type": "object", "properties": { - "country_code": { + "id": { "type": "string" }, - "prices": { + "action_type": { + "$ref": "#/definitions/ClassificationActionType" + }, + "descriptions": { "type": "array", "items": { - "$ref": "#/definitions/PriceEntry" + "type": "string" } } }, "additionalProperties": false, "required": [ - "country_code", - "prices" + "action_type", + "descriptions", + "id" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PriceEntry": { + "ClassificationActionType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 20, + 22 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AppealStatus": { "type": "object", "properties": { - "amount": { - "type": "integer" - }, - "currency": { - "type": "string" - }, - "exponent": { - "type": "integer" + "status": { + "$ref": "#/definitions/AppealStatusValue" } }, "additionalProperties": false, "required": [ - "amount", - "currency", - "exponent" + "status" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AppealStatusValue": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AppealIngestionType": { + "type": "number", + "enum": [ + 0, + 1, + 2 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ProductItem": { + "GuildClassification": { "type": "object", "properties": { - "type": { - "type": "integer" + "guild_metadata": { + "$ref": "#/definitions/GuildMetadata" }, "id": { "type": "string" }, - "sku_id": { - "type": "string" + "classification_type": { + "$ref": "#/definitions/ClassificationType" }, - "asset": { + "description": { "type": "string" }, - "label": { + "explainer_link": { "type": "string" }, - "palette": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ClassificationAction" + } + }, + "max_expiration_time": { "type": "string" + }, + "flagged_content": { + "type": "array", + "items": {} + }, + "appeal_status": { + "$ref": "#/definitions/AppealStatus" + }, + "is_coppa": { + "type": "boolean" + }, + "is_spam": { + "type": "boolean" + }, + "appeal_ingestion_type": { + "$ref": "#/definitions/AppealIngestionType" } }, "additionalProperties": false, "required": [ + "actions", + "appeal_ingestion_type", + "appeal_status", + "classification_type", + "description", + "explainer_link", + "flagged_content", + "guild_metadata", "id", - "sku_id", - "type" + "is_coppa", + "is_spam", + "max_expiration_time" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ProductItemVariant": { + "GuildMetadata": { "type": "object", "properties": { - "sku_id": { - "type": "string" - }, "name": { "type": "string" }, - "name_localizations": { - "type": "null" - }, - "summary": { + "icon": { "type": "string" }, - "summary_localizations": { - "type": "null" + "member_type": { + "$ref": "#/definitions/GuildMemberType" + } + }, + "additionalProperties": false, + "required": [ + "member_type", + "name" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildMemberType": { + "type": "number", + "enum": [ + 1, + 2 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AccountStandingState": { + "type": "number", + "enum": [ + 100, + 200, + 300, + 400, + 500 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AppealEligibility": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleItemType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 100, + 1000, + 2000, + 3000 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AnyCollectibleItem": { + "anyOf": [ + { + "$ref": "#/definitions/CollectibleAvatarDecorationSchema" }, - "store_listing_id": { - "type": "string" + { + "$ref": "#/definitions/CollectibleProfileEffectSchema" }, - "banner": { + { + "$ref": "#/definitions/CollectibleNameplateSchema" + } + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleProfileEffectAnimationType": { + "type": "number", + "enum": [ + 0, + 1, + 2 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleProfileEffectAnimation": { + "type": "object", + "properties": { + "src": { + "description": "The URL of the animation image (in APNG format)", "type": "string" }, - "unpublished_at": { - "type": [ - "null", - "string" - ] - }, - "styles": { - "$ref": "#/definitions/CollectiblesCategoryStyle" - }, - "prices": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "country_prices": { - "$ref": "#/definitions/CountryPrice" - } - }, - "additionalProperties": false, - "required": [ - "country_prices" - ] - } - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/ProductItem" - } + "loop": { + "description": "Whether the animation frame should loop", + "type": "boolean" }, - "type": { + "height": { + "description": "The height of the animation image", "type": "integer" }, - "premium_type": { + "width": { + "description": "The width of the animation image", "type": "integer" }, - "category_sku_id": { - "type": "string" + "duration": { + "description": "The duration of the animation frame (in milliseconds)", + "type": "integer" }, - "google_sku_ids": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "start": { + "description": "The start time of the animation frame (in milliseconds)", + "type": "integer" }, - "base_variant_sku_id": { - "type": "string" + "loopDelay": { + "description": "The delay between loops of the animation frame (in milliseconds)", + "type": "integer" }, - "base_variant_name": { - "type": "string" + "position": { + "$ref": "#/definitions/CollectibleProfileEffectPosition", + "description": "The position of the animation frame" }, - "variant_label": { - "type": "string" + "zIndex": { + "description": "The z-index of the animation frame", + "type": "integer" }, - "variant_value": { - "type": "string" + "randomizedSources": { + "description": "The sources to randomize the src from", + "type": "array", + "items": { + "$ref": "#/definitions/CollectibleProfileEffectSource" + } } }, "additionalProperties": false, "required": [ - "base_variant_name", - "base_variant_sku_id", - "category_sku_id", - "items", - "name", - "name_localizations", - "premium_type", - "prices", - "sku_id", - "store_listing_id", - "summary", - "summary_localizations", - "type", - "variant_label", - "variant_value" + "duration", + "height", + "loop", + "loopDelay", + "position", + "randomizedSources", + "src", + "start", + "width", + "zIndex" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "StaticAnimatedAsset": { + "CollectibleProfileEffectPosition": { "type": "object", "properties": { - "animated": { - "type": [ - "null", - "string" - ] + "x": { + "description": "The x-coordinate of the animation frame", + "type": "integer" }, - "static": { + "y": { + "description": "The y-coordinate of the animation frame", + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "x", + "y" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleProfileEffectSource": { + "type": "object", + "properties": { + "src": { + "description": "The URL of the animation image (in APNG format)", "type": "string" } }, "additionalProperties": false, "required": [ - "animated", - "static" + "src" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "CollectibleNameplateColorPalette": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "$schema": "http://json-schema.org/draft-07/schema#" }, @@ -12332,188 +16820,56 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "AnyShopBlock": { + "AnyCollectiblesShopBlock": { "anyOf": [ { - "$ref": "#/definitions/ItemRowShopBlock" + "$ref": "#/definitions/HeroShopBlockSchema" }, { - "$ref": "#/definitions/BundleTileRowShopBlock" + "$ref": "#/definitions/SubBlockSchema" }, { - "$ref": "#/definitions/ItemCollectionShopBlock" - } - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ItemRowShopBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer", - "const": 0 - }, - "category_sku_id": { - "type": "string" - }, - "name": { - "type": "string" + "$ref": "#/definitions/FeaturedShopBlockSchema" }, - "category_store_listing_id": { - "type": "string" - }, - "banner_asset": { - "$ref": "#/definitions/StaticAnimatedAsset" + { + "$ref": "#/definitions/FeedShopBlockSchema" }, - "logo_url": { - "type": "string" + { + "$ref": "#/definitions/WideBannerShopBlockSchema" }, - "unpublished_at": { - "type": [ - "null", - "string" - ] + { + "$ref": "#/definitions/ShelfShopBlockSchema" }, - "summary": { - "type": "string" + { + "$ref": "#/definitions/CountdownTimerShopBlockSchema" }, - "ranked_sku_ids": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "banner_asset", - "category_sku_id", - "category_store_listing_id", - "logo_url", - "name", - "ranked_sku_ids", - "summary", - "type", - "unpublished_at" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "BundleTileRowShopBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer", - "const": 1 + { + "$ref": "#/definitions/ImmersiveBannerShopBlockSchema" }, - "subblocks": { - "type": "array", - "items": { - "$ref": "#/definitions/ShopBlockSubBlock" - } + { + "$ref": "#/definitions/RewardHeroShopBlockSchema" } - }, - "additionalProperties": false, - "required": [ - "subblocks", - "type" ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ShopBlockSubBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer" - }, - "category_store_listing_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "unpublished_at": { - "type": [ - "null", - "string" - ] - }, - "banner_url": { - "type": "string" - }, - "body_text": { - "type": [ - "null", - "string" - ] - }, - "banner_text_color": { - "type": [ - "null", - "integer" - ] - } - }, - "additionalProperties": false, - "required": [ - "banner_text_color", - "banner_url", - "body_text", - "category_store_listing_id", - "name", - "type", - "unpublished_at" + "ShopBlockType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ItemCollectionShopBlock": { - "type": "object", - "properties": { - "type": { - "type": "integer", - "const": 2 - }, - "ranked_sku_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "sorted_sku_ids": { - "type": "object", - "properties": { - "recommended": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "null" - } - ] - }, - "popular": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "popular", - "recommended" - ] - } - }, - "additionalProperties": false, - "required": [ - "ranked_sku_ids", - "sorted_sku_ids", - "type" - ], + "ShopSubBlockType": { + "description": "A category subblock\n\nValue: 0\nName: CATEGORY", + "type": "number", + "const": 0, "$schema": "http://json-schema.org/draft-07/schema#" }, "PartialMessage": { @@ -13083,7 +17439,7 @@ "length": { "type": "integer" }, - "__@unscopables@700": { + "__@unscopables@703": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -13212,17 +17568,17 @@ "remove": { "type": "boolean" }, - "__@iterator@698": { + "__@iterator@670": { "type": "boolean" }, - "__@unscopables@700": { + "__@unscopables@703": { "type": "boolean" } } } }, "required": [ - "__@unscopables@700", + "__@unscopables@703", "length" ] }, @@ -13796,37 +18152,12 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "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, + "StoreListingIconType": { + "type": "number", + "enum": [ + 1, + 2 + ], "$schema": "http://json-schema.org/draft-07/schema#" } } \ No newline at end of file diff --git a/scripts/schemaExclusions.json b/scripts/schemaExclusions.json index 64e2bbf003..5e2fbe0172 100644 --- a/scripts/schemaExclusions.json +++ b/scripts/schemaExclusions.json @@ -410,6 +410,14 @@ { "value": "UserResponse", "reason": "Schema with only uppercase properties" + }, + { + "value": "SKUSchema", + "reason": "Self-reference only schema" + }, + { + "value": "CollectibleProductSchema", + "reason": "Self-reference only schema" } ] } \ No newline at end of file diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts index ad949b25ac..188338a94a 100644 --- a/src/api/middlewares/Authentication.ts +++ b/src/api/middlewares/Authentication.ts @@ -51,6 +51,8 @@ export const NO_AUTHORIZATION_ROUTES = [ "GET /policies/instance/", // Oauth callback "/oauth2/callback", + // get quest config + /^GET \/quests\/\d+/, // Asset delivery /^(GET|HEAD) \/guilds\/\d+\/widget\.(json|png)/, /^(GET|HEAD) \/guilds\/\d+\/shield\.svg/, diff --git a/src/api/routes/applications/#application_id/storefront/product.ts b/src/api/routes/applications/#application_id/storefront/product.ts new file mode 100644 index 0000000000..1040256739 --- /dev/null +++ b/src/api/routes/applications/#application_id/storefront/product.ts @@ -0,0 +1,30 @@ +import { Router, Request, Response } from "express"; +import { route } from "@spacebar/api"; +import { CreateApplicationSKUSchema, CreateApplicationSKUResponseSchema } from "@spacebar/schemas"; + +const router = Router({ mergeParams: true }); + +// this is the route the developer portal seems to use to create a sku for an app +router.post( + "/", + route({ + description: "Create a new SKU for an application", + requestBody: "CreateApplicationSKUSchema", + responses: { + 200: { + body: "CreateApplicationSKUResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + const { application_id } = req.params; + const { name, sku_type, product_line } = req.body as CreateApplicationSKUSchema; + // TODO: + res.json({ + skus: [], + store_listings: [], + } as CreateApplicationSKUResponseSchema); + }, +); + +export default router; diff --git a/src/api/routes/quests/#quest_id/claim-reward.ts b/src/api/routes/quests/#quest_id/claim-reward.ts new file mode 100644 index 0000000000..555bda937f --- /dev/null +++ b/src/api/routes/quests/#quest_id/claim-reward.ts @@ -0,0 +1,86 @@ +/* + 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 { route } from "@spacebar/api"; +import { EntitlementSpecialSourceType, EntitlementType, QuestClaimRewardRequestSchema, QuestClaimRewardResponseSchema } from "@spacebar/schemas/quests"; +import { emitEvent, EntitlementGiftCodeFlags } from "@spacebar/util"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.post( + "/", + route({ + description: + "Claims the quest's rewards, setting the completed_at and claimed_at fields of the quest user status to the current timestamp. Fires a Quests User Status Update Gateway event.", + requestBody: "QuestClaimRewardRequestSchema", + responses: { + 200: { + body: "QuestClaimRewardResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + const { quest_id } = req.params; + const { location, platform } = req.body as QuestClaimRewardRequestSchema; + + // TODO: implement + console.debug(`POST /quests/${quest_id}/claim-reward is incomplete`); + + await emitEvent({ + event: "QUESTS_USER_STATUS_UPDATE", + data: { + user_status: { + claimed_at: null, + claimed_tier: null, + completed_at: null, + dismissed_quest_content: 0, + enrolled_at: new Date().toISOString(), + last_stream_heartbeat_at: null, + progress: {}, + quest_id, + stream_progress_seconds: 0, + user_id: req.user.id, + }, + }, + }); + + res.json({ + claimed_at: new Date().toISOString(), + entitlement_expiration_metadata: {}, + entitlements: [ + { + id: "1453600390154162249", + sku_id: "1287881739531976815", + application_id: "1287870191526613112", + user_id: req.user.id, + deleted: false, + starts_at: null, + ends_at: null, + type: EntitlementType.QUEST_REWARD, + tenant_metadata: {}, + source_type: EntitlementSpecialSourceType.QUEST_REWARD, + gift_code_flags: EntitlementGiftCodeFlags.FLAGS.PAYMENT_SOURCE_REQUIRED, + promotion_id: null, + }, + ], + errors: [], + } as QuestClaimRewardResponseSchema); + }, +); + +export default router; diff --git a/src/api/routes/quests/#quest_id/enroll.ts b/src/api/routes/quests/#quest_id/enroll.ts new file mode 100644 index 0000000000..4ca3fa2735 --- /dev/null +++ b/src/api/routes/quests/#quest_id/enroll.ts @@ -0,0 +1,62 @@ +/* + 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 { route } from "@spacebar/api"; +import { QuestEnrollRequestSchema, QuestUserStatusSchema } from "@spacebar/schemas"; +import { emitEvent } from "@spacebar/util"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.post( + "/", + route({ + description: "Accepts a quest and returns a quest user status object. Fires a Quests User Status Update Gateway event.", + requestBody: "QuestEnrollRequestSchema", + }), + async (req: Request, res: Response) => { + const { quest_id } = req.params; + const { location } = req.body as QuestEnrollRequestSchema; + + // TODO: implement + console.debug(`POST /quests/${quest_id}/enroll is incomplete`); + + const status: QuestUserStatusSchema = { + claimed_at: null, + claimed_tier: null, + completed_at: null, + dismissed_quest_content: 0, + enrolled_at: new Date().toISOString(), + last_stream_heartbeat_at: null, + progress: {}, + quest_id, + stream_progress_seconds: 0, + user_id: req.user.id, + }; + + await emitEvent({ + event: "QUESTS_USER_STATUS_UPDATE", + data: { + user_status: status, + }, + }); + + res.json(status); + }, +); + +export default router; diff --git a/src/api/routes/quests/#quest_id/index.ts b/src/api/routes/quests/#quest_id/index.ts new file mode 100644 index 0000000000..af435f02f9 --- /dev/null +++ b/src/api/routes/quests/#quest_id/index.ts @@ -0,0 +1,141 @@ +/* + 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 { route } from "@spacebar/api"; +import { QuestAssignmentMethod, QuestConfigResponseSchema, QuestEventType, QuestFeature, QuestPlatformType, QuestRewardType, QuestSharePolicy } from "@spacebar/schemas"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.get( + "/", + route({ + description: "Returns a quest config object for the specified quest. Quest must be currently active.", + responses: { + 200: { + body: "QuestConfigResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + const { quest_id } = req.params; + // TODO: implement + console.debug(`GET /quests/${quest_id} is incomplete`); + + // just a dummy response for now + res.json({ + id: "1333839522189938740", + config_version: 2, + starts_at: "2025-07-14T14:00:00+00:00", + expires_at: "2099-08-15T23:00:00+00:00", + features: [QuestFeature.QUEST_BAR_V2, QuestFeature.REWARD_HIGHLIGHTING, QuestFeature.DISMISSAL_SURVEY, QuestFeature.QUESTS_CDN, QuestFeature.PACING_CONTROLLER], + application: { + link: "https://spacebar.chat", + id: "545364944258990091", + name: "Spacebar", + }, + colors: { + primary: "#5865F2", + secondary: "#000000", + }, + assets: { + hero: "quests/1333839522189938740/orbs_quest_card_banner_4.jpeg", + hero_video: null, + quest_bar_hero: "quests/1333839522189938740/orbs_quest_bar.png", + quest_bar_hero_video: null, + game_tile: "discord_game_tile.png", + logotype: "discord_logo.png", + game_tile_light: "quests/1333839522189938740/1417603112168067182.png", + game_tile_dark: "quests/1333839522189938740/1417603112742551603.png", + logotype_light: "quests/1333839522189938740/1417603113304719540.png", + logotype_dark: "quests/1333839522189938740/1417603113791131668.png", + }, + messages: { + quest_name: "Spacebar Bars Intro", + game_title: "Spacebar", + game_publisher: "Spacebar", + }, + task_config_v2: { + tasks: { + [QuestEventType.WATCH_VIDEO]: { + type: QuestEventType.WATCH_VIDEO, + target: 31, + assets: { + video: { + url: "quests/1410358070831480904/1420884840815005717_1080.mp4", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + video_low_res: { + url: "quests/1410358070831480904/1420884840815005717_720.mp4", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + video_hls: { + url: "quests/1410358070831480904/1420884840815005717.m3u8", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + }, + messages: { + video_title: "Intro to Spacebar Bars", + // video_end_cta_title: "Learn more about Bars", + // video_end_cta_subtitle: "Head to our Help Center for more information.", + }, + }, + }, + join_operator: "or", + }, + rewards_config: { + assignment_method: QuestAssignmentMethod.ALL, + rewards: [ + { + type: QuestRewardType.VIRTUAL_CURRENCY, + sku_id: "1287881739531976815", + messages: { + name: "150 Bars", + name_with_article: "150 Bars", + redemption_instructions_by_platform: { + [QuestPlatformType.CROSS_PLATFORM]: "Default", + }, + }, + orb_quantity: 150, + }, + ], + rewards_expire_at: "2099-02-01T00:00:27+00:00", + platforms: [QuestPlatformType.CROSS_PLATFORM], + }, + share_policy: QuestSharePolicy.SHAREABLE_EVERYWHERE, + cta_config: { + link: "https://spacebar.chat", + button_label: "Learn More", + subtitle: "Head to our Help Center for more information.", + }, + } as QuestConfigResponseSchema); + }, +); + +export default router; diff --git a/src/api/routes/quests/#quest_id/reward-code.ts b/src/api/routes/quests/#quest_id/reward-code.ts new file mode 100644 index 0000000000..c9d1e18eae --- /dev/null +++ b/src/api/routes/quests/#quest_id/reward-code.ts @@ -0,0 +1,50 @@ +/* + 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 { route } from "@spacebar/api"; +import { QuestPlatformType, QuestRewardCodeResponseSchema } from "@spacebar/schemas/quests"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.get( + "/", + route({ + description: "Retrieves the reward code for the specified platform. Returns a quest reward code object on success.", + responses: { + 200: { + body: "QuestRewardCodeResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + const { quest_id } = req.params; + + // TODO: implement + console.debug(`GET /quests/${quest_id}/reward-code is incomplete`); + + res.json({ + quest_id, + claimed_at: "2025-08-01T12:00:00+00:00", + code: "REWARD-CODE-1234", + platform: QuestPlatformType.CROSS_PLATFORM, + user_id: req.user.id, + } as QuestRewardCodeResponseSchema); + }, +); + +export default router; diff --git a/src/api/routes/quests/#quest_id/video-progress.ts b/src/api/routes/quests/#quest_id/video-progress.ts new file mode 100644 index 0000000000..7c14170444 --- /dev/null +++ b/src/api/routes/quests/#quest_id/video-progress.ts @@ -0,0 +1,68 @@ +/* + 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 { route } from "@spacebar/api"; +import { QuestUserStatusSchema, QuestVideoProgressRequestSchema } from "@spacebar/schemas/quests"; +import { emitEvent } from "@spacebar/util"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.post( + "/", + route({ + description: + "Tells the server to update the value field of the current video task. Used for keeping track of how long the video has been watched for, and for checking if the user has met the task duration requirement. Returns a quest user status object on success. Fires a Quests User Status Update Gateway event.", + requestBody: "QuestVideoProgressRequestSchema", + responses: { + 200: { + body: "QuestVideoProgressResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + const { quest_id } = req.params; + const { timestamp } = req.body as QuestVideoProgressRequestSchema; + + // TODO: implement + console.debug(`POST /quests/${quest_id}/video-progress is incomplete`); + + const status: QuestUserStatusSchema = { + claimed_at: null, + claimed_tier: null, + completed_at: null, + dismissed_quest_content: 0, + enrolled_at: new Date().toISOString(), + last_stream_heartbeat_at: null, + progress: {}, + quest_id, + stream_progress_seconds: 0, + user_id: req.user.id, + }; + + await emitEvent({ + event: "QUESTS_USER_STATUS_UPDATE", + data: { + user_status: status, + }, + }); + + res.json(status); + }, +); + +export default router; diff --git a/src/api/routes/quests/@me.ts b/src/api/routes/quests/@me.ts new file mode 100644 index 0000000000..630fa1c941 --- /dev/null +++ b/src/api/routes/quests/@me.ts @@ -0,0 +1,341 @@ +/* + 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 { route } from "@spacebar/api"; +import { ClaimedQuestsResponseSchema, QuestAssignmentMethod, QuestEventType, QuestFeature, QuestPlatformType, QuestRewardType, QuestSharePolicy } from "@spacebar/schemas"; +import { QuestsResponseSchema } from "@spacebar/schemas/responses"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.get( + "/", + route({ + description: "Returns information on the current quests for the current user.", + responses: { + 200: { + body: "QuestsResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + // TODO: pull quests from config + + console.debug("GET /quests/@me is incomplete"); + + res.json({ + excluded_quests: [], + quest_enrollment_blocked_until: null, + quests: [ + { + id: "1333839522189938740", + config: { + id: "1333839522189938740", + config_version: 2, + starts_at: "2025-07-14T14:00:00+00:00", + expires_at: "2099-08-15T23:00:00+00:00", + features: [ + QuestFeature.QUEST_BAR_V2, + QuestFeature.REWARD_HIGHLIGHTING, + QuestFeature.DISMISSAL_SURVEY, + QuestFeature.QUESTS_CDN, + QuestFeature.PACING_CONTROLLER, + ], + application: { + link: "https://spacebar.chat", + id: "545364944258990091", + name: "Spacebar", + }, + colors: { + primary: "#5865F2", + secondary: "#000000", + }, + assets: { + hero: "quests/1333839522189938740/orbs_quest_card_banner_4.jpeg", + hero_video: null, + quest_bar_hero: "quests/1333839522189938740/orbs_quest_bar.png", + quest_bar_hero_video: null, + game_tile: "discord_game_tile.png", + logotype: "discord_logo.png", + game_tile_light: "quests/1333839522189938740/1417603112168067182.png", + game_tile_dark: "quests/1333839522189938740/1417603112742551603.png", + logotype_light: "quests/1333839522189938740/1417603113304719540.png", + logotype_dark: "quests/1333839522189938740/1417603113791131668.png", + }, + messages: { + quest_name: "Spacebar Bars Intro", + game_title: "Spacebar", + game_publisher: "Spacebar", + }, + task_config_v2: { + tasks: { + [QuestEventType.WATCH_VIDEO]: { + type: QuestEventType.WATCH_VIDEO, + target: 31, + assets: { + video: { + url: "quests/1410358070831480904/1420884840815005717_1080.mp4", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + video_low_res: { + url: "quests/1410358070831480904/1420884840815005717_720.mp4", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + video_hls: { + url: "quests/1410358070831480904/1420884840815005717.m3u8", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + }, + messages: { + video_title: "Intro to Spacebar Bars", + // video_end_cta_title: "Learn more about Bars", + // video_end_cta_subtitle: "Head to our Help Center for more information.", + }, + }, + }, + join_operator: "or", + }, + rewards_config: { + assignment_method: QuestAssignmentMethod.ALL, + rewards: [ + { + type: QuestRewardType.VIRTUAL_CURRENCY, + sku_id: "1287881739531976815", + messages: { + name: "150 Bars", + name_with_article: "150 Bars", + redemption_instructions_by_platform: { + [QuestPlatformType.CROSS_PLATFORM]: "Default", + }, + }, + orb_quantity: 150, + }, + ], + rewards_expire_at: "2099-02-01T00:00:27+00:00", + platforms: [QuestPlatformType.CROSS_PLATFORM], + }, + share_policy: QuestSharePolicy.SHAREABLE_EVERYWHERE, + cta_config: { + link: "https://spacebar.chat", + button_label: "Learn More", + subtitle: "Head to our Help Center for more information.", + }, + }, + // user_status: { + // user_id: "498989696412549120", + // quest_id: "1333839522189938740", + // enrolled_at: "2025-07-14T21:20:04.640772+00:00", + // completed_at: "2025-07-14T21:21:05.941315+00:00", + // claimed_at: "2025-07-14T21:21:26.983570+00:00", + // claimed_tier: null, + // last_stream_heartbeat_at: null, + // stream_progress_seconds: 0, + // dismissed_quest_content: 0, + // progress: { + // WATCH_VIDEO: { + // value: 31, + // event_name: "WATCH_VIDEO", + // updated_at: "2025-07-14T21:21:05.941317+00:00", + // completed_at: "2025-07-14T21:21:05.941315+00:00", + // heartbeat: null, + // }, + // }, + // }, + user_status: null, + }, + { + id: "1410358070831480904", + config: { + id: "1410358070831480904", + config_version: 2, + starts_at: "2025-11-17T16:30:27+00:00", + expires_at: "2099-01-02T00:00:27+00:00", + features: [ + QuestFeature.QUEST_BAR_V2, + QuestFeature.REWARD_HIGHLIGHTING, + QuestFeature.DISMISSAL_SURVEY, + QuestFeature.MOBILE_QUEST_DOCK, + QuestFeature.QUESTS_CDN, + QuestFeature.PACING_CONTROLLER, + QuestFeature.VIDEO_QUEST_FORCE_HLS_VIDEO, + QuestFeature.VIDEO_QUEST_FORCE_END_CARD_CTA_SWAP, + QuestFeature.MOBILE_ONLY_QUEST_PUSH_TO_MOBILE, + ], + application: { + link: "https://spacebar.chat", + id: "545364944258990091", + name: "Spacebar", + }, + assets: { + hero: "quests/1410358070831480904/1440427094801911919.jpg", + hero_video: null, + quest_bar_hero: "quests/1410358070831480904/1440368088196579358.jpg", + quest_bar_hero_video: null, + game_tile: "687100d5-5958-43aa-b221-dfe4f2b79e14.png", + logotype: "0c58c77e-4ab4-482e-b784-ea4646b992ca.png", + game_tile_light: "quests/1410358070831480904/1417602409018163210.png", + game_tile_dark: "quests/1410358070831480904/1417602409668153406.png", + logotype_light: "quests/1410358070831480904/1417602410142105680.png", + logotype_dark: "quests/1410358070831480904/1417602410733375498.png", + }, + colors: { + primary: "#4752C4", + secondary: "#000000", + }, + messages: { + quest_name: "Mobile Bars Intro", + game_title: "Earn from Quests. Spend in Shop. Reward Your Play.", + game_publisher: "Spacebar", + }, + // task_config: { + // type: 1, + // join_operator: "or", + // tasks: { + // WATCH_VIDEO_ON_MOBILE: { + // event_name: "WATCH_VIDEO_ON_MOBILE", + // target: 31, + // external_ids: [], + // }, + // }, + // }, + task_config_v2: { + tasks: { + [QuestEventType.WATCH_VIDEO_ON_MOBILE]: { + type: QuestEventType.WATCH_VIDEO_ON_MOBILE, + target: 31, + assets: { + video: { + url: "quests/1410358070831480904/1420884840815005717_1080.mp4", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + video_low_res: { + url: "quests/1410358070831480904/1420884840815005717_720.mp4", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + video_hls: { + url: "quests/1410358070831480904/1420884840815005717.m3u8", + width: 1080, + height: 1920, + thumbnail: "quests/1410358070831480904/1421253196549984267.png", + caption: "quests/1410358070831480904/1410370389451866112.vtt", + transcript: "quests/1410358070831480904/1410370413032374293.txt", + }, + }, + messages: { + video_title: "Intro to Spacebar Bars", + // video_end_cta_title: "Learn more about Bars", + // video_end_cta_subtitle: "Head to our Help Center for more information.", + }, + }, + }, + join_operator: "or", + }, + rewards_config: { + assignment_method: QuestAssignmentMethod.ALL, + rewards: [ + { + type: QuestRewardType.VIRTUAL_CURRENCY, + sku_id: "1287881739531976815", + messages: { + name: "150 Bars", + name_with_article: "150 Bars", + redemption_instructions_by_platform: { + [QuestPlatformType.CROSS_PLATFORM]: "Default", + }, + }, + orb_quantity: 150, + }, + ], + rewards_expire_at: "2099-02-01T00:00:27+00:00", + platforms: [QuestPlatformType.CROSS_PLATFORM], + }, + share_policy: QuestSharePolicy.SHAREABLE_EVERYWHERE, + cta_config: { + link: "https://spacebar.chat", + button_label: "Learn More", + subtitle: "Head to our Help Center for more information.", + }, + }, + // user_status: { + // user_id: "498989696412549120", + // quest_id: "1410358070831480904", + // enrolled_at: "2025-11-19T04:17:07.950593+00:00", + // completed_at: "2025-11-19T04:17:45.920547+00:00", + // claimed_at: "2025-11-19T04:17:51.972621+00:00", + // claimed_tier: null, + // last_stream_heartbeat_at: null, + // stream_progress_seconds: 0, + // dismissed_quest_content: 0, + // progress: { + // WATCH_VIDEO_ON_MOBILE: { + // value: 31, + // event_name: "WATCH_VIDEO_ON_MOBILE", + // updated_at: "2025-11-19T04:17:45.920548+00:00", + // completed_at: "2025-11-19T04:17:45.920547+00:00", + // heartbeat: null, + // }, + // }, + // }, + user_status: null, + targeted_content: [], + preview: false, + }, + ], + } as QuestsResponseSchema); + }, +); + +router.get( + "/claimed", + route({ + description: "Returns information on the claimed quests for the current user.", + responses: { + 200: { + body: "ClaimedQuestsResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + // TODO: implement + console.debug("GET /quests/@me/claimed is incomplete"); + res.json({ + quests: [], + } as ClaimedQuestsResponseSchema); + }, +); + +export default router; diff --git a/src/api/routes/quests/decision.ts b/src/api/routes/quests/decision.ts new file mode 100644 index 0000000000..3b28bbf373 --- /dev/null +++ b/src/api/routes/quests/decision.ts @@ -0,0 +1,73 @@ +/* + 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 { route } from "@spacebar/api"; +import { QuestPlacementArea, QuestPlacementResponseSchema } from "@spacebar/schemas"; +import { FieldErrors } from "@spacebar/util"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.get( + "/", + route({ + description: "Returns the sponsored quest that should be shown to the user in a specific placement.", + query: { + placement: { + type: "number", + description: "The quest placement area to get the quest for", + }, + client_heartbeat_session_id: { + type: "string", + description: "A client-generated UUID representing the current persisted analytics heartbeat", + }, + }, + responses: { + 200: { + body: "QuestPlacementResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + const { placement, client_heartbeat_session_id } = req.query; + // check if placement is a valid QuestPlacementArea + if (!Object.values(QuestPlacementArea).includes(placement as unknown as number)) { + throw FieldErrors({ + placement: { + code: "ENUM_TYPE_COERCE", + message: req.t("common:field.ENUM_TYPE_COERCE", { + value: placement, + }), + }, + }); + } + + // TODO: implement + console.debug(`GET /quests/decision?placement=${placement}&client_heartbeat_session_id=${client_heartbeat_session_id} is incomplete`); + res.json({ + request_id: "unique-request-id-1234", + quest: null, + ad_identifiers: null, + ad_context: null, + response_ttl_seconds: 300, + metadata_raw: "", + metadata_sealed: "", + } as QuestPlacementResponseSchema); + }, +); + +export default router; diff --git a/src/api/routes/store/published-listings/skus.ts b/src/api/routes/store/published-listings/skus.ts index 01bbc8b279..068a947b14 100644 --- a/src/api/routes/store/published-listings/skus.ts +++ b/src/api/routes/store/published-listings/skus.ts @@ -21,77 +21,77 @@ import { route } from "@spacebar/api"; const router: Router = Router({ mergeParams: true }); -router.get("/:sku_id", route({}), (req: Request, res: Response) => { - //TODO - // const id = req.params.id; - res.json({ - id: "", - summary: "", - sku: { - id: "", - type: 1, - dependent_sku_id: null, - application_id: "", - manifets_labels: [], - access_type: 2, - name: "", - features: [], - release_date: "", - premium: false, - slug: "", - flags: 4, - genres: [], - legal_notice: "", - application: { - id: "", - name: "", - icon: "", - description: "", - summary: "", - cover_image: "", - primary_sku_id: "", - hook: true, - slug: "", - guild_id: "", - bot_public: "", - bot_require_code_grant: false, - verify_key: "", - publishers: [ - { - id: "", - name: "", - }, - ], - developers: [ - { - id: "", - name: "", - }, - ], - system_requirements: {}, - show_age_gate: false, - price: { - amount: 0, - currency: "EUR", - }, - locales: [], - }, - tagline: "", - description: "", - carousel_items: [ - { - asset_id: "", - }, - ], - header_logo_dark_theme: {}, //{id: "", size: 4665, mime_type: "image/gif", width 160, height: 160} - header_logo_light_theme: {}, - box_art: {}, - thumbnail: {}, - header_background: {}, - hero_background: {}, - assets: [], - }, - }).status(200); -}); +// router.get("/:sku_id", route({}), (req: Request, res: Response) => { +// //TODO +// // const id = req.params.id; +// res.json({ +// id: "", +// summary: "", +// sku: { +// id: "", +// type: 1, +// dependent_sku_id: null, +// application_id: "", +// manifets_labels: [], +// access_type: 2, +// name: "", +// features: [], +// release_date: "", +// premium: false, +// slug: "", +// flags: 4, +// genres: [], +// legal_notice: "", +// application: { +// id: "", +// name: "", +// icon: "", +// description: "", +// summary: "", +// cover_image: "", +// primary_sku_id: "", +// hook: true, +// slug: "", +// guild_id: "", +// bot_public: "", +// bot_require_code_grant: false, +// verify_key: "", +// publishers: [ +// { +// id: "", +// name: "", +// }, +// ], +// developers: [ +// { +// id: "", +// name: "", +// }, +// ], +// system_requirements: {}, +// show_age_gate: false, +// price: { +// amount: 0, +// currency: "EUR", +// }, +// locales: [], +// }, +// tagline: "", +// description: "", +// carousel_items: [ +// { +// asset_id: "", +// }, +// ], +// header_logo_dark_theme: {}, //{id: "", size: 4665, mime_type: "image/gif", width 160, height: 160} +// header_logo_light_theme: {}, +// box_art: {}, +// thumbnail: {}, +// header_background: {}, +// hero_background: {}, +// assets: [], +// }, +// }).status(200); +// }); export default router; diff --git a/src/api/routes/store/published-listings/skus/#sku_id/index.ts b/src/api/routes/store/published-listings/skus/#sku_id/index.ts new file mode 100644 index 0000000000..1635c6dfb0 --- /dev/null +++ b/src/api/routes/store/published-listings/skus/#sku_id/index.ts @@ -0,0 +1,96 @@ +/* + 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 { Request, Response, Router } from "express"; +import { route } from "@spacebar/api"; + +const router: Router = Router({ mergeParams: true }); + +router.get("/", route({}), (req: Request, res: Response) => { + //TODO + // const id = req.params.id; + res.json({ + id: "", + summary: "", + sku: { + id: "", + type: 1, + dependent_sku_id: null, + application_id: "", + manifets_labels: [], + access_type: 2, + name: "", + features: [], + release_date: "", + premium: false, + slug: "", + flags: 4, + genres: [], + legal_notice: "", + application: { + id: "", + name: "", + icon: "", + description: "", + summary: "", + cover_image: "", + primary_sku_id: "", + hook: true, + slug: "", + guild_id: "", + bot_public: "", + bot_require_code_grant: false, + verify_key: "", + publishers: [ + { + id: "", + name: "", + }, + ], + developers: [ + { + id: "", + name: "", + }, + ], + system_requirements: {}, + show_age_gate: false, + price: { + amount: 0, + currency: "EUR", + }, + locales: [], + }, + tagline: "", + description: "", + carousel_items: [ + { + asset_id: "", + }, + ], + header_logo_dark_theme: {}, //{id: "", size: 4665, mime_type: "image/gif", width 160, height: 160} + header_logo_light_theme: {}, + box_art: {}, + thumbnail: {}, + header_background: {}, + hero_background: {}, + assets: [], + }, + }).status(200); +}); +export default router; diff --git a/src/api/routes/store/skus.ts b/src/api/routes/store/skus.ts new file mode 100644 index 0000000000..bd794dd227 --- /dev/null +++ b/src/api/routes/store/skus.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 . +*/ + +import { Request, Response, Router } from "express"; +import { route } from "@spacebar/api"; +import { CreateSKUSchema } from "@spacebar/schemas"; +import { SKU } from "@spacebar/util"; + +const router: Router = Router({ mergeParams: true }); + +router.post( + "/", + route({ + description: + "Creates a new SKU. Returns the created SKU object on success. Requires an application with access to the store or monetization. User must be the owner of the application or member of the owning team.", + requestBody: "CreateSKUSchema", + }), + async (req: Request, res: Response) => { + const body = req.body as CreateSKUSchema; + + const sku = await SKU.createSku(body); + + res.json(sku).status(200); + }, +); + +export default router; diff --git a/src/api/routes/users/@me/virtual-currency/balance.ts b/src/api/routes/users/@me/virtual-currency/balance.ts new file mode 100644 index 0000000000..fd4577e303 --- /dev/null +++ b/src/api/routes/users/@me/virtual-currency/balance.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 . +*/ + +import { route } from "@spacebar/api"; +import { Request, Response, Router } from "express"; +const router = Router({ mergeParams: true }); + +router.get( + "/", + route({ + responses: { + 200: { + body: "VirtualCurrencyResponseSchema", + }, + }, + }), + async (req: Request, res: Response) => { + res.json({ + balance: req.user.currency, + }); + }, +); + +export default router; diff --git a/src/schemas/api/entitlements/EntitlementFulfillmentStatus.ts b/src/schemas/api/entitlements/EntitlementFulfillmentStatus.ts new file mode 100644 index 0000000000..4416e5b01e --- /dev/null +++ b/src/schemas/api/entitlements/EntitlementFulfillmentStatus.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 enum EntitlementFulfillmentStatus { + UNKNOWN = 0, + FULFILLMENT_NOT_NEEDED, + FULFILLMENT_NEEDED, + FULFILLED, + FULFILLMENT_FAILED, + UNFULFILLMENT_NEEDED, + UNFULFILLED, + UNFULFILLMENT_FAILED, + UNFULFILLMENT_NEEDED_MANUAL, +} diff --git a/src/schemas/api/entitlements/EntitlementGiftStyle.ts b/src/schemas/api/entitlements/EntitlementGiftStyle.ts new file mode 100644 index 0000000000..3d758145d2 --- /dev/null +++ b/src/schemas/api/entitlements/EntitlementGiftStyle.ts @@ -0,0 +1,32 @@ +/* + 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 enum EntitlementGiftStyle { + SNOWGLOBE = 1, + BOX, + CUP, + STANDARD_BOX, + CAKE, + CHEST, + COFFEE, + SEASONAL_STANDARD_BOX, + SEASONAL_CAKE, + SEASONAL_CHEST, + SEASONAL_COFFEE, + NITROWEEN_STANDARD, +} diff --git a/src/schemas/api/entitlements/EntitlementQuestRewardMetadataSchema.ts b/src/schemas/api/entitlements/EntitlementQuestRewardMetadataSchema.ts new file mode 100644 index 0000000000..69c97bf712 --- /dev/null +++ b/src/schemas/api/entitlements/EntitlementQuestRewardMetadataSchema.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 . +*/ + +import { QuestRewardCodeSchema, QuestRewardType } from "../../quests"; + +export interface EntitlementQuestRewardMetadataSchema { + tag: QuestRewardType; + reward_code?: QuestRewardCodeSchema; +} diff --git a/src/schemas/api/entitlements/EntitlementSchema.ts b/src/schemas/api/entitlements/EntitlementSchema.ts new file mode 100644 index 0000000000..964c724851 --- /dev/null +++ b/src/schemas/api/entitlements/EntitlementSchema.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 . +*/ + +import { SKU, User } from "@spacebar/util"; +import { EntitlementFulfillmentStatus } from "./EntitlementFulfillmentStatus"; +import { EntitlementGiftStyle } from "./EntitlementGiftStyle"; +import { EntitlementSpecialSourceType } from "./EntitlementSpecialSourceType"; +import { EntitlementTenantMetadataSchema } from "./EntitlementTenantMetadataSchema"; +import { EntitlementType } from "./EntitlementType"; + +export interface EntitlementSchema { + id: string; + type: EntitlementType; + sku_id: string; + application_id: string; + user_id: string; + user?: Partial; + guild_id?: string; + parent_id?: string; + deleted: boolean; + consumed?: boolean; + branches?: string[]; + starts_at: string | null; + ends_at: string | null; + promotion_id: string | null; + subscription_id?: string; + gift_code_flags: bigint; // EntitlementGiftCodeFlags; + gift_code_batch_id?: string; + gifter_user_id?: string; + gift_style?: EntitlementGiftStyle; + fulfillment_status?: EntitlementFulfillmentStatus; + fulfilled_at?: string; + source_type?: EntitlementSpecialSourceType; + tenant_metadata?: Record; + sku?: SKU; + subscription_plan?: Partial; // TODO: https://docs.discord.food/resources/store#subscription-plan-object +} diff --git a/src/schemas/api/entitlements/EntitlementSpecialSourceType.ts b/src/schemas/api/entitlements/EntitlementSpecialSourceType.ts new file mode 100644 index 0000000000..ec542d064d --- /dev/null +++ b/src/schemas/api/entitlements/EntitlementSpecialSourceType.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 enum EntitlementSpecialSourceType { + QUEST_REWARD = 1, + DEVELOPER_GIFT, + INVOICE, + REVERSE_TRIAL, + USER_GIFT, + GUILD_POWERUP, + HOLIDAY_PROMOTION, + FRACTIONAL_PREMIUM_GIVEBACK, + SUBSCRIPTION, + SUBSCRIPTION_MEMBER = 11, +} diff --git a/src/schemas/api/entitlements/EntitlementTenantMetadataSchema.ts b/src/schemas/api/entitlements/EntitlementTenantMetadataSchema.ts new file mode 100644 index 0000000000..2450730eda --- /dev/null +++ b/src/schemas/api/entitlements/EntitlementTenantMetadataSchema.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 . +*/ + +import { EntitlementQuestRewardMetadataSchema } from "./EntitlementQuestRewardMetadataSchema"; + +export interface EntitlementTenantMetadataSchema { + quest_rewards: EntitlementQuestRewardMetadataSchema; +} diff --git a/src/schemas/api/entitlements/EntitlementType.ts b/src/schemas/api/entitlements/EntitlementType.ts new file mode 100644 index 0000000000..5c098e0d3f --- /dev/null +++ b/src/schemas/api/entitlements/EntitlementType.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 enum EntitlementType { + PURCHASE = 1, + PREMIUM_SUBSCRIPTION, + DEVELOPER_GIFT, + TEST_MODE_PURCHASE, + FREE_PURCHASE, + USER_GIFT, + PREMIUM_PURCHASE, + APPLICATION_SUBSCRIPTION, + FREE_STAFF_PURCHASE, + QUEST_REWARD, + FRACTIONAL_REDEMPTION, + VIRTUAL_CURRENCY_REDEMPTION, + GUILD_POWERUP, +} diff --git a/src/schemas/api/entitlements/index.ts b/src/schemas/api/entitlements/index.ts new file mode 100644 index 0000000000..8d0e2b122e --- /dev/null +++ b/src/schemas/api/entitlements/index.ts @@ -0,0 +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 "./EntitlementFulfillmentStatus"; +export * from "./EntitlementGiftStyle"; +export * from "./EntitlementQuestRewardMetadataSchema"; +export * from "./EntitlementSchema"; +export * from "./EntitlementSpecialSourceType"; +export * from "./EntitlementTenantMetadataSchema"; +export * from "./EntitlementType"; diff --git a/src/schemas/api/guilds/GuildPremiumFeaturesSchema.ts b/src/schemas/api/guilds/GuildPremiumFeaturesSchema.ts new file mode 100644 index 0000000000..d03b7ce912 --- /dev/null +++ b/src/schemas/api/guilds/GuildPremiumFeaturesSchema.ts @@ -0,0 +1,36 @@ +/* + 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 GuildPremiumFeatures { + /** + * Enabled powerup-specific guild features + */ + features: string[]; + /** + * The number of additional emoji slots available to the guild + */ + additional_emoji_slots: number; + /** + * The number of additional sticker slots available to the guild + */ + additional_sticker_slots: number; + /** + * The number of additional soundboard slots available to the guild + */ + additional_sound_slots: number; +} diff --git a/src/schemas/api/guilds/index.ts b/src/schemas/api/guilds/index.ts index eee86bceee..0ea662150b 100644 --- a/src/schemas/api/guilds/index.ts +++ b/src/schemas/api/guilds/index.ts @@ -17,6 +17,7 @@ */ export * from "./AuditLog"; export * from "./Automod"; +export * from "./GuildPremiumFeaturesSchema"; export * from "./GuildProfileResponse"; export * from "./GuildSchema"; export * from "./Role"; diff --git a/src/schemas/api/index.ts b/src/schemas/api/index.ts index b0215da1f5..57f56b809a 100644 --- a/src/schemas/api/index.ts +++ b/src/schemas/api/index.ts @@ -18,6 +18,8 @@ export * from "./bots"; export * from "./channels"; export * from "./developers"; +export * from "./entitlements"; export * from "./guilds"; export * from "./messages"; export * from "./users"; +export * from "./store"; diff --git a/src/schemas/api/store/AnyCollectiblesShopBlock.ts b/src/schemas/api/store/AnyCollectiblesShopBlock.ts new file mode 100644 index 0000000000..fd64fdea5e --- /dev/null +++ b/src/schemas/api/store/AnyCollectiblesShopBlock.ts @@ -0,0 +1,38 @@ +/* + 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 { CountdownTimerShopBlockSchema } from "./CountdownTimerShopBlockSchema"; +import { FeaturedShopBlockSchema } from "./FeaturedShopBlockSchema"; +import { FeedShopBlockSchema } from "./FeedShopBlockSchema"; +import { HeroShopBlockSchema } from "./HeroShopBlockSchema"; +import { ImmersiveBannerShopBlockSchema } from "./ImmersiveBannerShopBlockSchema"; +import { RewardHeroShopBlockSchema } from "./RewardHeroShoppBlockSchema"; +import { ShelfShopBlockSchema } from "./ShelfShopBlockSchema"; +import { SubBlockSchema } from "./SubBlockSchema"; +import { WideBannerShopBlockSchema } from "./WideBannerShopBlockSchema"; + +export type AnyCollectiblesShopBlock = + | HeroShopBlockSchema + | FeaturedShopBlockSchema + | SubBlockSchema + | FeedShopBlockSchema + | WideBannerShopBlockSchema + | ShelfShopBlockSchema + | CountdownTimerShopBlockSchema + | ImmersiveBannerShopBlockSchema + | RewardHeroShopBlockSchema; diff --git a/src/schemas/api/store/ApplicationApprovableConsoleType.ts b/src/schemas/api/store/ApplicationApprovableConsoleType.ts new file mode 100644 index 0000000000..50792911a9 --- /dev/null +++ b/src/schemas/api/store/ApplicationApprovableConsoleType.ts @@ -0,0 +1,41 @@ +/* + 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 enum ApplicationApprovableConsoleType { + /** + * Xbox + * + * Value: 1 + * Name: XBOX + */ + XBOX = 1, + /** + * PlayStation 5 + * + * Value: 2 + * Name: PLAYSTATION_5 + */ + PLAYSTATION_5 = 2, + /** + * PlayStation 4 + * + * Value: 3 + * Name: PLAYSTATION_4 + */ + PLAYSTATION_4 = 3, +} diff --git a/src/schemas/api/store/ApplicationCompanySchema.ts b/src/schemas/api/store/ApplicationCompanySchema.ts new file mode 100644 index 0000000000..ff8a182363 --- /dev/null +++ b/src/schemas/api/store/ApplicationCompanySchema.ts @@ -0,0 +1,28 @@ +/* + 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 ApplicationCompanySchema { + /** + * The ID of the company + */ + id: string; + /** + * The name of the company + */ + name: string; +} diff --git a/src/schemas/api/store/ApplicationDiscoverabilityState.ts b/src/schemas/api/store/ApplicationDiscoverabilityState.ts new file mode 100644 index 0000000000..019aecc06c --- /dev/null +++ b/src/schemas/api/store/ApplicationDiscoverabilityState.ts @@ -0,0 +1,55 @@ +/* + 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 enum ApplicationDiscoverabilityState { + /** + * This application is ineligible for the application directory + * + * Value: 1 + * Name: INELIGIBLE + */ + INELIGIBLE = 1, + /** + * This application is not listed in the application directory + * + * Value: 2 + * Name: NOT_DISCOVERABLE + */ + NOT_DISCOVERABLE = 2, + /** + * This application is listed in the application directory + * + * Value: 3 + * Name: DISCOVERABLE + */ + DISCOVERABLE = 3, + /** + * This application is featurable in the application directory + * + * Value: 4 + * Name: FEATUREABLE + */ + FEATUREABLE = 4, + /** + * This application has been blocked from appearing in the application directory + * + * Value: 5 + * Name: BLOCKED + */ + BLOCKED = 5, +} diff --git a/src/schemas/api/store/ApplicationEventWebhooksStatus.ts b/src/schemas/api/store/ApplicationEventWebhooksStatus.ts new file mode 100644 index 0000000000..6121bfd6d5 --- /dev/null +++ b/src/schemas/api/store/ApplicationEventWebhooksStatus.ts @@ -0,0 +1,34 @@ +/* + 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 enum ApplicationEventWebhooksStatus { + /** + * Event webhooks are disabled + * + * Value: 1 + * Name: DISABLED + */ + DISABLED = 1, + /** + * Event webhooks are enabled + * + * Value: 2 + * Name: ENABLED + */ + ENABLED = 2, +} diff --git a/src/schemas/api/store/ApplicationEventWebhooksType.ts b/src/schemas/api/store/ApplicationEventWebhooksType.ts new file mode 100644 index 0000000000..eb04945a30 --- /dev/null +++ b/src/schemas/api/store/ApplicationEventWebhooksType.ts @@ -0,0 +1,92 @@ +/* + 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 enum ApplicationEventWebhooksType { + /** + * Sent when a user authorizes the application + * + * Value: APPLICATION_AUTHORIZED + */ + APPLICATION_AUTHORIZED, + /** + * Sent when a user deauthorizes the application + * + * Value: APPLICATION_DEAUTHORIZED + */ + APPLICATION_DEAUTHORIZED, + /** + * Sent when a user creates an entitlement + * + * Value: ENTITLEMENT_CREATE + */ + ENTITLEMENT_CREATE, + /** + * Sent when an entitlement is updated + * + * Value: ENTITLEMENT_UPDATE + */ + ENTITLEMENT_UPDATE, + /** + * Sent when an entitlement is deleted + * + * Value: ENTITLEMENT_DELETE + */ + ENTITLEMENT_DELETE, + /** + * Sent when a user enrolls in a quest + * + * Value: QUEST_USER_ENROLLMENT + */ + QUEST_USER_ENROLLMENT, + /** + * Sent when a user sends a message in a lobby + * + * Value: LOBBY_MESSAGE_CREATE + */ + LOBBY_MESSAGE_CREATE, + /** + * Sent when a user updates a message in a lobby + * + * Value: LOBBY_MESSAGE_UPDATE + */ + LOBBY_MESSAGE_UPDATE, + /** + * Sent when a user deletes a message in a lobby + * + * Value: LOBBY_MESSAGE_DELETE + */ + LOBBY_MESSAGE_DELETE, + /** + * Sent when a user sends a direct message through the social layer SDK + * + * Value: GAME_DIRECT_MESSAGE_CREATE + */ + GAME_DIRECT_MESSAGE_CREATE, + /** + * Sent when a user updates a direct message through the social layer SDK + * + * Value: GAME_DIRECT_MESSAGE_UPDATE + */ + GAME_DIRECT_MESSAGE_UPDATE, + /** + * Sent when a user deletes a direct message through the social layer SDK + * + * Value: GAME_DIRECT_MESSAGE_DELETE + */ + GAME_DIRECT_MESSAGE_DELETE, +} diff --git a/src/schemas/api/store/ApplicationExecutableSchema.ts b/src/schemas/api/store/ApplicationExecutableSchema.ts new file mode 100644 index 0000000000..b22602f125 --- /dev/null +++ b/src/schemas/api/store/ApplicationExecutableSchema.ts @@ -0,0 +1,32 @@ +/* + 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 ApplicationExecutableSchema { + /** + * The operating system the executable can be found on + */ + os: string; + /** + * The name of the executable + */ + name: string; + /** + * Whether the executable is for a game launcher + */ + is_launcher: boolean; +} diff --git a/src/schemas/api/store/ApplicationGuildRestriction.ts b/src/schemas/api/store/ApplicationGuildRestriction.ts new file mode 100644 index 0000000000..73cddbcf1d --- /dev/null +++ b/src/schemas/api/store/ApplicationGuildRestriction.ts @@ -0,0 +1,41 @@ +/* + 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 enum ApplicationGuildRestriction { + /** + * The application can be authorized in any guild + * + * Value: 1 + * Name: JOIN_ALL + */ + JOIN_ALL = 1, + /** + * The application can only be authorized in guilds without the INTERNAL_EMPLOYEE_ONLY guild feature + * + * Value: 2 + * Name: JOIN_EXTERNAL_ONLY + */ + JOIN_EXTERNAL_ONLY = 2, + /** + * The application can only be authorized in guilds with the INTERNAL_EMPLOYEE_ONLY guild feature + * + * Value: 3 + * Name: JOIN_INTERNAL_ONLY + */ + JOIN_INTERNAL_ONLY = 3, +} diff --git a/src/schemas/api/store/ApplicationInstallParamsSchema.ts b/src/schemas/api/store/ApplicationInstallParamsSchema.ts new file mode 100644 index 0000000000..95cf9270c2 --- /dev/null +++ b/src/schemas/api/store/ApplicationInstallParamsSchema.ts @@ -0,0 +1,28 @@ +/* + 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 ApplicationInstallParamsSchema { + /** + * The scopes to authorize the integration with + */ + scopes: string[]; + /** + * The permissions to request for the application's bot integration role + */ + permissions: string; +} diff --git a/src/schemas/api/store/ApplicationIntegrationTypeConfigurationSchema.ts b/src/schemas/api/store/ApplicationIntegrationTypeConfigurationSchema.ts new file mode 100644 index 0000000000..702c7a7c8b --- /dev/null +++ b/src/schemas/api/store/ApplicationIntegrationTypeConfigurationSchema.ts @@ -0,0 +1,26 @@ +/* + 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 { ApplicationInstallParamsSchema } from "./ApplicationInstallParamsSchema"; + +export interface ApplicationIntegrationTypeConfigurationSchema { + /** + * The default in-app authorization link for the installation context + */ + oauth2_install_params?: ApplicationInstallParamsSchema; +} diff --git a/src/schemas/api/store/ApplicationInteractionsVersion.ts b/src/schemas/api/store/ApplicationInteractionsVersion.ts new file mode 100644 index 0000000000..201f3133b5 --- /dev/null +++ b/src/schemas/api/store/ApplicationInteractionsVersion.ts @@ -0,0 +1,34 @@ +/* + 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 enum ApplicationInteractionsVersion { + /** + * Only Interaction Create events are sent as documented (default) + * + * Value: 1 + * Name: VERSION_1 + */ + VERSION_1 = 1, + /** + * A selection of chosen events are sent + * + * Value: 2 + * Name: VERSION_2 + */ + VERSION_2 = 2, +} diff --git a/src/schemas/api/store/ApplicationMonetizationState.ts b/src/schemas/api/store/ApplicationMonetizationState.ts new file mode 100644 index 0000000000..0d077a27b3 --- /dev/null +++ b/src/schemas/api/store/ApplicationMonetizationState.ts @@ -0,0 +1,41 @@ +/* + 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 enum ApplicationMonetizationState { + /** + * This application does not have monetization set up + * + * Value: 1 + * Name: NONE + */ + NONE = 1, + /** + * This application has monetization set up + * + * Value: 2 + * Name: ENABLED + */ + ENABLED = 2, + /** + * This application has been blocked from monetizing + * + * Value: 3 + * Name: BLOCKED + */ + BLOCKED = 3, +} diff --git a/src/schemas/api/store/ApplicationSKUDistributor.ts b/src/schemas/api/store/ApplicationSKUDistributor.ts new file mode 100644 index 0000000000..14a5e5a625 --- /dev/null +++ b/src/schemas/api/store/ApplicationSKUDistributor.ts @@ -0,0 +1,117 @@ +/* + 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 . +*/ + +/** + * [Distributor Type](https://docs.discord.food/resources/application#distributor-type) + * + * FIELD TYPE DESCRIPTION + * + * id ?string The ID of the game + * + * sku ?string The SKU of the game + * + * distributor string The [distributor](https://docs.discord.food/resources/application#distributor-type) of the game + * + * TypeScript + */ +export enum ApplicationSKUDistributor { + /** + * Discord Store + * + * Value: discord + */ + discord, + /** + * Steam + * + * Value: steam + */ + steam, + /** + * Twitch + * + * Value: twitch + */ + twitch, + /** + * Ubisoft Connect + * + * Value: uplay + */ + uplay, + /** + * Battle.net + * + * Value: battlenet + */ + battlenet, + /** + * Origin + * + * Value: origin + */ + origin, + /** + * GOG.com + * + * Value: gog + */ + gog, + /** + * Epic Games Store + * + * Value: epic + */ + epic, + /** + * Microsoft Store + * + * Value: microsoft + */ + microsoft, + /** + * IGDB.com + * + * Value: igdb + */ + igdb, + /** + * Glyph.net + * + * Value: glyph + */ + glyph, + /** + * Google Play Store + * + * Value: google_play + */ + google_play, + /** + * NVIDIA Cloud Gaming + * + * Value: nvidia_gdn_app + */ + nvidia_gdn_app, + /** + * Gameopedia + * + * Value: gop + */ + gop, +} diff --git a/src/schemas/api/store/ApplicationSKUSchema.ts b/src/schemas/api/store/ApplicationSKUSchema.ts new file mode 100644 index 0000000000..86349f6a5e --- /dev/null +++ b/src/schemas/api/store/ApplicationSKUSchema.ts @@ -0,0 +1,34 @@ +/* + 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 { ApplicationSKUDistributor } from "./ApplicationSKUDistributor"; + +export interface ApplicationSKUSchema { + /** + * The ID of the game + */ + id: string | null; + /** + * The SKU of the game + */ + sku: string | null; + /** + * The distributor of the game + */ + distributor: ApplicationSKUDistributor; +} diff --git a/src/schemas/api/store/ApplicationVerificationState.ts b/src/schemas/api/store/ApplicationVerificationState.ts new file mode 100644 index 0000000000..ebc342629d --- /dev/null +++ b/src/schemas/api/store/ApplicationVerificationState.ts @@ -0,0 +1,62 @@ +/* + 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 enum ApplicationVerificationState { + /** + * This application is ineligible for verification + * + * Value: 1 + * Name: INELIGIBLE + */ + INELIGIBLE = 1, + /** + * This application has not yet been applied for verification + * + * Value: 2 + * Name: UNSUBMITTED + */ + UNSUBMITTED = 2, + /** + * This application has submitted a verification request + * + * Value: 3 + * Name: SUBMITTED + */ + SUBMITTED = 3, + /** + * This application has been verified manually from Discord staff or using the old verification process + * + * Value: 4 + * Name: APPROVED_MANUALLY + */ + APPROVED_MANUALLY = 4, + /** + * This application is blocked and cannot be verified + * + * Value: 5 + * Name: BLOCKED + */ + BLOCKED = 5, + /** + * This application has been verified automatically through the Stripe identity verification process + * + * Value: 6 + * Name: APPROVED_AUTOMATICALLY + */ + APPROVED_AUTOMATICALLY = 6, +} diff --git a/src/schemas/api/store/CollectibleAssetConfigSchema.ts b/src/schemas/api/store/CollectibleAssetConfigSchema.ts new file mode 100644 index 0000000000..f77ee05b55 --- /dev/null +++ b/src/schemas/api/store/CollectibleAssetConfigSchema.ts @@ -0,0 +1,28 @@ +/* + 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 CollectibleAssetConfigSchema { + /** + * The URL of the animated image (in APNG format) + */ + animated: string | null; + /** + * The URL of the static image + */ + static: string; +} diff --git a/src/schemas/api/store/CollectibleBannerAssetSchema.ts b/src/schemas/api/store/CollectibleBannerAssetSchema.ts new file mode 100644 index 0000000000..86d1327e3d --- /dev/null +++ b/src/schemas/api/store/CollectibleBannerAssetSchema.ts @@ -0,0 +1,36 @@ +/* + 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 CollectibleBannerAssetSchema { + /** + * The CSS the web client should use + */ + background_style: string | null; + /** + * Max height of the banner on desktop + */ + desktop_max_height?: number | null; + /** + * Max height of the banner on mobile + */ + mobile_max_height?: number | null; + /** + * Whether the banner is responsive + */ + responsive: boolean | null; +} diff --git a/src/schemas/api/store/CollectibleItemSchema.ts b/src/schemas/api/store/CollectibleItemSchema.ts new file mode 100644 index 0000000000..7dc7589158 --- /dev/null +++ b/src/schemas/api/store/CollectibleItemSchema.ts @@ -0,0 +1,204 @@ +/* + 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 { CollectibleItemType } from "./CollectibleItemType"; +import { CollectibleNameplateColorPalette } from "./CollectibleNameplateColorPalette"; +import { CollectibleProfileEffectAnimationType } from "./CollectibleProfileEffectAnimationType"; + +export interface CollectibleItemAssetsSchema { + /** + * The URL for the static image of the collectible + */ + static_image_url: string; + /** + * The URL for the animated image of the collectible (in APNG format) + */ + animated_image_url: string; + /** + * The URL for the video of the collectible + */ + video_url?: string; +} + +export interface CollectibleProfileEffectPosition { + /** + * The x-coordinate of the animation frame + */ + x: number; + /** + * The y-coordinate of the animation frame + */ + y: number; +} + +export interface CollectibleProfileEffectSource { + /** + * The URL of the animation image (in APNG format) + */ + src: string; +} + +export interface CollectibleProfileEffectAnimation { + /** + * The URL of the animation image (in APNG format) + */ + src: string; + /** + * Whether the animation frame should loop + */ + loop: boolean; + /** + * The height of the animation image + */ + height: number; + /** + * The width of the animation image + */ + width: number; + /** + * The duration of the animation frame (in milliseconds) + */ + duration: number; + /** + * The start time of the animation frame (in milliseconds) + */ + start: number; + /** + * The delay between loops of the animation frame (in milliseconds) + */ + loopDelay: number; + /** + * The position of the animation frame + */ + position: CollectibleProfileEffectPosition; + /** + * The z-index of the animation frame + */ + zIndex: number; + /** + * The sources to randomize the src from + */ + randomizedSources: CollectibleProfileEffectSource[]; +} + +export interface CollectibleAvatarDecorationSchema { + /** + * The type of collectible + */ + type: CollectibleItemType; + /** + * The ID of the avatar decoration + */ + id: string; + /** + * The SKU ID of the avatar decoration + */ + sku_id: string; + /** + * The asset hash of the avatar decoration + */ + asset: string; + /** + * The URLs for the static and animated images of the avatar decoration + */ + assets: CollectibleItemAssetsSchema; + /** + * The avatar decoration accessibility description + */ + label: string; +} + +export interface CollectibleProfileEffectSchema { + /** + * The type of collectible + */ + type: CollectibleItemType; + /** + * The ID of the profile effect + */ + id: string; + /** + * The ID of the profile effect SKU + */ + sku_id: string; + /** + * The title of the profile effect + */ + title: string; + /** + * The description of the profile effect + */ + description: string; + /** + * An accessible description of the profile effect + */ + accessibilityLabel: string; + /** + * The type of animation used by the profile effect + */ + animationType: CollectibleProfileEffectAnimationType; + /** + * The URL of the profile effect's thumbnail preview image (in APNG format) + */ + thumbnailPreviewSrc: string; + /** + * A URL of the profile effect with reduced motion (in APNG format) + */ + reducedMotionSrc: string; + /** + * The URL of the static frame of the profile effect (in PNG format) + */ + staticFrameSrc: string; + /** + * The animation frames for the profile effect + */ + effects: CollectibleProfileEffectAnimation[]; +} + +export interface CollectibleNameplateSchema { + /** + * The type of collectible + */ + type: CollectibleItemType; + /** + * The ID of the nameplate + */ + id: string; + /** + * The SKU ID of the nameplate + */ + sku_id: string; + /** + * The nameplate's color palette + */ + palette: CollectibleNameplateColorPalette; + /** + * The nameplate asset path + */ + asset: string; + /** + * The URLs for the static and animated images of the nameplate + */ + assets: CollectibleItemAssetsSchema; + /** + * The nameplate accessibility description + */ + label: string; +} + +export type AnyCollectibleItem = CollectibleAvatarDecorationSchema | CollectibleProfileEffectSchema | CollectibleNameplateSchema; diff --git a/src/schemas/api/store/CollectibleItemType.ts b/src/schemas/api/store/CollectibleItemType.ts new file mode 100644 index 0000000000..26c1fff4c5 --- /dev/null +++ b/src/schemas/api/store/CollectibleItemType.ts @@ -0,0 +1,63 @@ +/* + 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 enum CollectibleItemType { + /** + * An avatar decoration + * + * Value: 0 + * Name: AVATAR_DECORATION + */ + AVATAR_DECORATION = 0, + /** + * A profile effect + * + * Value: 1 + * Name: PROFILE_EFFECT + */ + PROFILE_EFFECT = 1, + /** + * A nameplate + * + * Value: 2 + * Name: NAMEPLATE + */ + NAMEPLATE = 2, + NONE = 100, + /** + * A bundle of collectibles + * + * Value: 1000 + * Name: BUNDLE + */ + BUNDLE = 1000, + /** + * A group of variants + * + * Value: 2000 + * Name: VARIANTS_GROUP + */ + VARIANTS_GROUP = 2000, + /** + * A non-collectible SKU (e.g. fractional premium) + * + * Value: 3000 + * Name: EXTERNAL_SKU + */ + EXTERNAL_SKU = 3000, +} diff --git a/src/schemas/api/store/CollectibleNameplateColorPalette.ts b/src/schemas/api/store/CollectibleNameplateColorPalette.ts new file mode 100644 index 0000000000..4ac9d92360 --- /dev/null +++ b/src/schemas/api/store/CollectibleNameplateColorPalette.ts @@ -0,0 +1,92 @@ +/* + 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 enum CollectibleNameplateColorPalette { + /** + * None + * + * Value: none + */ + none, + /** + * Crimson + * + * Value: crimson + */ + crimson, + /** + * Berry + * + * Value: berry + */ + berry, + /** + * Sky + * + * Value: sky + */ + sky, + /** + * Teal + * + * Value: teal + */ + teal, + /** + * Forest + * + * Value: forest + */ + forest, + /** + * BubbleGum + * + * Value: bubble_gum + */ + bubble_gum, + /** + * Violet + * + * Value: violet + */ + violet, + /** + * Cobalt + * + * Value: cobalt + */ + cobalt, + /** + * Clover + * + * Value: clover + */ + clover, + /** + * Lemon + * + * Value: lemon + */ + lemon, + /** + * White + * + * Value: white + */ + white, +} diff --git a/src/schemas/api/store/CollectibleProductSchema.ts b/src/schemas/api/store/CollectibleProductSchema.ts new file mode 100644 index 0000000000..7238dfb9e1 --- /dev/null +++ b/src/schemas/api/store/CollectibleProductSchema.ts @@ -0,0 +1,109 @@ +/* + 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 { AnyCollectibleItem } from "./CollectibleItemSchema"; +import { CollectibleItemType } from "./CollectibleItemType"; +import { CollectibleStyleSchema } from "./CollectibleStyleSchema"; +import { SubscriptionPricesSchema } from "./SubscriptionPricesSchema"; + +export interface CollectibleProductSchema { + /** + * The SKU ID of the collectible product + */ + sku_id: string; + /** + * The store listing ID associated with the collectible product + */ + store_listing_id: string; + /** + * The type of collectible + */ + type: CollectibleItemType; + /** + * The bundled products included in the collectible product + */ + bundled_products?: CollectibleProductSchema[]; + /** + * The category SKU ID of the collectible product + */ + category_sku_id: string; + /** + * The Google SKU IDs for the collectible per purchase type + */ + google_sku_ids?: Record; + /** + * The items included in the collectible product + */ + items: AnyCollectibleItem[]; + /** + * The name of the collectible product + */ + name: string; + /** + * The premium type required to purchase the collectible product + */ + premium_type: number; + /** + * The prices for the collectible per purchase type + */ + prices?: Record; + /** + * The colors to use in the client + */ + styles: CollectibleStyleSchema; + /** + * A description of the collectible product + */ + summary: string; + /** + * When the collectible product should be unpublished + */ + unpublished_at: string | null; + /** + * The name of the base variant of the collectible product + */ + base_variant_name?: string; + /** + * The SKU ID of the base variant of the collectible product + */ + base_variant_sku_id?: string; + /** + * When the collectible product expires + */ + expires_at?: string | null; + /** + * The purchase type of the collectible product + */ + purchase_type?: number; + /** + * When the collectible product was purchased + */ + purchased_at?: string; + /** + * The label for the variant of the collectible product + */ + variant_label?: string; + /** + * The hex value of the color for the variant of the collectible product + */ + variant_value?: string; + /** + * The variants of the collectible product + */ + variants?: CollectibleProductSchema[]; +} diff --git a/src/schemas/api/store/CollectibleProfileEffectAnimationType.ts b/src/schemas/api/store/CollectibleProfileEffectAnimationType.ts new file mode 100644 index 0000000000..ec93dbc289 --- /dev/null +++ b/src/schemas/api/store/CollectibleProfileEffectAnimationType.ts @@ -0,0 +1,41 @@ +/* + 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 enum CollectibleProfileEffectAnimationType { + /** + * The animation type is unspecified + * + * Value: 0 + * Name: UNSPECIFIED + */ + UNSPECIFIED = 0, + /** + * The animation type is persistent + * + * Value: 1 + * Name: PERSISTENT + */ + PERSISTENT = 1, + /** + * The animation type is intermittent + * + * Value: 2 + * Name: INTERMITTENT + */ + INTERMITTENT = 2, +} diff --git a/src/schemas/api/store/CollectibleStyleSchema.ts b/src/schemas/api/store/CollectibleStyleSchema.ts new file mode 100644 index 0000000000..e659412c19 --- /dev/null +++ b/src/schemas/api/store/CollectibleStyleSchema.ts @@ -0,0 +1,32 @@ +/* + 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 CollectibleStyleSchema { + /** + * An array of background colors + */ + background_colors: number[]; + /** + * An array of button colors + */ + button_colors: number[]; + /** + * An array of confetti colors + */ + confetti_colors: number[]; +} diff --git a/src/schemas/api/store/CollectibleUserDiscountSchema.ts b/src/schemas/api/store/CollectibleUserDiscountSchema.ts new file mode 100644 index 0000000000..e746a6c3de --- /dev/null +++ b/src/schemas/api/store/CollectibleUserDiscountSchema.ts @@ -0,0 +1,31 @@ +/* + 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 CollectibleUserDiscountSchema { + /** + * How much the discount is + */ + amount: number; + /** + * The discount ID + */ + discount_id: string; + /** + * When the discount expires + */ + expires_at: string | null; +} diff --git a/src/schemas/api/store/CountdownTimerShopBlockSchema.ts b/src/schemas/api/store/CountdownTimerShopBlockSchema.ts new file mode 100644 index 0000000000..53bd8084bd --- /dev/null +++ b/src/schemas/api/store/CountdownTimerShopBlockSchema.ts @@ -0,0 +1,45 @@ +/* + 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 { ShopBlockType } from "./ShopBlockType"; + +export interface CountdownTimerShopBlockSchema { + /** + * The shop block type + */ + type: ShopBlockType; + /** + * The title of the countdown timer + */ + title: string; + /** + * The body text of the countdown timer + */ + body: string; + /** + * The URL of the countdown timer banner + */ + banner_url: string; + /** + * The end time of the countdown timer + */ + end_time: string; + /** + * The hex color code of the text + */ + text_color: string; +} diff --git a/src/schemas/api/store/CountryPricesSchema.ts b/src/schemas/api/store/CountryPricesSchema.ts new file mode 100644 index 0000000000..7d67d17944 --- /dev/null +++ b/src/schemas/api/store/CountryPricesSchema.ts @@ -0,0 +1,29 @@ +/* + 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 { UnitPriceSchema } from "./UnitPriceSchema"; + +export interface CountryPricesSchema { + /** + * The ISO 3166-1 alpha-2 country code + */ + country_code: string; + /** + * The prices for the plan in the given country + */ + prices: UnitPriceSchema[]; +} diff --git a/src/schemas/api/store/CreateApplicationSKUSchema.ts b/src/schemas/api/store/CreateApplicationSKUSchema.ts new file mode 100644 index 0000000000..4f996985af --- /dev/null +++ b/src/schemas/api/store/CreateApplicationSKUSchema.ts @@ -0,0 +1,27 @@ +/* + 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 { SKUProductLine } from "./SKUProductLine"; +import { SKUType } from "./SKUType"; + +export interface CreateApplicationSKUSchema { + name: string; + sku_type: SKUType; + // Added for spacebar as discord seems to only allow creating Application SKUs + product_line?: SKUProductLine; +} diff --git a/src/schemas/api/store/CreateSKUSchema.ts b/src/schemas/api/store/CreateSKUSchema.ts new file mode 100644 index 0000000000..0a43ec8452 --- /dev/null +++ b/src/schemas/api/store/CreateSKUSchema.ts @@ -0,0 +1,105 @@ +/* + 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 { LocalizedStringSchema } from "../../uncategorised"; +import { SKUAccessType } from "./SKUAccessType"; +import { SKUContentRatingSchema } from "./SKUContentRatingSchema"; +import { SKUFeature } from "./SKUFeature"; +import { SKUGenre } from "./SKUGenre"; +import { SKUSystemRequirementsSchema } from "./SKUSystemRequirementsSchema"; +import { SKUType } from "./SKUType"; + +export interface CreateSKUSchema { + /** + * The type of SKU + */ + type: SKUType; + /** + * The ID of the application the SKU belongs to + */ + application_id: string; + /** + * The name of the SKU (1-256 characters) + */ + name: LocalizedStringSchema | string; + /** + * The SKU flags (only AVAILABLE can be set) + * SKUFlags bitfield + */ + flags?: number; + /** + * The legal notice for the SKU (max 1024 characters) + */ + legal_notice?: LocalizedStringSchema; + /** + * The ID of the prerequisite required to buy this SKU + */ + dependent_sku_id?: string; + /** + * The IDs of the SKUs that are included when purchasing this SKU + */ + bundled_skus?: string[]; + /** + * The access level of the SKU + */ + access_type?: SKUAccessType; + /** + * The IDs of the manifest labels associated with the SKU + */ + manifest_labels?: string[]; + /** + * The features of the SKU + */ + features?: SKUFeature[]; + /** + * The locales the SKU is available in + */ + locales?: string[]; + /** + * The genres of the SKU + */ + genres?: SKUGenre[]; + /** + * The content ratings of the SKU per agency + */ + content_ratings?: { [agency: string]: SKUContentRatingSchema }; + /** + * The system requirements for each operating system the SKU supports + */ + system_requirements?: { [os: string]: SKUSystemRequirementsSchema }; + /** + * The base price of the SKU + */ + price_tier?: number; + /** + * Localized pricing overrides per lower-cased ISO 4217 currency code + */ + price?: { [currency: string]: number }; + /** + * The sale price of the SKU + */ + sale_price_tier?: number; + /** + * Localized sale pricing overrides per lower-cased ISO 4217 currency code + */ + sale_price?: { [currency: string]: number }; + /** + * When the SKU will be released + */ + release_date?: string; +} diff --git a/src/schemas/api/store/FeaturedShopBlockSchema.ts b/src/schemas/api/store/FeaturedShopBlockSchema.ts new file mode 100644 index 0000000000..4109bb3d6f --- /dev/null +++ b/src/schemas/api/store/FeaturedShopBlockSchema.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 . +*/ +import { ShopBlockType } from "./ShopBlockType"; +import { SubBlockSchema } from "./SubBlockSchema"; + +export interface FeaturedShopBlockSchema { + /** + * The list of sub-blocks in the featured shop block + */ + subblocks: SubBlockSchema[]; + /** + * The shop block type + */ + type: ShopBlockType; +} diff --git a/src/schemas/api/store/FeedShopBlockSchema.ts b/src/schemas/api/store/FeedShopBlockSchema.ts new file mode 100644 index 0000000000..6b986b288f --- /dev/null +++ b/src/schemas/api/store/FeedShopBlockSchema.ts @@ -0,0 +1,35 @@ +/* + 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 { ShopBlockType } from "./ShopBlockType"; +import { SortedSKUIDsSchema } from "./SortedSKUIDsSchema"; + +export interface FeedShopBlockSchema { + /** + * All SKU IDs ranked by popularity + */ + ranked_sku_ids: string[]; + /** + * The sorted SKU IDs + */ + sorted_sku_ids: SortedSKUIDsSchema; + /** + * The shop block type + */ + type: ShopBlockType; +} diff --git a/src/schemas/api/store/GuildPowerupCatagoryType.ts b/src/schemas/api/store/GuildPowerupCatagoryType.ts new file mode 100644 index 0000000000..84ce55c61f --- /dev/null +++ b/src/schemas/api/store/GuildPowerupCatagoryType.ts @@ -0,0 +1,38 @@ +/* + 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 enum GuildPowerupCategoryType { + /** + * Guild premium tier + * + * Value: level + */ + level, + /** + * Additional guild perk + * + * Value: perk + */ + perk, + /** + * Game server attached to the guild + * + * Value: game_server + */ + game_server, +} diff --git a/src/schemas/api/store/HeroShopBlockSchema.ts b/src/schemas/api/store/HeroShopBlockSchema.ts new file mode 100644 index 0000000000..837ed73920 --- /dev/null +++ b/src/schemas/api/store/HeroShopBlockSchema.ts @@ -0,0 +1,100 @@ +/* + 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 { CollectibleAssetConfigSchema } from "./CollectibleAssetConfigSchema"; +import { CollectibleBannerAssetSchema } from "./CollectibleBannerAssetSchema"; +import { ShopBlockType } from "./ShopBlockType"; + +export interface HeroShopBlockSchema { + /** + * The shop block type + */ + type: ShopBlockType; + /** + * The collectible category SKU ID + */ + category_sku_id: string; + /** + * The collectible category store listing ID + */ + category_store_listing_id: string; + /** + * The banner asset + */ + banner_asset: CollectibleAssetConfigSchema; + /** + * The display configuration + */ + banner_display_config: CollectibleBannerAssetSchema; + /** + * The hex color code for the banner text + */ + banner_text_color?: string; + /** + * The URL of the hero logo image + */ + hero_logo_url: string; + /** + * The URL of the hero Rive animation + */ + hero_rive_url?: string; + /** + * The shop block logo display config + */ + logo_display_config: CollectibleBannerAssetSchema; + /** + * The URL of the hero logo image + */ + logo_url: string; + /** + * The name of the shop block + */ + name: string; + /** + * The title to be displayed on mobile devices + */ + mobile_title?: string; + /** + * The summary to be displayed on mobile devices + */ + mobile_summary?: string; + /** + * The products title to be displayed on mobile devices + */ + mobile_products_title?: string; + /** + * The URL of the mobile hero banner image + */ + mobile_hero_url?: string; + /** + * The URL of the mobile animated hero banner image + */ + mobile_hero_animated_url?: string; + /** + * The SKU IDs ranked by popularity in the collectible category + */ + ranked_sku_ids: string[]; + /** + * A description of the collectible category + */ + summary: string; + /** + * When the collectible category should be unpublished + */ + unpublished_at: string | null; +} diff --git a/src/schemas/api/store/ImmersiveBannerShopBlockSchema.ts b/src/schemas/api/store/ImmersiveBannerShopBlockSchema.ts new file mode 100644 index 0000000000..10aa8cb65b --- /dev/null +++ b/src/schemas/api/store/ImmersiveBannerShopBlockSchema.ts @@ -0,0 +1,51 @@ +/* + 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 { CollectibleAssetConfigSchema } from "./CollectibleAssetConfigSchema"; +import { ShopBlockType } from "./ShopBlockType"; + +export interface ImmersiveBannerShopBlockSchema { + /** + * The shop block type + */ + type: ShopBlockType; + /** + * The title of the immersive banner + */ + title: string; + /** + * The body text of the immersive banner + */ + body: string; + /** + * The URL to the help center article + */ + help_center_url: string; + /** + * The hex color code of the text + */ + text_color: string; + /** + * The end time of the immersive banner + */ + end_time: string | null; + /** + * The banner asset + */ + banner_asset: CollectibleAssetConfigSchema; +} diff --git a/src/schemas/api/store/RPCApplicationState.ts b/src/schemas/api/store/RPCApplicationState.ts new file mode 100644 index 0000000000..a006dd89db --- /dev/null +++ b/src/schemas/api/store/RPCApplicationState.ts @@ -0,0 +1,55 @@ +/* + 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 enum RPCApplicationState { + /** + * This application does not have access to RPC + * + * Value: 0 + * Name: DISABLED + */ + DISABLED = 0, + /** + * This application has not yet been applied for RPC access + * + * Value: 1 + * Name: UNSUBMITTED + */ + UNSUBMITTED = 1, + /** + * This application has submitted a RPC access request + * + * Value: 2 + * Name: SUBMITTED + */ + SUBMITTED = 2, + /** + * This application has been approved for RPC access + * + * Value: 3 + * Name: APPROVED + */ + APPROVED = 3, + /** + * This application has been rejected from RPC access + * + * Value: 4 + * Name: REJECTED + */ + REJECTED = 4, +} diff --git a/src/schemas/api/store/RewardHeroShoppBlockSchema.ts b/src/schemas/api/store/RewardHeroShoppBlockSchema.ts new file mode 100644 index 0000000000..6501ca63fc --- /dev/null +++ b/src/schemas/api/store/RewardHeroShoppBlockSchema.ts @@ -0,0 +1,115 @@ +/* + 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 { CollectibleAssetConfigSchema } from "./CollectibleAssetConfigSchema"; +import { CollectibleBannerAssetSchema } from "./CollectibleBannerAssetSchema"; +import { ShopBlockType } from "./ShopBlockType"; + +export interface RewardHeroShopBlockSchema { + /** + * The shop block type + */ + type: ShopBlockType; + /** + * The collectible category SKU ID + */ + category_sku_id?: string; + /** + * The collectible category store listing ID + */ + category_store_listing_id: string; + /** + * The name of the shop block + */ + name: string; + /** + * A description of the collectible category + */ + summary: string; + /** + * The banner asset + */ + banner_asset: CollectibleAssetConfigSchema; + /** + * The URL of the hero logo image + */ + logo_url: string; + /** + * The title of the reward hero shop block + */ + title: string; + /** + * The hex color code for the banner text + */ + banner_text_color?: string; + /** + * The display configuration + */ + banner_display_config: CollectibleBannerAssetSchema; + /** + * The URL of the hero Rive animation + */ + hero_rive_url?: string; + /** + * The shop block logo display config + */ + logo_display_config: CollectibleBannerAssetSchema; + /** + * The title to be displayed on mobile devices + */ + mobile_title?: string; + /** + * The summary to be displayed on mobile devices + */ + mobile_summary?: string; + /** + * The products title to be displayed on mobile devices + */ + mobile_products_title?: string; + /** + * The URL of the hero banner image + */ + hero_banner_url: string; + /** + * The URL of the hero animated banner image + */ + hero_banner_animated_url: string; + /** + * The URL of the hero logo image + */ + hero_logo_url: string; + /** + * The URL of the mobile hero banner image + */ + mobile_hero_url?: string; + /** + * The URL of the mobile animated hero banner image + */ + mobile_hero_animated_url?: string; + /** + * The SKU IDs ranked by popularity in the collectible category + */ + ranked_sku_ids: string[]; + /** + * When the collectible category should be unpublished + */ + unpublished_at: string | null; + /** + * The SKU ID of the reward collectible + */ + reward_sku_id: string; +} diff --git a/src/schemas/api/store/SKUAccessType.ts b/src/schemas/api/store/SKUAccessType.ts new file mode 100644 index 0000000000..5556558b2c --- /dev/null +++ b/src/schemas/api/store/SKUAccessType.ts @@ -0,0 +1,34 @@ +/* + 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 enum SKUAccessType { + /** + * SKU is fully accessible + * + * Value: 1 + * Name: FULL + */ + FULL = 1, + /** + * SKU is in early access + * + * Value: 2 + * Name: EARLY_ACCESS + */ + EARLY_ACCESS = 2, +} diff --git a/src/schemas/api/store/SKUContentDescriptor.ts b/src/schemas/api/store/SKUContentDescriptor.ts new file mode 100644 index 0000000000..4a27659172 --- /dev/null +++ b/src/schemas/api/store/SKUContentDescriptor.ts @@ -0,0 +1,22 @@ +/* + 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 { SKUESRBContentDescriptor } from "./SKUESRBContentDescriptor"; +import { SKUPEGIContentDescriptor } from "./SKUPEGIContentDescriptor"; + +export type SKUContentDescriptor = SKUESRBContentDescriptor | SKUPEGIContentDescriptor; diff --git a/src/schemas/api/store/SKUContentRating.ts b/src/schemas/api/store/SKUContentRating.ts new file mode 100644 index 0000000000..24b972585e --- /dev/null +++ b/src/schemas/api/store/SKUContentRating.ts @@ -0,0 +1,22 @@ +/* + 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 { SKUESRBContentRating } from "./SKUESRBContentRating"; +import { SKUPEGIContentRating } from "./SKUPEGIContentRating"; + +export type SKUContentRating = SKUESRBContentRating | SKUPEGIContentRating; diff --git a/src/schemas/api/store/SKUContentRatingAgency.ts b/src/schemas/api/store/SKUContentRatingAgency.ts new file mode 100644 index 0000000000..97aaf6464f --- /dev/null +++ b/src/schemas/api/store/SKUContentRatingAgency.ts @@ -0,0 +1,38 @@ +/* + 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 enum SKUContentRatingAgency { + /** + * Entertainment Software Rating Board + * + * Value: 1 + * Name: ESRB + * Content Rating: ESRB Content Rating + * Content Descriptor: ESRB Content Descriptor + */ + ESRB = 1, + /** + * Pan European Game Information + * + * Value: 2 + * Name: PEGI + * Content Rating: PEGI Content Rating + * Content Descriptor: PEGI Content Descriptor + */ + PEGI = 2, +} diff --git a/src/schemas/api/store/SKUContentRatingSchema.ts b/src/schemas/api/store/SKUContentRatingSchema.ts new file mode 100644 index 0000000000..897a24508f --- /dev/null +++ b/src/schemas/api/store/SKUContentRatingSchema.ts @@ -0,0 +1,31 @@ +/* + 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 { SKUContentDescriptor } from "./SKUContentDescriptor"; +import { SKUContentRating } from "./SKUContentRating"; + +export interface SKUContentRatingSchema { + /** + * The content rating + */ + rating: SKUContentRating; + /** + * The content descriptors + */ + descriptors: SKUContentDescriptor[]; +} diff --git a/src/schemas/api/store/SKUESRBContentDescriptor.ts b/src/schemas/api/store/SKUESRBContentDescriptor.ts new file mode 100644 index 0000000000..1bd874dcf3 --- /dev/null +++ b/src/schemas/api/store/SKUESRBContentDescriptor.ts @@ -0,0 +1,321 @@ +/* + 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 enum SKUESRBContentDescriptor { + /** + * References to alcohol + * + * Value: 1 + * Name: ALCOHOL_REFERENCE + */ + ALCOHOL_REFERENCE = 1, + /** + * Animated blood + * + * Value: 2 + * Name: ANIMATED_BLOOD + */ + ANIMATED_BLOOD = 2, + /** + * Blood + * + * Value: 3 + * Name: BLOOD + */ + BLOOD = 3, + /** + * Blood and gore + * + * Value: 4 + * Name: BLOOD_AND_GORE + */ + BLOOD_AND_GORE = 4, + /** + * Cartoon violence + * + * Value: 5 + * Name: CARTOON_VIOLENCE + */ + CARTOON_VIOLENCE = 5, + /** + * Comic mischief + * + * Value: 6 + * Name: COMIC_MISCHIEF + */ + COMIC_MISCHIEF = 6, + /** + * Crude humor + * + * Value: 7 + * Name: CRUDE_HUMOR + */ + CRUDE_HUMOR = 7, + /** + * References to drugs + * + * Value: 8 + * Name: DRUG_REFERENCE + */ + DRUG_REFERENCE = 8, + /** + * Fantasy violence + * + * Value: 9 + * Name: FANTASY_VIOLENCE + */ + FANTASY_VIOLENCE = 9, + /** + * Intense violence + * + * Value: 10 + * Name: INTENSE_VIOLENCE + */ + INTENSE_VIOLENCE = 10, + /** + * Use of strong language + * + * Value: 11 + * Name: LANGUAGE + */ + LANGUAGE = 11, + /** + * Lyrics + * + * Value: 12 + * Name: LYRICS + */ + LYRICS = 12, + /** + * Mature humor + * + * Value: 13 + * Name: MATURE_HUMOR + */ + MATURE_HUMOR = 13, + /** + * Nudity + * + * Value: 14 + * Name: NUDITY + */ + NUDITY = 14, + /** + * Partial nudity + * + * Value: 15 + * Name: PARTIAL_NUDITY + */ + PARTIAL_NUDITY = 15, + /** + * Real gambling + * + * Value: 16 + * Name: REAL_GAMBLING + */ + REAL_GAMBLING = 16, + /** + * Sexual content + * + * Value: 17 + * Name: SEXUAL_CONTENT + */ + SEXUAL_CONTENT = 17, + /** + * Sexual themes + * + * Value: 18 + * Name: SEXUAL_THEMES + */ + SEXUAL_THEMES = 18, + /** + * Sexual violence + * + * Value: 19 + * Name: SEXUAL_VIOLENCE + */ + SEXUAL_VIOLENCE = 19, + /** + * Simulated gambling + * + * Value: 20 + * Name: SIMULATED_GAMBLING + */ + SIMULATED_GAMBLING = 20, + /** + * Strong language + * + * Value: 21 + * Name: STRONG_LANGUAGE + */ + STRONG_LANGUAGE = 21, + /** + * Strong lyrics + * + * Value: 22 + * Name: STRONG_LYRICS + */ + STRONG_LYRICS = 22, + /** + * Strong sexual content + * + * Value: 23 + * Name: STRONG_SEXUAL_CONTENT + */ + STRONG_SEXUAL_CONTENT = 23, + /** + * Suggestive themes + * + * Value: 24 + * Name: SUGGESTIVE_THEMES + */ + SUGGESTIVE_THEMES = 24, + /** + * References to tobacco + * + * Value: 25 + * Name: TOBACCO_REFERENCE + */ + TOBACCO_REFERENCE = 25, + /** + * Use of alcohol + * + * Value: 26 + * Name: USE_OF_ALCOHOL + */ + USE_OF_ALCOHOL = 26, + /** + * Use of drugs + * + * Value: 27 + * Name: USE_OF_DRUGS + */ + USE_OF_DRUGS = 27, + /** + * Use of tobacco + * + * Value: 28 + * Name: USE_OF_TOBACCO + */ + USE_OF_TOBACCO = 28, + /** + * Violence + * + * Value: 29 + * Name: VIOLENCE + */ + VIOLENCE = 29, + /** + * Violent references + * + * Value: 30 + * Name: VIOLENT_REFERENCES + */ + VIOLENT_REFERENCES = 30, + /** + * In-game purchases + * + * Value: 31 + * Name: IN_GAME_PURCHASES + */ + IN_GAME_PURCHASES = 31, + /** + * User interaction + * + * Value: 32 + * Name: USERS_INTERACT + */ + USERS_INTERACT = 32, + /** + * Location sharing + * + * Value: 33 + * Name: SHARES_LOCATION + */ + SHARES_LOCATION = 33, + /** + * Unrestricted internet access + * + * Value: 34 + * Name: UNRESTRICTED_INTERNET + */ + UNRESTRICTED_INTERNET = 34, + /** + * Mild blood + * + * Value: 35 + * Name: MILD_BLOOD + */ + MILD_BLOOD = 35, + /** + * Mild cartoon violence + * + * Value: 36 + * Name: MILD_CARTOON_VIOLENCE + */ + MILD_CARTOON_VIOLENCE = 36, + /** + * Mild fantasy violence + * + * Value: 37 + * Name: MILD_FANTASY_VIOLENCE + */ + MILD_FANTASY_VIOLENCE = 37, + /** + * Mild language + * + * Value: 38 + * Name: MILD_LANGUAGE + */ + MILD_LANGUAGE = 38, + /** + * Mild lyrics + * + * Value: 39 + * Name: MILD_LYRICS + */ + MILD_LYRICS = 39, + /** + * Mild sexual themes + * + * Value: 40 + * Name: MILD_SEXUAL_THEMES + */ + MILD_SEXUAL_THEMES = 40, + /** + * Mild suggestive themes + * + * Value: 41 + * Name: MILD_SUGGESTIVE_THEMES + */ + MILD_SUGGESTIVE_THEMES = 41, + /** + * Mild violence + * + * Value: 42 + * Name: MILD_VIOLENCE + */ + MILD_VIOLENCE = 42, + /** + * Animated violence + * + * Value: 43 + * Name: ANIMATED_VIOLENCE + */ + ANIMATED_VIOLENCE = 43, +} diff --git a/src/schemas/api/store/SKUESRBContentRating.ts b/src/schemas/api/store/SKUESRBContentRating.ts new file mode 100644 index 0000000000..0591114549 --- /dev/null +++ b/src/schemas/api/store/SKUESRBContentRating.ts @@ -0,0 +1,62 @@ +/* + 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 enum SKUESRBContentRating { + /** + * Suitable for all ages + * + * Value: 1 + * Name: EVERYONE + */ + EVERYONE = 1, + /** + * Suitable for ages 10 and up + * + * Value: 2 + * Name: EVERYONE_TEN_PLUS + */ + EVERYONE_TEN_PLUS = 2, + /** + * Suitable for ages 13 and up + * + * Value: 3 + * Name: TEEN + */ + TEEN = 3, + /** + * Suitable for ages 17 and up + * + * Value: 4 + * Name: MATURE + */ + MATURE = 4, + /** + * Suitable for ages 18 and up + * + * Value: 5 + * Name: ADULTS_ONLY + */ + ADULTS_ONLY = 5, + /** + * Rating is pending + * + * Value: 6 + * Name: RATING_PENDING + */ + RATING_PENDING = 6, +} diff --git a/src/schemas/api/store/SKUExternalSKUStrategySchema.ts b/src/schemas/api/store/SKUExternalSKUStrategySchema.ts new file mode 100644 index 0000000000..a513066a10 --- /dev/null +++ b/src/schemas/api/store/SKUExternalSKUStrategySchema.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 . +*/ + +import { SKUExternalSKUStrategyType } from "./SKUExternalSKUStrategyType"; + +export interface SKUExternalSKUStrategySchema { + /** + * The type of external SKU strategy + */ + type: SKUExternalSKUStrategyType; + /** + * Additional metadata for the external SKU strategy + */ + metadata?: Record; +} diff --git a/src/schemas/api/store/SKUExternalSKUStrategyType.ts b/src/schemas/api/store/SKUExternalSKUStrategyType.ts new file mode 100644 index 0000000000..93ad0bab4d --- /dev/null +++ b/src/schemas/api/store/SKUExternalSKUStrategyType.ts @@ -0,0 +1,34 @@ +/* + 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 enum SKUExternalSKUStrategyType { + /** + * Regular pricing + * + * Value: 1 + * Name: CONSTANT + */ + CONSTANT = 1, + /** + * Apple sticker pack pricing + * + * Value: 2 + * Name: APPLE_STICKER + */ + APPLE_STICKER = 2, +} diff --git a/src/schemas/api/store/SKUFeature.ts b/src/schemas/api/store/SKUFeature.ts new file mode 100644 index 0000000000..dc0c637f35 --- /dev/null +++ b/src/schemas/api/store/SKUFeature.ts @@ -0,0 +1,111 @@ +/* + 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 enum SKUFeature { + /** + * Single player game + * + * Value: 1 + * Name: SINGLE_PLAYER + */ + SINGLE_PLAYER = 1, + /** + * Online multiplayer game + * + * Value: 2 + * Name: ONLINE_MULTIPLAYER + */ + ONLINE_MULTIPLAYER = 2, + /** + * Local multiplayer game + * + * Value: 3 + * Name: LOCAL_MULTIPLAYER + */ + LOCAL_MULTIPLAYER = 3, + /** + * Player versus player game + * + * Value: 4 + * Name: PVP + */ + PVP = 4, + /** + * Local cooperative multiplayer + * + * Value: 5 + * Name: LOCAL_COOP + */ + LOCAL_COOP = 5, + /** + * Cross-platform play supported + * + * Value: 6 + * Name: CROSS_PLATFORM + */ + CROSS_PLATFORM = 6, + /** + * Rich presence integration + * + * Value: 7 + * Name: RICH_PRESENCE + */ + RICH_PRESENCE = 7, + /** + * Discord game invites supported + * + * Value: 8 + * Name: DISCORD_GAME_INVITES + */ + DISCORD_GAME_INVITES = 8, + /** + * Spectator mode supported + * + * Value: 9 + * Name: SPECTATOR_MODE + */ + SPECTATOR_MODE = 9, + /** + * Controller support + * + * Value: 10 + * Name: CONTROLLER_SUPPORT + */ + CONTROLLER_SUPPORT = 10, + /** + * Cloud saves supported + * + * Value: 11 + * Name: CLOUD_SAVES + */ + CLOUD_SAVES = 11, + /** + * Online cooperative multiplayer + * + * Value: 12 + * Name: ONLINE_COOP + */ + ONLINE_COOP = 12, + /** + * Secure networking supported + * + * Value: 13 + * Name: SECURE_NETWORKING + */ + SECURE_NETWORKING = 13, +} diff --git a/src/schemas/api/store/SKUGameServerPowerupMetadataSchema.ts b/src/schemas/api/store/SKUGameServerPowerupMetadataSchema.ts new file mode 100644 index 0000000000..cba676044d --- /dev/null +++ b/src/schemas/api/store/SKUGameServerPowerupMetadataSchema.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 { GuildPremiumFeatures } from "../guilds"; +import { GuildPowerupCategoryType } from "./GuildPowerupCatagoryType"; +import { SKUGameServerPowerupProvider } from "./SKUGameServerPowerupProvider"; + +export interface SKUGameServerPowerupMetadataSchema { + /** + * The number of boosts the powerup costs + */ + boost_price: number; + /** + * The maximum number of entitlements a guild can have for the powerup + */ + purchase_limit: number; + /** + * The features granted by the powerup + */ + guild_features: GuildPremiumFeatures; + /** + * The type of guild powerup + */ + category_type: GuildPowerupCategoryType; + /** + * The available providers + */ + available_providers: SKUGameServerPowerupProvider[]; + /** + * The amount of RAM in megabytes that the game server provides + */ + memory: number; + /** + * The amount of CPU cores that the game server provides + */ + cpu: number; + /** + * The amount of storage in gigabytes that the game server provides + */ + storage: number; + /** + * Maximum amount of players that can connect to the game server + */ + max_slots: number; + /** + * Human-readable amount of RAM that the game server provides + */ + memory_string: string; + /** + * Human-readable maximum amount of players that can connect to the game server + */ + player_string: string; +} diff --git a/src/schemas/api/store/SKUGameServerPowerupProvider.ts b/src/schemas/api/store/SKUGameServerPowerupProvider.ts new file mode 100644 index 0000000000..7649aeab70 --- /dev/null +++ b/src/schemas/api/store/SKUGameServerPowerupProvider.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 enum SKUGameServerPowerupProvider { + SHOCKBYTE = "shockbyte", +} diff --git a/src/schemas/api/store/SKUGenre.ts b/src/schemas/api/store/SKUGenre.ts new file mode 100644 index 0000000000..4332cf58b6 --- /dev/null +++ b/src/schemas/api/store/SKUGenre.ts @@ -0,0 +1,503 @@ +/* + 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 enum SKUGenre { + /** + * Action + * + * Value: 1 + * Name: ACTION + */ + ACTION = 1, + /** + * Action RPG + * + * Value: 2 + * Name: ACTION_RPG + */ + ACTION_RPG = 2, + /** + * Brawler + * + * Value: 3 + * Name: BRAWLER + */ + BRAWLER = 3, + /** + * Hack and Slash + * + * Value: 4 + * Name: HACK_AND_SLASH + */ + HACK_AND_SLASH = 4, + /** + * Platformer + * + * Value: 5 + * Name: PLATFORMER + */ + PLATFORMER = 5, + /** + * Stealth + * + * Value: 6 + * Name: STEALTH + */ + STEALTH = 6, + /** + * Survival + * + * Value: 7 + * Name: SURVIVAL + */ + SURVIVAL = 7, + /** + * Adventure + * + * Value: 8 + * Name: ADVENTURE + */ + ADVENTURE = 8, + /** + * Action Adventure + * + * Value: 9 + * Name: ACTION_ADVENTURE + */ + ACTION_ADVENTURE = 9, + /** + * Metroidvania + * + * Value: 10 + * Name: METROIDVANIA + */ + METROIDVANIA = 10, + /** + * Open World + * + * Value: 11 + * Name: OPEN_WORLD + */ + OPEN_WORLD = 11, + /** + * Psychological Horror + * + * Value: 12 + * Name: PSYCHOLOGICAL_HORROR + */ + PSYCHOLOGICAL_HORROR = 12, + /** + * Sandbox + * + * Value: 13 + * Name: SANDBOX + */ + SANDBOX = 13, + /** + * Survival Horror + * + * Value: 14 + * Name: SURVIVAL_HORROR + */ + SURVIVAL_HORROR = 14, + /** + * Visual Novel + * + * Value: 15 + * Name: VISUAL_NOVEL + */ + VISUAL_NOVEL = 15, + /** + * Driving / Racing + * + * Value: 16 + * Name: DRIVING_RACING + */ + DRIVING_RACING = 16, + /** + * Vehicular Combat + * + * Value: 17 + * Name: VEHICULAR_COMBAT + */ + VEHICULAR_COMBAT = 17, + /** + * Massively Multiplayer + * + * Value: 18 + * Name: MASSIVELY_MULTIPLAYER + */ + MASSIVELY_MULTIPLAYER = 18, + /** + * MMORPG + * + * Value: 19 + * Name: MMORPG + */ + MMORPG = 19, + /** + * Role-Playing + * + * Value: 20 + * Name: ROLE_PLAYING + */ + ROLE_PLAYING = 20, + /** + * Dungeon Crawler + * + * Value: 21 + * Name: DUNGEON_CRAWLER + */ + DUNGEON_CRAWLER = 21, + /** + * Roguelike + * + * Value: 22 + * Name: ROGUELIKE + */ + ROGUELIKE = 22, + /** + * Shooter + * + * Value: 23 + * Name: SHOOTER + */ + SHOOTER = 23, + /** + * Light Gun + * + * Value: 24 + * Name: LIGHT_GUN + */ + LIGHT_GUN = 24, + /** + * Shoot 'Em Up + * + * Value: 25 + * Name: SHOOT_EM_UP + */ + SHOOT_EM_UP = 25, + /** + * First-Person Shooter + * + * Value: 26 + * Name: FPS + */ + FPS = 26, + /** + * Dual-Joystick Shooter + * + * Value: 27 + * Name: DUAL_JOYSTICK_SHOOTER + */ + DUAL_JOYSTICK_SHOOTER = 27, + /** + * Simulation + * + * Value: 28 + * Name: SIMULATION + */ + SIMULATION = 28, + /** + * Flight Simulator + * + * Value: 29 + * Name: FLIGHT_SIMULATOR + */ + FLIGHT_SIMULATOR = 29, + /** + * Train Simulator + * + * Value: 30 + * Name: TRAIN_SIMULATOR + */ + TRAIN_SIMULATOR = 30, + /** + * Life Simulator + * + * Value: 31 + * Name: LIFE_SIMULATOR + */ + LIFE_SIMULATOR = 31, + /** + * Fishing + * + * Value: 32 + * Name: FISHING + */ + FISHING = 32, + /** + * Sports + * + * Value: 33 + * Name: SPORTS + */ + SPORTS = 33, + /** + * Baseball + * + * Value: 34 + * Name: BASEBALL + */ + BASEBALL = 34, + /** + * Basketball + * + * Value: 35 + * Name: BASKETBALL + */ + BASKETBALL = 35, + /** + * Billiards + * + * Value: 36 + * Name: BILLIARDS + */ + BILLIARDS = 36, + /** + * Bowling + * + * Value: 37 + * Name: BOWLING + */ + BOWLING = 37, + /** + * Boxing + * + * Value: 38 + * Name: BOXING + */ + BOXING = 38, + /** + * Football + * + * Value: 39 + * Name: FOOTBALL + */ + FOOTBALL = 39, + /** + * Golf + * + * Value: 40 + * Name: GOLF + */ + GOLF = 40, + /** + * Hockey + * + * Value: 41 + * Name: HOCKEY + */ + HOCKEY = 41, + /** + * Skateboarding / Skating + * + * Value: 42 + * Name: SKATEBOARDING_SKATING + */ + SKATEBOARDING_SKATING = 42, + /** + * Snowboarding / Skiing + * + * Value: 43 + * Name: SNOWBOARDING_SKIING + */ + SNOWBOARDING_SKIING = 43, + /** + * Soccer + * + * Value: 44 + * Name: SOCCER + */ + SOCCER = 44, + /** + * Track & Field + * + * Value: 45 + * Name: TRACK_FIELD + */ + TRACK_FIELD = 45, + /** + * Surfing / Wakeboarding + * + * Value: 46 + * Name: SURFING_WAKEBOARDING + */ + SURFING_WAKEBOARDING = 46, + /** + * Wrestling + * + * Value: 47 + * Name: WRESTLING + */ + WRESTLING = 47, + /** + * Strategy + * + * Value: 48 + * Name: STRATEGY + */ + STRATEGY = 48, + /** + * 4X (explore, expand, exploit, exterminate) + * + * Value: 49 + * Name: FOUR_X + */ + FOUR_X = 49, + /** + * Artillery + * + * Value: 50 + * Name: ARTILLERY + */ + ARTILLERY = 50, + /** + * Real-Time Strategy + * + * Value: 51 + * Name: RTS + */ + RTS = 51, + /** + * Tower Defense + * + * Value: 52 + * Name: TOWER_DEFENSE + */ + TOWER_DEFENSE = 52, + /** + * Turn-Based Strategy + * + * Value: 53 + * Name: TURN_BASED_STRATEGY + */ + TURN_BASED_STRATEGY = 53, + /** + * Wargame + * + * Value: 54 + * Name: WARGAME + */ + WARGAME = 54, + /** + * Multiplayer Online Battle Arena + * + * Value: 55 + * Name: MOBA + */ + MOBA = 55, + /** + * Fighting + * + * Value: 56 + * Name: FIGHTING + */ + FIGHTING = 56, + /** + * Puzzle + * + * Value: 57 + * Name: PUZZLE + */ + PUZZLE = 57, + /** + * Card Game + * + * Value: 58 + * Name: CARD_GAME + */ + CARD_GAME = 58, + /** + * Education + * + * Value: 59 + * Name: EDUCATION + */ + EDUCATION = 59, + /** + * Fitness + * + * Value: 60 + * Name: FITNESS + */ + FITNESS = 60, + /** + * Gambling + * + * Value: 61 + * Name: GAMBLING + */ + GAMBLING = 61, + /** + * Music / Rhythm + * + * Value: 62 + * Name: MUSIC_RHYTHM + */ + MUSIC_RHYTHM = 62, + /** + * Party / Mini Game + * + * Value: 63 + * Name: PARTY_MINI_GAME + */ + PARTY_MINI_GAME = 63, + /** + * Pinball + * + * Value: 64 + * Name: PINBALL + */ + PINBALL = 64, + /** + * Trivia / Board Game + * + * Value: 65 + * Name: TRIVIA_BOARD_GAME + */ + TRIVIA_BOARD_GAME = 65, + /** + * Tactical + * + * Value: 66 + * Name: TACTICAL + */ + TACTICAL = 66, + /** + * Indie + * + * Value: 67 + * Name: INDIE + */ + INDIE = 67, + /** + * Arcade + * + * Value: 68 + * Name: ARCADE + */ + ARCADE = 68, + /** + * Point-and-Click + * + * Value: 69 + * Name: POINT_AND_CLICK + */ + POINT_AND_CLICK = 69, +} diff --git a/src/schemas/api/store/SKUGuildMonetizationMetadataSchema.ts b/src/schemas/api/store/SKUGuildMonetizationMetadataSchema.ts new file mode 100644 index 0000000000..738a2a3ccf --- /dev/null +++ b/src/schemas/api/store/SKUGuildMonetizationMetadataSchema.ts @@ -0,0 +1,31 @@ +/* + 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 { SKUGameServerPowerupMetadataSchema } from "./SKUGameServerPowerupMetadataSchema"; +import { SKUGuildPowerupMetadataSchema } from "./SKUGuildPowerupMetadataSchema"; + +export interface SKUGuildMonetizationMetadataSchema { + /** + * Guild powerup metadata + */ + powerup?: SKUGuildPowerupMetadataSchema; + /** + * Game server powerup metadata + */ + game_server?: SKUGameServerPowerupMetadataSchema; +} diff --git a/src/schemas/api/store/SKUGuildPowerupMetadataSchema.ts b/src/schemas/api/store/SKUGuildPowerupMetadataSchema.ts new file mode 100644 index 0000000000..3edc00ef50 --- /dev/null +++ b/src/schemas/api/store/SKUGuildPowerupMetadataSchema.ts @@ -0,0 +1,51 @@ +/* + 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 { GuildPremiumFeatures } from "@spacebar/schemas"; +import { GuildPowerupCategoryType } from "./GuildPowerupCatagoryType"; + +export interface SKUGuildPowerupMetadataSchema { + /** + * The number of boosts the powerup costs + */ + boost_price: number; + /** + * The maximum number of entitlements a guild can have for the powerup + */ + purchase_limit: number; + /** + * The features granted by the powerup + */ + guild_features: GuildPremiumFeatures; + /** + * The type of guild powerup + */ + category_type: GuildPowerupCategoryType; + /** + * URL of the static banner image for the powerup + */ + static_image_url: string; + /** + * URL of the animated banner image for the powerup + */ + animated_image_url: string; + /** + * When the powerup will be removed from the store + */ + store_removal_date?: string | null; +} diff --git a/src/schemas/api/store/SKUOperatingSystem.ts b/src/schemas/api/store/SKUOperatingSystem.ts new file mode 100644 index 0000000000..628f8be865 --- /dev/null +++ b/src/schemas/api/store/SKUOperatingSystem.ts @@ -0,0 +1,41 @@ +/* + 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 enum SKUOperatingSystem { + /** + * Windows OS + * + * Value: 1 + * Name: WINDOWS + */ + WINDOWS = 1, + /** + * macOS + * + * Value: 2 + * Name: MACOS + */ + MACOS = 2, + /** + * Linux + * + * Value: 3 + * Name: LINUX + */ + LINUX = 3, +} diff --git a/src/schemas/api/store/SKUPEGIContentDescriptor.ts b/src/schemas/api/store/SKUPEGIContentDescriptor.ts new file mode 100644 index 0000000000..01288d793b --- /dev/null +++ b/src/schemas/api/store/SKUPEGIContentDescriptor.ts @@ -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 . +*/ + +export enum SKUPEGIContentDescriptor { + /** + * Depictions of violence + * + * Value: 1 + * Name: VIOLENCE + */ + VIOLENCE = 1, + /** + * Use of bad language + * + * Value: 2 + * Name: BAD_LANGUAGE + */ + BAD_LANGUAGE = 2, + /** + * Scenes that may frighten + * + * Value: 3 + * Name: FEAR + */ + FEAR = 3, + /** + * Depictions of gambling + * + * Value: 4 + * Name: GAMBLING + */ + GAMBLING = 4, + /** + * Depictions of sexual content + * + * Value: 5 + * Name: SEX + */ + SEX = 5, + /** + * Depictions of drugs + * + * Value: 6 + * Name: DRUGS + */ + DRUGS = 6, + /** + * Depictions of discrimination + * + * Value: 7 + * Name: DISCRIMINATION + */ + DISCRIMINATION = 7, +} diff --git a/src/schemas/api/store/SKUPEGIContentRating.ts b/src/schemas/api/store/SKUPEGIContentRating.ts new file mode 100644 index 0000000000..cfe60d1a28 --- /dev/null +++ b/src/schemas/api/store/SKUPEGIContentRating.ts @@ -0,0 +1,55 @@ +/* + 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 enum SKUPEGIContentRating { + /** + * Suitable for all ages + * + * Value: 1 + * Name: THREE + */ + THREE = 1, + /** + * Suitable for ages 7 and up + * + * Value: 2 + * Name: SEVEN + */ + SEVEN = 2, + /** + * Suitable for ages 12 and up + * + * Value: 3 + * Name: TWELVE + */ + TWELVE = 3, + /** + * Suitable for ages 16 and up + * + * Value: 4 + * Name: SIXTEEN + */ + SIXTEEN = 4, + /** + * Suitable for ages 18 and up + * + * Value: 5 + * Name: EIGHTEEN + */ + EIGHTEEN = 5, +} diff --git a/src/schemas/api/store/SKUPremiumPriceSchema.ts b/src/schemas/api/store/SKUPremiumPriceSchema.ts new file mode 100644 index 0000000000..b048626ddf --- /dev/null +++ b/src/schemas/api/store/SKUPremiumPriceSchema.ts @@ -0,0 +1,28 @@ +/* + 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 SKUPremiumPriceSchema { + /** + * The price amount in the smallest currency unit + */ + amount: number; + /** + * The percentage discount for premium users + */ + percentage: number; +} diff --git a/src/schemas/api/store/SKUPriceSchema.ts b/src/schemas/api/store/SKUPriceSchema.ts new file mode 100644 index 0000000000..9bdb9f65b0 --- /dev/null +++ b/src/schemas/api/store/SKUPriceSchema.ts @@ -0,0 +1,46 @@ +/* + 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 { SKUPremiumPriceSchema } from "./SKUPremiumPriceSchema"; + +export interface SKUPriceSchema { + /** + * The lower-cased ISO 4217 currency code + */ + currency: string; + /** + * The exponent to convert the amount to the displayed currency unit + */ + currency_exponent: number; + /** + * The price amount in the smallest currency unit + */ + amount: number; + /** + * The sale price amount in the smallest currency unit + */ + sale_amount?: number; + /** + * The percentage discount of the sale price + */ + sale_percentage?: number; + /** + * The price for premium users per premium type + */ + premium?: Record; +} diff --git a/src/schemas/api/store/SKUProductLine.ts b/src/schemas/api/store/SKUProductLine.ts new file mode 100644 index 0000000000..483415808f --- /dev/null +++ b/src/schemas/api/store/SKUProductLine.ts @@ -0,0 +1,111 @@ +/* + 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 enum SKUProductLine { + /** + * Premium (Nitro) subscription + * + * Value: 1 + * Name: PREMIUM + */ + PREMIUM = 1, + /** + * Premium guild (boosting) subscription + * + * Value: 2 + * Name: PREMIUM_GUILD + */ + PREMIUM_GUILD = 2, + /** + * Embedded activity in-app purchase + * + * Value: 3 + * Name: ACTIVITY_IAP + */ + ACTIVITY_IAP = 3, + /** + * Guild role subscription or ticketed event + * + * Value: 4 + * Name: GUILD_ROLE + */ + GUILD_ROLE = 4, + /** + * Guild product + * + * Value: 5 + * Name: GUILD_PRODUCT + */ + GUILD_PRODUCT = 5, + /** + * Application item + * + * Value: 6 + * Name: APPLICATION + */ + APPLICATION = 6, + /** + * Discord collectible + * + * Value: 7 + * Name: COLLECTIBLES + */ + COLLECTIBLES = 7, + /** + * In-game quest reward + * + * Value: 9 + * Name: QUEST_IN_GAME_REWARD + */ + QUEST_IN_GAME_REWARD = 9, + /** + * Quest reward code + * + * Value: 10 + * Name: QUEST_REWARD_CODE + */ + QUEST_REWARD_CODE = 10, + /** + * Fractional premium subscription + * + * Value: 11 + * Name: FRACTIONAL_PREMIUM + */ + FRACTIONAL_PREMIUM = 11, + /** + * Virtual currency + * + * Value: 12 + * Name: VIRTUAL_CURRENCY + */ + VIRTUAL_CURRENCY = 12, + /** + * Guild powerup + * + * Value: 13 + * Name: GUILD_POWERUP + */ + GUILD_POWERUP = 13, + /** + * Social SDK game item + * + * Value: 14 + * Name: SOCIAL_LAYER_GAME_ITEM + */ + SOCIAL_LAYER_GAME_ITEM = 14, +} diff --git a/src/schemas/api/store/SKUSystemRequirementSchema.ts b/src/schemas/api/store/SKUSystemRequirementSchema.ts new file mode 100644 index 0000000000..bd11c11e32 --- /dev/null +++ b/src/schemas/api/store/SKUSystemRequirementSchema.ts @@ -0,0 +1,58 @@ +/* + 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 { LocalizedStringSchema } from "../../uncategorised"; + +export interface SKUSystemRequirementSchema { + /** + * The amount of RAM in megabytes + */ + ram?: number; + /** + * The amount of disk space in megabytes + */ + disk?: number; + /** + * The required operating system version + */ + operating_system_version?: LocalizedStringSchema; + /** + * The required CPU + */ + cpu?: LocalizedStringSchema; + /** + * The required GPU + */ + gpu?: LocalizedStringSchema; + /** + * The required sound card + */ + sound_card?: LocalizedStringSchema; + /** + * The required DirectX version + */ + directx?: LocalizedStringSchema; + /** + * The required network connectivity status + */ + network?: LocalizedStringSchema; + /** + * Additional notes + */ + notes?: LocalizedStringSchema; +} diff --git a/src/schemas/api/store/SKUSystemRequirementsSchema.ts b/src/schemas/api/store/SKUSystemRequirementsSchema.ts new file mode 100644 index 0000000000..20fc8dd7e0 --- /dev/null +++ b/src/schemas/api/store/SKUSystemRequirementsSchema.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 . +*/ + +import { SKUSystemRequirementSchema } from "./SKUSystemRequirementSchema"; + +export interface SKUSystemRequirementsSchema { + /** + * The minimum system requirements + */ + minimum?: SKUSystemRequirementSchema; + /** + * The recommended system requirements + */ + recommended?: SKUSystemRequirementSchema; +} diff --git a/src/schemas/api/store/SKUTenantMetadataSchema.ts b/src/schemas/api/store/SKUTenantMetadataSchema.ts new file mode 100644 index 0000000000..033b219fbe --- /dev/null +++ b/src/schemas/api/store/SKUTenantMetadataSchema.ts @@ -0,0 +1,31 @@ +/* + 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 { SKUGuildMonetizationMetadataSchema } from "./SKUGuildMonetizationMetadataSchema"; +import { SocialLayerMetadataSchema } from "./SocialLayerMetadataSchema"; + +export interface SKUTenantMetadataSchema { + /** + * Guild monetization data + */ + guild_monetization?: SKUGuildMonetizationMetadataSchema; + /** + * Social layer game item data + */ + social_layer?: SocialLayerMetadataSchema; +} diff --git a/src/schemas/api/store/SKUType.ts b/src/schemas/api/store/SKUType.ts new file mode 100644 index 0000000000..db7389cce3 --- /dev/null +++ b/src/schemas/api/store/SKUType.ts @@ -0,0 +1,62 @@ +/* + 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 enum SKUType { + /** + * Primary durable item + * + * Value: 1 + * Name: DURABLE_PRIMARY + */ + DURABLE_PRIMARY = 1, + /** + * Durable item + * + * Value: 2 + * Name: DURABLE + */ + DURABLE = 2, + /** + * Consumable item + * + * Value: 3 + * Name: CONSUMABLE + */ + CONSUMABLE = 3, + /** + * Bundle of items + * + * Value: 4 + * Name: BUNDLE + */ + BUNDLE = 4, + /** + * Subscription item + * + * Value: 5 + * Name: SUBSCRIPTION + */ + SUBSCRIPTION = 5, + /** + * Group of subscription items + * + * Value: 6 + * Name: SUBSCRIPTION_GROUP + */ + SUBSCRIPTION_GROUP = 6, +} diff --git a/src/schemas/api/store/ShelfShopBlockSchema.ts b/src/schemas/api/store/ShelfShopBlockSchema.ts new file mode 100644 index 0000000000..d9362c24f8 --- /dev/null +++ b/src/schemas/api/store/ShelfShopBlockSchema.ts @@ -0,0 +1,37 @@ +/* + 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 { ShopBlockType } from "./ShopBlockType"; + +export interface ShelfShopBlockSchema { + /** + * The shop block type + */ + type: ShopBlockType; + /** + * The collectible category SKU ID + */ + category_sku_id?: string; + /** + * The name of the shop block + */ + name: string; + /** + * The SKU IDs ranked by popularity in the collectible category + */ + ranked_sku_ids: string[]; +} diff --git a/src/schemas/api/store/ShopBlockType.ts b/src/schemas/api/store/ShopBlockType.ts new file mode 100644 index 0000000000..667b6d99a3 --- /dev/null +++ b/src/schemas/api/store/ShopBlockType.ts @@ -0,0 +1,76 @@ +/* + 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 enum ShopBlockType { + /** + * A hero shop block + * + * Value: 0 + * Name: HERO + */ + HERO = 0, + /** + * A featured shop block + * + * Value: 1 + * Name: FEATURED + */ + FEATURED = 1, + /** + * A feed shop block + * + * Value: 2 + * Name: FEED + */ + FEED = 2, + /** + * A wide banner shop block + * + * Value: 3 + * Name: WIDE_BANNER + */ + WIDE_BANNER = 3, + /** + * A shelf shop block + * + * Value: 4 + * Name: SHELF + */ + SHELF = 4, + /** + * A countdown timer shop block + * + * Value: 5 + * Name: COUNTDOWN_TIMER + */ + COUNTDOWN_TIMER = 5, + /** + * An immersive banner shop block + * + * Value: 6 + * Name: IMMERSIVE_BANNER + */ + IMMERSIVE_BANNER = 6, + /** + * A reward hero shop block + * + * Value: 7 + * Name: REWARD HERO + */ + REWARD = 7, +} diff --git a/src/schemas/api/store/SocialLayerMetadataSchema.ts b/src/schemas/api/store/SocialLayerMetadataSchema.ts new file mode 100644 index 0000000000..b53a9d1f95 --- /dev/null +++ b/src/schemas/api/store/SocialLayerMetadataSchema.ts @@ -0,0 +1,42 @@ +/* + 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 { StoreCarouselItemSchema } from "./StoreCarouselItemSchema"; + +export interface SocialLayerMetadataSchema { + /** + * The carousel items for the listing + */ + carousel_items: StoreCarouselItemSchema[]; + /** + * The label for the listing + */ + label: string; + /** + * When the listing expires + */ + expires_at: string | null; + /** + * The store asset ID for the card image + */ + card_image_asset_id?: string; + /** + * The store asset ID for the card background image + */ + card_background_image_asset_id?: string; +} diff --git a/src/schemas/api/store/SortedSKUIDsSchema.ts b/src/schemas/api/store/SortedSKUIDsSchema.ts new file mode 100644 index 0000000000..312ef6eac4 --- /dev/null +++ b/src/schemas/api/store/SortedSKUIDsSchema.ts @@ -0,0 +1,27 @@ +/* + 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 SortedSKUIDsSchema { + /** + * The SKU IDs sorted by popularity + */ + popular: string[]; + /** + * The SKU IDs sorted by recommendation + */ + recommended: string[]; +} diff --git a/src/schemas/api/store/StoreApplicationState.ts b/src/schemas/api/store/StoreApplicationState.ts new file mode 100644 index 0000000000..28b959bd58 --- /dev/null +++ b/src/schemas/api/store/StoreApplicationState.ts @@ -0,0 +1,55 @@ +/* + 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 enum StoreApplicationState { + /** + * This application does not have a commerce license + * + * Value: 1 + * Name: NONE + */ + NONE = 1, + /** + * This application has a commerce license but has not yet submitted a store approval request + * + * Value: 2 + * Name: PAID + */ + PAID = 2, + /** + * This application has submitted a store approval request + * + * Value: 3 + * Name: SUBMITTED + */ + SUBMITTED = 3, + /** + * This application has been approved for the store + * + * Value: 4 + * Name: APPROVED + */ + APPROVED = 4, + /** + * This application has been rejected from the store + * + * Value: 5 + * Name: REJECTED + */ + REJECTED = 5, +} diff --git a/src/schemas/api/store/StoreAssetSchema.ts b/src/schemas/api/store/StoreAssetSchema.ts new file mode 100644 index 0000000000..8931f85c3d --- /dev/null +++ b/src/schemas/api/store/StoreAssetSchema.ts @@ -0,0 +1,44 @@ +/* + 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 StoreAssetSchema { + /** + * The ID of the asset + */ + id: string; + /** + * The size of the asset in bytes + */ + size: number; + /** + * The asset's media type + */ + mime_type: string; + /** + * The filename of the asset + */ + filename: string; + /** + * The width of the asset in pixels + */ + width: number; + /** + * The height of the asset in pixels + */ + height: number; +} diff --git a/src/schemas/api/store/StoreCarouselItemSchema.ts b/src/schemas/api/store/StoreCarouselItemSchema.ts new file mode 100644 index 0000000000..34d46f6354 --- /dev/null +++ b/src/schemas/api/store/StoreCarouselItemSchema.ts @@ -0,0 +1,44 @@ +/* + 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 StoreCarouselItemSchema { + /** + * The YouTube video ID for the item + */ + youtube_video_id?: string; + /** + * The store asset ID for the item + */ + asset_id?: string; + /** + * The store asset ID for the thumbnail + */ + thumbnail_asset_id?: string; + /** + * The store asset ID for the background + */ + background_asset_id?: string; + /** + * The label for the item + */ + label?: string; + /** + * The store asset ID for the label icon + */ + label_icon_asset_id?: string; +} diff --git a/src/schemas/api/store/StoreListingBenefitSchema.ts b/src/schemas/api/store/StoreListingBenefitSchema.ts new file mode 100644 index 0000000000..15463aa6c6 --- /dev/null +++ b/src/schemas/api/store/StoreListingBenefitSchema.ts @@ -0,0 +1,38 @@ +/* + 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 { StoreListingIconSchema } from "./StoreListingIconSchema"; + +export interface StoreListingBenefitSchema { + /** + * The ID of the benefit + */ + id: string; + /** + * The name of the benefit + */ + name: string; + /** + * The description of the benefit + */ + description: string; + /** + * The icon for the benefit + */ + icon: StoreListingIconSchema; +} diff --git a/src/schemas/api/store/StoreListingIconSchema.ts b/src/schemas/api/store/StoreListingIconSchema.ts new file mode 100644 index 0000000000..6a1a78c918 --- /dev/null +++ b/src/schemas/api/store/StoreListingIconSchema.ts @@ -0,0 +1,49 @@ +/* + 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 enum StoreListingIconType { + /** + * Icon is a store asset + * + * Value: 1 + * Name: STORE_ASSET + */ + STORE_ASSET = 1, + /** + * Icon is a unicode emoji + * + * Value: 2 + * Name: EMOJI + */ + EMOJI = 2, +} + +export interface StoreListingIconSchema { + /** + * The type of icon + */ + type: StoreListingIconType; + /** + * The store asset ID for the icon + */ + store_asset_id: string; + /** + * The unicode emoji for the icon + */ + emoji: string; +} diff --git a/src/schemas/api/store/StoreListingSchema.ts b/src/schemas/api/store/StoreListingSchema.ts new file mode 100644 index 0000000000..dd8fe2974f --- /dev/null +++ b/src/schemas/api/store/StoreListingSchema.ts @@ -0,0 +1,135 @@ +/* + 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 { Guild, SKU } from "@spacebar/util"; +import { LocalizedStringSchema } from "../../uncategorised"; +import { SKUGuildPowerupMetadataSchema } from "./SKUGuildPowerupMetadataSchema"; +import { StoreAssetSchema } from "./StoreAssetSchema"; +import { StoreCarouselItemSchema } from "./StoreCarouselItemSchema"; +import { StoreListingBenefitSchema } from "./StoreListingBenefitSchema"; +import { StoreNoteSchema } from "./StoreNoteSchema"; + +/** + * Store listing objects can either be localized or unlocalized. Localized listings only serialize strings and pricing for the user's location, while unlocalized listings serialize all strings and pricing for all locales. All objects serialized in the listing inherit this behavior. + */ +export interface StoreListingSchema { + /** + * The ID of the listing + */ + id: string; + /** + * The SKU associated with the listing + */ + sku: SKU; + /** + * The child SKUs associated with the category listing + */ + child_skus?: SKU[]; + /** + * Alternative SKUs for the listing + */ + alternative_skus?: SKU[]; + /** + * A summary of the listing + */ + summary: LocalizedStringSchema; + /** + * A description of the listing + */ + description?: LocalizedStringSchema; + /** + * A tagline for the listing + */ + tagline?: LocalizedStringSchema | null; + /** + * Flavor text for the listing + */ + flavor_text?: string | null; + /** + * The benefits of the listing + */ + benefits?: StoreListingBenefitSchema[]; + /** + * Whether the listing is published + */ + published?: boolean; + /** + * The carousel items for the listing + */ + carousel_items?: StoreCarouselItemSchema[]; + /** + * Notes from staff about the listing + */ + staff_notes?: StoreNoteSchema; + /** + * The public guild associated with the listing + */ + guild?: Partial | null; + /** + * The store assets for the listing + */ + assets?: StoreAssetSchema[]; + /** + * The thumbnail for the listing + */ + thumbnail?: StoreAssetSchema; + /** + * The preview video for the listing + */ + preview_video?: StoreAssetSchema; + /** + * The header background for the listing + */ + header_background?: StoreAssetSchema; + /** + * The dark theme header logo for the listing + */ + header_logo_dark_theme?: StoreAssetSchema; + /** + * The light theme header logo for the listing + */ + header_logo_light_theme?: StoreAssetSchema; + /** + * The box art for the listing + */ + box_art?: StoreAssetSchema; + /** + * The hero background for the listing + */ + hero_background?: StoreAssetSchema; + /** + * The hero video for the listing + */ + hero_video?: StoreAssetSchema; + /** + * The application branch ID granted by the listing + */ + entitlement_branch_id?: string | null; + /** + * When the listing was published + */ + published_at?: string; + /** + * When the listing was unpublished + */ + unpublished_at?: string; + /** + * The guild powerup metadata for the listing + */ + powerup_metadata?: Partial; +} diff --git a/src/schemas/api/store/StoreNoteSchema.ts b/src/schemas/api/store/StoreNoteSchema.ts new file mode 100644 index 0000000000..1c4e49039c --- /dev/null +++ b/src/schemas/api/store/StoreNoteSchema.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 . +*/ + +import { User } from "@spacebar/util"; + +export interface StoreNoteSchema { + /** + * The user who made the note + */ + user: Partial | null; + /** + * The note content + */ + content: string; +} diff --git a/src/schemas/api/store/SubBlockSchema.ts b/src/schemas/api/store/SubBlockSchema.ts new file mode 100644 index 0000000000..c925cf4000 --- /dev/null +++ b/src/schemas/api/store/SubBlockSchema.ts @@ -0,0 +1,62 @@ +/* + 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 enum ShopSubBlockType { + /** + * A category subblock + * + * Value: 0 + * Name: CATEGORY + */ + CATEGORY = 0, +} + +export interface SubBlockSchema { + /** + * The subblock type + */ + type: ShopSubBlockType; + /** + * The collectible category store listing ID + */ + category_store_listing_id: string; + /** + * The URL of the shop block asset + */ + asset_url: string; + /** + * The hex color code of the banner text + */ + banner_text_color: string | null; + /** + * The URL of the banner image + */ + banner_url: string; + /** + * The body text of the shop block + */ + body_text: string | null; + /** + * The name of the shop block + */ + name: string; + /** + * When the collectible category should be unpublished + */ + unpublished_at: string | null; +} diff --git a/src/schemas/api/store/SubscriptionPlanPurchaseType.ts b/src/schemas/api/store/SubscriptionPlanPurchaseType.ts new file mode 100644 index 0000000000..ffc9ca901b --- /dev/null +++ b/src/schemas/api/store/SubscriptionPlanPurchaseType.ts @@ -0,0 +1,75 @@ +/* + 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 enum SubscriptionPlanPurchaseType { + /** + * Default pricing + * + * Value: 0 + * Name: DEFAULT + */ + DEFAULT = 0, + /** + * Gift purchase pricing + * + * Value: 1 + * Name: GIFT + */ + GIFT = 1, + /** + * Sale pricing + * + * Value: 2 + * Name: SALE + */ + SALE = 2, + /** + * Nitro Classic subscriber pricing + * + * Value: 3 + * Name: PREMIUM_TIER_1 + */ + PREMIUM_TIER_1 = 3, + /** + * Nitro subscriber pricing + * + * Value: 4 + * Name: PREMIUM_TIER_2 + */ + PREMIUM_TIER_2 = 4, + /** + * Mobile purchase pricing + * + * Value: 5 + * Name: MOBILE + */ + MOBILE = 5, + /** + * Nitro Basic subscriber pricing + * + * Value: 6 + * Name: PREMIUM_TIER_0 + */ + PREMIUM_TIER_0 = 6, + /** + * Mobile Nitro subscriber pricing + * + * Value: 7 + * Name: MOBILE_PREMIUM_TIER_2 + */ + MOBILE_PREMIUM_TIER_2 = 7, +} diff --git a/src/schemas/api/store/SubscriptionPricesSchema.ts b/src/schemas/api/store/SubscriptionPricesSchema.ts new file mode 100644 index 0000000000..1761cedcf4 --- /dev/null +++ b/src/schemas/api/store/SubscriptionPricesSchema.ts @@ -0,0 +1,31 @@ +/* + 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 { CountryPricesSchema } from "./CountryPricesSchema"; +import { UnitPriceSchema } from "./UnitPriceSchema"; + +export interface SubscriptionPricesSchema { + /** + * The prices for the plan for the given country + */ + country_prices: CountryPricesSchema; + /** + * The prices for the plan per user payment source ID + */ + payment_source_prices?: Record; +} diff --git a/src/schemas/api/store/UnitPriceSchema.ts b/src/schemas/api/store/UnitPriceSchema.ts new file mode 100644 index 0000000000..37f3f350aa --- /dev/null +++ b/src/schemas/api/store/UnitPriceSchema.ts @@ -0,0 +1,31 @@ +/* + 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 UnitPriceSchema { + /** + * The lower-cased ISO 4217 currency code + */ + currency: string; + /** + * The price amount in the smallest currency unit + */ + amount: number; + /** + * The exponent to convert the amount to the displayed currency unit + */ + exponent: number; +} diff --git a/src/schemas/api/store/WideBannerShopBlockSchema.ts b/src/schemas/api/store/WideBannerShopBlockSchema.ts new file mode 100644 index 0000000000..b140e0c589 --- /dev/null +++ b/src/schemas/api/store/WideBannerShopBlockSchema.ts @@ -0,0 +1,79 @@ +/* + 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 { CollectibleAssetConfigSchema } from "./CollectibleAssetConfigSchema"; +import { ShopBlockType } from "./ShopBlockType"; + +export interface WideBannerShopBlockSchema { + /** + * The shop block type + */ + type: ShopBlockType; + /** + * The collectible category store listing ID + */ + category_store_listing_id: string; + /** + * The banner asset + */ + banner_asset: CollectibleAssetConfigSchema; + /** + * The URL of the wide banner logo image + */ + logo_url: string; + /** + * The title of the wide banner + */ + title: string; + /** + * The body text of the wide banner + */ + body: string; + /** + * The hex color code of the banner text + */ + banner_text_color: string | null; + /** + * Whether to disable the CTA for the wide banner + */ + disable_cta: boolean; + /** + * The CTA text for the wide banner + */ + cta_text: string; + /** + * The CTA route for the wide banner + */ + cta_route: string; + /** + * Whether the wide banner is dismissible + */ + is_dismissible: boolean; + /** + * The version of the dismissible content + */ + dismissible_content_version: number; + /** + * The URL of the wide banner image + */ + wide_banner_url: string; + /** + * The URL of the animated wide banner image + */ + wide_banner_animated_url?: string; +} diff --git a/src/schemas/api/store/index.ts b/src/schemas/api/store/index.ts new file mode 100644 index 0000000000..7205edf52f --- /dev/null +++ b/src/schemas/api/store/index.ts @@ -0,0 +1,92 @@ +/* + 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 "./GuildPowerupCatagoryType"; +export * from "./SKUAccessType"; +export * from "./SKUContentDescriptor"; +export * from "./SKUContentRating"; +export * from "./SKUContentRatingAgency"; +export * from "./SKUContentRatingSchema"; +export * from "./SKUESRBContentDescriptor"; +export * from "./SKUESRBContentRating"; +export * from "./SKUExternalSKUStrategySchema"; +export * from "./SKUExternalSKUStrategyType"; +export * from "./SKUFeature"; +export * from "./SKUGameServerPowerupMetadataSchema"; +export * from "./SKUGameServerPowerupProvider"; +export * from "./SKUGenre"; +export * from "./SKUGuildMonetizationMetadataSchema"; +export * from "./SKUOperatingSystem"; +export * from "./SKUPEGIContentDescriptor"; +export * from "./SKUPEGIContentRating"; +export * from "./SKUPremiumPriceSchema"; +export * from "./SKUPriceSchema"; +export * from "./SKUProductLine"; +export * from "./SKUSystemRequirementSchema"; +export * from "./SKUSystemRequirementsSchema"; +export * from "./SKUTenantMetadataSchema"; +export * from "./SKUType"; +export * from "./SocialLayerMetadataSchema"; +export * from "./StoreCarouselItemSchema"; +export * from "./CollectibleBannerAssetSchema"; +export * from "./CollectibleProductSchema"; +export * from "./CollectibleStyleSchema"; +export * from "./CountryPricesSchema"; +export * from "./SubscriptionPricesSchema"; +export * from "./UnitPriceSchema"; +export * from "./CollectibleItemSchema"; +export * from "./ShopBlockType"; +export * from "./CollectibleAssetConfigSchema"; +export * from "./HeroShopBlockSchema"; +export * from "./FeaturedShopBlockSchema"; +export * from "./SubBlockSchema"; +export * from "./FeedShopBlockSchema"; +export * from "./WideBannerShopBlockSchema"; +export * from "./ShelfShopBlockSchema"; +export * from "./CountdownTimerShopBlockSchema"; +export * from "./ImmersiveBannerShopBlockSchema"; +export * from "./AnyCollectiblesShopBlock"; +export * from "./CollectibleUserDiscountSchema"; +export * from "./CollectibleItemType"; +export * from "./CollectibleProfileEffectAnimationType"; +export * from "./CollectibleNameplateColorPalette"; +export * from "./SortedSKUIDsSchema"; +export * from "./SubscriptionPlanPurchaseType"; +export * from "./CreateApplicationSKUSchema"; +export * from "./StoreAssetSchema"; +export * from "./StoreListingSchema"; +export * from "./StoreListingIconSchema"; +export * from "./StoreListingBenefitSchema"; +export * from "./StoreNoteSchema"; +export * from "./ApplicationExecutableSchema"; +export * from "./ApplicationSKUSchema"; +export * from "./ApplicationSKUDistributor"; +export * from "./ApplicationCompanySchema"; +export * from "./ApplicationGuildRestriction"; +export * from "./ApplicationInteractionsVersion"; +export * from "./ApplicationEventWebhooksStatus"; +export * from "./ApplicationEventWebhooksType"; +export * from "./ApplicationIntegrationTypeConfigurationSchema"; +export * from "./ApplicationInstallParamsSchema"; +export * from "./ApplicationVerificationState"; +export * from "./StoreApplicationState"; +export * from "./RPCApplicationState"; +export * from "./ApplicationDiscoverabilityState"; +export * from "./ApplicationMonetizationState"; +export * from "./ApplicationApprovableConsoleType"; +export * from "./CreateSKUSchema"; diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 99f4095c64..0a0d879999 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -17,9 +17,10 @@ */ export * from "./api"; export * from "./gateway"; -export * from "./responses"; -export * from "./uncategorised"; -export * from "./webrtc"; export * from "./HelperTypes"; export * from "./Identifiers"; +export * from "./quests"; +export * from "./responses"; +export * from "./uncategorised"; export * from "./Validator"; +export * from "./webrtc"; diff --git a/src/schemas/quests/ClaimedQuestSchema.ts b/src/schemas/quests/ClaimedQuestSchema.ts new file mode 100644 index 0000000000..657a7e4219 --- /dev/null +++ b/src/schemas/quests/ClaimedQuestSchema.ts @@ -0,0 +1,26 @@ +/* + 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 { QuestConfigSchema } from "./QuestConfigSchema"; +import { QuestUserStatusSchema } from "./QuestUserStatusSchema"; + +export interface ClaimedQuestSchema { + id: string; + config: QuestConfigSchema; + user_status: QuestUserStatusSchema; +} diff --git a/src/schemas/quests/QuestAdIdentifiersSchema.ts b/src/schemas/quests/QuestAdIdentifiersSchema.ts new file mode 100644 index 0000000000..9f81cdd60d --- /dev/null +++ b/src/schemas/quests/QuestAdIdentifiersSchema.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 QuestAdIdentifiersSchema { + // The ID of the advertisement campaign + campaign_id: string; + // The ID of the advertisement set + ad_set_id: string; + // The ID of the advertisement + ad_id: string; + // The ID of the advertisement creative + creative_id: string; + // The type of advertisement creative + creative_type: string; +} diff --git a/src/schemas/quests/QuestApplicationSchema.ts b/src/schemas/quests/QuestApplicationSchema.ts new file mode 100644 index 0000000000..14680c879d --- /dev/null +++ b/src/schemas/quests/QuestApplicationSchema.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 QuestApplicationSchema { + // The ID of the application + id: string; + // The link to the game's page + link?: string; + // The name of the application + name: string; +} diff --git a/src/schemas/quests/QuestAssignmentMethod.ts b/src/schemas/quests/QuestAssignmentMethod.ts new file mode 100644 index 0000000000..e1e5d386ba --- /dev/null +++ b/src/schemas/quests/QuestAssignmentMethod.ts @@ -0,0 +1,22 @@ +/* + 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 enum QuestAssignmentMethod { + ALL = 1, + TIERED, +} diff --git a/src/schemas/quests/QuestClaimRewardRequestSchema.ts b/src/schemas/quests/QuestClaimRewardRequestSchema.ts new file mode 100644 index 0000000000..908cc50490 --- /dev/null +++ b/src/schemas/quests/QuestClaimRewardRequestSchema.ts @@ -0,0 +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 . +*/ + +import { QuestPlatformType } from "./QuestPlatformType"; + +export interface QuestClaimRewardRequestSchema { + location: number; // https://docs.discord.food/resources/quests#quest-content-type + platform: QuestPlatformType; +} diff --git a/src/schemas/quests/QuestConfigSchema.ts b/src/schemas/quests/QuestConfigSchema.ts new file mode 100644 index 0000000000..a44cfb38b1 --- /dev/null +++ b/src/schemas/quests/QuestConfigSchema.ts @@ -0,0 +1,77 @@ +/* + 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 { QuestRewardConfigSchema } from "./QuestRewardConfigSchema"; + +import { QuestFeature, QuestSharePolicy } from "."; +import { QuestApplicationSchema } from "./QuestApplicationSchema"; +import { QuestTaskConfigV2Schema } from "./QuestTaskConfigV2Schema"; + +export interface QuestConfigSchema { + id: string; + config_version: number; // as of now (12/24/2025) its 2 + starts_at: string; // ISO date + expires_at: string; // ISO date + features: QuestFeature[]; + application: QuestApplicationSchema; + assets: { + // The quest's hero image + hero: string | null; + // A video representation of the hero image + hero_video?: string | null; + // The hero image used in the quest popup that appears when launching the game before accepting the quest + quest_bar_hero: string | null; + // A video representation of the quest bar hero image + quest_bar_hero_video?: string | null; + // The game's icon + game_tile: string | null; + game_tile_dark: string | null; + game_tile_light: string | null; + // The game's logo + logotype: string | null; + logotype_dark: string | null; + logotype_light: string | null; + }; + colors: { + primary: string; // hex color + secondary: string; // hex color + }; + messages: { + // The name of the quest + quest_name: string; + // The title of the game the quest is for + game_title: string; + // The publisher of the game the quest is for + game_publisher: string; + }; + task_config?: unknown; // seems to be unused now in favor of task_config_v2 + task_config_v2: QuestTaskConfigV2Schema; + rewards_config: QuestRewardConfigSchema; + share_policy: QuestSharePolicy; + cta_config: { + button_label: string; + link: string; + subtitle?: string; + android?: { + android_app_id: string; + }; + ios?: { + ios_app_id: string; + }; + }; +} diff --git a/src/schemas/quests/QuestEnrollRequestSchema.ts b/src/schemas/quests/QuestEnrollRequestSchema.ts new file mode 100644 index 0000000000..44a38f1ad8 --- /dev/null +++ b/src/schemas/quests/QuestEnrollRequestSchema.ts @@ -0,0 +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 interface QuestEnrollRequestSchema { + location: number; // https://docs.discord.food/resources/quests#quest-content- + is_targeted?: boolean; + metadata_raw?: string | null; + metadata_sealed?: string | null; +} diff --git a/src/schemas/quests/QuestEntitlementExpirationMetadataSchema.ts b/src/schemas/quests/QuestEntitlementExpirationMetadataSchema.ts new file mode 100644 index 0000000000..8244a32d60 --- /dev/null +++ b/src/schemas/quests/QuestEntitlementExpirationMetadataSchema.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 QuestEntitlementExpirationMetadataSchema { + // Whether the entitlement expiration has been extended due to a premium subscription + extended: boolean; + // Whether the entitlement expiration can be extended due to a premium subscription + extendable: boolean; +} diff --git a/src/schemas/quests/QuestEventType.ts b/src/schemas/quests/QuestEventType.ts new file mode 100644 index 0000000000..410903ed9f --- /dev/null +++ b/src/schemas/quests/QuestEventType.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 . +*/ + +export enum QuestEventType { + STREAM_ON_DESKTOP = "STREAM_ON_DESKTOP", + PLAY_ON_DESKTOP = "PLAY_ON_DESKTOP", + PLAY_ON_XBOX = "PLAY_ON_XBOX", + PLAY_ON_PLAYSTATION = "PLAY_ON_PLAYSTATION", + PLAY_ON_DESKTOP_V2 = "PLAY_ON_DESKTOP_V2", + WATCH_VIDEO = "WATCH_VIDEO", + WATCH_VIDEO_ON_MOBILE = "WATCH_VIDEO_ON_MOBILE", + PLAY_ACTIVITY = "PLAY_ACTIVITY", + ACHIEVEMENT_IN_GAME = "ACHIEVEMENT_IN_GAME", + ACHIEVEMENT_IN_ACTIVITY = "ACHIEVEMENT_IN_ACTIVITY", +} diff --git a/src/schemas/quests/QuestFeature.ts b/src/schemas/quests/QuestFeature.ts new file mode 100644 index 0000000000..b3d8123b1c --- /dev/null +++ b/src/schemas/quests/QuestFeature.ts @@ -0,0 +1,53 @@ +/* + 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 enum QuestFeature { + POST_ENROLLMENT_CTA = 1, + QUEST_BAR_V2 = 3, + EXCLUDE_MINORS = 4, // removed from the client apparently + EXCLUDE_RUSSIA = 5, + IN_HOUSE_CONSOLE_QUEST = 6, + MOBILE_CONSOLE_QUEST = 7, + START_QUEST_CTA = 8, + REWARD_HIGHLIGHTING = 9, + FRACTIONS_QUEST = 10, + ADDITIONAL_REDEMPTION_INSTRUCTIONS = 11, + PACING_V2 = 12, + DISMISSAL_SURVEY = 13, + MOBILE_QUEST_DOCK = 14, + QUESTS_CDN = 15, + PACING_CONTROLLER = 16, + QUEST_HOME_FORCE_STATIC_IMAGE = 17, + VIDEO_QUEST_FORCE_HLS_VIDEO = 18, + VIDEO_QUEST_FORCE_END_CARD_CTA_SWAP = 19, + EXPERIMENTAL_TARGETING_TRAITS = 20, + DO_NOT_DISPLAY = 21, + EXTERNAL_DIALOG = 22, + MOBILE_ONLY_QUEST_PUSH_TO_MOBILE = 23, + MANUAL_HEARTBEAT_INITIALIZATION = 24, + CLOUD_GAMING_ACTIVITY = 25, + NON_GAMING_PLAY_QUEST = 26, + ACTIVITY_QUEST_AUTO_ENROLLMENT = 27, + PACKAGE_ACTION_ADVENTURE = 28, + PACKAGE_RPG_MMO = 29, + PACKAGE_RACING_SPORTS = 30, + PACKAGE_SANDBOX_CREATIVE = 31, + PACKAGE_FAMILY_FRIENDLY = 32, + PACKAGE_HOLIDAY_SEASON = 33, + PACKAGE_NEW_YEARS = 34, +} diff --git a/src/schemas/quests/QuestJoinOperator.ts b/src/schemas/quests/QuestJoinOperator.ts new file mode 100644 index 0000000000..74984e7af6 --- /dev/null +++ b/src/schemas/quests/QuestJoinOperator.ts @@ -0,0 +1,22 @@ +/* + 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 enum QuestJoinOperator { + AND = "and", + OR = "or", +} diff --git a/src/schemas/quests/QuestPlacementArea.ts b/src/schemas/quests/QuestPlacementArea.ts new file mode 100644 index 0000000000..8b19b7b30a --- /dev/null +++ b/src/schemas/quests/QuestPlacementArea.ts @@ -0,0 +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 enum QuestPlacementArea { + // Account panel on desktop + DESKTOP_ACCOUNT_PANEL_AREA = 1, + // Home dock on mobile + MOBILE_HOME_DOCK_AREA, +} diff --git a/src/schemas/quests/QuestPlatformType.ts b/src/schemas/quests/QuestPlatformType.ts new file mode 100644 index 0000000000..b99fbfc7cd --- /dev/null +++ b/src/schemas/quests/QuestPlatformType.ts @@ -0,0 +1,25 @@ +/* + 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 enum QuestPlatformType { + CROSS_PLATFORM = 0, + XBOX, + PLAYSTATION, + SWITCH, + PC, +} diff --git a/src/schemas/quests/QuestRewardCodeSchema.ts b/src/schemas/quests/QuestRewardCodeSchema.ts new file mode 100644 index 0000000000..a559258b2d --- /dev/null +++ b/src/schemas/quests/QuestRewardCodeSchema.ts @@ -0,0 +1,34 @@ +/* + 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 { QuestPlatformType } from "."; + +export interface QuestRewardCodeSchema { + // The ID of the quest + quest_id: string; + // The redeem code + code: string; + // The platform this redeem code applies to + platform: QuestPlatformType; + // The ID of the user who this code belongs to + user_id: string; + // When the user claimed the quest's reward + claimed_at: string; + // Which reward tier the code belongs to, if the quest's assignment_method is set to TIERED + tier: number | null; +} diff --git a/src/schemas/quests/QuestRewardConfigSchema.ts b/src/schemas/quests/QuestRewardConfigSchema.ts new file mode 100644 index 0000000000..b9ae7dc2db --- /dev/null +++ b/src/schemas/quests/QuestRewardConfigSchema.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 . +*/ + +import { QuestAssignmentMethod } from "./QuestAssignmentMethod"; +import { QuestPlatformType } from "./QuestPlatformType"; +import { QuestRewardSchema } from "./QuestRewardSchema"; + +export interface QuestRewardConfigSchema { + assignment_method: QuestAssignmentMethod; + platforms: QuestPlatformType[]; + rewards: QuestRewardSchema[]; + rewards_expire_at: string; // ISO8601 timestamp +} diff --git a/src/schemas/quests/QuestRewardExpirationMode.ts b/src/schemas/quests/QuestRewardExpirationMode.ts new file mode 100644 index 0000000000..b9821a2256 --- /dev/null +++ b/src/schemas/quests/QuestRewardExpirationMode.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 enum QuestRewardExpirationMode { + NORMAL = 1, + PREMIUM_EXTENSION, + PREMIUM_PERMANENT, +} diff --git a/src/schemas/quests/QuestRewardSchema.ts b/src/schemas/quests/QuestRewardSchema.ts new file mode 100644 index 0000000000..56ca9d64c7 --- /dev/null +++ b/src/schemas/quests/QuestRewardSchema.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 . +*/ + +import { QuestRewardExpirationMode } from "./QuestRewardExpirationMode"; +import { QuestRewardType } from "./QuestRewardType"; + +export interface QuestRewardSchema { + type: QuestRewardType; + sku_id: string; + asset?: string; + asset_video?: string | null; + messages: { + name: string; + name_with_article: string; + redemption_instructions_by_platform: Record; + }; + // An approximate count of how many users can claim the reward + approximate_count?: number | null; + // The link to redeem the reward + redemption_link?: string | null; + // When the reward expires + expires_at?: string | null; + // When the reward expires for premium users + expires_at_premium?: string | null; + // The expiration mode + expiration_mode?: QuestRewardExpirationMode; + // The amount of virtual currency awarded + orb_quantity?: number; + // The days of fractional premium awarded + quantity?: number; +} diff --git a/src/schemas/quests/QuestRewardType.ts b/src/schemas/quests/QuestRewardType.ts new file mode 100644 index 0000000000..2bfd7d77d9 --- /dev/null +++ b/src/schemas/quests/QuestRewardType.ts @@ -0,0 +1,25 @@ +/* + 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 enum QuestRewardType { + REWARD_CODE = 1, + IN_GAME, + COLLECTIBLE, + VIRTUAL_CURRENCY, + FRACTIONAL_PREMIUM, +} diff --git a/src/schemas/quests/QuestSchema.ts b/src/schemas/quests/QuestSchema.ts new file mode 100644 index 0000000000..0f5b3b4678 --- /dev/null +++ b/src/schemas/quests/QuestSchema.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 { QuestConfigSchema } from "./QuestConfigSchema"; +import { QuestUserStatusSchema } from "./QuestUserStatusSchema"; + +export interface QuestSchema { + // The ID of the quest + id: string; + // The configuration and metadata for the quest + config: QuestConfigSchema; + // Whether the quest is unreleased and in preview for Discord employees + preview: boolean; + // The content areas where the quest can be shown, deprecated + targeted_content: unknown[]; + // The user's quest progress, if it has been accepted + user_status: null | QuestUserStatusSchema; +} diff --git a/src/schemas/quests/QuestSharePolicy.ts b/src/schemas/quests/QuestSharePolicy.ts new file mode 100644 index 0000000000..1cfc02ccb0 --- /dev/null +++ b/src/schemas/quests/QuestSharePolicy.ts @@ -0,0 +1,22 @@ +/* + 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 enum QuestSharePolicy { + SHAREABLE_EVERYWHERE = "shareable_everywhere", + NOT_SHAREABLE = "not_shareable", +} diff --git a/src/schemas/quests/QuestTaskConfigV2Schema.ts b/src/schemas/quests/QuestTaskConfigV2Schema.ts new file mode 100644 index 0000000000..f4789b1b59 --- /dev/null +++ b/src/schemas/quests/QuestTaskConfigV2Schema.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 . +*/ + +import { QuestEventType, QuestJoinOperator } from "."; +import { QuestTaskSchema } from "./QuestTaskSchema"; + +export interface QuestTaskConfigV2Schema { + join_operator: QuestJoinOperator; + tasks: Partial>; +} diff --git a/src/schemas/quests/QuestTaskSchema.ts b/src/schemas/quests/QuestTaskSchema.ts new file mode 100644 index 0000000000..0c76f6e5ab --- /dev/null +++ b/src/schemas/quests/QuestTaskSchema.ts @@ -0,0 +1,40 @@ +/* + 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 { QuestEventType } from "."; +import { QuestVideoAssetSchema } from "./QuestVideoAssetSchema"; + +export interface QuestTaskSchema { + type: QuestEventType; + target: number; // seconds the task requires + assets?: { + video: QuestVideoAssetSchema; // pretty sure this is always present + video_low_res?: QuestVideoAssetSchema; + video_hls?: QuestVideoAssetSchema; + }; // WATCH_VIDEO, WATCH_VIDEO_ON_MOBILE + applications?: { + id: string; + }[]; // All except watch video types + external_ids?: string[]; // game id on the external platform im pretty sure. PLAY_ON_XBOX, PLAY_ON_PLAYSTATION + messages?: { + video_title?: string; // WATCH_VIDEO, WATCH_VIDEO_ON_MOBILE + task_title?: string; // ACHIEVEMENT_IN_GAME, ACHIEVEMENT_IN_ACTIVITY + task_description?: string; // ACHIEVEMENT_IN_GAME, ACHIEVEMENT_IN_ACTIVITY + }; // ACHIEVEMENT_IN_GAME, ACHIEVEMENT_IN_ACTIVITY, WATCH_VIDEO, WATCH_VIDEO_ON_MOBILE + event_name?: string; // ?? seems to be used in a request. ACHIEVEMENT_IN_GAME, ACHIEVEMENT_IN_ACTIVITY +} diff --git a/src/schemas/quests/QuestUserStatusProgressSchema.ts b/src/schemas/quests/QuestUserStatusProgressSchema.ts new file mode 100644 index 0000000000..b05e87da2d --- /dev/null +++ b/src/schemas/quests/QuestUserStatusProgressSchema.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 { QuestEventType } from "."; + +export interface QuestUserStatusProgressSchema { + value: number; + event_name: QuestEventType; + updated_at: string; // ISO8601 timestamp + completed_at: string | null; // ISO8601 timestamp + heartbeat: { + last_beat_at: string; // ISO8601 timestamp + expires_at: null | string; // ISO8601 timestamp + } | null; +} diff --git a/src/schemas/quests/QuestUserStatusSchema.ts b/src/schemas/quests/QuestUserStatusSchema.ts new file mode 100644 index 0000000000..bf4afad6c3 --- /dev/null +++ b/src/schemas/quests/QuestUserStatusSchema.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 . +*/ + +import { QuestUserStatusProgressSchema } from "./QuestUserStatusProgressSchema"; + +export interface QuestUserStatusSchema { + // The ID of the user + user_id: string; + // The ID of the quest + quest_id: string; + // When the user accepted the quest + enrolled_at: null | string; + // When the user completed the quest + completed_at: null | string; + // When the user claimed the quest's reward + claimed_at: null | string; + // Which reward tier the user has claimed, if the quest's assignment_method is TIERED + claimed_tier?: number | null; + // When the last heartbeat was received. only used for quest config version 1, where the event is always STREAM_ON_DESKTOP. + last_stream_heartbeat_at?: null | string; + // Duration (in seconds) the user has streamed the game for since the quest was accepted. only used for quest config version 1, where the event is always STREAM_ON_DESKTOP. + stream_progress_seconds: number; + // The content areas the user has dismissed for the quest + dismissed_quest_content?: number; + // The user's progress for each task in the quest, keyed by their event name + progress?: Record; // ive only seen this for watch video, watch video on mobile, and play on desktop +} diff --git a/src/schemas/quests/QuestVideoAssetSchema.ts b/src/schemas/quests/QuestVideoAssetSchema.ts new file mode 100644 index 0000000000..52209a4683 --- /dev/null +++ b/src/schemas/quests/QuestVideoAssetSchema.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 QuestVideoAssetSchema { + url: string; + width: number; + height: number; + thumbnail: string; + caption?: string; + transcript?: string; +} diff --git a/src/schemas/quests/QuestVideoProgressRequestSchema.ts b/src/schemas/quests/QuestVideoProgressRequestSchema.ts new file mode 100644 index 0000000000..f31e04be81 --- /dev/null +++ b/src/schemas/quests/QuestVideoProgressRequestSchema.ts @@ -0,0 +1,22 @@ +/* + 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 QuestVideoProgressRequestSchema { + // How far into the video the user is (in seconds) + timestamp: number; +} diff --git a/src/schemas/quests/index.ts b/src/schemas/quests/index.ts new file mode 100644 index 0000000000..72ba6645df --- /dev/null +++ b/src/schemas/quests/index.ts @@ -0,0 +1,44 @@ +/* + 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 "./ClaimedQuestSchema"; +export * from "./QuestAdIdentifiersSchema"; +export * from "./QuestApplicationSchema"; +export * from "./QuestAssignmentMethod"; +export * from "./QuestClaimRewardRequestSchema"; +export * from "./QuestConfigSchema"; +export * from "./QuestEnrollRequestSchema"; +export * from "./QuestEntitlementExpirationMetadataSchema"; +export * from "./QuestEventType"; +export * from "./QuestFeature"; +export * from "./QuestJoinOperator"; +export * from "./QuestPlacementArea"; +export * from "./QuestPlatformType"; +export * from "./QuestRewardCodeSchema"; +export * from "./QuestRewardConfigSchema"; +export * from "./QuestRewardExpirationMode"; +export * from "./QuestRewardSchema"; +export * from "./QuestRewardType"; +export * from "./QuestSchema"; +export * from "./QuestSharePolicy"; +export * from "./QuestTaskConfigV2Schema"; +export * from "./QuestTaskSchema"; +export * from "./QuestUserStatusProgressSchema"; +export * from "./QuestUserStatusSchema"; +export * from "./QuestVideoAssetSchema"; +export * from "./QuestVideoProgressRequestSchema"; diff --git a/src/schemas/responses/ClaimedQuestsResponseSchema.ts b/src/schemas/responses/ClaimedQuestsResponseSchema.ts new file mode 100644 index 0000000000..f6da01d25b --- /dev/null +++ b/src/schemas/responses/ClaimedQuestsResponseSchema.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 . +*/ + +import { ClaimedQuestSchema } from "@spacebar/schemas"; + +export interface ClaimedQuestsResponseSchema { + quests: ClaimedQuestSchema[]; +} diff --git a/src/schemas/responses/CollectiblesCategoriesResponse.ts b/src/schemas/responses/CollectiblesCategoriesResponse.ts index 2b93ffd014..9aaf558b04 100644 --- a/src/schemas/responses/CollectiblesCategoriesResponse.ts +++ b/src/schemas/responses/CollectiblesCategoriesResponse.ts @@ -16,105 +16,166 @@ along with this program. If not, see . */ -// TODO: Clean up -import { StringStringDictionary } from "@spacebar/schemas"; +import { CollectibleAssetConfigSchema, CollectibleBannerAssetSchema, CollectibleProductSchema, CollectibleStyleSchema, StringStringDictionary } from "@spacebar/schemas"; -export type CollectiblesCategoriesResponse = CollectiblesCategoryItem[]; +export type CollectiblesCategoriesResponse = CollectibleCategorySchema[]; -export interface CollectiblesCategoryStyle { - background_colors: number[]; - button_colors: number[]; - confetti_colors: number[]; -} - -export interface CollectiblesCategoryItem { +export interface CollectibleCategorySchema { + /** + * The SKU ID of the collectible category + */ sku_id: string; - name: string; - summary: string; + /** + * The store listing ID associated with the collectible category + */ store_listing_id: string; - banner: string; - unpublished_at: string | null; - styles: CollectiblesCategoryStyle; - logo: string; - hero_ranking: string[] | null; - mobile_bg: string | null; - pdp_bg: string | null; - success_modal_bg: string | null; - mobile_banner: string | null; - featured_block: string | null; - hero_banner: string | null; - wide_banner: string | null; - hero_logo: string | null; - products: CollectiblesCategoryProductItem[]; - banner_asset?: StaticAnimatedAsset; - hero_banner_asset?: StaticAnimatedAsset; -} - -export interface StaticAnimatedAsset { - // CDN URLs - animated: string | null; - static: string; -} - -export interface CollectiblesCategoryProductItem { - sku_id: string; + /** + * The color of the banner text as a hexadecimal color string + */ + banner_text_color?: string; + /** + * The catalog banner asset + */ + catalog_banner_asset?: CollectibleAssetConfigSchema; + /** + * The hero banner asset + */ + hero_banner_asset?: CollectibleAssetConfigSchema; + /** + * The body text for the featured block + */ + featured_block_body?: string; + /** + * The URL of the featured block image + */ + featured_block_url?: string; + /** + * The hero banner asset. might be legacy in favor of hero_banner_asset? + */ + hero_banner_config_asset?: CollectibleBannerAssetSchema; + /** + * The display configuration for the hero banner + */ + hero_banner_display_config?: CollectibleBannerAssetSchema; + /** + * The display configuration for the hero banner. might be legacy in favor of hero_banner_display_config? + */ + hero_banner_config?: CollectibleBannerAssetSchema; + /** + * The title text for the hero block + */ + hero_block_title?: string; + /** + * The display configuration for the hero logo + */ + hero_logo_display_config?: CollectibleAssetConfigSchema; + /** + * The URL of the hero logo image + */ + hero_logo_url?: string; + /** + * The popularity ranking of SKU IDs within the collectible category + */ + hero_ranking: string[]; + /** + * The URL of the Rive hero animation + */ + hero_rive_url?: string; + /** + * The URL of the logo image + */ + logo_url: string; + /** + * The URL of the mobile banner image + */ + mobile_banner_url?: string; + /** + * The URL of the mobile background image + */ + mobile_bg_url?: string; + /** + * The title text for the mobile hero block + */ + mobile_hero_block_title?: string; + /** + * The title text for the mobile products section + */ + mobile_products_title?: string; + /** + * The summary text for the mobile products section + */ + mobile_summary: string; + /** + * The name of the collectible category + */ name: string; + /** + * The URL of the product display page background image + */ + pdp_bg_url: string; + /** + * The list of products in the collectible category + */ + products: CollectibleProductSchema[]; + /** + * The colors to use in the client + */ + styles: CollectibleStyleSchema; + /** + * A description of the collectible category + */ summary: string; - store_listing_id: string; - banner: string; + /** + * The time at which the collectible category should be unpublished + */ unpublished_at: string | null; - styles: CollectiblesCategoryStyle; - prices: PriceMap; - items: ProductItem[]; - type: number; - premium_type: number; - category_sku_id: string; - google_sku_ids: StringStringDictionary; - variants?: ProductItemVariant[]; -} - -export interface ProductItemVariant { - sku_id: string; - name: string; - name_localizations: null; - summary: string; - summary_localizations: null; - store_listing_id: string; - banner?: string; - unpublished_at?: string | null; - styles?: CollectiblesCategoryStyle; - prices: PriceMap; - items: ProductItem[]; - type: number; - premium_type: number; - category_sku_id: string; - google_sku_ids?: StringStringDictionary; - base_variant_sku_id: string; - base_variant_name: string; - variant_label: string; - variant_value: string; // hex string -} - -export interface ProductItem { - type: number; - id: string; - sku_id: string; - asset?: string; - label?: string; - palette?: string; -} - -export type PriceMap = { - [key: string]: { country_prices: CountryPrice }; -}; - -export interface CountryPrice { - country_code: string; - prices: PriceEntry[]; -} - -export interface PriceEntry { - amount: number; - currency: string; - exponent: number; + /** + * The wide banner asset config + */ + wide_banner_asset?: CollectibleAssetConfigSchema; + /** + * The body text for the wide banner + */ + wide_banner_body?: string; + /** + * The title text for the wide banner + */ + wide_banner_title?: string; + /** + * The ID of the logo image + */ + logo?: string | null; + /** + * The ID of the mobile background image + */ + mobile_bg?: string | null; + /** + * The ID of the product display page background image + */ + pdp_bg?: string | null; + /** + * The ID of the mobile banner image + */ + mobile_banner?: string | null; + featured_block?: string; + /** + * The ID of the hero logo image + */ + hero_logo?: string | null; + /** + * The URL of the hero banner + */ + hero_banner_url?: string | null; + /** + * The URL of the animated hero banner + */ + hero_banner_animated_url?: string | null; + /** + * The URL of the catalog banner + */ + catalog_banner_url?: string | null; + /** + * The URL of the wide banner + */ + wide_banner_url?: string | null; } diff --git a/src/schemas/responses/CollectiblesShopResponse.ts b/src/schemas/responses/CollectiblesShopResponse.ts index b739fe0cf6..004b43dfed 100644 --- a/src/schemas/responses/CollectiblesShopResponse.ts +++ b/src/schemas/responses/CollectiblesShopResponse.ts @@ -16,51 +16,11 @@ along with this program. If not, see . */ -import { CollectiblesCategoryItem, StaticAnimatedAsset } from "./CollectiblesCategoriesResponse"; +import { AnyCollectiblesShopBlock, CollectibleUserDiscountSchema } from "@spacebar/schemas"; +import { CollectibleCategorySchema } from "./CollectiblesCategoriesResponse"; export interface CollectiblesShopResponse { - shop_blocks: AnyShopBlock[]; - categories: CollectiblesCategoryItem[]; -} - -export type AnyShopBlock = ItemRowShopBlock | BundleTileRowShopBlock | ItemCollectionShopBlock; - -export interface BaseShopBlock { - type: number; -} - -export interface ItemRowShopBlock extends BaseShopBlock { - type: 0; - category_sku_id: string; - name: string; - category_store_listing_id: string; - banner_asset: StaticAnimatedAsset; - logo_url: string; - unpublished_at: string | null; - summary: string; - ranked_sku_ids: string[]; -} - -export interface BundleTileRowShopBlock extends BaseShopBlock { - type: 1; - subblocks: ShopBlockSubBlock[]; -} - -export interface ShopBlockSubBlock { - type: number; - category_store_listing_id: string; - name: string; - unpublished_at: string | null; - banner_url: string; - body_text: string | null; - banner_text_color: number | null; -} - -export interface ItemCollectionShopBlock extends BaseShopBlock { - type: 2; - ranked_sku_ids: string[]; - sorted_sku_ids: { - recommended: string[] | null; - popular: string[]; - }; + shop_blocks: AnyCollectiblesShopBlock[]; + categories: CollectibleCategorySchema[]; + user_discounts?: CollectibleUserDiscountSchema[]; } diff --git a/src/schemas/responses/CreateApplicationSKUResponseSchema.ts b/src/schemas/responses/CreateApplicationSKUResponseSchema.ts new file mode 100644 index 0000000000..44eaf9bfbc --- /dev/null +++ b/src/schemas/responses/CreateApplicationSKUResponseSchema.ts @@ -0,0 +1,25 @@ +/* + 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 { StoreListingSchema } from "@spacebar/schemas"; +import { SKU } from "../../util"; + +export interface CreateApplicationSKUResponseSchema { + skus: SKU[]; + store_listings: StoreListingSchema[]; +} diff --git a/src/schemas/responses/QuestClaimRewardResponseSchema.ts b/src/schemas/responses/QuestClaimRewardResponseSchema.ts new file mode 100644 index 0000000000..72540f8d0e --- /dev/null +++ b/src/schemas/responses/QuestClaimRewardResponseSchema.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 { EntitlementSchema, QuestEntitlementExpirationMetadataSchema } from "@spacebar/schemas"; + +export interface QuestClaimRewardResponseSchema { + claimed_at: string; + entitlement_expiration_metadata: Record; + entitlements: EntitlementSchema[]; + errors: { message: string; code: number }[]; +} diff --git a/src/schemas/responses/QuestConfigResponseSchema.ts b/src/schemas/responses/QuestConfigResponseSchema.ts new file mode 100644 index 0000000000..697c1a0087 --- /dev/null +++ b/src/schemas/responses/QuestConfigResponseSchema.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 { QuestConfigSchema } from "@spacebar/schemas"; + +export type QuestConfigResponseSchema = QuestConfigSchema; diff --git a/src/schemas/responses/QuestPlacementResponseSchema.ts b/src/schemas/responses/QuestPlacementResponseSchema.ts new file mode 100644 index 0000000000..7927b5c0fd --- /dev/null +++ b/src/schemas/responses/QuestPlacementResponseSchema.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 { QuestAdIdentifiersSchema, QuestSchema } from "@spacebar/schemas"; + +export interface QuestPlacementResponseSchema { + // The advertisement decision ID + request_id: string; + // The quest to show to the user + quest: QuestSchema | null; + // The advertisement identifiers for the delivered quest + ad_identifiers: QuestAdIdentifiersSchema | null; + // The advertisement context for the delivered quest + ad_context: { is_campaign_ias_enabled: boolean } | null; + response_ttl_seconds: number; + // Base64-encoded protobuf metadata for the advertisement + metadata_raw: string | null; +} diff --git a/src/schemas/responses/QuestRewardCodeResponseSchema.ts b/src/schemas/responses/QuestRewardCodeResponseSchema.ts new file mode 100644 index 0000000000..446c071b97 --- /dev/null +++ b/src/schemas/responses/QuestRewardCodeResponseSchema.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 { QuestRewardCodeSchema } from "@spacebar/schemas"; + +export type QuestRewardCodeResponseSchema = QuestRewardCodeSchema; diff --git a/src/schemas/responses/QuestUserStatusResponseSchema.ts b/src/schemas/responses/QuestUserStatusResponseSchema.ts new file mode 100644 index 0000000000..4ce547caf6 --- /dev/null +++ b/src/schemas/responses/QuestUserStatusResponseSchema.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 { QuestUserStatusSchema } from "@spacebar/schemas"; + +export type QuestUserStatusResponseSchema = QuestUserStatusSchema; diff --git a/src/schemas/responses/QuestsResponseSchema.ts b/src/schemas/responses/QuestsResponseSchema.ts new file mode 100644 index 0000000000..e243c9c98c --- /dev/null +++ b/src/schemas/responses/QuestsResponseSchema.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 . +*/ + +import { QuestSchema } from "@spacebar/schemas"; + +export interface QuestsResponseSchema { + excluded_quests: { + id: string; + replacement_id?: string; + }[]; + quest_enrollment_blocked_until: unknown; // idk, i assume null | ISO8601 timestamp? + quests: QuestSchema[]; +} diff --git a/src/schemas/responses/VirtualCurrencyResponseSchema.ts b/src/schemas/responses/VirtualCurrencyResponseSchema.ts new file mode 100644 index 0000000000..094686fa43 --- /dev/null +++ b/src/schemas/responses/VirtualCurrencyResponseSchema.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 VirtualCurrencyResponseSchema { + balance: number; +} diff --git a/src/schemas/responses/index.ts b/src/schemas/responses/index.ts index 690b1ec53f..34dd7d35f1 100644 --- a/src/schemas/responses/index.ts +++ b/src/schemas/responses/index.ts @@ -15,11 +15,12 @@ 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 "./ClaimedQuestsResponseSchema"; export * from "./CollectiblesCategoriesResponse"; export * from "./CollectiblesMarketingResponse"; export * from "./CollectiblesShopResponse"; @@ -50,6 +51,12 @@ export * from "./LocationMetadataResponse"; export * from "./MemberJoinGuildResponse"; export * from "./OAuthAuthorizeResponse"; export * from "./PreloadMessagesResponseSchema"; +export * from "./QuestClaimRewardResponseSchema"; +export * from "./QuestConfigResponseSchema"; +export * from "./QuestPlacementResponseSchema"; +export * from "./QuestRewardCodeResponseSchema"; +export * from "./QuestsResponseSchema"; +export * from "./QuestUserStatusResponseSchema"; export * from "./RefreshUrlsResponse"; export * from "./SettingsProtoUpdateResponse"; export * from "./TeamListResponse"; @@ -60,7 +67,9 @@ export * from "./UpdatesResponse"; export * from "./UploadAttachmentResponseSchema"; export * from "./UserNoteResponse"; export * from "./UserProfileResponse"; -export * from "./UserRelationsResponse"; export * from "./UserRelationshipsResponse"; +export * from "./UserRelationsResponse"; +export * from "./VirtualCurrencyResponseSchema"; export * from "./WebAuthnCreateResponse"; export * from "./WebhookCreateResponse"; +export * from "./CreateApplicationSKUResponseSchema"; diff --git a/src/schemas/uncategorised/BillingPaymentGateway.ts b/src/schemas/uncategorised/BillingPaymentGateway.ts new file mode 100644 index 0000000000..66ccbc4d4a --- /dev/null +++ b/src/schemas/uncategorised/BillingPaymentGateway.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 enum BillingPaymentGateway { + STRIPE = 1, + BRAINTREE, + APPLE, + GOOGLE, + ADYEN, + APPLE_PARTNER, + VIRTUAL_CURRENCY = 8, + APPLE_ADVANCED_COMMERCE, +} diff --git a/src/schemas/uncategorised/LocalizedStringSchema.ts b/src/schemas/uncategorised/LocalizedStringSchema.ts new file mode 100644 index 0000000000..0add25c912 --- /dev/null +++ b/src/schemas/uncategorised/LocalizedStringSchema.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 LocalizedStringSchema { + default: string; + localizations?: { [key: string]: string }; +} diff --git a/src/schemas/uncategorised/index.ts b/src/schemas/uncategorised/index.ts index 603151e5ea..410fd7c7a6 100644 --- a/src/schemas/uncategorised/index.ts +++ b/src/schemas/uncategorised/index.ts @@ -15,6 +15,7 @@ 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"; @@ -23,6 +24,7 @@ export * from "./BackupCodesChallengeSchema"; export * from "./BanCreateSchema"; export * from "./BanModeratorSchema"; export * from "./BanRegistrySchema"; +export * from "./BillingPaymentGateway"; export * from "./BotModifySchema"; export * from "./BulkBanSchema"; export * from "./BulkDeleteSchema"; @@ -47,6 +49,7 @@ export * from "./GuildUpdateSchema"; export * from "./GuildUpdateWelcomeScreenSchema"; export * from "./HubWaitlistSignupSchema"; export * from "./InviteCreateSchema"; +export * from "./LocalizedStringSchema"; export * from "./LoginResponse"; export * from "./LoginSchema"; export * from "./MemberChangeProfileSchema"; @@ -63,8 +66,8 @@ export * from "./PruneSchema"; export * from "./PurgeSchema"; export * from "./RefreshUrlsRequestSchema"; export * from "./RegisterSchema"; -export * from "./RelationshipPostSchema"; export * from "./RelationshipPatchSchema"; +export * from "./RelationshipPostSchema"; export * from "./RelationshipPutSchema"; export * from "./RequestGuildMembersSchema"; export * from "./RoleModifySchema"; diff --git a/src/util/entities/Application.ts b/src/util/entities/Application.ts index e00b4a9880..014361bca9 100644 --- a/src/util/entities/Application.ts +++ b/src/util/entities/Application.ts @@ -21,6 +21,22 @@ import { BaseClass } from "./BaseClass"; import { Team } from "./Team"; import { User } from "./User"; import { Guild } from "./Guild"; +import { + ApplicationApprovableConsoleType, + ApplicationCompanySchema, + ApplicationDiscoverabilityState, + ApplicationEventWebhooksStatus, + ApplicationEventWebhooksType, + ApplicationExecutableSchema, + ApplicationGuildRestriction, + ApplicationIntegrationTypeConfigurationSchema, + ApplicationInteractionsVersion, + ApplicationMonetizationState, + ApplicationSKUSchema, + ApplicationVerificationState, + RPCApplicationState, + StoreApplicationState, +} from "@spacebar/schemas"; @Entity({ name: "applications", @@ -45,9 +61,11 @@ export class Application extends BaseClass { hook: boolean = true; @Column() + // deprecated bot_public?: boolean = true; @Column() + // deprecated bot_require_code_grant?: boolean = false; @Column() @@ -57,21 +75,21 @@ export class Application extends BaseClass { @ManyToOne(() => User, { onDelete: "CASCADE" }) owner: User; - // TODO: enum this? https://discord.com/developers/docs/resources/application#application-object-application-flags @Column() + // ApplicationFlags bitfield flags: number = 0; @Column({ type: "simple-array", nullable: true }) redirect_uris: string[] = []; - @Column({ nullable: true }) - rpc_application_state: number = 0; + @Column() + rpc_application_state: RPCApplicationState = RPCApplicationState.DISABLED; - @Column({ nullable: true }) - store_application_state: number = 1; + @Column() + store_application_state: StoreApplicationState = StoreApplicationState.NONE; - @Column({ nullable: true }) - verification_state: number = 1; + @Column() + verification_state: ApplicationVerificationState = ApplicationVerificationState.INELIGIBLE; @Column({ nullable: true }) interactions_endpoint_url?: string; @@ -83,10 +101,10 @@ export class Application extends BaseClass { integration_require_code_grant: boolean = false; @Column({ nullable: true }) - discoverability_state: number = 1; + discoverability_state: ApplicationDiscoverabilityState = ApplicationDiscoverabilityState.INELIGIBLE; @Column({ nullable: true }) - discovery_eligibility_flags: number = 2240; + discovery_eligibility_flags: number = 0; // ApplicationDiscoveryEligibilityFlags bitfield @JoinColumn({ name: "bot_user_id" }) @OneToOne(() => User, { onDelete: "CASCADE" }) @@ -118,16 +136,131 @@ export class Application extends BaseClass { @Column({ nullable: true }) custom_install_url?: string; - //just for us + @Column({ nullable: true }) + splash?: string; + + @Column({ nullable: true }) + primary_sku_id?: string; // if this application is a game sold, this field will be the id of the "Game SKU" that is created, + + @Column({ nullable: true }) + eula_id?: string; + + @Column({ nullable: true }) + slug?: string; // if this application is a game sold, this field will be the URL slug that links to the store page + + @Column({ type: "simple-array", nullable: true }) + aliases?: string[]; + + @Column({ type: "simple-json", nullable: true }) + executables?: ApplicationExecutableSchema[]; + + @Column({ type: "simple-json", nullable: true }) + third_party_skus?: ApplicationSKUSchema[]; + + @Column({ nullable: true }) + overlay?: boolean = false; + + @Column({ nullable: true }) + overlay_methods?: number; // only one right now is 1 << 0 OUT_OF_PROCESS + + @Column({ nullable: true }) + overlay_warn?: boolean = false; + + @Column({ nullable: true }) + overlay_compatibility_hook?: boolean = false; + + @Column({ type: "simple-json", nullable: true }) + developers?: ApplicationCompanySchema[]; + + @Column({ type: "simple-json", nullable: true }) + publishers?: ApplicationCompanySchema[]; + + @Column({ type: "simple-array", nullable: true }) + rpc_origins?: string[]; + + @Column({ nullable: true }) + deeplink_uri?: string; + + @Column({ nullable: true }) + bot_disabled?: boolean = false; + + @Column({ nullable: true }) + bot_quarantined?: boolean = false; + + @Column({ nullable: true }) + bot_approximate_guild_count?: number; + + @Column({ nullable: true }) + approximate_guild_count?: number; + + @Column({ nullable: true }) + approximate_user_install_count?: number; + + @Column({ nullable: true }) + approximate_user_authorization_count?: number; + + @Column({ nullable: true }) + internal_guild_restriction?: ApplicationGuildRestriction; + + @Column({ nullable: true, type: "text" }) + role_connections_verification_url: string | null = null; + + @Column() + interactions_version: ApplicationInteractionsVersion = ApplicationInteractionsVersion.VERSION_1; - //@Column({ type: "simple-array", nullable: true }) - //rpc_origins?: string[]; + @Column({ type: "simple-array" }) + interactions_event_types: ApplicationEventWebhooksType[] = []; + + @Column({ nullable: true }) + event_webhooks_status?: ApplicationEventWebhooksStatus; + + @Column({ nullable: true }) + event_webhooks_url?: string; + + @Column({ type: "simple-array", nullable: true }) + event_webhooks_types?: ApplicationEventWebhooksType[]; + + @Column() + explicit_content_filter: number = 0; // Inherits the guild's explicit content filter + + @Column({ type: "simple-json", nullable: true }) + integration_types_config?: Record; + + @Column({ nullable: true }) + connection_entrypoint_url?: string; + + @Column() + is_verified: boolean = false; + + @Column() + creator_monetization_state: number = 0; // unknown values + + @Column() + is_discoverable: boolean = false; + + @Column() + is_monetized: boolean = false; + + @Column() + storefront_available: boolean = false; + + @Column() + monetization_state: ApplicationMonetizationState = ApplicationMonetizationState.NONE; + + @Column({ nullable: true }) + monetization_eligibility_flags?: number = 0; // ApplicationMonetizationEligibilityFlags + + @Column({ nullable: true }) + max_participants?: number; // max participants for embedded applications, -1 for unlimited + + @Column({ type: "simple-json", nullable: true }) + embedded_activity_config?: object; // dont feel like making types for this rn - //@Column({ nullable: true }) - //primary_sku_id?: string; // if this application is a game sold, this field will be the id of the "Game SKU" that is created, + @Column({ type: "simple-array" }) + approved_consoles: ApplicationApprovableConsoleType[] = []; - //@Column({ nullable: true }) - //slug?: string; // if this application is a game sold, this field will be the URL slug that links to the store page + // @Column() + // pricing_localization_strategy: string; @JoinColumn({ name: "team_id" }) @ManyToOne(() => Team, { diff --git a/src/util/entities/SKU.ts b/src/util/entities/SKU.ts new file mode 100644 index 0000000000..e615ed0888 --- /dev/null +++ b/src/util/entities/SKU.ts @@ -0,0 +1,225 @@ +/* + 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 { BaseEntity, Column, Entity, JoinColumn, ManyToOne, OneToMany, Unique } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { User } from "./User"; +import { Application } from "./Application"; +import { + BillingPaymentGateway, + CreateSKUSchema, + LocalizedStringSchema, + SKUAccessType, + SKUContentRatingAgency, + SKUContentRatingSchema, + SKUExternalSKUStrategySchema, + SKUFeature, + SKUGenre, + SKUOperatingSystem, + SKUPriceSchema, + SKUProductLine, + SKUSystemRequirementsSchema, + SKUTenantMetadataSchema, + SKUType, +} from "@spacebar/schemas"; +import { SKUGuildPowerupMetadataSchema } from "../../schemas/api/store/SKUGuildPowerupMetadataSchema"; +import { slugify } from "../util"; + +@Entity({ + name: "skus", +}) +export class SKU extends BaseClass { + @Column() + type: SKUType; + + @Column() + application_id: string; + + @JoinColumn({ name: "application_id" }) + @ManyToOne(() => Application, { onDelete: "CASCADE" }) + application: Application; + + @Column() + product_line: SKUProductLine; + + @Column() + product_id?: string; + + @Column({ type: "bigint" }) + flags: number = 0; // SKUFlags + + @Column({ type: "simple-json" }) + name: LocalizedStringSchema; + + @Column({ nullable: true, type: "simple-json" }) + summary?: LocalizedStringSchema; + + @Column({ nullable: true, type: "simple-json" }) + description?: LocalizedStringSchema; + + @Column({ nullable: true, type: "simple-json" }) + legal_notice?: LocalizedStringSchema; + + @Column() + slug: string; + + @Column({ nullable: true }) + thumbnail_asset_id?: string; + + @Column({ nullable: true, type: "text" }) + dependent_sku_id?: string | null; + + @JoinColumn({ name: "bundled_sku_ids" }) + @OneToMany(() => SKU, (sku: SKU) => sku.id, { + cascade: true, + orphanedRowAction: "delete", + onDelete: "CASCADE", + }) + bundled_skus?: SKU[]; + + @Column({ nullable: true, type: "simple-array" }) + bundled_sku_ids?: string[]; + + @Column() + access_type: SKUAccessType; + + @Column({ nullable: true, type: "simple-array" }) + manifest_labels?: string[] | null; + + @Column({ type: "simple-array" }) + features: SKUFeature[]; + + @Column({ nullable: true, type: "simple-array" }) + locales?: string[]; + + @Column({ nullable: true, type: "simple-array" }) + genres?: SKUGenre[]; + + @Column({ nullable: true, type: "simple-array" }) + available_regions?: string[]; + + @Column({ nullable: true, type: "simple-json" }) + // only for localized skus + content_rating?: SKUContentRatingSchema; + + @Column({ nullable: true, type: "simple-json" }) + // only for localized skus + content_rating_agency?: SKUContentRatingAgency; + + @Column({ nullable: true, type: "simple-json" }) + // only for unlocalized skus + content_ratings?: Record; + + @Column({ nullable: true, type: "simple-json" }) + system_requirements?: Record; + + @Column({ nullable: true, type: "simple-json" }) + // used for localized skus + price?: SKUPriceSchema | Record; // discord.food says map[string, integer] but i dont think thats true, its probably SKUPriceSchema + + @Column({ nullable: true }) + // used for unlocalized skus + price_tier?: number; + + @Column({ nullable: true }) + // used for unlocalized skus + sale_price_tier?: number; + + @Column({ nullable: true, type: "simple-json" }) + // used for localized skus + sale_price?: Record; // same here, discord.food says map[string, integer] which i dont believe + + @Column() + created_at: Date; + + @Column() + updated_at: Date; + + @Column({ nullable: true, type: Date }) + release_date?: Date | null; + + @Column({ nullable: true }) + preorder_approximate_release_date?: string; + + @Column({ nullable: true }) + preorder_released_at?: string; + + @Column({ nullable: true }) + external_purchase_url?: string; + + @Column({ nullable: true, type: "simple-json" }) + external_sku_strategies?: Record; + + @Column({ nullable: true, type: "simple-array" }) + eligible_payment_gateways?: BillingPaymentGateway[]; + + @Column() + premium: boolean; + + @Column() + show_age_gate: boolean; + + @Column({ nullable: true }) + // only for localized skus + restricted?: boolean; + + @Column({ nullable: true }) + exclusive?: boolean; + + @Column({ nullable: true, default: false }) + deleted?: boolean = false; + + @Column({ nullable: true, type: "simple-json" }) + tenant_metadata?: SKUTenantMetadataSchema; + + @Column({ nullable: true, type: "simple-json" }) + powerup_metadata?: SKUGuildPowerupMetadataSchema; + + static async createSku(data: CreateSKUSchema): Promise { + const n = { + ...data, + bundled_skus: undefined, + name: undefined, + slug: undefined, + }; + + // convert string to localized string or use as is + const name = typeof data.name === "string" ? { default: data.name } : data.name; + + const sku = await SKU.create({ + product_line: SKUProductLine.APPLICATION, + dependent_sku_id: null, + manifest_labels: null, + access_type: SKUAccessType.FULL, + features: [], + release_date: null, + premium: false, + flags: 0, + show_age_gate: false, + tenant_metadata: {}, + created_at: new Date(), + updated_at: new Date(), + ...n, + bundled_sku_ids: data.bundled_skus, + name, + slug: slugify(name.default), + }); + + return sku; + } +} diff --git a/src/util/entities/User.ts b/src/util/entities/User.ts index 84471e0d46..ba008e12d0 100644 --- a/src/util/entities/User.ts +++ b/src/util/entities/User.ts @@ -168,6 +168,9 @@ export class User extends BaseClass { @Column({ type: "simple-array", nullable: true }) badge_ids?: string[]; + @Column() + currency: number = 0; // virtual currency amount + // TODO: I don't like this method? validate() { if (this.discriminator) { diff --git a/src/util/entities/index.ts b/src/util/entities/index.ts index 0e67675a88..dcd91ba7f9 100644 --- a/src/util/entities/index.ts +++ b/src/util/entities/index.ts @@ -62,3 +62,4 @@ export * from "./UserSettingsProtos"; export * from "./ValidRegistrationTokens"; export * from "./VoiceState"; export * from "./Webhook"; +export * from "./SKU"; diff --git a/src/util/interfaces/Event.ts b/src/util/interfaces/Event.ts index d72a8e2138..97f4a3915a 100644 --- a/src/util/interfaces/Event.ts +++ b/src/util/interfaces/Event.ts @@ -38,7 +38,17 @@ import { Snowflake, } from "@spacebar/util"; import { JsonValue } from "@protobuf-ts/runtime"; -import { ApplicationCommand, GuildCreateResponse, PartialEmoji, PublicMember, PublicUser, PublicVoiceState, RelationshipType, UserPrivate } from "@spacebar/schemas"; +import { + ApplicationCommand, + GuildCreateResponse, + PartialEmoji, + PublicMember, + PublicUser, + PublicVoiceState, + QuestUserStatusSchema, + RelationshipType, + UserPrivate, +} from "@spacebar/schemas"; export interface Event { guild_id?: string; @@ -608,6 +618,13 @@ export interface GuildMemberListUpdate extends Event { }; } +export interface QuestsUserStatusUpdate extends Event { + event: "QUESTS_USER_STATUS_UPDATE"; + data: { + user_status: QuestUserStatusSchema; + }; +} + export type EventData = | InvalidatedEvent | ReadyEvent @@ -658,7 +675,8 @@ export type EventData = | InteractionFailureEvent | MessageAckEvent | RelationshipAddEvent - | RelationshipRemoveEvent; + | RelationshipRemoveEvent + | QuestsUserStatusUpdate; // located in collection events @@ -712,6 +730,7 @@ export enum EVENTEnum { ApplicationCommandUpdate = "APPLICATION_COMMAND_UPDATE", ApplicationCommandDelete = "APPLICATION_COMMAND_DELETE", SessionsReplace = "SESSIONS_REPLACE", + QuestsUserStatusUpdate = "QUESTS_USER_STATUS_UPDATE", } export type EVENT = @@ -775,6 +794,7 @@ export type EVENT = | "RELATIONSHIP_UPDATE" | "SESSIONS_REPLACE" | "USER_SETTINGS_PROTO_UPDATE" + | "QUESTS_USER_STATUS_UPDATE" | CUSTOMEVENTS; export type CUSTOMEVENTS = "INVALIDATED" | "RATELIMIT"; diff --git a/src/util/util/ApplicationDiscoveryEligibilityFlags.ts b/src/util/util/ApplicationDiscoveryEligibilityFlags.ts new file mode 100644 index 0000000000..acdf64401c --- /dev/null +++ b/src/util/util/ApplicationDiscoveryEligibilityFlags.ts @@ -0,0 +1,40 @@ +/* + 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 { BitField } from "./BitField"; + +export class ApplicationDiscoveryEligibilityFlags extends BitField { + static FLAGS = { + VERIFIED: BigInt(1) << BigInt(0), + TAG: BigInt(1) << BigInt(1), + DESCRIPTION: BigInt(1) << BigInt(2), + TERMS_OF_SERVICE: BigInt(1) << BigInt(3), + PRIVACY_POLICY: BigInt(1) << BigInt(4), + INSTALL_PARAMS: BigInt(1) << BigInt(5), + SAFE_NAME: BigInt(1) << BigInt(6), + SAFE_DESCRIPTION: BigInt(1) << BigInt(7), + APPROVED_COMMANDS: BigInt(1) << BigInt(8), + SUPPORT_GUILD: BigInt(1) << BigInt(9), + SAFE_COMMANDS: BigInt(1) << BigInt(10), + MFA: BigInt(1) << BigInt(11), + SAFE_DIRECTORY_OVERVIEW: BigInt(1) << BigInt(12), + SUPPORTED_LOCALES: BigInt(1) << BigInt(13), + SAFE_SHORT_DESCRIPTION: BigInt(1) << BigInt(14), + SAFE_ROLE_CONNECTIONS: BigInt(1) << BigInt(15), + }; +} diff --git a/src/util/util/ApplicationFlags.ts b/src/util/util/ApplicationFlags.ts new file mode 100644 index 0000000000..a158cf786a --- /dev/null +++ b/src/util/util/ApplicationFlags.ts @@ -0,0 +1,54 @@ +/* + 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 { BitField } from "./BitField"; + +export class ApplicationFlags extends BitField { + static FLAGS = { + EMBEDDED_RELEASED: BigInt(1) << BigInt(1), + MANAGED_EMOJI: BigInt(1) << BigInt(2), + EMBEDDED_IAP: BigInt(1) << BigInt(3), + GROUP_DM_CREATE: BigInt(1) << BigInt(4), + RPC_PRIVATE_BETA: BigInt(1) << BigInt(5), + AUTO_MODERATION_RULE_CREATE_BADGE: BigInt(1) << BigInt(6), + GAME_PROFILE_DISABLED: BigInt(1) << BigInt(7), + PUBLIC_OAUTH2_CLIENT: BigInt(1) << BigInt(8), + CONTEXTLESS_ACTIVITY: BigInt(1) << BigInt(9), + SOCIAL_LAYER_INTEGRATION_LIMITED: BigInt(1) << BigInt(10), + CLOUD_GAMING_DEMO: BigInt(1) << BigInt(11), + GATEWAY_PRESENCE: BigInt(1) << BigInt(12), + GATEWAY_PRESENCE_LIMITED: BigInt(1) << BigInt(13), + GATEWAY_GUILD_MEMBERS: BigInt(1) << BigInt(14), + GATEWAY_GUILD_MEMBERS_LIMITED: BigInt(1) << BigInt(15), + VERIFICATION_PENDING_GUILD_LIMIT: BigInt(1) << BigInt(16), + EMBEDDED: BigInt(1) << BigInt(17), + GATEWAY_MESSAGE_CONTENT: BigInt(1) << BigInt(18), + GATEWAY_MESSAGE_CONTENT_LIMITED: BigInt(1) << BigInt(19), + EMBEDDED_FIRST_PARTY: BigInt(1) << BigInt(20), + APPLICATION_COMMAND_MIGRATED: BigInt(1) << BigInt(21), + APPLICATION_COMMAND_BADGE: BigInt(1) << BigInt(23), + ACTIVE: BigInt(1) << BigInt(24), + ACTIVE_GRACE_PERIOD: BigInt(1) << BigInt(25), + IFRAME_MODAL: BigInt(1) << BigInt(26), + SOCIAL_LAYER_INTEGRATION: BigInt(1) << BigInt(27), + PROMOTED: BigInt(1) << BigInt(29), + PARTNER: BigInt(1) << BigInt(30), + PARENT: BigInt(1) << BigInt(33), + DISABLE_RELATIONSHIP_ACCESS: BigInt(1) << BigInt(34), + }; +} diff --git a/src/util/util/ApplicationMonetizationEligibilityFlags.ts b/src/util/util/ApplicationMonetizationEligibilityFlags.ts new file mode 100644 index 0000000000..1fb19bd290 --- /dev/null +++ b/src/util/util/ApplicationMonetizationEligibilityFlags.ts @@ -0,0 +1,43 @@ +/* + 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 { BitField } from "./BitField"; + +export class ApplicationMonetizationEligibilityFlags extends BitField { + static FLAGS = { + VERIFIED: BigInt(1) << BigInt(0), + HAS_TEAM: BigInt(1) << BigInt(1), + APPROVED_COMMANDS: BigInt(1) << BigInt(2), + TERMS_OF_SERVICE: BigInt(1) << BigInt(3), + PRIVACY_POLICY: BigInt(1) << BigInt(4), + SAFE_NAME: BigInt(1) << BigInt(5), + SAFE_DESCRIPTION: BigInt(1) << BigInt(6), + SAFE_ROLE_CONNECTIONS: BigInt(1) << BigInt(7), + USER_IS_TEAM_OWNER: BigInt(1) << BigInt(8), + NOT_QUARANTINED: BigInt(1) << BigInt(9), + USER_LOCALE_SUPPORTED: BigInt(1) << BigInt(10), + USER_AGE_SUPPORTED: BigInt(1) << BigInt(11), + USER_DATE_OF_BIRTH_DEFINED: BigInt(1) << BigInt(12), + USER_MFA_ENABLED: BigInt(1) << BigInt(13), + USER_EMAIL_VERIFIED: BigInt(1) << BigInt(14), + TEAM_MEMBERS_EMAIL_VERIFIED: BigInt(1) << BigInt(15), + TEAM_MEMBERS_MFA_ENABLED: BigInt(1) << BigInt(16), + NO_BLOCKING_ISSUES: BigInt(1) << BigInt(17), + VALID_PAYOUT_STATUS: BigInt(1) << BigInt(18), + }; +} diff --git a/src/util/util/EntitlementGiftCodeFlags.ts b/src/util/util/EntitlementGiftCodeFlags.ts new file mode 100644 index 0000000000..221e7136b8 --- /dev/null +++ b/src/util/util/EntitlementGiftCodeFlags.ts @@ -0,0 +1,10 @@ +import { BitField } from "./BitField"; + +export class EntitlementGiftCodeFlags extends BitField { + static FLAGS = { + PAYMENT_SOURCE_REQUIRED: BigInt(1) << BigInt(0), + EXISTING_SUBSCRIPTION_DISALLOWED: BigInt(1) << BigInt(1), + NOT_SELF_REDEEMABLE: BigInt(1) << BigInt(2), + PROMOTION: BigInt(1) << BigInt(3), + }; +} diff --git a/src/util/util/SKUFlags.ts b/src/util/util/SKUFlags.ts new file mode 100644 index 0000000000..a04807bebe --- /dev/null +++ b/src/util/util/SKUFlags.ts @@ -0,0 +1,18 @@ +import { BitField } from "./BitField"; + +export class SKUFlags extends BitField { + static FLAGS = { + PREMIUM_PURCHASE: BigInt(1) << BigInt(0), + HAS_FREE_PREMIUM_CONTENT: BigInt(1) << BigInt(1), + AVAILABLE: BigInt(1) << BigInt(2), + PREMIUM_AND_DISTRIBUTION: BigInt(1) << BigInt(3), + STICKER: BigInt(1) << BigInt(4), + GUILD_ROLE: BigInt(1) << BigInt(5), + AVAILABLE_FOR_SUBSCRIPTION_GIFTING: BigInt(1) << BigInt(6), + APPLICATION_GUILD_SUBSCRIPTION: BigInt(1) << BigInt(7), + APPLICATION_USER_SUBSCRIPTION: BigInt(1) << BigInt(8), + CREATOR_MONETIZATION: BigInt(1) << BigInt(9), + GUILD_PRODUCT: BigInt(1) << BigInt(10), + AVAILABLE_FOR_APPLICATION_GIFTING: BigInt(1) << BigInt(11), + }; +} diff --git a/src/util/util/index.ts b/src/util/util/index.ts index b2cfc568bf..0563888a87 100644 --- a/src/util/util/index.ts +++ b/src/util/util/index.ts @@ -54,3 +54,9 @@ export * from "../../schemas/HelperTypes"; export * from "./extensions"; export * from "./Random"; export * from "./Url"; +export * from "./SKUFlags"; +export * from "./EntitlementGiftCodeFlags"; +export * from "./slugify"; +export * from "./ApplicationDiscoveryEligibilityFlags"; +export * from "./ApplicationFlags"; +export * from "./ApplicationMonetizationEligibilityFlags"; diff --git a/src/util/util/slugify.ts b/src/util/util/slugify.ts new file mode 100644 index 0000000000..03f772fae6 --- /dev/null +++ b/src/util/util/slugify.ts @@ -0,0 +1,10 @@ +export function slugify(text: string): string { + // return as url friendly slug + return text + .toString() + .toLowerCase() + .trim() + .replace(/\s+/g, "-") + .replace(/[^\w\\-]+/g, "") + .replace(/\\-\\-+/g, "-"); +}