syntax = "proto3";

import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";

package discord_protos.discord_users.v1.PreloadedUserSettings;

message PreloadedUserSettings {
  message Versions {
    uint32 client_version = 1;
    uint32 server_version = 2;
    uint32 data_version = 3;
  }

  enum InboxTab {
    UNSPECIFIED = 0;
    MENTIONS = 1;
    UNREADS = 2;
    TODOS = 3;
    FOR_YOU = 4;
  }

  message InboxSettings {
    InboxTab current_tab = 1;
    bool viewed_tutorial = 2;
  }

  message ChannelSettings {
    bool collapsed_in_inbox = 1;
  }

  message GuildSettings {
    map<fixed64, ChannelSettings> channels = 1;
    uint32 hub_progress = 2;
    uint32 guild_onboarding_progress = 3;
    optional google.protobuf.Timestamp guild_recents_dismissed_at = 4;
    bytes dismissed_guild_content = 5;
  }

  message AllGuildSettings {
    map<fixed64, GuildSettings> guilds = 1;
  }

  message UserContentSettings {
    bytes dismissed_contents = 1;
    optional google.protobuf.StringValue last_dismissed_outbound_promotion_start_date = 2;
    optional google.protobuf.Timestamp premium_tier_0_modal_dismissed_at = 3;
  }

  message VideoFilterBackgroundBlur {
    bool use_blur = 1;
  }

  message VideoFilterAsset {
    fixed64 id = 1;
    string asset_hash = 2;
  }

  message SoundboardSettings {
    float volume = 1;
  }

  message VoiceAndVideoSettings {
    VideoFilterBackgroundBlur blur = 1;
    uint32 preset_option = 2;
    VideoFilterAsset custom_asset = 3;
    optional google.protobuf.BoolValue always_preview_video = 5;
    optional google.protobuf.UInt32Value afk_timeout = 6;
    optional google.protobuf.BoolValue stream_notifications_enabled = 7;
    optional google.protobuf.BoolValue native_phone_integration_enabled = 8;
    optional SoundboardSettings soundboard_settings = 9;
  }

  message TextAndImagesSettings {
    optional google.protobuf.StringValue diversity_surrogate = 1;
    optional google.protobuf.BoolValue use_rich_chat_input = 2;
    optional google.protobuf.BoolValue use_thread_sidebar = 3;
    optional google.protobuf.StringValue render_spoilers = 4;
    repeated string emoji_picker_collapsed_sections = 5;
    repeated string sticker_picker_collapsed_sections = 6;
    optional google.protobuf.BoolValue view_image_descriptions = 7;
    optional google.protobuf.BoolValue show_command_suggestions = 8;
    optional google.protobuf.BoolValue inline_attachment_media = 9;
    optional google.protobuf.BoolValue inline_embed_media = 10;
    optional google.protobuf.BoolValue gif_auto_play = 11;
    optional google.protobuf.BoolValue render_embeds = 12;
    optional google.protobuf.BoolValue render_reactions = 13;
    optional google.protobuf.BoolValue animate_emoji = 14;
    optional google.protobuf.UInt32Value animate_stickers = 15;
    optional google.protobuf.BoolValue enable_tts_command = 16;
    optional google.protobuf.BoolValue message_display_compact = 17;
    optional google.protobuf.UInt32Value explicit_content_filter = 19;
    optional google.protobuf.BoolValue view_nsfw_guilds = 20;
    optional google.protobuf.BoolValue convert_emoticons = 21;
    optional google.protobuf.BoolValue expression_suggestions_enabled = 22;
    optional google.protobuf.BoolValue view_nsfw_commands = 23;
    optional google.protobuf.BoolValue use_legacy_chat_input = 24;
  }

  message NotificationSettings {
    optional google.protobuf.BoolValue show_in_app_notifications = 1;
    optional google.protobuf.BoolValue notify_friends_on_go_live = 2;
    fixed64 notification_center_acked_before_id = 3;
  }

  enum GuildActivityStatusRestrictionDefault {
    OFF = 0;
    ON_FOR_LARGE_GUILDS = 1;
  }

  message PrivacySettings {
    optional google.protobuf.BoolValue allow_activity_party_privacy_friends = 1;
    optional google.protobuf.BoolValue allow_activity_party_privacy_voice_channel = 2;
    repeated fixed64 restricted_guild_ids = 3;
    bool default_guilds_restricted = 4;
    bool allow_accessibility_detection = 7;
    optional google.protobuf.BoolValue detect_platform_accounts = 8;
    optional google.protobuf.BoolValue passwordless = 9;
    optional google.protobuf.BoolValue contact_sync_enabled = 10;
    optional google.protobuf.UInt32Value friend_source_flags = 11;
    optional google.protobuf.UInt32Value friend_discovery_flags = 12;
    repeated fixed64 activity_restricted_guild_ids = 13;
    GuildActivityStatusRestrictionDefault default_guilds_activity_restricted = 14;
    repeated fixed64 activity_joining_restricted_guild_ids = 15;
    repeated fixed64 message_request_restricted_guild_ids = 16;
    optional google.protobuf.BoolValue default_message_request_restricted = 17;
    optional google.protobuf.BoolValue drops_opted_out = 18;
    optional google.protobuf.BoolValue non_spam_retraining_opt_in = 19;
  }

  message DebugSettings {
    optional google.protobuf.BoolValue rtc_panel_show_voice_states = 1;
  }

  message GameLibrarySettings {
    optional google.protobuf.BoolValue install_shortcut_desktop = 1;
    optional google.protobuf.BoolValue install_shortcut_start_menu = 2;
    optional google.protobuf.BoolValue disable_games_tab = 3;
  }

  message CustomStatus {
    string text = 1;
    fixed64 emoji_id = 2;
    string emoji_name = 3;
    fixed64 expires_at_ms = 4;
  }

  message StatusSettings {
    optional google.protobuf.StringValue status = 1;
    optional CustomStatus custom_status = 2;
    optional google.protobuf.BoolValue show_current_game = 3;
  }

  message LocalizationSettings {
    optional google.protobuf.StringValue locale = 1;
    optional google.protobuf.Int32Value timezone_offset = 2;
  }

  enum Theme {
    UNSET = 0;
    DARK = 1;
    LIGHT = 2;
  }

  message ClientThemeSettings {
    optional google.protobuf.UInt64Value primary_color = 1;
    optional google.protobuf.UInt32Value background_gradient_preset_id = 2;
    optional google.protobuf.FloatValue background_gradient_angle = 3;
  }

  message AppearanceSettings {
    Theme theme = 1;
    bool developer_mode = 2;
    optional ClientThemeSettings client_theme_settings = 3;
    bool mobile_redesign_disabled = 4;
  }

  message GuildFolder {
    repeated fixed64 guild_ids = 1;
    optional google.protobuf.Int64Value id = 2;
    optional google.protobuf.StringValue name = 3;
    optional google.protobuf.UInt64Value color = 4;
  }

  message GuildFolders {
    repeated GuildFolder folders = 1;
    repeated fixed64 guild_positions = 2;
  }

  enum FavoriteChannelType {
    UNSET_FAVORITE_CHANNEL_TYPE = 0;
    REFERENCE_ORIGINAL = 1;
    CATEGORY = 2;
  }

  message FavoriteChannel {
    string nickname = 1;
    FavoriteChannelType type = 2;
    uint32 position = 3;
    fixed64 parent_id = 4;
  }

  message Favorites {
    map<fixed64, FavoriteChannel> favorite_channels = 1;
    bool muted = 2;
  }

  message AudioContextSetting {
    bool muted = 1;
    float volume = 2;
    fixed64 modified_at = 3;
  }

  message AudioSettings {
    map<fixed64, AudioContextSetting> user = 1;
    map<fixed64, AudioContextSetting> stream = 2;
  }

  message CommunitiesSettings {
    optional google.protobuf.BoolValue disable_home_auto_nav = 1;
  }

  optional Versions versions = 1;
  optional InboxSettings inbox = 2;
  optional AllGuildSettings guilds = 3;
  optional UserContentSettings user_content = 4;
  optional VoiceAndVideoSettings voice_and_video = 5;
  optional TextAndImagesSettings text_and_images = 6;
  optional NotificationSettings notifications = 7;
  optional PrivacySettings privacy = 8;
  optional DebugSettings debug = 9;
  optional GameLibrarySettings game_library = 10;
  optional StatusSettings status = 11;
  optional LocalizationSettings localization = 12;
  optional AppearanceSettings appearance = 13;
  optional GuildFolders guild_folders = 14;
  optional Favorites favorites = 15;
  optional AudioSettings audio_context_settings = 16;
  optional CommunitiesSettings communities = 17;
}
