Files
mattermost-mobile/types/launch/index.ts
Elias Nahum 17e832e689 [Gekidou] Refactor storage layer (#5471)
* Refactored storage layer - in progress

* Refactored DatabaseManager & Operators

* Renamed isRecordAppEqualToRaw to isRecordInfoEqualToRaw

* Review feedback

* Update app/database/models/app/info.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/database/models/server/my_team.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
2021-06-21 17:06:18 -04:00

54 lines
1.2 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
export interface DeepLink {
serverUrl: string;
teamName: string;
}
export interface DeepLinkChannel extends DeepLink {
channelName: string;
}
export interface DeepLinkDM extends DeepLink {
userName: string;
}
export interface DeepLinkPermalink extends DeepLink {
postId: string;
}
export interface DeepLinkGM extends DeepLink {
channelId: string;
}
export const DeepLinkType = {
Channel: 'channel',
DirectMessage: 'dm',
GroupMessage: 'gm',
Invalid: 'invalid',
Permalink: 'permalink',
} as const;
export type DeepLinkType = typeof DeepLinkType[keyof typeof DeepLinkType];
export interface DeepLinkWithData {
type: DeepLinkType;
data?: DeepLinkChannel | DeepLinkDM | DeepLinkGM | DeepLinkPermalink;
}
export const LaunchType = {
Normal: 'normal',
DeepLink: 'deeplink',
Notification: 'notification',
} as const;
export type LaunchType = typeof LaunchType[keyof typeof LaunchType];
export interface LaunchProps {
extra?: DeepLinkWithData | NotificationWithData;
launchType: LaunchType;
launchError?: Boolean;
serverUrl?: string;
}