2154 lines
No EOL
55 KiB
JavaScript
Executable file
2154 lines
No EOL
55 KiB
JavaScript
Executable file
/* @flow */
|
|
/* eslint-disable max-len */
|
|
|
|
import keyMirror from 'keymirror';
|
|
import {parse} from 'url';
|
|
import * as ConstantsIOS from './Constants.ios';
|
|
import * as ConstantsCommon from '../discord_common/js/Constants';
|
|
|
|
export const API_HOST = parse(process.env.API_ENDPOINT, false, true).host || 'localhost';
|
|
|
|
export const ActionTypes = keyMirror({
|
|
USER_UPDATE: null,
|
|
|
|
LOAD_REGIONS: null,
|
|
|
|
PREFETCH_MESSAGES: null,
|
|
LOAD_MESSAGES: null,
|
|
LOAD_MESSAGES_SUCCESS: null,
|
|
LOAD_MESSAGES_FAILURE: null,
|
|
LOAD_MESSAGES_SUCCESS_CACHED: null,
|
|
TRUNCATE_MESSAGES: null,
|
|
|
|
LOAD_MESSAGES_AROUND_SUCCESS: null,
|
|
CLEAR_MESSAGES_AROUND_SUCCESS: null,
|
|
|
|
MESSAGE_CREATE: null,
|
|
MESSAGE_SEND_FAILED: null,
|
|
MESSAGE_UPDATE: null,
|
|
MESSAGE_START_EDIT: null,
|
|
MESSAGE_END_EDIT: null,
|
|
MESSAGE_DELETE: null,
|
|
MESSAGE_DELETE_BULK: null,
|
|
MESSAGE_ACK: null,
|
|
MESSAGE_REVEAL: null,
|
|
RECENT_MENTION_DELETE: null,
|
|
|
|
MESSAGE_REACTION_ADD: null,
|
|
MESSAGE_REACTION_ADD_USERS: null,
|
|
MESSAGE_REACTION_REMOVE: null,
|
|
MESSAGE_REACTION_REMOVE_ALL: null,
|
|
|
|
CHANNEL_PINS_ACK: null,
|
|
CHANNEL_PINS_UPDATE: null,
|
|
|
|
RELATIONSHIP_ADD: null,
|
|
RELATIONSHIP_REMOVE: null,
|
|
|
|
LOAD_RELATIONSHIPS_SUCCESS: null,
|
|
LOAD_RELATIONSHIPS_FAILURE: null,
|
|
|
|
LOAD_FRIEND_SUGGESTIONS_SUCCESS: null,
|
|
LOAD_FRIEND_SUGGESTIONS_FAILURE: null,
|
|
|
|
FRIEND_SUGGESTION_CREATE: null,
|
|
FRIEND_SUGGESTION_DELETE: null,
|
|
|
|
FRIENDS_SET_SECTION: null,
|
|
|
|
GUILD_UNAVAILABLE: null,
|
|
|
|
GUILD_CREATE: null,
|
|
GUILD_UPDATE: null,
|
|
GUILD_DELETE: null,
|
|
GUILD_EMOJIS_UPDATE: null,
|
|
GUILD_SYNC: null,
|
|
|
|
EMOJI_DIVERSITY_COLOR_CHANGE: null,
|
|
|
|
EMOJI_UPLOAD_START: null,
|
|
EMOJI_UPLOAD_STOP: null,
|
|
EMOJI_FETCH: null,
|
|
EMOJI_FETCH_SUCCESS: null,
|
|
EMOJI_FETCH_FAILURE: null,
|
|
EMOJI_DELETE: null,
|
|
|
|
GUILD_SYNC_ADD: null,
|
|
GUILD_SELECT: null,
|
|
GUILD_MOVE: null,
|
|
|
|
DELAYED_GUILD_SELECT: null,
|
|
DELAYED_CHANNEL_SELECT: null,
|
|
DELAYED_SELECT_FLUSH: null,
|
|
|
|
GUILD_MEMBERS_REQUEST: null,
|
|
GUILD_MEMBERS_CHUNK: null,
|
|
GUILD_ACK: null,
|
|
|
|
CHANGE_LOG_OPEN: null,
|
|
CHANGE_LOG_CLOSE: null,
|
|
|
|
CHANNEL_CREATE: null,
|
|
CHANNEL_UPDATE: null,
|
|
CHANNEL_DELETE: null,
|
|
CHANNEL_SELECT: null,
|
|
CHANNEL_ACK: null,
|
|
CHANNEL_LOCAL_ACK: null,
|
|
CHANNEL_COLLAPSE: null,
|
|
CHANNEL_COLLAPSE_MUTED: null,
|
|
CHANNEL_TOGGLE_SECTION: null,
|
|
CHANNEL_RECIPIENT_ADD: null,
|
|
CHANNEL_RECIPIENT_REMOVE: null,
|
|
GUILD_NSFW_AGREE: null,
|
|
|
|
LOAD_PINNED_MESSAGES: null,
|
|
LOAD_PINNED_MESSAGES_SUCCESS: null,
|
|
LOAD_PINNED_MESSAGES_FAILURE: null,
|
|
|
|
VOICE_CHANNEL_SELECT: null,
|
|
VOICE_CHANNEL_CLEAR: null,
|
|
|
|
ACTIVITY_START: null,
|
|
|
|
TYPING_START: null,
|
|
TYPING_STOP: null,
|
|
|
|
EXPERIMENT_TRIGGER: null,
|
|
EXPERIMENT_REGISTER: null,
|
|
EXPERIMENT_OVERRIDE_TYPE: null,
|
|
EXPERIMENT_OVERRIDE_BUCKET: null,
|
|
EXPERIMENTS_FETCH_SUCCESS: null,
|
|
|
|
USER_AUTHORIZED_APPS_UPDATE: null,
|
|
RPC_APP_CONNECTED: null,
|
|
RPC_APP_DISCONNECTED: null,
|
|
RPC_NOTIFICATION_CREATE: null,
|
|
|
|
NEW_USER_FLOW_SET_STEP: null,
|
|
NEW_USER_FLOW_ADVANCE_STEP: null,
|
|
NEW_USER_FLOW_SKIP: null,
|
|
NEW_USER_FLOW_ACCOUNT_SUBMITTED: null,
|
|
NEW_USER_FLOW_ACCOUNT_UPDATE: null,
|
|
NEW_USER_FLOW_ACCOUNT_FAILURE: null,
|
|
NEW_USER_FLOW_ACCOUNT_SUCCESS: null,
|
|
NEW_USER_FLOW_GUILD_UPDATE: null,
|
|
NEW_USER_FLOW_GUILD_CREATED: null,
|
|
NEW_USER_FLOW_GUILD_SUBMITTED: null,
|
|
NEW_USER_FLOW_GUILD_FAILURE: null,
|
|
NEW_USER_FLOW_MIC_TEST_START: null,
|
|
NEW_USER_FLOW_MIC_TEST_STOP: null,
|
|
NEW_USER_FLOW_SELECT_MIC_INPUT: null,
|
|
|
|
START_SESSION: null,
|
|
LOGIN: null,
|
|
LOGIN_SUCCESS: null,
|
|
LOGIN_FAILURE: null,
|
|
LOGIN_MFA: null,
|
|
LOGIN_MFA_STEP: null,
|
|
LOGIN_MFA_FAILURE: null,
|
|
LOGIN_RESET: null,
|
|
FINGERPRINT: null,
|
|
REGISTER: null,
|
|
REGISTER_SUCCESS: null,
|
|
REGISTER_FAILURE: null,
|
|
VERIFY_SUCCESS: null,
|
|
VERIFY_FAILURE: null,
|
|
FORGOT_PASSWORD_SENT: null,
|
|
LOGOUT: null,
|
|
UPDATE_TOKEN: null,
|
|
MFA_ENABLE_SUCCESS: null,
|
|
MFA_DISABLE_SUCCESS: null,
|
|
MFA_VIEW_BACKUP_CODES: null,
|
|
MFA_CLEAR_BACKUP_CODES: null,
|
|
OAUTH2_TOKEN_REVOKE: null,
|
|
|
|
MODAL_PUSH: null,
|
|
MODAL_UPDATE: null,
|
|
MODAL_POP: null,
|
|
|
|
POST_CONNECTION_PENDING_CALLBACK: null,
|
|
|
|
POPOUT_OPEN: null,
|
|
POPOUT_CLOSE: null,
|
|
POPOUT_CLOSE_ALL: null,
|
|
POPOUT_NEEDS_RERENDER: null,
|
|
POPOUT_DID_RERENDER: null,
|
|
|
|
CONTEXT_MENU_OPEN: null,
|
|
CONTEXT_MENU_CLOSE: null,
|
|
|
|
TOOLTIP_SHOW: null,
|
|
TOOLTIP_HIDE: null,
|
|
|
|
TUTORIAL_INDICATOR_SHOW: null,
|
|
TUTORIAL_INDICATOR_HIDE: null,
|
|
TUTORIAL_INDICATOR_DISMISS: null,
|
|
TUTORIAL_INDICATOR_SUPPRESS_ALL: null,
|
|
|
|
UPLOAD_QUEUE: null,
|
|
UPLOAD_START: null,
|
|
UPLOAD_PROGRESS: null,
|
|
UPLOAD_COMPLETE: null,
|
|
UPLOAD_FAIL: null,
|
|
|
|
UPDATE_CHANNEL_DIMENSIONS: null,
|
|
UPDATE_CHANNEL_LIST_DIMENSIONS: null,
|
|
UPDATE_GUILD_LIST_DIMENSIONS: null,
|
|
|
|
CONNECTION_OPEN: null,
|
|
CONNECTION_RESUMED: null,
|
|
CONNECTION_CLOSED: null,
|
|
|
|
WINDOW_FOCUS: null,
|
|
WINDOW_RESIZED: null,
|
|
|
|
PRESENCE_UPDATE: null,
|
|
PRESENCES_REPLACE: null,
|
|
|
|
VOICE_STATE_UPDATE: null,
|
|
|
|
VOICE_SERVER_UPDATE: null,
|
|
|
|
SPEAKING: null,
|
|
|
|
AUDIO_SET_TEMPORARY_SELF_MUTE: null,
|
|
AUDIO_TOGGLE_SELF_MUTE: null,
|
|
AUDIO_TOGGLE_SELF_DEAF: null,
|
|
AUDIO_TOGGLE_LOCAL_MUTE: null,
|
|
AUDIO_TOGGLE_MUTE: null,
|
|
AUDIO_TOGGLE_DEAF: null,
|
|
AUDIO_ENABLE: null,
|
|
AUDIO_SET_MODE: null,
|
|
AUDIO_SET_INPUT_VOLUME: null,
|
|
AUDIO_SET_OUTPUT_VOLUME: null,
|
|
AUDIO_SET_LOCAL_VOLUME: null,
|
|
AUDIO_SET_LOCAL_PAN: null,
|
|
AUDIO_SET_INPUT_DEVICE: null,
|
|
AUDIO_SET_OUTPUT_DEVICE: null,
|
|
MEDIA_ENGINE_SET_VIDEO_DEVICE: null,
|
|
AUDIO_SET_ECHO_CANCELLATION: null,
|
|
AUDIO_SET_NOISE_SUPPRESSION: null,
|
|
AUDIO_SET_AUTOMATIC_GAIN_CONTROL: null,
|
|
AUDIO_SET_DISPLAY_SILENCE_WARNING: null,
|
|
AUDIO_SET_ATTENUATION: null,
|
|
AUDIO_SET_QOS: null,
|
|
MEDIA_ENGINE_DEVICES: null,
|
|
AUDIO_VOLUME_CHANGE: null,
|
|
AUDIO_RESET: null,
|
|
AUDIO_INPUT_DETECTED: null,
|
|
AUDIO_SWITCH_SUBSYSTEM: null,
|
|
AUDIO_SET_CURRENT_APP: null,
|
|
SET_MEDIA_ENGINE: null,
|
|
MEDIA_ENGINE_SET_VIDEO_ENABLED: null,
|
|
MEDIA_ENGINE_SET_DESKTOP_SOURCE: null,
|
|
|
|
USER_SETTINGS_UPDATE: null,
|
|
|
|
USER_REQUIRED_ACTION_UPDATE: null,
|
|
|
|
USER_CONNECTIONS_UPDATE: null,
|
|
USER_CONNECTIONS_INTEGRATION_JOINING: null,
|
|
|
|
LOAD_RECENT_MENTIONS: null,
|
|
LOAD_RECENT_MENTIONS_SUCCESS: null,
|
|
LOAD_RECENT_MENTIONS_FAILURE: null,
|
|
SET_RECENT_MENTIONS_FILTER: null,
|
|
TRUNCATE_MENTIONS: null,
|
|
|
|
USER_NOTE_UPDATE: null,
|
|
|
|
KEYBINDS_ADD_KEYBIND: null,
|
|
KEYBINDS_SET_KEYBIND: null,
|
|
KEYBINDS_DELETE_KEYBIND: null,
|
|
KEYBINDS_ENABLE_ALL_KEYBINDS: null,
|
|
|
|
NOTIFICATIONS_SET_DESKTOP_TYPE: null,
|
|
NOTIFICATIONS_SET_TTS_TYPE: null,
|
|
NOTIFICATIONS_SET_DISABLED_SOUNDS: null,
|
|
NOTIFICATIONS_SET_DISABLE_UNREAD_BADGE: null,
|
|
NOTIFICATIONS_SET_PERMISSION_STATE: null,
|
|
NOTIFICATION_CREATE: null,
|
|
NOTIFICATION_CLICK: null,
|
|
|
|
NOTICE_SHOW: null,
|
|
NOTICE_DISMISS: null,
|
|
|
|
RTC_CONNECTION_STATE: null,
|
|
RTC_CONNECTION_VIDEO: null,
|
|
RTC_CONNECTION_PING: null,
|
|
|
|
IN_PROGRESS_TEXT_SAVE: null,
|
|
IN_PROGRESS_TEXT_CHANGE: null,
|
|
|
|
INVITE_RESOLVE: null,
|
|
INVITE_RESOLVE_SUCCESS: null,
|
|
INVITE_RESOLVE_FAILURE: null,
|
|
INVITE_ACCEPT: null,
|
|
INVITE_ACCEPT_SUCCESS: null,
|
|
INVITE_ACCEPT_FAILURE: null,
|
|
INVITE_APP_OPENING: null,
|
|
INVITE_APP_OPENED: null,
|
|
INVITE_APP_NOT_OPENED: null,
|
|
INVITE_NATIVE_APP_MODAL_OPENING: null,
|
|
INVITE_NATIVE_APP_MODAL_OPENED: null,
|
|
INVITE_NATIVE_APP_MODAL_OPEN_FAILED: null,
|
|
|
|
GUILD_BAN_ADD: null,
|
|
GUILD_BAN_REMOVE: null,
|
|
|
|
GUILD_MEMBER_ADD: null,
|
|
GUILD_MEMBER_UPDATE: null,
|
|
GUILD_MEMBER_REMOVE: null,
|
|
|
|
GUILD_ROLE_CREATE: null,
|
|
GUILD_ROLE_UPDATE: null,
|
|
GUILD_ROLE_DELETE: null,
|
|
|
|
GUILD_INTEGRATIONS_UPDATE: null,
|
|
|
|
FEATURED_HELP_ARTICLES: null,
|
|
|
|
CHECKING_FOR_UPDATES: null,
|
|
UPDATE_NOT_AVAILABLE: null,
|
|
UPDATE_AVAILABLE: null,
|
|
UPDATE_ERROR: null,
|
|
UPDATE_DOWNLOADED: null,
|
|
UPDATE_MANUALLY: null,
|
|
|
|
RUNNING_GAMES_CHANGE: null,
|
|
RUNNING_STREAMER_TOOLS_CHANGE: null,
|
|
CANDIDATE_GAMES_CHANGE: null,
|
|
OVERLAY_GAMES_CHANGE: null,
|
|
OVERLAY_INSTALL_PROGRESS: null,
|
|
|
|
IDLE: null,
|
|
AFK: null,
|
|
|
|
PERMISSION_CLEAR_VAD_WARNING: null,
|
|
PERMISSION_CLEAR_SUPPRESS_WARNING: null,
|
|
PERMISSION_CLEAR_PTT_ADMIN_WARNING: null,
|
|
|
|
INSTANT_INVITE_CREATE: null,
|
|
INSTANT_INVITE_CREATE_SUCCESS: null,
|
|
INSTANT_INVITE_CREATE_FAILURE: null,
|
|
|
|
INSTANT_INVITE_REVOKE_SUCCESS: null,
|
|
|
|
INTEGRATION_QUERY: null,
|
|
INTEGRATION_QUERY_SUCCESS: null,
|
|
INTEGRATION_QUERY_FAILURE: null,
|
|
|
|
OVERLAY_SET_ENABLED: null,
|
|
OVERLAY_SELECT_GUILD: null,
|
|
OVERLAY_SELECT_CALL: null,
|
|
OVERLAY_OPEN_USER_POPOUT: null,
|
|
OVERLAY_SET_DISPLAY_NAME_MODE: null,
|
|
OVERLAY_SET_DISPLAY_USER_MODE: null,
|
|
OVERLAY_SET_AVATAR_SIZE_MODE: null,
|
|
OVERLAY_SET_POSITION: null,
|
|
OVERLAY_SET_LOCKED: null,
|
|
|
|
USER_GUILD_SETTINGS_UPDATE: null,
|
|
|
|
STREAMER_MODE_UPDATE: null,
|
|
STREAMING_UPDATE: null,
|
|
|
|
PLATFORM_ACCOUNTS_DETECTING: null,
|
|
PLATFORM_ACCOUNTS_DETECTED: null,
|
|
PLATFORM_ACCOUNTS_IGNORE: null,
|
|
DETECTED_PLATFORM_ACCOUNTS_DISPLAY_TYPE_CHANGE: null,
|
|
|
|
// Custom Modals
|
|
|
|
USER_SETTINGS_MODAL_OPEN: null,
|
|
USER_SETTINGS_MODAL_INIT: null,
|
|
USER_SETTINGS_MODAL_CLOSE: null,
|
|
USER_SETTINGS_MODAL_SUBMIT: null,
|
|
USER_SETTINGS_MODAL_SUBMIT_FAILURE: null,
|
|
USER_SETTINGS_MODAL_SET_SECTION: null,
|
|
USER_SETTINGS_MODAL_UPDATE_ACCOUNT: null,
|
|
USER_SETTINGS_MODAL_UPDATE_AUTHORIZED_APPS: null,
|
|
|
|
USER_SETTINGS_ACCOUNT_INIT: null,
|
|
USER_SETTINGS_ACCOUNT_CLOSE: null,
|
|
USER_SETTINGS_ACCOUNT_TOGGLE_EDITING_PROFILE: null,
|
|
USER_SETTINGS_ACCOUNT_TOGGLE_EDITING_PASSWORD: null,
|
|
USER_SETTINGS_ACCOUNT_UPDATE_INFO: null,
|
|
USER_SETTINGS_ACCOUNT_SUBMIT: null,
|
|
USER_SETTINGS_ACCOUNT_SUBMIT_SUCCESS: null,
|
|
USER_SETTINGS_ACCOUNT_SUBMIT_FAILURE: null,
|
|
|
|
CREATE_GUILD_MODAL_OPEN: null,
|
|
CREATE_GUILD_MODAL_SET_SCREEN: null,
|
|
CREATE_GUILD_MODAL_UPDATE: null,
|
|
CREATE_GUILD_MODAL_CLOSE: null,
|
|
CREATE_GUILD_MODAL_SUBMIT: null,
|
|
CREATE_GUILD_MODAL_SUBMIT_FAILURE: null,
|
|
JOIN_GUILD_MODAL: null,
|
|
|
|
GUILD_SETTINGS_INIT: null,
|
|
GUILD_SETTINGS_OPEN: null,
|
|
GUILD_SETTINGS_CLOSE: null,
|
|
GUILD_SETTINGS_UPDATE: null,
|
|
GUILD_SETTINGS_CANCEL_CHANGES: null,
|
|
GUILD_SETTINGS_SUBMIT: null,
|
|
GUILD_SETTINGS_SUBMIT_SUCCESS: null,
|
|
GUILD_SETTINGS_SUBMIT_FAILURE: null,
|
|
GUILD_SETTINGS_SET_SECTION: null,
|
|
GUILD_SETTINGS_SET_SEARCH_QUERY: null,
|
|
GUILD_SETTINGS_LOADED_BANS: null,
|
|
GUILD_SETTINGS_LOADED_INVITES: null,
|
|
GUILD_SETTINGS_LOADED_INTEGATIONS: null,
|
|
GUILD_SETTINGS_ROLE_SELECT: null,
|
|
GUILD_SETTINGS_SET_EMBED: null,
|
|
GUILD_SETTINGS_SET_VANITY_URL: null,
|
|
GUILD_SETTINGS_SET_MFA_SUCCESS: null,
|
|
|
|
GUILD_SETTINGS_VANITY_URL_CLOSE: null,
|
|
GUILD_SETTINGS_VANITY_URL_RESET: null,
|
|
GUILD_SETTINGS_VANITY_URL_SET: null,
|
|
GUILD_SETTINGS_VANITY_URL_ERROR: null,
|
|
|
|
GUILD_SETTINGS_ROLES_INIT: null,
|
|
GUILD_SETTINGS_ROLES_SORT_UPDATE: null,
|
|
GUILD_SETTINGS_ROLES_UPDATE_PERMISSIONS: null,
|
|
GUILD_SETTINGS_ROLES_UPDATE_SETTINGS: null,
|
|
GUILD_SETTINGS_ROLES_UPDATE_NAME: null,
|
|
GUILD_SETTINGS_ROLES_UPDATE_COLOR: null,
|
|
GUILD_SETTINGS_ROLES_SAVE_SUCCESS: null,
|
|
GUILD_SETTINGS_ROLES_SUBMITTING: null,
|
|
|
|
GUILD_SETTINGS_MODAL_ROLES_START_REORDER: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_STOP_REORDER: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_EDIT_ORDER: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_START_EDITING: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_STOP_EDITING: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_CANCEL: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSION_ALLOW: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSION_DENY: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_SUCCESS: null,
|
|
GUILD_SETTINGS_MODAL_ROLES_PERMISSIONS_SUBMITTING_FAILURE: null,
|
|
|
|
GUILD_SETTINGS_MODAL_CHANNELS_INIT: null,
|
|
GUILD_SETTINGS_MODAL_CHANNELS_TERMINATE: null,
|
|
GUILD_SETTINGS_MODAL_CHANNELS_START_REORDER: null,
|
|
GUILD_SETTINGS_MODAL_CHANNELS_STOP_REORDER: null,
|
|
GUILD_SETTINGS_MODAL_CHANNELS_EDIT_ORDER: null,
|
|
GUILD_SETTINGS_MODAL_CHANNELS_ADD_CHANNEL: null,
|
|
GUILD_SETTINGS_MODAL_CHANNELS_ADD_CHANNEL_FAILURE: null,
|
|
|
|
GUILD_SETTINGS_MODAL_MEMBERS_START_EDITING: null,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_STOP_EDITING: null,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_TOGGLE_ROLE: null,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE: null,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_ROLES_SAVE_COMPLETE: null,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME: null,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_SUCCESS: null,
|
|
GUILD_SETTINGS_MODAL_MEMBERS_CHANGE_NICKNAME_FAILURE: null,
|
|
|
|
PAYMENT_MODAL_OPEN: null,
|
|
PAYMENT_MODAL_CLOSE: null,
|
|
PAYMENT_MODAL_SUBMIT: null,
|
|
PAYMENT_PROCESSING: null,
|
|
PAYMENT_UPDATE_SUCCESS: null,
|
|
PAYMENT_UPDATE_FAILURE: null,
|
|
STRIPE_TOKEN_FAILURE: null,
|
|
|
|
BILLING_SYNC: null,
|
|
BILLING_SYNC_PROFILE_SUCCESS: null,
|
|
BILLING_SYNC_HISTORY_SUCCESS: null,
|
|
BILLING_SYNC_ERROR: null,
|
|
BILLING_SYNC_SUCCESS: null,
|
|
|
|
BILLING_INFO_UPDATE: null,
|
|
BILLING_INFO_UPDATE_COMPLETE: null,
|
|
|
|
SUBSCRIBE_SUCCESS: null,
|
|
SUBSCRIBE_FAILURE: null,
|
|
|
|
NOTIFICATION_SETTINGS_MODAL_OPEN: null,
|
|
NOTIFICATION_SETTINGS_MODAL_CLOSE: null,
|
|
|
|
CREATE_CHANNEL_MODAL_OPEN: null,
|
|
CREATE_CHANNEL_MODAL_CLOSE: null,
|
|
CREATE_CHANNEL_MODAL_SUBMIT: null,
|
|
CREATE_CHANNEL_MODAL_SUBMIT_FAILURE: null,
|
|
|
|
CHANNEL_SETTINGS_OPEN: null,
|
|
CHANNEL_SETTINGS_INIT: null,
|
|
CHANNEL_SETTINGS_CLOSE: null,
|
|
CHANNEL_SETTINGS_UPDATE: null,
|
|
CHANNEL_SETTINGS_SUBMIT: null,
|
|
CHANNEL_SETTINGS_SUBMIT_SUCCESS: null,
|
|
CHANNEL_SETTINGS_SUBMIT_FAILURE: null,
|
|
CHANNEL_SETTINGS_SET_SECTION: null,
|
|
CHANNEL_SETTINGS_OVERWRITE_SELECT: null,
|
|
CHANNEL_SETTINGS_LOADED_INVITES: null,
|
|
|
|
PRIVACY_SETTINGS_MODAL_OPEN: null,
|
|
PRIVACY_SETTINGS_MODAL_CLOSE: null,
|
|
|
|
CHANGE_NICKNAME_MODAL_OPEN: null,
|
|
CHANGE_NICKNAME_MODAL_CLOSE: null,
|
|
CHANGE_NICKNAME_MODAL_SUBMIT: null,
|
|
CHANGE_NICKNAME_MODAL_SUBMIT_FAILURE: null,
|
|
|
|
CHANGE_VANITY_URL_MODAL_OPEN: null,
|
|
CHANGE_VANITY_URL_MODAL_CLOSE: null,
|
|
CHANGE_VANITY_URL_MODAL_SUBMIT: null,
|
|
CHANGE_VANITY_URL_MODAL_SUBMIT_FAILURE: null,
|
|
|
|
USER_PROFILE_MODAL_OPEN: null,
|
|
USER_PROFILE_MODAL_CLOSE: null,
|
|
USER_PROFILE_MODAL_SET_SECTION: null,
|
|
USER_PROFILE_MODAL_PUSH: null,
|
|
USER_PROFILE_MODAL_POP: null,
|
|
USER_PROFILE_MODAL_FETCH_SUCCESS: null,
|
|
|
|
LOAD_MUTUAL_FRIENDS: null,
|
|
|
|
PRUNE_GUILD_MODAL_OPEN: null,
|
|
PRUNE_GUILD_MODAL_CLOSE: null,
|
|
|
|
STATUS_PAGE_INCIDENT: null,
|
|
STATUS_PAGE_SCHEDULED_MAINTENANCE: null,
|
|
STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK: null,
|
|
|
|
GUILD_VERIFICATION_CHECK: null,
|
|
|
|
USER_SEARCH_QUERY: null,
|
|
USER_SEARCH_SELECT: null,
|
|
|
|
RUNNING_GAME_ADD_OVERRIDE: null,
|
|
RUNNING_GAME_TOGGLE_BLOCK: null,
|
|
RUNNING_GAME_TOGGLE_OVERLAY: null,
|
|
RUNNING_GAME_EDIT_NAME: null,
|
|
RUNNING_GAME_DELETE_ENTRY: null,
|
|
|
|
UPLOAD_MODAL_POP_FILE: null,
|
|
UPLOAD_MODAL_PUSH_FILES: null,
|
|
UPLOAD_MODAL_CLEAR_ALL_FILES: null,
|
|
|
|
PRIVATE_CHANNEL_RECIPIENTS_INVITE_QUERY: null,
|
|
PRIVATE_CHANNEL_RECIPIENTS_INVITE_SELECT: null,
|
|
PRIVATE_CHANNEL_RECIPIENTS_ADD_USER: null,
|
|
PRIVATE_CHANNEL_RECIPIENTS_REMOVE_USER: null,
|
|
|
|
PRIVATE_CHANNEL_CALL_SELECT_PARTICIPANT: null,
|
|
PRIVATE_CHANNEL_CALL_UPDATE_LAYOUT: null,
|
|
|
|
// Accessibility (a11y)
|
|
|
|
ACCESSIBILITY_FONT_SCALE_TO: 'ACCESSIBILITY_FONT_SCALE_TO',
|
|
ACCESSIBILITY_ZOOM_TO: 'ACCESSIBILITY_ZOOM_TO',
|
|
ACCESSIBILITY_RESET_TO_DEFAULT: 'ACCESSIBILITY_RESET_TO_DEFAULT',
|
|
|
|
// iOS
|
|
|
|
ALERT_OPEN: null,
|
|
ALERT_CLOSE: null,
|
|
|
|
ACTION_SHEET_OPEN: null,
|
|
ACTION_SHEET_CLOSE: null,
|
|
|
|
SCREEN_UPDATE: null,
|
|
|
|
DRAWER_OPEN: null,
|
|
DRAWER_CLOSE: null,
|
|
DRAWER_DRAG_START: null,
|
|
DRAWER_DRAG_END: null,
|
|
DRAWER_ENABLE: null,
|
|
DRAWER_DISABLE: null,
|
|
|
|
BROWSER_UPDATE: null,
|
|
|
|
KEYBOARD_SHOW: null,
|
|
KEYBOARD_HIDE: null,
|
|
|
|
APP_STATE_UPDATE: null,
|
|
|
|
MENTION_MODAL_OPEN: null,
|
|
MENTION_MODAL_CLOSE: null,
|
|
|
|
SEARCH_MODAL_OPEN: null,
|
|
SEARCH_MODAL_CLOSE: null,
|
|
|
|
// Calls
|
|
|
|
CALL_CREATE: null,
|
|
CALL_UPDATE: null,
|
|
CALL_DELETE: null,
|
|
CALL_CONNECT: null,
|
|
|
|
CALL_RING: null,
|
|
|
|
// Incoming Calls
|
|
|
|
INCOMING_CALL_MOVE: null,
|
|
|
|
TEXT_MESSAGE_DOWNLOAD_LINK_SUBMITTING: null,
|
|
TEXT_MESSAGE_DOWNLOAD_LINK_SUCCESS: null,
|
|
TEXT_MESSAGE_DOWNLOAD_LINK_FAILURE: null,
|
|
TEXT_MESSAGE_DOWNLOAD_LINK_RESET: null,
|
|
|
|
// Invite Modal
|
|
INVITE_MODAL_OPEN: null,
|
|
INVITE_MODAL_CLOSE: null,
|
|
INVITE_MODAL_ERROR: null,
|
|
|
|
SHOW_KEYBOARD_SHORTCUTS: null,
|
|
HIDE_KEYBOARD_SHORTCUTS: null,
|
|
ACTIVATE_RAGING_DEMON: null,
|
|
DEACTIVATE_RAGING_DEMON: null,
|
|
|
|
// Channel Notices
|
|
CHANNEL_NOTICE_SHOW: null,
|
|
CHANNEL_NOTICE_HIDE: null,
|
|
CHANNEL_NOTICE_INVITE_FORCE_CREATE: null,
|
|
|
|
// Webhooks
|
|
WEBHOOKS_UPDATE: null,
|
|
WEBHOOKS_FETCHING: null,
|
|
WEBHOOK_CREATE: null,
|
|
WEBHOOK_DELETE: null,
|
|
WEBHOOK_UPDATE: null,
|
|
|
|
MASKED_LINK_ADD_TRUSTED_DOMAIN: null,
|
|
|
|
// Search
|
|
SEARCH_EDITOR_STATE_CHANGE: null,
|
|
SEARCH_EDITOR_STATE_CLEAR: null,
|
|
SEARCH_START: null,
|
|
SEARCH_INDEXING: null,
|
|
SEARCH_FINISH: null,
|
|
SEARCH_ENSURE_SEARCH_STATE: null,
|
|
SEARCH_AUTOCOMPLETE_QUERY_UPDATE: null,
|
|
SEARCH_CLEAR_HISTORY: null,
|
|
SEARCH_SET_SHOW_BLOCKED_RESULTS: null,
|
|
|
|
// Billing
|
|
USER_PAYMENTS_UPDATE: null,
|
|
USER_BILLING_PROFILE_UPDATE: null,
|
|
|
|
QUICKSWITCHER_SHOW: null,
|
|
QUICKSWITCHER_HIDE: null,
|
|
QUICKSWITCHER_SEARCH: null,
|
|
QUICKSWITCHER_SELECT: null,
|
|
QUICKSWITCHER_SWITCH_TO: null,
|
|
|
|
LAYER_PUSH: null,
|
|
LAYER_POP: null,
|
|
LAYER_POP_ALL: null,
|
|
|
|
// Audit Log
|
|
AUDIT_LOG_FETCH_START: null,
|
|
AUDIT_LOG_FETCH_SUCCESS: null,
|
|
AUDIT_LOG_FETCH_FAIL: null,
|
|
AUDIT_LOG_FETCH_NEXT_PAGE_START: null,
|
|
AUDIT_LOG_FETCH_NEXT_PAGE_SUCCESS: null,
|
|
AUDIT_LOG_FETCH_NEXT_PAGE_FAIL: null,
|
|
AUDIT_LOG_FILTER_BY_ACTION: null,
|
|
AUDIT_LOG_FILTER_BY_USER: null,
|
|
|
|
// Screenshare
|
|
SCREENSHARE_MODAL_OPEN: null,
|
|
SCREENSHARE_MODAL_CLOSE: null,
|
|
|
|
// Verification
|
|
EMAIL_VERIFICATION_MODAL_OPEN: null,
|
|
EMAIL_VERIFICATION_MODAL_CLOSE: null,
|
|
|
|
// Channel Settings Permissions
|
|
CHANNEL_SETTINGS_PERMISSIONS_INIT: null,
|
|
CHANNEL_SETTINGS_PERMISSIONS_UPDATE_PERMISSION: null,
|
|
CHANNEL_SETTINGS_PERMISSIONS_SELECT_PERMISSION: null,
|
|
CHANNEL_SETTINGS_PERMISSIONS_SUBMITTING: null,
|
|
CHANNEL_SETTINGS_PERMISSIONS_SAVE_SUCCESS: null,
|
|
|
|
// Verification
|
|
VERIFICATION_ADDING_PHONE: null,
|
|
VERIFICATION_ADD_PHONE_SUCCESS: null,
|
|
VERIFICATION_ADD_PHONE_FAILURE: null,
|
|
VERIFICATION_VERIFYING_PHONE: null,
|
|
VERIFICATION_VERIFY_PHONE_SUCCESS: null,
|
|
VERIFICATION_VERIFY_PHONE_FAILURE: null,
|
|
VERIFICATION_SELECT_COUNTRY: null,
|
|
VERIFICATION_OPEN_COUNTRY_SELECTOR: null,
|
|
|
|
// RPC
|
|
RPC_SERVER_READY: null,
|
|
|
|
// Picture in Picture
|
|
PICTURE_IN_PICTURE_OPEN: null,
|
|
PICTURE_IN_PICTURE_CLOSE: null,
|
|
PICTURE_IN_PICTURE_MOVE: null,
|
|
});
|
|
|
|
export const LoginStates = keyMirror({
|
|
NONE: null,
|
|
LOGGING_IN: null,
|
|
MFA_STEP: null,
|
|
LOGGING_IN_MFA: null,
|
|
});
|
|
|
|
export const FormStates = keyMirror({
|
|
OPEN: null,
|
|
SUBMITTING: null,
|
|
CLOSED: null,
|
|
});
|
|
|
|
export const KeybindActions = keyMirror({
|
|
SERVER_NEXT: null,
|
|
SERVER_PREV: null,
|
|
CHANNEL_NEXT: null,
|
|
CHANNEL_PREV: null,
|
|
UNREAD_NEXT: null,
|
|
UNREAD_PREV: null,
|
|
MENTION_CHANNEL_NEXT: null,
|
|
MENTION_CHANNEL_PREV: null,
|
|
|
|
TOGGLE_SETTINGS: null,
|
|
TOGGLE_HELP: null,
|
|
TOGGLE_USERS: null,
|
|
TOGGLE_MENTIONS: null,
|
|
TOGGLE_CHANNEL_PINS: null,
|
|
TOGGLE_PREVIOUS_GUILD: null,
|
|
TOGGLE_MUTE: null,
|
|
TOGGLE_DEAFEN: null,
|
|
TOGGLE_HOTKEYS: null,
|
|
|
|
UPLOAD_FILE: null,
|
|
SEARCH_EMOJIS: null,
|
|
MARK_CHANNEL_READ: null,
|
|
MARK_SERVER_READ: null,
|
|
|
|
MENTION_NEXT: null,
|
|
MENTION_PREV: null,
|
|
|
|
CREATE_DM_GROUP: null,
|
|
CREATE_GUILD: null,
|
|
|
|
RETURN_TO_AUDIO_CHANNEL: null,
|
|
CALL_ACCEPT: null,
|
|
CALL_DECLINE: null,
|
|
CALL_START: null,
|
|
|
|
SCROLL_UP: null,
|
|
SCROLL_DOWN: null,
|
|
|
|
TEXTAREA_FOCUS: null,
|
|
CLOSE_MODAL: null,
|
|
SUBMIT: null,
|
|
|
|
JUMP_TO_GUILD: null,
|
|
|
|
JUMP_TO_FIRST_UNREAD: null,
|
|
JUMP_TO_PRESENT: null,
|
|
|
|
FOCUS_SEARCH: null,
|
|
|
|
QUICKSWITCHER_SHOW: null,
|
|
QUICKSWITCHER_HIDE: null,
|
|
|
|
ZOOM_IN: null,
|
|
ZOOM_OUT: null,
|
|
ZOOM_RESET: null,
|
|
});
|
|
|
|
export const KeybindCustomActions = keyMirror({
|
|
UNASSIGNED: null,
|
|
PUSH_TO_TALK: null,
|
|
PUSH_TO_MUTE: null,
|
|
TOGGLE_MUTE: null,
|
|
TOGGLE_DEAFEN: null,
|
|
TOGGLE_OVERLAY: null,
|
|
TOGGLE_VOICE_MODE: null,
|
|
TOGGLE_OVERLAY_INPUT_LOCK: null,
|
|
TOGGLE_STREAMER_MODE: null,
|
|
});
|
|
|
|
export const RecentMentionsFilters = keyMirror({
|
|
ALL_SERVERS: null,
|
|
THIS_SERVER: null,
|
|
});
|
|
|
|
export const UserSettingsSections = keyMirror({
|
|
ACCOUNT: null,
|
|
CONNECTIONS: null,
|
|
CONNECTIONS_AUTHORIZED: null,
|
|
AUTHORIZED_APPS: null,
|
|
TEXT: null,
|
|
VOICE: null,
|
|
PRIVACY_AND_SAFETY: null,
|
|
NOTIFICATIONS: null,
|
|
GAMES: null,
|
|
KEYBINDS: null,
|
|
APPEARANCE: null,
|
|
OVERLAY: null,
|
|
LOCALE: null,
|
|
STREAMER_MODE: null,
|
|
PREMIUM: null,
|
|
EXPERIMENTS: null,
|
|
});
|
|
|
|
export const GuildSettingsSections = keyMirror({
|
|
LANDING: null,
|
|
OVERVIEW: null,
|
|
MEMBERS: null,
|
|
MEMBER_EDIT: null,
|
|
MEMBER_KICK: null,
|
|
MEMBER_BAN: null,
|
|
CHANNELS: null,
|
|
CHANNEL_ADD: null,
|
|
ROLES: null,
|
|
ROLE_EDIT: null,
|
|
ROLE_PERMISSIONS: null,
|
|
BANS: null,
|
|
INSTANT_INVITES: null,
|
|
EMBED: null,
|
|
INTEGRATIONS: null,
|
|
INTEGRATION_SETTINGS: null,
|
|
SECURITY: null,
|
|
VANITY_URL: null,
|
|
EMOJI: null,
|
|
WEBHOOKS: null,
|
|
AUDIT_LOG: null,
|
|
MODERATION: null,
|
|
DELETE: null,
|
|
});
|
|
|
|
export const ChannelSettingsSections = keyMirror({
|
|
OVERVIEW: null,
|
|
PERMISSIONS: null,
|
|
INSTANT_INVITES: null,
|
|
WEBHOOKS: null,
|
|
DELETE: null,
|
|
// iOS only
|
|
NOTIFICATIONS: null,
|
|
PINNED_MESSAGES: null,
|
|
PINNED_CHAT: null,
|
|
NEW_PERMISSION: null,
|
|
PERMISSION_OVERRIDES: null,
|
|
});
|
|
|
|
export const ChannelSections = keyMirror({
|
|
NONE: null,
|
|
MEMBERS: null,
|
|
SEARCH: null,
|
|
});
|
|
|
|
export const FriendsSections = keyMirror({
|
|
ADD_FRIEND: null,
|
|
ALL: null,
|
|
ONLINE: null,
|
|
PENDING: null,
|
|
BLOCKED: null,
|
|
});
|
|
|
|
export const UserProfileSections = keyMirror({
|
|
USER_INFO: null,
|
|
MUTUAL_GUILDS: null,
|
|
MUTUAL_FRIENDS: null,
|
|
});
|
|
|
|
export const SearchSections = keyMirror({
|
|
SEARCH: null,
|
|
CHANNEL: null,
|
|
});
|
|
|
|
export const DesktopNotificationTypes = keyMirror({
|
|
NEVER: null,
|
|
ALL: null,
|
|
});
|
|
|
|
export const NotificationPermissionTypes = keyMirror({
|
|
NEVER: null,
|
|
ENABLED: null,
|
|
BLOCKED: null,
|
|
});
|
|
|
|
export const TTSNotificationTypes = keyMirror({
|
|
NEVER: null,
|
|
ALL_CHANNELS: null,
|
|
SELECTED_CHANNEL: null,
|
|
});
|
|
|
|
export const InputModes = keyMirror({
|
|
PUSH_TO_TALK: null,
|
|
VOICE_ACTIVITY: null,
|
|
});
|
|
|
|
export const ChannelTypes = {
|
|
DM: 1,
|
|
GROUP_DM: 3,
|
|
GUILD_TEXT: 0,
|
|
GUILD_VOICE: 2,
|
|
};
|
|
|
|
export const ThemeTypes = {
|
|
DARK: 'dark',
|
|
LIGHT: 'light',
|
|
};
|
|
|
|
export const ContextMenuTypes = keyMirror({
|
|
USER_CHANNEL_MEMBERS: null,
|
|
USER_CHANNEL_MESSAGE: null,
|
|
USER_CHANNEL_MENTION: null,
|
|
USER_CHANNEL_TITLE: null,
|
|
USER_CHANNEL_VOICE: null,
|
|
USER_PRIVATE_CHANNELS: null,
|
|
USER_PRIVATE_CHANNELS_MESSAGE: null,
|
|
USER_SEARCH_RESULTS: null,
|
|
USER_FRIEND_LIST: null,
|
|
USER_PROFILE_MUTUAL: null,
|
|
USER_GROUP_DM: null,
|
|
USER_CALL_AVATAR: null,
|
|
USER_GUILD_MEMBERS: null,
|
|
USER_AUDIT_LOG: null,
|
|
USER_BANS: null,
|
|
|
|
GUILD_ICON_BAR: null,
|
|
GUILD_ICON_NEW: null,
|
|
GUILD_PROFILE_MUTUAL: null,
|
|
GUILD_HEADER: null,
|
|
|
|
CHANNEL_LIST_TEXT: null,
|
|
CHANNEL_LIST_VOICE: null,
|
|
CHANNEL_TITLE: null,
|
|
CHANNEL_TOPIC: null,
|
|
CHANNEL_AUDIT_LOG: null,
|
|
|
|
MESSAGE_MAIN: null,
|
|
MESSAGE_SYSTEM: null,
|
|
|
|
NATIVE_DEFAULT: null,
|
|
NATIVE_LINK: null,
|
|
NATIVE_IMAGE: null,
|
|
NATIVE_TEXT: null,
|
|
NATIVE_INPUT: null,
|
|
});
|
|
|
|
export const NoticeTypes = keyMirror({
|
|
GENERIC: null,
|
|
UNCLAIMED_ACCOUNT: null,
|
|
DOWNLOAD_NAG: null,
|
|
VOICE_DISABLED: null,
|
|
SCHEDULED_MAINTENANCE: null,
|
|
CREATE_SERVER_NAG: null,
|
|
NO_INPUT_DETECTED: null,
|
|
STREAMER_MODE: null,
|
|
RPC_CONNECTIONS: null,
|
|
DETECTED_PLATFORM_ACCOUNTS: null,
|
|
DOWNLOAD_MOBILE_APPS: null,
|
|
SURVEY: null,
|
|
CORRUPT_INSTALLATION: null,
|
|
});
|
|
|
|
export const InviteStates = keyMirror({
|
|
RESOLVING: null,
|
|
RESOLVED: null,
|
|
EXPIRED: null,
|
|
ACCEPTING: null,
|
|
ACCEPTED: null,
|
|
APP_OPENING: null,
|
|
APP_OPENED: null,
|
|
APP_NOT_OPENED: null,
|
|
});
|
|
|
|
export const InviteNativeAppStates = keyMirror({
|
|
OPENING: null,
|
|
OPEN: null,
|
|
OPEN_FAIL: null,
|
|
});
|
|
|
|
export const CreateGuildModalScreens = {
|
|
Choose: 0,
|
|
CreateGuild: 1,
|
|
JoinGuild: 2,
|
|
};
|
|
|
|
export const GuildFeatures = keyMirror({
|
|
INVITE_SPLASH: null,
|
|
VIP_REGIONS: null,
|
|
VANITY_URL: null,
|
|
});
|
|
|
|
export const RTCConnectionStates = keyMirror({
|
|
DISCONNECTED: null,
|
|
AWAITING_ENDPOINT: null,
|
|
AUTHENTICATING: null,
|
|
CONNECTING: null,
|
|
CONNECTED: null,
|
|
RTC_DISCONNECTED: null,
|
|
RTC_CONNECTING: null,
|
|
RTC_CONNECTED: null,
|
|
NO_ROUTE: null,
|
|
// WebRTC
|
|
ICE_CHECKING: null,
|
|
});
|
|
|
|
export const RTCConnectionQuality = {
|
|
UNKNOWN: 'unknown',
|
|
BAD: 'bad',
|
|
AVERAGE: 'average',
|
|
FINE: 'fine',
|
|
};
|
|
|
|
export const ExplicitContentFilterTypes = {
|
|
DISABLED: 0,
|
|
NON_FRIENDS: 1,
|
|
FRIENDS_AND_NON_FRIENDS: 2,
|
|
};
|
|
|
|
export const MessageStates = keyMirror({
|
|
SENT: null,
|
|
SENDING: null,
|
|
SEND_FAILED: null,
|
|
});
|
|
|
|
export const MessageTypes = {
|
|
DEFAULT: 0,
|
|
RECIPIENT_ADD: 1,
|
|
RECIPIENT_REMOVE: 2,
|
|
CALL: 3,
|
|
CHANNEL_NAME_CHANGE: 4,
|
|
CHANNEL_ICON_CHANGE: 5,
|
|
CHANNEL_PINNED_MESSAGE: 6,
|
|
GUILD_MEMBER_JOIN: 7,
|
|
};
|
|
|
|
export const MessageTypesDeletable = {
|
|
[MessageTypes.DEFAULT]: true,
|
|
[MessageTypes.GUILD_MEMBER_JOIN]: true,
|
|
[MessageTypes.CHANNEL_PINNED_MESSAGE]: true,
|
|
};
|
|
|
|
export const OverlayDisplayNames = keyMirror({
|
|
ALWAYS: null,
|
|
NEVER: null,
|
|
ONLY_WHILE_SPEAKING: null,
|
|
});
|
|
|
|
export const OverlayDisplayUsers = keyMirror({
|
|
ALWAYS: null,
|
|
ONLY_WHILE_SPEAKING: null,
|
|
});
|
|
|
|
export const OverlayAvatarSizes = {
|
|
LARGE: 'large',
|
|
SMALL: 'small',
|
|
};
|
|
|
|
export const StatusTypes = {
|
|
ONLINE: 'online',
|
|
OFFLINE: 'offline',
|
|
IDLE: 'idle',
|
|
DND: 'dnd',
|
|
INVISIBLE: 'invisible',
|
|
UNKNOWN: 'unknown',
|
|
|
|
MUTED: 'muted',
|
|
DEAFENED: 'deafened',
|
|
};
|
|
|
|
export const TextareaTypes = {
|
|
NORMAL: 'normal',
|
|
EDIT: 'edit',
|
|
FORM: 'form',
|
|
};
|
|
|
|
export const VerificationLevels = {
|
|
NONE: 0,
|
|
LOW: 1,
|
|
MEDIUM: 2,
|
|
HIGH: 3,
|
|
VERY_HIGH: 4,
|
|
};
|
|
|
|
export const VerificationCriteria = {
|
|
ACCOUNT_AGE: 5,
|
|
MEMBER_AGE: 10,
|
|
};
|
|
|
|
export const MFALevels = {
|
|
NONE: 0,
|
|
ELEVATED: 1,
|
|
};
|
|
|
|
export const GuildExplicitContentFilterTypes = {
|
|
DISABLED: 0,
|
|
MEMBERS_WITHOUT_ROLES: 1,
|
|
ALL_MEMBERS: 2,
|
|
};
|
|
|
|
export const RelationshipTypes = {
|
|
NONE: 0,
|
|
FRIEND: 1,
|
|
BLOCKED: 2,
|
|
PENDING_INCOMING: 3,
|
|
PENDING_OUTGOING: 4,
|
|
};
|
|
|
|
export const DMSearchResultTypes = keyMirror({
|
|
CHANNEL: null,
|
|
USER: null,
|
|
});
|
|
|
|
export const DetectedPlatformAccountsDisplayTypes = keyMirror({
|
|
NONE: null,
|
|
NOTICE: null,
|
|
MODAL: null,
|
|
});
|
|
|
|
export const Endpoints = {
|
|
USER_RELATIONSHIPS: (userId: string = '@me'): string => `/users/${userId}/relationships`,
|
|
USER_PROFILE: (userId: string): string => `/users/${userId}/profile`,
|
|
USER_CHANNELS: (userId: string): string => `/users/${userId}/channels`,
|
|
USER_GAMES_START: '/users/@me/games/start',
|
|
GUILD_ACK: (guildId: string): string => `/guilds/${guildId}/ack`,
|
|
GUILD_CHANNELS: (guildId: string): string => `/guilds/${guildId}/channels`,
|
|
GUILD_MEMBERS: (guildId: string): string => `/guilds/${guildId}/members`,
|
|
GUILD_MEMBER: (guildId: string, userId: string): string => `/guilds/${guildId}/members/${userId}`,
|
|
GUILD_INTEGRATIONS: (guildId: string): string => `/guilds/${guildId}/integrations`,
|
|
GUILD_BANS: (guildId: string): string => `/guilds/${guildId}/bans`,
|
|
GUILD_BAN: (guildId: string, userId: string) => `/guilds/${guildId}/bans/${userId}`,
|
|
GUILD_ROLES: (guildId: string): string => `/guilds/${guildId}/roles`,
|
|
GUILD_ROLE: (guildId: string, roleId: string): string => `/guilds/${guildId}/roles/${roleId}`,
|
|
GUILD_INSTANT_INVITES: (guildId: string): string => `/guilds/${guildId}/invites`,
|
|
GUILD_EMBED: (guildId: string): string => `/guilds/${guildId}/embed`,
|
|
GUILD_VANITY_URL: (guildId: string): string => `/guilds/${guildId}/vanity-url`,
|
|
GUILD_MFA: (guildId: string): string => `/guilds/${guildId}/mfa`,
|
|
GUILD_PRUNE: (guildId: string): string => `/guilds/${guildId}/prune`,
|
|
GUILD_ICON: (guildId: string, hash: string): string => `/guilds/${guildId}/icons/${hash}.jpg`,
|
|
GUILD_EMOJIS: (guildId: string): string => `/guilds/${guildId}/emojis`,
|
|
GUILD_EMOJI: (guildId: string, emojiId: string): string => `/guilds/${guildId}/emojis/${emojiId}`,
|
|
GUILD_AUDIT_LOG: (guildId: string) => `/guilds/${guildId}/audit-logs`,
|
|
EMOJI: (emojiId: string): string => `/emojis/${emojiId}.png`,
|
|
GUILD_SPLASH: (guildId: string, hash: string): string => `/guilds/${guildId}/splashes/${hash}.jpg`,
|
|
GUILDS: '/guilds',
|
|
GUILD: (guildId: string): string => `/guilds/${guildId}`,
|
|
CHANNELS: '/channels',
|
|
AVATAR: (userId: string, hash: string): string => `/users/${userId}/avatars/${hash}.jpg`,
|
|
MESSAGES: (channelId: string): string => `/channels/${channelId}/messages`,
|
|
MESSAGES_ACK: (channelId: string, messageId: string): string => `/channels/${channelId}/messages/${messageId}/ack`,
|
|
PINS_ACK: (channelId: string): string => `/channels/${channelId}/pins/ack`,
|
|
PINS: (channelId: string): string => `/channels/${channelId}/pins`,
|
|
PIN: (channelId: string, messageId: string): string => `/channels/${channelId}/pins/${messageId}`,
|
|
INSTANT_INVITES: (channelId: string): string => `/channels/${channelId}/invites`,
|
|
TYPING: (channelId: string): string => `/channels/${channelId}/typing`,
|
|
CHANNEL_PERMISSIONS: (channelId: string): string => `/channels/${channelId}/permissions`,
|
|
CHANNEL_RECIPIENTS: (channelId: string): string => `/channels/${channelId}/recipients`,
|
|
CHANNEL_ICON: (channelId: string, hash: string): string => `/channels/${channelId}/icons/${hash}.jpg`,
|
|
CHANNEL_CONVERT: (channelId: string): string => `/channels/${channelId}/convert`,
|
|
FRIEND_SUGGESTIONS: `/friend-suggestions`,
|
|
TUTORIAL: `/tutorial`,
|
|
TUTORIAL_INDICATORS: `/tutorial/indicators`,
|
|
USERS: '/users',
|
|
ME: '/users/@me',
|
|
DEVICES: '/users/@me/devices',
|
|
SETTINGS: '/users/@me/settings',
|
|
PHONE: '/users/@me/phone',
|
|
VERIFY_PHONE: '/users/@me/phone/verify',
|
|
CONNECTIONS: '/users/@me/connections',
|
|
CONNECTIONS_AUTHORIZE: (platformType: string): string => `/connections/${platformType}/authorize`,
|
|
CONNECTIONS_CALLBACK: (platformType: string): string => `/connections/${platformType}/callback`,
|
|
CONNECTION: (platformType: string, accountId: string): string =>
|
|
`/users/@me/connections/${platformType}/${accountId}`,
|
|
NOTES: '/users/@me/notes',
|
|
MENTIONS: '/users/@me/mentions',
|
|
MENTIONS_MESSAGE_ID: (messageId: string) => `/users/@me/mentions/${messageId}`,
|
|
CAPTCHA: '/users/@me/captcha/verify',
|
|
EXPERIMENTS: '/experiments',
|
|
LOGIN: '/auth/login',
|
|
LOGIN_MFA: '/auth/mfa/totp',
|
|
LOGOUT: '/auth/logout',
|
|
REGISTER: '/auth/register',
|
|
INVITE: '/invite',
|
|
TRACK: '/track',
|
|
SSO: '/sso',
|
|
VERIFY: '/auth/verify',
|
|
AUTHORIZE_IP: '/auth/authorize-ip',
|
|
VERIFY_RESEND: '/auth/verify/resend',
|
|
FORGOT_PASSWORD: '/auth/forgot',
|
|
RESET_PASSWORD: '/auth/reset',
|
|
REGIONS: (guildId: ?string): string => (guildId != null ? `/guilds/${guildId}/regions` : '/voice/regions'),
|
|
ICE: '/voice/ice',
|
|
REPORT: '/report',
|
|
INTEGRATIONS: '/integrations',
|
|
INTEGRATIONS_JOIN: (integrationId: string): string => `/integrations/${integrationId}/join`,
|
|
GATEWAY: '/gateway',
|
|
USER_GUILD_SETTINGS: (guildId: string): string => `/users/@me/guilds/${guildId}/settings`,
|
|
APPLICATIONS: '/applications',
|
|
APPLICATION_ICON: (guildId: string, hash: string): string => `/applications/${guildId}/icons/${hash}.jpg`,
|
|
APPLICATION_RPC: (applicationId: string): string => `/oauth2/applications/${applicationId}/rpc`,
|
|
OAUTH2_AUTHORIZE: '/oauth2/authorize',
|
|
OAUTH2_AUTHORIZE_WEBHOOK_CHANNELS: '/oauth2/authorize/webhook-channels',
|
|
OAUTH2_CURRENT_AUTH: '/oauth2/@me',
|
|
OAUTH2_RPC_TOKEN: '/oauth2/token/rpc',
|
|
OAUTH2_TOKENS: '/oauth2/tokens',
|
|
OAUTH2_TOKEN: (id: string): string => `/oauth2/tokens/${id}`,
|
|
OAUTH2_WHITELIST_ACCEPT: '/oauth2/whitelist/accept',
|
|
MFA_TOTP_ENABLE: `/users/@me/mfa/totp/enable`,
|
|
MFA_TOTP_DISABLE: `/users/@me/mfa/totp/disable`,
|
|
MFA_CODES: `/users/@me/mfa/codes`,
|
|
CALL: (channelId: string) => `/channels/${channelId}/call`,
|
|
CALL_RING: (channelId: string): string => `/channels/${channelId}/call/ring`,
|
|
CALL_STOP_RINGING: (channelId: string): string => `/channels/${channelId}/call/stop-ringing`,
|
|
MOBILE_TEXT_LINK: `/download/sms`,
|
|
DISABLE_EMAIL_NOTIFICATIONS: `/users/disable-email-notifications`,
|
|
CHANNEL_WEBHOOKS: (channelId: string): string => `/channels/${channelId}/webhooks`,
|
|
GUILD_WEBHOOKS: (guildId: string): string => `/guilds/${guildId}/webhooks`,
|
|
WEBHOOK: (webhookId: string): string => `/webhooks/${webhookId}`,
|
|
WEBHOOK_INTEGRATION: (webhookId: string, webhookToken: string): string => `/webhooks/${webhookId}/${webhookToken}`,
|
|
REACTIONS: (channelId: string, messageId: string, emoji: string): string =>
|
|
`/channels/${channelId}/messages/${messageId}/reactions/${emoji}`,
|
|
REMOVE_REACTIONS: (channelId: string, messageId: string): string =>
|
|
`/channels/${channelId}/messages/${messageId}/reactions`,
|
|
REACTION: (channelId: string, messageId: string, emoji: string, userId: string): string =>
|
|
`/channels/${channelId}/messages/${messageId}/reactions/${emoji}/${userId}`,
|
|
SEARCH_GUILD: (guildId: string) => `/guilds/${guildId}/messages/search`,
|
|
SEARCH_CHANNEL: (channelId: string) => `/channels/${channelId}/messages/search`,
|
|
BILLING: `/users/@me/billing`,
|
|
BILLING_PREMIUM_SUBSCRIPTION: `/users/@me/billing/premium-subscription`,
|
|
BILLING_PAYMENT_SOURCE: `/users/@me/billing/payment-source`,
|
|
BILLING_HISTORY: `/users/@me/billing/payments`,
|
|
USER_AGREEMENTS: '/users/@me/agreements',
|
|
};
|
|
|
|
// Router
|
|
export const Routes = {
|
|
FRIENDS: '/channels/@me', // todo expand eventually
|
|
ME: '/channels/@me',
|
|
GUILD: (guildId: string): string => `/channels/${guildId}`,
|
|
CHANNEL: (guildId: string, channelId: string): string => `/channels/${guildId}/${channelId}`,
|
|
MESSAGE: (guildId: ?string, channelId: string, messageId: string): string =>
|
|
`/channels/${guildId || ME}/${channelId}?jump=${messageId}`,
|
|
LOGIN: '/login',
|
|
REGISTER: '/register',
|
|
INVITE: (code: string): string => `/invite/${code}`,
|
|
INVITE_PROXY: (channelId: string): string => `/invite-proxy/${channelId}`,
|
|
WELCOME: (guildId: string, channelId: string, type: string): string =>
|
|
`/channels/welcome/${guildId}/${channelId}/${type}`,
|
|
VERIFY: '/verify',
|
|
RESET: '/reset',
|
|
APPS: '/apps',
|
|
CONNECTIONS: (type: string): string => `/connections/${type}`,
|
|
OAUTH2_AUTHORIZE: '/oauth2/authorize',
|
|
OAUTH2_AUTHORIZED: '/oauth2/authorized',
|
|
OAUTH2_ERROR: '/oauth2/error',
|
|
SETTINGS: (section: string, subsection: ?string): string =>
|
|
`/settings/${section}${subsection ? `/${subsection}` : ''}`,
|
|
};
|
|
|
|
export const Permissions = {
|
|
// General
|
|
CREATE_INSTANT_INVITE: 1 << 0,
|
|
KICK_MEMBERS: 1 << 1,
|
|
BAN_MEMBERS: 1 << 2,
|
|
ADMINISTRATOR: 1 << 3,
|
|
MANAGE_CHANNELS: 1 << 4,
|
|
MANAGE_GUILD: 1 << 5,
|
|
CHANGE_NICKNAME: 1 << 26,
|
|
MANAGE_NICKNAMES: 1 << 27,
|
|
MANAGE_ROLES: 1 << 28,
|
|
MANAGE_WEBHOOKS: 1 << 29,
|
|
MANAGE_EMOJIS: 1 << 30,
|
|
VIEW_AUDIT_LOG: 1 << 7,
|
|
|
|
// Text
|
|
READ_MESSAGES: 1 << 10,
|
|
SEND_MESSAGES: 1 << 11,
|
|
SEND_TSS_MESSAGES: 1 << 12,
|
|
MANAGE_MESSAGES: 1 << 13,
|
|
EMBED_LINKS: 1 << 14,
|
|
ATTACH_FILES: 1 << 15,
|
|
READ_MESSAGE_HISTORY: 1 << 16,
|
|
MENTION_EVERYONE: 1 << 17,
|
|
USE_EXTERNAL_EMOJIS: 1 << 18,
|
|
ADD_REACTIONS: 1 << 6,
|
|
|
|
// Voice
|
|
CONNECT: 1 << 20,
|
|
SPEAK: 1 << 21,
|
|
MUTE_MEMBERS: 1 << 22,
|
|
DEAFEN_MEMBERS: 1 << 23,
|
|
MOVE_MEMBERS: 1 << 24,
|
|
USE_VAD: 1 << 25,
|
|
};
|
|
|
|
export const OAuth2Scopes = ConstantsCommon.OAuth2Scopes;
|
|
|
|
// RPC Server
|
|
export const RPC_PRIVATE_SCOPE = 'RPC_PRIVATE_SCOPE';
|
|
|
|
export const RPCDeepLinks = keyMirror({
|
|
USER_SETTINGS: null,
|
|
});
|
|
|
|
export const RPCCommands = keyMirror({
|
|
DISPATCH: null,
|
|
|
|
AUTHORIZE: null,
|
|
AUTHENTICATE: null,
|
|
|
|
GET_GUILD: null,
|
|
GET_GUILDS: null,
|
|
GET_CHANNEL: null,
|
|
GET_CHANNELS: null,
|
|
|
|
SUBSCRIBE: null,
|
|
UNSUBSCRIBE: null,
|
|
|
|
SET_USER_VOICE_SETTINGS: null,
|
|
SELECT_VOICE_CHANNEL: null,
|
|
GET_SELECTED_VOICE_CHANNEL: null,
|
|
SELECT_TEXT_CHANNEL: null,
|
|
GET_VOICE_SETTINGS: null,
|
|
SET_VOICE_SETTINGS: null,
|
|
|
|
CAPTURE_SHORTCUT: null,
|
|
|
|
INVITE_BROWSER: null,
|
|
DEEP_LINK: null,
|
|
CONNECTIONS_CALLBACK: null,
|
|
|
|
OVERLAY: null,
|
|
});
|
|
|
|
export const RPCEvents = keyMirror({
|
|
GUILD_STATUS: null,
|
|
GUILD_CREATE: null,
|
|
|
|
CHANNEL_CREATE: null,
|
|
|
|
VOICE_CHANNEL_SELECT: null,
|
|
VOICE_STATE_CREATE: null,
|
|
VOICE_STATE_DELETE: null,
|
|
VOICE_STATE_UPDATE: null,
|
|
VOICE_SETTINGS_UPDATE: null,
|
|
VOICE_CONNECTION_STATUS: null,
|
|
SPEAKING_START: null,
|
|
SPEAKING_STOP: null,
|
|
|
|
NOTIFICATION_CREATE: null,
|
|
|
|
MESSAGE_CREATE: null,
|
|
MESSAGE_UPDATE: null,
|
|
MESSAGE_DELETE: null,
|
|
|
|
CAPTURE_SHORTCUT_CHANGE: null,
|
|
|
|
OVERLAY: null,
|
|
|
|
READY: null,
|
|
ERROR: null,
|
|
});
|
|
|
|
export const RPCErrors = {
|
|
UNKNOWN_ERROR: 1000,
|
|
|
|
INVALID_PAYLOAD: 4000,
|
|
INVALID_COMMAND: 4002,
|
|
INVALID_GUILD: 4003,
|
|
INVALID_EVENT: 4004,
|
|
INVALID_CHANNEL: 4005,
|
|
INVALID_PERMISSIONS: 4006,
|
|
INVALID_CLIENTID: 4007,
|
|
INVALID_ORIGIN: 4008,
|
|
INVALID_TOKEN: 4009,
|
|
INVALID_USER: 4010,
|
|
INVALID_INVITE: 4011,
|
|
|
|
OAUTH2_ERROR: 5000,
|
|
SELECT_CHANNEL_TIMED_OUT: 5001,
|
|
GET_GUILD_TIMED_OUT: 5002,
|
|
SELECT_VOICE_FORCE_REQUIRED: 5003,
|
|
CAPTURE_SHORTCUT_ALREADY_LISTENING: 5004,
|
|
};
|
|
|
|
export const RPCCloseCodes = {
|
|
CLOSE_NORMAL: 1000,
|
|
CLOSE_ABNORMAL: 1006,
|
|
INVALID_CLIENTID: 4000,
|
|
INVALID_ORIGIN: 4001,
|
|
RATELIMITED: 4002,
|
|
TOKEN_REVOKED: 4003,
|
|
INVALID_VERSION: 4004,
|
|
INVALID_ENCODING: 4005,
|
|
};
|
|
|
|
// For Guild MFA
|
|
export const ElevatedPermissions = [
|
|
Permissions.KICK_MEMBERS,
|
|
Permissions.BAN_MEMBERS,
|
|
Permissions.ADMINISTRATOR,
|
|
Permissions.MANAGE_CHANNELS,
|
|
Permissions.MANAGE_GUILD,
|
|
Permissions.MANAGE_ROLES,
|
|
Permissions.MANAGE_MESSAGES,
|
|
].reduce((permissions, permission) => permissions | permission, 0);
|
|
|
|
export const UserNotificationSettings = {
|
|
// Must be kept in sync with constants.py
|
|
|
|
// Message notification
|
|
ALL_MESSAGES: 0,
|
|
ONLY_MENTIONS: 1,
|
|
NO_MESSAGES: 2,
|
|
NULL: 3,
|
|
};
|
|
|
|
export type GuildNotificationSettings = 0 | 1;
|
|
export type StatusType = 'offline' | 'online' | 'idle' | 'unknown' | 'dnd' | 'invisible';
|
|
|
|
export const ME = '@me';
|
|
|
|
export const MAX_MESSAGES_PER_CHANNEL = 50;
|
|
export const MAX_MENTIONS_PER_FETCH = 25;
|
|
export const MAX_LOADED_MESSAGES = MAX_MESSAGES_PER_CHANNEL * 4;
|
|
export const TRUNCATED_MESSAGE_VIEW_SIZE = MAX_LOADED_MESSAGES * 0.5;
|
|
export const MAX_MESSAGE_CACHE_SIZE = MAX_MESSAGES_PER_CHANNEL * 5;
|
|
export const MAX_MESSAGE_LENGTH = 2000;
|
|
export const MAX_TTS_LENGTH = 200;
|
|
export const MAX_PINS_PER_CHANNEL = 50;
|
|
|
|
export const IDLE_DURATION = 1000 * (process.env.NODE_ENV === 'production' ? 60 * 10 /* 10min */ : 10) /* 10sec */;
|
|
export const TYPING_TIMEOUT = 10000;
|
|
export const MAX_TYPING_USERS = 5;
|
|
|
|
export const MAX_ROLE_LENGTH = 32;
|
|
|
|
export const MAX_ATTACHMENT_SIZE = 8 * 1024 * 1024;
|
|
export const MAX_PREMIUM_ATTACHMENT_SIZE = 50 * 1024 * 1024;
|
|
|
|
export const ChannelStreamTypes = keyMirror({
|
|
MESSAGE_GROUP: null,
|
|
MESSAGE_GROUP_BLOCKED: null,
|
|
DIVIDER_TIME_STAMP: null,
|
|
DIVIDER_NEW_MESSAGES: null,
|
|
JUMP_TARGET: null,
|
|
});
|
|
|
|
export const CallMemberStates = keyMirror({
|
|
NONE: null,
|
|
IN_CALL: null,
|
|
RINGING: null,
|
|
});
|
|
|
|
export const CallModes = {
|
|
VIDEO: 'video',
|
|
VOICE: 'voice',
|
|
};
|
|
|
|
export const ActivityTypes = {
|
|
PLAYING: 0,
|
|
STREAMING: 1,
|
|
};
|
|
|
|
export const NOOP = () => {};
|
|
export const NOOP_NULL = () => null;
|
|
|
|
export const AVATAR_SIZE = 128;
|
|
export const AVATAR_MAX_SIZE = 1024;
|
|
export const SPLASH_SIZE = 2048;
|
|
|
|
export const MAX_PTT_RELEASE_DELAY = 2000;
|
|
|
|
export const CUSTOM_EMOJI = 'CUSTOM_EMOJI';
|
|
|
|
export const EMOJI_CATEGORY_RECENT = 'recent';
|
|
export const EMOJI_CATEGORY_CUSTOM = 'custom';
|
|
|
|
export const BITRATE_MIN = 8000;
|
|
export const BITRATE_DEFAULT = 64000;
|
|
export const BITRATE_MAX = 96000;
|
|
export const BITRATE_MAX_VIP = 128000;
|
|
|
|
export const NON_USER_BOT_DISCRIMINATOR = '0000';
|
|
export const LOCAL_BOT_ID = '1';
|
|
|
|
export const MAX_VOICE_USER_LIMIT = 99;
|
|
|
|
export const MAX_MUTUAL_GUILDS = __IOS__ ? 3 : 5;
|
|
|
|
export const LARGE_THRESHOLD = 100;
|
|
|
|
export const MAX_GROUP_DM_PARTICIPANTS = 10;
|
|
|
|
export const PLACEHOLDER_TAG = '#0000';
|
|
|
|
export const TOKEN_KEY = 'token';
|
|
export const DEVICE_TOKEN = 'DEVICE_TOKEN';
|
|
export const DEVICE_PUSH_PROVIDER = __IOS__ ? 'apns' : null;
|
|
|
|
export const MARKETING_URLS = {
|
|
API_DOCS: `${process.env.MARKETING_ENDPOINT}/developers/docs/intro`,
|
|
COMPANY: `${process.env.MARKETING_ENDPOINT}/company`,
|
|
PARTNERS: `${process.env.MARKETING_ENDPOINT}/partners`,
|
|
HYPESQUAD: `${process.env.MARKETING_ENDPOINT}/hypesquad`,
|
|
TERMS: `${process.env.MARKETING_ENDPOINT}/terms`,
|
|
PRIVACY: `${process.env.MARKETING_ENDPOINT}/privacy`,
|
|
GUIDELINES: `${process.env.MARKETING_ENDPOINT}/guidelines`,
|
|
};
|
|
|
|
export const TWITCH_CLIENT_ID = '33kozedd0zs6fbauka98psnc7zwom2s';
|
|
|
|
export const MAX_USER_AUTOCOMPLETE_RESULTS = 10;
|
|
|
|
export const LARGE_SERVER_MEMBER_THRESHOLD = 100;
|
|
|
|
export const SEARCH_PAGE_SIZE = 25;
|
|
export const IS_SEARCH_FILTER_TOKEN = /^FILTER_/;
|
|
export const IS_SEARCH_ANSWER_TOKEN = /^ANSWER_/;
|
|
|
|
export const SearchTypes = keyMirror({
|
|
GUILD: null,
|
|
CHANNEL: null,
|
|
});
|
|
|
|
export const SearchModes = {
|
|
RECENT: 'timestamp',
|
|
RELEVANT: 'relevance',
|
|
};
|
|
|
|
// Be sure to update the dev-cli if you change these
|
|
export const EmojiSprites = {
|
|
NonDiversityPerRow: 42,
|
|
DiversityPerRow: 10,
|
|
PickerPerRow: 11,
|
|
PickerCount: 50,
|
|
};
|
|
export const DIVERSITY_SURROGATES = ['🏻', '🏼', '🏽', '🏾', '🏿'];
|
|
|
|
export const NEW_USER_ONBOARDING_STEPS = keyMirror({
|
|
INITIAL: null,
|
|
DISABLED: null,
|
|
MARKETING: null,
|
|
AVATAR_UPLOAD: null,
|
|
GUILD_SETTINGS: null,
|
|
GRANT_MIC_ACCESS: null,
|
|
MIC_TEST: null,
|
|
CHAT_EXAMPLE: null,
|
|
APP_DOWNLOADS: null,
|
|
CLAIM_ACCOUNT: null,
|
|
});
|
|
|
|
export const NEW_USER_ONBOARDING_MIC_MODES = keyMirror({
|
|
WAITING: null,
|
|
LOADING: null,
|
|
LISTENING: null,
|
|
SUCCESS: null,
|
|
ERROR: null,
|
|
});
|
|
|
|
export const AbortCodes = {
|
|
UNKNOWN_ACCOUNT: 10001,
|
|
UNKNOWN_APPLICATION: 10002,
|
|
UNKNOWN_CHANNEL: 10003,
|
|
UNKNOWN_GUILD: 10004,
|
|
UNKNOWN_INTEGRATION: 10005,
|
|
UNKNOWN_INVITE: 10006,
|
|
UNKNOWN_MEMBER: 10007,
|
|
UNKNOWN_MESSAGE: 10008,
|
|
UNKNOWN_OVERWRITE: 10009,
|
|
UNKNOWN_PLATFORM: 10010,
|
|
UNKNOWN_ROLE: 10011,
|
|
UNKNOWN_TOKEN: 10012,
|
|
UNKNOWN_USER: 10013,
|
|
UNKNOWN_EMOJI: 10014,
|
|
UNKNOWN_WEBHOOK: 10015,
|
|
|
|
BOT_DISALLOWED: 20001,
|
|
BOT_REQUIRED: 20002,
|
|
RPC_PROXY_DISALLOWED: 20003,
|
|
EXPLICIT_CONTENT: 20009,
|
|
|
|
TOO_MANY_USER_GUILDS: 30001,
|
|
TOO_MANY_BOT_GUILDS: 30001,
|
|
TOO_MANY_FRIENDS: 30002,
|
|
TOO_MANY_PINS_IN_CHANNEL: 30003,
|
|
TOO_MANY_RECIPIENTS: 30004,
|
|
TOO_MANY_GUILD_ROLES: 30005,
|
|
TOO_MANY_USING_USERNAME: 30006,
|
|
TOO_MANY_WEBHOOKS: 30007,
|
|
TOO_MANY_REACTIONS: 30010,
|
|
|
|
UNAUTHORIZED: 40001,
|
|
EMAIL_VERIFICATION_REQUIRED: 40002,
|
|
RATE_LIMIT_DM_OPEN: 40003,
|
|
SEND_MESSAGE_TEMPORARILY_DISABLED: 40004,
|
|
|
|
INVALID_ACCESS: 50001,
|
|
INVALID_ACCOUNT_TYPE: 50002,
|
|
INVALID_ACTION_DM: 50003,
|
|
INVALID_EMBED_DISABLED: 50004,
|
|
INVALID_MESSAGE_AUTHOR: 50005,
|
|
INVALID_MESSAGE_EMPTY: 50006,
|
|
INVALID_MESSAGE_SEND_USER: 50007,
|
|
INVALID_MESSAGE_SEND_VOICE: 50008,
|
|
INVALID_MESSAGE_VERIFICATION_LEVEL: 50009,
|
|
INVALID_OAUTH_APP_BOT: 50010,
|
|
INVALID_OAUTH_APP_LIMIT: 50011,
|
|
INVALID_OAUTH_STATE: 50012,
|
|
INVALID_PERMISSIONS: 50013,
|
|
INVALID_TOKEN: 50014,
|
|
INVALID_NOTE: 50015,
|
|
INVALID_BULK_DELETE_COUNT: 50016,
|
|
INVALID_MFA_LEVEL: 50017,
|
|
INVALID_PASSWORD: 50018,
|
|
INVALID_PIN_MESSAGE_CHANNEL: 50019,
|
|
INVALID_INVITE_CODE: 50020,
|
|
INVALID_PHONE_NUMBER: 50022,
|
|
INVALID_CLIENT_ID: 50023,
|
|
INVALID_CHANNEL_TYPE: 50024,
|
|
INVALID_OAUTH2_ACCESS_TOKEN: 50025,
|
|
INVALID_OAUTH2_MISSING_SCOPE: 50026,
|
|
INVALID_WEBHOOK_TOKEN: 50027,
|
|
|
|
MFA_ENABLED: 60001,
|
|
MFA_DISABLED: 60002,
|
|
MFA_REQUIRED: 60003,
|
|
MFA_UNVERIFIED: 60004,
|
|
MFA_INVALID_SECRET: 60005,
|
|
MFA_INVALID_TICKET: 60006,
|
|
MFA_INVALID_CODE: 60008,
|
|
MFA_INVALID_SESSION: 60009,
|
|
|
|
PHONE_NUMBER_UNABLE_TO_SEND: 70003,
|
|
|
|
RELATIONSHIP_INCOMING_DISABLED: 80000,
|
|
RELATIONSHIP_INCOMING_BLOCKED: 80001,
|
|
RELATIONSHIP_INVALUD_USER_BOT: 80002,
|
|
RELATIONSHIP_INVALID_SELF: 80003,
|
|
RELATIONSHIP_INVALID_DISCORD_TAG: 80004,
|
|
|
|
REACTION_BLOCKED: 90001,
|
|
};
|
|
|
|
export const CLYDE_ERROR_MESSAGES = {
|
|
[AbortCodes.EMAIL_VERIFICATION_REQUIRED]: 'BOT_REQUIRES_EMAIL_VERIFICATION',
|
|
[AbortCodes.INVALID_MESSAGE_SEND_USER]: 'BOT_DM_SEND_FAILED',
|
|
[AbortCodes.RATE_LIMIT_DM_OPEN]: 'BOT_DM_RATE_LIMITED',
|
|
[AbortCodes.SEND_MESSAGE_TEMPORARILY_DISABLED]: 'BOT_DM_SEND_MESSAGE_TEMPORARILY_DISABLED',
|
|
DEFAULT: 'BOT_DM_SEND_FAILED',
|
|
};
|
|
|
|
export const RECAPTCHA_SITE_KEY = ConstantsCommon.RECAPTCHA_SITE_KEY;
|
|
|
|
export const ExperimentBuckets = {
|
|
NOT_ELIGIBLE: -1,
|
|
CONTROL: 0,
|
|
TREATMENT_1: 1,
|
|
TREATMENT_2: 2,
|
|
TREATMENT_3: 3,
|
|
TREATMENT_4: 4,
|
|
TREATMENT_5: 5,
|
|
TREATMENT_6: 6,
|
|
TREATMENT_7: 7,
|
|
};
|
|
|
|
export const ExperimentTypes = {
|
|
GUILD: 'guild',
|
|
USER: 'user',
|
|
DEVELOPER: 'developer',
|
|
NONE: 'none',
|
|
};
|
|
|
|
export const ExperimentContextTypes = {
|
|
GUILD: 'guild',
|
|
CHANNEL: 'channel',
|
|
};
|
|
|
|
export const Experiments = {
|
|
RECOMMEND_MOBILE_NOTICE: 'recommend_mobile_notice',
|
|
SURVEY_VIDEO_CHAT: 'survey_video_chat',
|
|
INVITE_PERIOD: '2017-04_invite-period',
|
|
|
|
// NOTE: Temp id, not used for analytics
|
|
CHANNEL_CATEGORIES: 'channel_categories',
|
|
};
|
|
|
|
export const PopoutCallers = keyMirror({
|
|
CALL: null,
|
|
GROUP_DM: null,
|
|
});
|
|
|
|
export const ComponentActions = {
|
|
MODAL_SUBMIT: 'MODAL_SUBMIT',
|
|
MODAL_CLOSE: 'MODAL_CLOSE',
|
|
TEXTAREA_FOCUS: 'TEXTAREA_FOCUS',
|
|
TEXTAREA_BLUR: 'TEXTAREA_BLUR',
|
|
SCROLLTO_PRESENT: 'SCROLLTO_PRESENT',
|
|
SCROLLTO_CHANNEL: 'SCROLLTO_CHANNEL',
|
|
TOGGLE_CHANNEL_PINS: 'TOGGLE_CHANNEL_PINS',
|
|
TOGGLE_MENTIONS: 'TOGGLE_MENTIONS',
|
|
TOGGLE_EMOJI_POPOUT: 'TOGGLE_EMOJI_POPOUT',
|
|
TOGGLE_DM_CREATE: 'TOGGLE_DM_CREATE',
|
|
INSERT_TEXT: 'INSERT_TEXT',
|
|
SCROLL_PAGE_DOWN: 'SCROLL_PAGE_DOWN',
|
|
SCROLL_PAGE_UP: 'SCROLL_PAGE_UP',
|
|
FOCUS_FRIEND_SEARCH: 'FOCUS_FRIEND_SEARCH',
|
|
BLUR_INPUT: 'BLUR_INPUT',
|
|
POPOUT_CLOSE: 'POPOUT_CLOSE',
|
|
TOGGLE_HELP_MODAL: 'TOGGLE_HELP_MODAL',
|
|
UPLOAD_FILE: 'UPLOAD_FILE',
|
|
CALL_ACCEPT: 'CALL_ACCEPT',
|
|
CALL_DECLINE: 'CALL_DECLINE',
|
|
CALL_START: 'CALL_START',
|
|
DDR_ARROW_DOWN: 'DDR_ARROW_DOWN',
|
|
DDR_ARROW_UP: 'DDR_ARROW_UP',
|
|
SHAKE_APP: 'SHAKE_APP',
|
|
EMPHASIZE_NOTICE: 'EMPHASIZE_NOTICE',
|
|
TOGGLE_REACTION_POPOUT: (messageId: string) => `TOGGLE_REACTION_POPOUT_${messageId}`,
|
|
SET_SEARCH_QUERY: 'SET_SEARCH_QUERY',
|
|
FOCUS_SEARCH: 'FOCUS_SEARCH',
|
|
PERFORM_SEARCH: 'PERFORM_SEARCH',
|
|
QUICKSWITCHER_RESULT_FOCUS: 'QUICKSWITCHER_RESULT_FOCUS',
|
|
LAYER_POP_ESCAPE_KEY: 'LAYER_POP_ESCAPE_KEY',
|
|
LAYER_POP_COMPLETE: 'LAYER_POP_COMPLETE',
|
|
CONTEXT_MENU_CLOSE: 'CONTEXT_MENU_CLOSE',
|
|
};
|
|
|
|
// Used on keyboard shortcuts to minimize effects of repeat rate
|
|
export const NAVIGATION_THROTTLE = 50;
|
|
|
|
export const RPC_STARTING_PORT = 6463; // why is it 6463? 0x6463 = dc
|
|
export const RPC_PORT_RANGE = 10;
|
|
export const RPC_VERSION = 1;
|
|
|
|
export const PlatformTypes = {
|
|
TWITCH: 'twitch',
|
|
YOUTUBE: 'youtube',
|
|
SKYPE: 'skype',
|
|
STEAM: 'steam',
|
|
LEAGUE_OF_LEGENDS: 'leagueoflegends',
|
|
BATTLENET: 'battlenet',
|
|
REDDIT: 'reddit',
|
|
TWITTER: 'twitter',
|
|
};
|
|
|
|
export const UNSAFE_PLATFORM_TYPES = new Set([
|
|
PlatformTypes.SKYPE,
|
|
PlatformTypes.LEAGUE_OF_LEGENDS,
|
|
PlatformTypes.BATTLENET,
|
|
]);
|
|
|
|
export const SAFE_PLATFORM_TYPES = new Set([
|
|
PlatformTypes.TWITCH,
|
|
PlatformTypes.YOUTUBE,
|
|
PlatformTypes.REDDIT,
|
|
PlatformTypes.TWITTER,
|
|
PlatformTypes.STEAM,
|
|
]);
|
|
|
|
export const VERIFIABLE_PLATFORM_TYPES = new Set([...SAFE_PLATFORM_TYPES, ...[PlatformTypes.BATTLENET]]);
|
|
|
|
export const Arrows = keyMirror({
|
|
UP: null,
|
|
DOWN: null,
|
|
LEFT: null,
|
|
RIGHT: null,
|
|
});
|
|
|
|
export const DownloadLinks = {
|
|
IOS: 'https://itunes.apple.com/us/app/discord-chat-for-games/id985746746',
|
|
ANDROID: 'https://play.google.com/store/apps/details?id=com.discord',
|
|
};
|
|
|
|
export const DEFAULT_ROLE_COLOR = 0x99aab5;
|
|
export const ROLE_COLORS = [
|
|
0x1abc9c,
|
|
0x2ecc71,
|
|
0x3498db,
|
|
0x9b59b6,
|
|
0xe91e63,
|
|
0xf1c40f,
|
|
0xe67e22,
|
|
0xe74c3c,
|
|
0x95a5a6,
|
|
0x607d8b,
|
|
|
|
0x11806a,
|
|
0x1f8b4c,
|
|
0x206694,
|
|
0x71368a,
|
|
0xad1457,
|
|
0xc27c0e,
|
|
0xa84300,
|
|
0x992d22,
|
|
0x979c9f,
|
|
0x546e7a,
|
|
];
|
|
|
|
// iOS
|
|
|
|
export const DrawerTypes = ConstantsIOS.DrawerTypes;
|
|
export const AppStates = ConstantsIOS.AppStates;
|
|
export const Colors = ConstantsCommon.Colors;
|
|
export const Fonts = ConstantsCommon.Fonts;
|
|
export const Changeset = ConstantsIOS.Changeset;
|
|
export const RowType = ConstantsIOS.RowType;
|
|
export const SeparatorType = ConstantsIOS.SeparatorType;
|
|
export const SeparatorAction = ConstantsIOS.SeparatorAction;
|
|
export const WebBrowserType = ConstantsIOS.WebBrowserType;
|
|
export const GuildSettingsPermissionSections = ConstantsIOS.GuildSettingsPermissionSections;
|
|
export const MentionModalScenes = ConstantsIOS.MentionModalScenes;
|
|
export const VerificationModalScenes = ConstantsIOS.VerificationModalScenes;
|
|
export const SearchBarStates = ConstantsIOS.SearchBarStates;
|
|
export const NAV_BAR_HEIGHT = ConstantsIOS.NAV_BAR_HEIGHT;
|
|
export const STATUS_BAR_HEIGHT = ConstantsIOS.STATUS_BAR_HEIGHT;
|
|
export const NAV_HEIGHT = ConstantsIOS.NAV_HEIGHT;
|
|
export const SEARCH_BAR_HEIGHT = ConstantsIOS.SEARCH_BAR_HEIGHT;
|
|
export const FBSDKEvent = ConstantsIOS.FBSDKEvent;
|
|
|
|
export const PermissionOverrideType = keyMirror({
|
|
ROLE: null,
|
|
MEMBER: null,
|
|
});
|
|
|
|
// Features exposed by the native component.
|
|
export const NativeFeatures = {
|
|
ELECTRON_CONFIGURE_HARDWARE_ACCELERATION: 'electron_configure_hardware_acceleration',
|
|
VOICE_SOUND_STOP_LOOP: 'voice_sound_stop_loop',
|
|
VOICE_RELATIVE_SOUNDS: 'voice_relative_sounds',
|
|
VOICE_LEGACY_SUBSYSTEM: 'voice_legacy_subsystem',
|
|
VOICE_PANNING: 'voice_panning',
|
|
};
|
|
|
|
export const SearchTokenTypes = keyMirror({
|
|
FILTER_FROM: null,
|
|
FILTER_MENTIONS: null,
|
|
ANSWER_USERNAME_FROM: null,
|
|
ANSWER_USERNAME_MENTIONS: null,
|
|
FILTER_HAS: null,
|
|
ANSWER_HAS: null,
|
|
// TODO: Uncomment when the backend is ready
|
|
// FILTER_LINK_FROM: null,
|
|
// ANSWER_LINK_FROM: null,
|
|
FILTER_FILE_TYPE: null,
|
|
ANSWER_FILE_TYPE: null,
|
|
FILTER_FILE_NAME: null,
|
|
ANSWER_FILE_NAME: null,
|
|
FILTER_BEFORE: null,
|
|
ANSWER_BEFORE: null,
|
|
FILTER_AFTER: null,
|
|
ANSWER_AFTER: null,
|
|
FILTER_ON: null,
|
|
ANSWER_ON: null,
|
|
FILTER_IN: null,
|
|
ANSWER_IN: null,
|
|
});
|
|
|
|
export const SearchAutocompleteGroups = keyMirror({
|
|
HISTORY: null,
|
|
SEARCH_OPTIONS: null,
|
|
DATES: null,
|
|
});
|
|
|
|
export const SearchPopoutModes = keyMirror({
|
|
EMPTY: null,
|
|
FILTER: null,
|
|
FILTER_ALL: null,
|
|
});
|
|
|
|
export const SEARCH_DATE_FORMAT = 'YYYY-MM-DD';
|
|
export const SEARCH_MONTH_FORMAT = 'MMMM';
|
|
export const SEARCH_POPOUT_ID = 'search-popout';
|
|
|
|
export const PremiumPlans = {
|
|
MONTHLY: 'premium_month',
|
|
YEARLY: 'premium_year',
|
|
};
|
|
|
|
export const PremiumPlanPrices = {
|
|
MONTHLY: '4.99',
|
|
YEARLY: '49.99',
|
|
};
|
|
|
|
export const CurrencySymbols = {
|
|
USD: '$',
|
|
};
|
|
|
|
export const CurrencyCodes = keyMirror({
|
|
USD: null,
|
|
});
|
|
|
|
export const PaymentSettings = {
|
|
STRIPE: {
|
|
KEY: process.env.STRIPE_KEY,
|
|
PAYMENT_GATEWAY: 'stripe',
|
|
},
|
|
};
|
|
|
|
export const PaymentStatusTypes = {
|
|
PENDING: 0,
|
|
COMPLETED: 1,
|
|
FAILED: 2,
|
|
REVERSED: 3,
|
|
REFUNDED: 4,
|
|
};
|
|
|
|
export const PremiumStatusTypes = {
|
|
UNPAID: 0,
|
|
ACTIVE: 1,
|
|
PAST_DUE: 2,
|
|
CANCELED: 3,
|
|
};
|
|
|
|
export const PaymentModelModes = keyMirror({
|
|
NEW: null,
|
|
CHANGE: null,
|
|
RESUBSCRIBE: null,
|
|
});
|
|
|
|
export const FancyInputRefs = keyMirror({
|
|
CARD_NUMBER: null,
|
|
EXPIRATION: null,
|
|
SECURITY_CODE: null,
|
|
ZIP_CODE: null,
|
|
});
|
|
|
|
export const MAX_IMAGE_WIDTH = 2560;
|
|
export const MAX_IMAGE_HEIGHT = 2560;
|
|
|
|
export const QuickSwitcherResultTypes = keyMirror({
|
|
GUILD: null,
|
|
TEXT_CHANNEL: null,
|
|
GROUP_DM: null,
|
|
VOICE_CHANNEL: null,
|
|
USER: null,
|
|
HEADER: null,
|
|
});
|
|
|
|
export const Accessibility = {
|
|
FONT_SCALE_DEFAULT: 100,
|
|
FONT_SCALE_MIN: 70,
|
|
FONT_SCALE_MAX: 200,
|
|
FONT_SCALES: [82, 92, 100, 110, 125, 150],
|
|
|
|
ZOOM_DEFAULT: 100,
|
|
ZOOM_MIN: 50,
|
|
ZOOM_MAX: 200,
|
|
ZOOM_SCALES: [50, 67, 75, 80, 90, 100, 110, 125, 150, 175, 200],
|
|
};
|
|
|
|
export const INVITE_BANNER_MEMBER_THRESHOLD = 1;
|
|
|
|
export const AnalyticEvents = {
|
|
EMAIL_CLICKED: 'email_clicked',
|
|
|
|
INVITE_OPENED: 'invite_opened',
|
|
INVITE_APP_INVOKED: 'invite_app_invoked',
|
|
INVITE_APP_OPENED: 'invite_app_opened',
|
|
INVITE_APP_DOWNLOADED: 'invite_app_downloaded',
|
|
INVITE_LEARN_MORE: 'invite_learn_more',
|
|
INVITE_LOGIN: 'invite_login',
|
|
INVITE_LOGIN_SUCCESSFUL: 'invite_login_successful',
|
|
|
|
QUICKSWITCHER_OPENED: 'quickswitcher_opened',
|
|
QUICKSWITCHER_CLOSED: 'quickswitcher_closed',
|
|
QUICKSWITCHER_RESULT_SELECTED: 'quickswitcher_result_selected',
|
|
|
|
NOTIFICATION_CLICKED: 'notification_clicked',
|
|
|
|
ACK_MESSAGES: 'ack_messages',
|
|
|
|
JOIN_VOICE_CHANNEL: 'join_voice_channel',
|
|
LEAVE_VOICE_CHANNEL: 'leave_voice_channel',
|
|
VOICE_CONNECT: 'voice_connect',
|
|
START_SPEAKING: 'start_speaking',
|
|
START_LISTENING: 'start_listening',
|
|
|
|
SETTINGS_PANE_VIEWED: 'settings_pane_viewed',
|
|
CHANNEL_NOTICE_VIEWED: 'channel_notice_viewed',
|
|
CHANNEL_NOTICE_CLOSED: 'channel_notice_closed',
|
|
};
|
|
|
|
export const UserSearchWorkerMessageTypes = keyMirror({
|
|
UPDATE_USERS: null,
|
|
USER_RESULTS: null,
|
|
QUERY_SET: null,
|
|
QUERY_CLEAR: null,
|
|
});
|
|
|
|
export const PublicReleaseChannels = {
|
|
CANARY: 'canary',
|
|
PTB: 'ptb',
|
|
STABLE: 'stable',
|
|
};
|
|
|
|
export const UserFlags = {
|
|
STAFF: 1 << 0,
|
|
PARTNER: 1 << 1,
|
|
HYPESQUAD: 1 << 2,
|
|
};
|
|
|
|
export const ChannelNoticeTypes = keyMirror({
|
|
MFA_WARNING: null,
|
|
INVITE: null,
|
|
QUICKSWITCHER: null,
|
|
});
|
|
|
|
export const CHANNEL_NOTICE_SHOW_DELAY = 1000 * 60 * 60 * 24;
|
|
|
|
export const CallLayouts = {
|
|
NORMAL: 'normal',
|
|
MINIMUM: 'minimum',
|
|
NO_CHAT: 'no-chat',
|
|
FULL_SCREEN: 'full-screen',
|
|
};
|
|
|
|
export const Layers = keyMirror({
|
|
USER_SETTINGS: null,
|
|
CHANNEL_SETTINGS: null,
|
|
GUILD_SETTINGS: null,
|
|
VERIFICATION: null,
|
|
});
|
|
|
|
export const AuditLogActions = {
|
|
ALL: null,
|
|
|
|
GUILD_UPDATE: 1,
|
|
|
|
CHANNEL_CREATE: 10,
|
|
CHANNEL_UPDATE: 11,
|
|
CHANNEL_DELETE: 12,
|
|
CHANNEL_OVERWRITE_CREATE: 13,
|
|
CHANNEL_OVERWRITE_UPDATE: 14,
|
|
CHANNEL_OVERWRITE_DELETE: 15,
|
|
|
|
MEMBER_KICK: 20,
|
|
MEMBER_PRUNE: 21,
|
|
MEMBER_BAN_ADD: 22,
|
|
MEMBER_BAN_REMOVE: 23,
|
|
MEMBER_UPDATE: 24,
|
|
MEMBER_ROLE_UPDATE: 25,
|
|
|
|
ROLE_CREATE: 30,
|
|
ROLE_UPDATE: 31,
|
|
ROLE_DELETE: 32,
|
|
|
|
INVITE_CREATE: 40,
|
|
INVITE_UPDATE: 41,
|
|
INVITE_DELETE: 42,
|
|
|
|
WEBHOOK_CREATE: 50,
|
|
WEBHOOK_UPDATE: 51,
|
|
WEBHOOK_DELETE: 52,
|
|
|
|
EMOJI_CREATE: 60,
|
|
EMOJI_UPDATE: 61,
|
|
EMOJI_DELETE: 62,
|
|
|
|
MESSAGE_DELETE: 72,
|
|
};
|
|
|
|
export const AuditLogActionTypes = keyMirror({
|
|
ALL: null,
|
|
CREATE: null,
|
|
UPDATE: null,
|
|
DELETE: null,
|
|
});
|
|
|
|
export const AuditLogSubtargetTypes = {
|
|
USER: 'member',
|
|
ROLE: 'role',
|
|
};
|
|
|
|
export const AuditLogTargetTypes = keyMirror({
|
|
ALL: null,
|
|
GUILD: null,
|
|
CHANNEL: null,
|
|
USER: null,
|
|
ROLE: null,
|
|
INVITE: null,
|
|
WEBHOOK: null,
|
|
EMOJI: null,
|
|
});
|
|
|
|
export const AuditLogChangeKeys = {
|
|
NAME: 'name',
|
|
ICON_HASH: 'icon_hash',
|
|
SPLASH_HASH: 'splash_hash',
|
|
OWNER_ID: 'owner_id',
|
|
REGION: 'region',
|
|
AFK_CHANNEL_ID: 'afk_channel_id',
|
|
AFK_TIMEOUT: 'afk_timeout',
|
|
MFA_LEVEL: 'mfa_level',
|
|
WIDGET_ENABLED: 'widget_enabled',
|
|
WIDGET_CHANNEL_ID: 'widget_channel_id',
|
|
VERIFICATION_LEVEL: 'verification_level',
|
|
EXPLICIT_CONTENT_FILTER: 'explicit_content_filter',
|
|
DEFAULT_MESSAGE_NOTIFICATIONS: 'default_message_notifications',
|
|
VANITY_URL_CODE: 'vanity_url_code',
|
|
POSITION: 'position',
|
|
TOPIC: 'topic',
|
|
TYPE: 'type',
|
|
BITRATE: 'bitrate',
|
|
PERMISSION_OVERRIDES: 'permission_overrides',
|
|
ROLES_ADD: '$add',
|
|
ROLES_REMOVE: '$remove',
|
|
NICK: 'nick',
|
|
DEAF: 'deaf',
|
|
MUTE: 'mute',
|
|
PERMISSIONS: 'permissions',
|
|
COLOR: 'color',
|
|
HOIST: 'hoist',
|
|
MENTIONABLE: 'mentionable',
|
|
CODE: 'code',
|
|
CHANNEL_ID: 'channel_id',
|
|
INVITER_ID: 'inviter_id',
|
|
MAX_USES: 'max_uses',
|
|
USES: 'uses',
|
|
MAX_AGE: 'max_age',
|
|
TEMPORARY: 'temporary',
|
|
APPLICATION_ID: 'application_id',
|
|
AVATAR_HASH: 'avatar_hash',
|
|
ID: 'id',
|
|
PERMISSIONS_GRANTED: 'allow',
|
|
PERMISSIONS_DENIED: 'deny',
|
|
REASON: 'reason',
|
|
PRUNE_DELETE_DAYS: 'prune_delete_days',
|
|
};
|
|
|
|
export const AUDIT_LOG_PAGE_LIMIT = 50;
|
|
|
|
export const UserRequiredActions = keyMirror({
|
|
AGREEMENTS: null,
|
|
REQUIRE_CAPTCHA: null,
|
|
REQUIRE_VERIFIED_EMAIL: null,
|
|
REQUIRE_VERIFIED_PHONE: null,
|
|
});
|
|
|
|
export const VerificationTypes = {
|
|
CAPTCHA: 'captcha',
|
|
EMAIL_OR_PHONE: 'email',
|
|
PHONE: 'phone',
|
|
};
|
|
|
|
export const MAX_REASON_LENGTH = 512;
|
|
|
|
export const MouseButtons = {
|
|
PRIMARY: 0,
|
|
SECONDARY: 2,
|
|
WHEEL: 4,
|
|
BACK: 8,
|
|
FORWARD: 16,
|
|
};
|
|
|
|
export const PictureInPicturePositions = {
|
|
TOP_LEFT: 'top-left',
|
|
TOP_RIGHT: 'top-right',
|
|
BOTTOM_LEFT: 'bottom-left',
|
|
BOTTOM_RIGHT: 'bottom-right',
|
|
};
|
|
|
|
export const PictureInPictureComponents = {
|
|
VIDEO: 'VIDEO',
|
|
};
|
|
|
|
|
|
|
|
// WEBPACK FOOTER //
|
|
// ./discord_app/Constants.js
|