mattermost-mobile/app/constants/database.ts
Elias Nahum c452ef8038
[Gekidou] Login entry point (#5568)
* Login entry point

* feedback review

* sort imports

* Fix model relations

* Handle when no current team or current channel has been selected

* Fix MFA unit test

* update prepareCommonSystemValues arguments
2021-07-26 12:03:43 +04:00

70 lines
1.9 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import keyMirror from '@utils/key_mirror';
export const MM_TABLES = {
APP: {
INFO: 'Info',
GLOBAL: 'Global',
SERVERS: 'Servers',
},
SERVER: {
CHANNEL: 'Channel',
CHANNEL_INFO: 'ChannelInfo',
CHANNEL_MEMBERSHIP: 'ChannelMembership',
CUSTOM_EMOJI: 'CustomEmoji',
DRAFT: 'Draft',
FILE: 'File',
GROUP: 'Group',
GROUPS_IN_CHANNEL: 'GroupsInChannel',
GROUPS_IN_TEAM: 'GroupsInTeam',
GROUP_MEMBERSHIP: 'GroupMembership',
MY_CHANNEL: 'MyChannel',
MY_CHANNEL_SETTINGS: 'MyChannelSettings',
MY_TEAM: 'MyTeam',
POST: 'Post',
POSTS_IN_CHANNEL: 'PostsInChannel',
POSTS_IN_THREAD: 'PostsInThread',
POST_METADATA: 'PostMetadata',
PREFERENCE: 'Preference',
REACTION: 'Reaction',
ROLE: 'Role',
SLASH_COMMAND: 'SlashCommand',
SYSTEM: 'System',
TEAM: 'Team',
TEAM_CHANNEL_HISTORY: 'TeamChannelHistory',
TEAM_MEMBERSHIP: 'TeamMembership',
TEAM_SEARCH_HISTORY: 'TeamSearchHistory',
TERMS_OF_SERVICE: 'TermsOfService',
USER: 'User',
},
};
export const MIGRATION_EVENTS = keyMirror({
MIGRATION_ERROR: null,
MIGRATION_STARTED: null,
MIGRATION_SUCCESS: null,
});
export const SYSTEM_IDENTIFIERS = {
CONFIG: 'config',
CURRENT_CHANNEL_ID: 'currentChannelId',
CURRENT_TEAM_ID: 'currentTeamId',
CURRENT_USER_ID: 'currentUserId',
DATA_RETENTION_POLICIES: 'dataRetentionPolicies',
LICENSE: 'license',
WEBSOCKET: 'WebSocket',
};
export const GLOBAL_IDENTIFIERS = {
DEVICE_TOKEN: 'deviceToken',
MENTION_COUNT: 'mentionCount',
};
export default {
GLOBAL_IDENTIFIERS,
MM_TABLES,
MIGRATION_EVENTS,
SYSTEM_IDENTIFIERS,
};