mattermost-mobile/app/mm-redux/constants/apps.ts
Daniel Espino García df7945318e
[Apps Framework] Separate calls (#5877)
* Port https://github.com/mattermost/mattermost-webapp/pull/9263 to mobile

* Fix forms props from commands and missing error->text change

* lint

* various fixes

* fix lookups for command parser

* update app command parser

* fixes

* fixes with embedded forms

* lint and types

* remove bindings.expanded fix for cleaning bindings on render

* lint

* re-expand bindings on post update

Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
2022-03-24 11:03:06 -04:00

44 lines
1.2 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {AppCallResponseType, AppExpandLevel, AppFieldType} from '@mm-redux/types/apps';
export const AppBindingLocations = {
POST_MENU_ITEM: '/post_menu',
CHANNEL_HEADER_ICON: '/channel_header',
COMMAND: '/command',
IN_POST: '/in_post',
};
export const AppBindingPresentations = {
MODAL: 'modal',
};
export const AppCallResponseTypes: { [name: string]: AppCallResponseType } = {
OK: 'ok',
ERROR: 'error',
FORM: 'form',
CALL: 'call',
NAVIGATE: 'navigate',
};
export const AppExpandLevels: { [name: string]: AppExpandLevel } = {
EXPAND_DEFAULT: '',
EXPAND_NONE: 'none',
EXPAND_ALL: 'all',
EXPAND_SUMMARY: 'summary',
};
export const AppFieldTypes: { [name: string]: AppFieldType } = {
TEXT: 'text',
STATIC_SELECT: 'static_select',
DYNAMIC_SELECT: 'dynamic_select',
BOOL: 'bool',
USER: 'user',
CHANNEL: 'channel',
MARKDOWN: 'markdown',
};
export const COMMAND_SUGGESTION_ERROR = 'error';
export const COMMAND_SUGGESTION_CHANNEL = 'channel';
export const COMMAND_SUGGESTION_USER = 'user';