Files
mattermost-mobile/types/launch/index.ts
Daniel Espino García f4e6917185 Ensure no unresolved types in the definition files (#6521)
* Ensure no unresolved types in the definition files

* Address feedback and general cleanup

* Move import from @constants/x to @constants where relevant

* Remove unneeded "import as"
2022-08-05 14:36:19 +02:00

48 lines
1.1 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import type {DeepLink, Launch} from '@constants';
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 interface DeepLinkPlugin extends DeepLink {
id: string;
}
export type DeepLinkType = typeof DeepLink[keyof typeof DeepLink];
export interface DeepLinkWithData {
type: DeepLinkType;
data?: DeepLinkChannel | DeepLinkDM | DeepLinkGM | DeepLinkPermalink | DeepLinkPlugin;
}
export type LaunchType = typeof Launch[keyof typeof Launch];
export interface LaunchProps {
extra?: DeepLinkWithData | NotificationWithData;
launchType: LaunchType;
launchError?: Boolean;
serverUrl?: string;
displayName?: string;
time?: number;
}