mattermost-mobile/app/constants/database.ts
Mattermost Build 7b8d37153f
Add Playbooks read-only support for mobile devices (#8978) (#8987)
* Add the channel options to get into playbooks (#8750)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Address design issues

* Add requested comment

---------



* Playbooks database (#8802)

* Add lastPlaybookFetchAt to channel table (#8916)

* Add lastPlaybookFetchAt to channel table

* Add missing commit

* Use my_channel table instead

* Fix test

* Address feedback

* First implementation of playbooks API (#8897)

* First implementation of playbooks API

* Add version check

* Address feedback

* Fix test

* Add last fetch at usage and other improvements

* Simplify test

* Add sort_order, update_at and previousReminder columns (#8927)

* Add sort_order, update_at and previousReminder columns

* Remove order from the schema

* Fix tests

* Add tests

* Add websockets for playbooks (#8947)

* Add websocket events for playbooks

* Fix typo

* Add playbook run list (#8761)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Add playbook run list

* Add missing texts

* Add back button support and item size to flash list

* Address design issues

* Add requested comment

* Standardize tag and use it in the card

* Fix merge

* Add API related functionality

---------



* Add playbooks run details (#8872)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Add playbook run list

* Add missing texts

* Add back button support and item size to flash list

* Address design issues

* Add requested comment

* Standardize tag and use it in the card

* Add playbooks run details

* Fix merge

* Add API related functionality

* Add API related changes

* Order fixes

* Several fixes

* Add error state on playbook run

* i18n-extract

* Fix tests

* Fix test

* Several fixes

* Fixes and add missing UI elements

* i18n-extract

* Fix tests

* Remove files from bad merge

---------



* Add missing tests for playbooks (#8976)

* Add the channel options to get into playbooks

* Use playbook run id instead of playbook id

* i18n

* Fix issues and move playbooks to the products folder

* Address some tests

* Fix test

* Add playbook run list

* Add missing texts

* Add back button support and item size to flash list

* Address design issues

* Add requested comment

* Standardize tag and use it in the card

* Add playbooks run details

* Fix merge

* Add API related functionality

* Add API related changes

* Order fixes

* Several fixes

* Add error state on playbook run

* i18n-extract

* Fix tests

* Fix test

* Several fixes

* Fixes and add missing UI elements

* i18n-extract

* Fix tests

* Remove files from bad merge

* Add tests

* Fix typo

* Add missing strings

* Fix tests and skip some

* Fix test

* Fix typo

---------



* Address feedback

* Address feedback and fix tests

* Address comments and fix tests

* Address feedback

* Address plugin changes and fix bugs

---------


(cherry picked from commit bb7ff622af)

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2025-07-14 11:00:15 +03:00

110 lines
3.3 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: {
CATEGORY: 'Category',
CATEGORY_CHANNEL: 'CategoryChannel',
CHANNEL: 'Channel',
CHANNEL_BOOKMARK: 'ChannelBookmark',
CHANNEL_INFO: 'ChannelInfo',
CHANNEL_MEMBERSHIP: 'ChannelMembership',
CONFIG: 'Config',
CUSTOM_EMOJI: 'CustomEmoji',
CUSTOM_PROFILE_FIELD: 'CustomProfileField',
CUSTOM_PROFILE_ATTRIBUTE: 'CustomProfileAttribute',
DRAFT: 'Draft',
FILE: 'File',
GROUP: 'Group',
GROUP_CHANNEL: 'GroupChannel',
GROUP_MEMBERSHIP: 'GroupMembership',
GROUP_TEAM: 'GroupTeam',
MY_CHANNEL: 'MyChannel',
MY_CHANNEL_SETTINGS: 'MyChannelSettings',
MY_TEAM: 'MyTeam',
POST: 'Post',
POSTS_IN_CHANNEL: 'PostsInChannel',
POSTS_IN_THREAD: 'PostsInThread',
PREFERENCE: 'Preference',
REACTION: 'Reaction',
ROLE: 'Role',
SCHEDULED_POST: 'ScheduledPost',
SYSTEM: 'System',
TEAM: 'Team',
TEAM_CHANNEL_HISTORY: 'TeamChannelHistory',
TEAM_MEMBERSHIP: 'TeamMembership',
TEAM_SEARCH_HISTORY: 'TeamSearchHistory',
THREAD: 'Thread',
THREADS_IN_TEAM: 'ThreadsInTeam',
THREAD_PARTICIPANT: 'ThreadParticipant',
TEAM_THREADS_SYNC: 'TeamThreadsSync',
USER: 'User',
},
};
export const MIGRATION_EVENTS = keyMirror({
MIGRATION_ERROR: null,
MIGRATION_STARTED: null,
MIGRATION_SUCCESS: null,
});
export const SYSTEM_IDENTIFIERS = {
CURRENT_CHANNEL_ID: 'currentChannelId',
LAST_UNREAD_CHANNEL_ID: 'lastUnreadChannelId',
CURRENT_TEAM_ID: 'currentTeamId',
CURRENT_USER_ID: 'currentUserId',
DATA_RETENTION_POLICIES: 'dataRetentionPolicies',
EXPANDED_LINKS: 'expandedLinks',
GRANULAR_DATA_RETENTION_POLICIES: 'granularDataRetentionPolicies',
LAST_DATA_RETENTION_RUN: 'lastDataRetentionRun',
GLOBAL_THREADS_TAB: 'globalThreadsTab',
LAST_DISMISSED_BANNER: 'lastDismissedBanner',
LAST_SERVER_VERSION_CHECK: 'LastServerVersionCheck',
LICENSE: 'license',
ONLY_UNREADS: 'onlyUnreads',
PUSH_VERIFICATION_STATUS: 'pushVerificationStatus',
RECENT_CUSTOM_STATUS: 'recentCustomStatus',
RECENT_MENTIONS: 'recentMentions',
RECENT_REACTIONS: 'recentReactions',
SESSION_EXPIRATION: 'sessionExpiration',
TEAM_HISTORY: 'teamHistory',
WEBSOCKET: 'WebSocket',
PLAYBOOKS_VERSION: 'playbooks_version',
};
export const GLOBAL_IDENTIFIERS = {
DEVICE_TOKEN: 'deviceToken',
DONT_ASK_FOR_REVIEW: 'dontAskForReview',
FIRST_LAUNCH: 'firstLaunch',
LAST_ASK_FOR_REVIEW: 'lastAskForReview',
ONBOARDING: 'onboarding',
LAST_VIEWED_CHANNEL: 'lastViewedChannel',
LAST_VIEWED_THREAD: 'lastViewedThread',
PUSH_DISABLED_ACK: 'pushDisabledAck',
};
export enum OperationType {
CREATE = 'CREATE',
UPDATE = 'UPDATE',
DELETE = 'DELETE',
}
// The only two types of databases in the app
export enum DatabaseType {
DEFAULT,
SERVER,
}
export default {
GLOBAL_IDENTIFIERS,
MM_TABLES,
MIGRATION_EVENTS,
SYSTEM_IDENTIFIERS,
};