2021-12-03 19:27:57 +00:00
|
|
|
import { NavigatorScreenParams } from '@react-navigation/core';
|
|
|
|
import { TextInputProps } from 'react-native';
|
|
|
|
import Model from '@nozbe/watermelondb/Model';
|
|
|
|
|
2022-01-17 16:10:39 +00:00
|
|
|
import { IRoom } from '../definitions/IRoom';
|
2021-12-03 19:27:57 +00:00
|
|
|
import { IOptionsField } from '../views/NotificationPreferencesView/options';
|
|
|
|
import { IServer } from '../definitions/IServer';
|
|
|
|
import { IAttachment } from '../definitions/IAttachment';
|
2022-04-01 15:32:17 +00:00
|
|
|
import { IMessage, TMessageModel } from '../definitions/IMessage';
|
2022-01-11 13:51:48 +00:00
|
|
|
import { ISubscription, SubscriptionType, TSubscriptionModel } from '../definitions/ISubscription';
|
2022-02-04 22:15:01 +00:00
|
|
|
import { ICannedResponse } from '../definitions/ICannedResponse';
|
2022-02-25 18:59:39 +00:00
|
|
|
import { ModalStackParamList } from './MasterDetailStack/types';
|
2021-12-03 19:27:57 +00:00
|
|
|
|
|
|
|
export type ChatsStackParamList = {
|
2022-02-25 18:59:39 +00:00
|
|
|
ModalStackNavigator: NavigatorScreenParams<ModalStackParamList>;
|
|
|
|
E2ESaveYourPasswordStackNavigator: NavigatorScreenParams<E2ESaveYourPasswordStackParamList>;
|
|
|
|
E2EEnterYourPasswordStackNavigator: NavigatorScreenParams<E2EEnterYourPasswordStackParamList>;
|
|
|
|
SettingsView: any;
|
|
|
|
NewMessageStackNavigator: any;
|
|
|
|
NewMessageStack: undefined;
|
2021-12-03 19:27:57 +00:00
|
|
|
RoomsListView: undefined;
|
2022-03-02 14:49:43 +00:00
|
|
|
RoomView:
|
|
|
|
| {
|
|
|
|
rid: string;
|
|
|
|
t: SubscriptionType;
|
|
|
|
tmid?: string;
|
2022-04-01 15:32:17 +00:00
|
|
|
message?: TMessageModel;
|
2022-03-02 14:49:43 +00:00
|
|
|
name?: string;
|
|
|
|
fname?: string;
|
|
|
|
prid?: string;
|
|
|
|
room?: TSubscriptionModel | { rid: string; t: string; name?: string; fname?: string; prid?: string };
|
|
|
|
jumpToMessageId?: string;
|
|
|
|
jumpToThreadId?: string;
|
|
|
|
roomUserId?: string | null;
|
|
|
|
usedCannedResponse?: string;
|
|
|
|
}
|
|
|
|
| undefined; // Navigates back to RoomView already on stack
|
2021-12-03 19:27:57 +00:00
|
|
|
RoomActionsView: {
|
2022-03-02 14:49:43 +00:00
|
|
|
room: TSubscriptionModel;
|
2021-12-03 19:27:57 +00:00
|
|
|
member: any;
|
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
t: SubscriptionType;
|
2021-12-03 19:27:57 +00:00
|
|
|
joined: boolean;
|
|
|
|
};
|
|
|
|
SelectListView: {
|
2022-03-02 14:49:43 +00:00
|
|
|
data?: IRoom[];
|
2021-12-03 19:27:57 +00:00
|
|
|
title: string;
|
2022-03-02 14:49:43 +00:00
|
|
|
infoText?: string;
|
2022-01-17 16:10:39 +00:00
|
|
|
nextAction: (selected: string[]) => void;
|
2022-03-02 14:49:43 +00:00
|
|
|
showAlert?: () => void;
|
|
|
|
isSearch?: boolean;
|
|
|
|
onSearch?: (text: string) => Promise<Partial<IRoom[]> | any>;
|
2021-12-03 19:27:57 +00:00
|
|
|
isRadio?: boolean;
|
|
|
|
};
|
|
|
|
RoomInfoView: {
|
2022-03-03 21:46:53 +00:00
|
|
|
room?: ISubscription;
|
2022-04-01 21:52:38 +00:00
|
|
|
member?: any;
|
2021-12-03 19:27:57 +00:00
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
t: SubscriptionType;
|
2022-03-03 21:46:53 +00:00
|
|
|
showCloseModal?: boolean;
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
RoomInfoEditView: {
|
|
|
|
rid: string;
|
|
|
|
};
|
|
|
|
RoomMembersView: {
|
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
room: ISubscription;
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
2022-01-17 19:55:33 +00:00
|
|
|
DiscussionsView: {
|
|
|
|
rid: string;
|
2022-01-24 18:35:06 +00:00
|
|
|
t: SubscriptionType;
|
2022-01-17 19:55:33 +00:00
|
|
|
};
|
2021-12-03 19:27:57 +00:00
|
|
|
SearchMessagesView: {
|
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
t: SubscriptionType;
|
2021-12-03 19:27:57 +00:00
|
|
|
encrypted?: boolean;
|
|
|
|
showCloseModal?: boolean;
|
|
|
|
};
|
|
|
|
SelectedUsersView: {
|
|
|
|
maxUsers?: number;
|
|
|
|
showButton?: boolean;
|
|
|
|
title?: string;
|
|
|
|
buttonText?: string;
|
2022-01-17 16:10:39 +00:00
|
|
|
nextAction?(): void;
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
InviteUsersView: {
|
|
|
|
rid: string;
|
|
|
|
};
|
|
|
|
InviteUsersEditView: {
|
|
|
|
rid: string;
|
|
|
|
};
|
|
|
|
MessagesView: {
|
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
t: SubscriptionType;
|
2021-12-03 19:27:57 +00:00
|
|
|
name: string;
|
|
|
|
};
|
|
|
|
AutoTranslateView: {
|
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
room: TSubscriptionModel;
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
DirectoryView: undefined;
|
|
|
|
NotificationPrefView: {
|
|
|
|
rid: string;
|
|
|
|
room: Model;
|
|
|
|
};
|
|
|
|
ForwardLivechatView: {
|
|
|
|
rid: string;
|
|
|
|
};
|
|
|
|
LivechatEditView: {
|
2022-01-11 13:51:48 +00:00
|
|
|
room: ISubscription;
|
2021-12-03 19:27:57 +00:00
|
|
|
roomUser: any; // TODO: Change
|
|
|
|
};
|
|
|
|
PickerView: {
|
|
|
|
title: string;
|
|
|
|
data: IOptionsField[];
|
2022-02-17 14:57:30 +00:00
|
|
|
value?: string;
|
|
|
|
onSearch?: (text?: string) => Promise<any>;
|
|
|
|
onEndReached?: (text: string, offset?: number) => Promise<any>;
|
|
|
|
total?: number;
|
2021-12-03 19:27:57 +00:00
|
|
|
goBack?: boolean;
|
|
|
|
onChangeValue: Function;
|
|
|
|
};
|
|
|
|
ThreadMessagesView: {
|
|
|
|
rid: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
t: SubscriptionType;
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
TeamChannelsView: {
|
|
|
|
teamId: string;
|
|
|
|
};
|
|
|
|
CreateChannelView: {
|
|
|
|
isTeam?: boolean; // TODO: To check
|
|
|
|
teamId?: string;
|
|
|
|
};
|
|
|
|
AddChannelTeamView: {
|
|
|
|
teamId?: string;
|
|
|
|
teamChannels: []; // TODO: Change
|
|
|
|
};
|
|
|
|
AddExistingChannelView: {
|
|
|
|
teamId?: string;
|
|
|
|
teamChannels: []; // TODO: Change
|
|
|
|
};
|
|
|
|
MarkdownTableView: {
|
|
|
|
renderRows: (drawExtraBorders?: boolean) => JSX.Element;
|
|
|
|
tableWidth: number;
|
|
|
|
};
|
|
|
|
ReadReceiptsView: {
|
|
|
|
messageId: string;
|
|
|
|
};
|
|
|
|
QueueListView: undefined;
|
|
|
|
CannedResponsesListView: {
|
|
|
|
rid: string;
|
|
|
|
};
|
|
|
|
CannedResponseDetail: {
|
2022-02-04 22:15:01 +00:00
|
|
|
cannedResponse: ICannedResponse;
|
2022-01-11 13:51:48 +00:00
|
|
|
room: ISubscription;
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type ProfileStackParamList = {
|
|
|
|
ProfileView: undefined;
|
|
|
|
UserPreferencesView: undefined;
|
|
|
|
UserNotificationPrefView: undefined;
|
|
|
|
PickerView: {
|
|
|
|
title: string;
|
|
|
|
data: IOptionsField[];
|
|
|
|
value: any; // TODO: Change
|
|
|
|
onChangeText?: TextInputProps['onChangeText'];
|
|
|
|
goBack?: Function;
|
|
|
|
onChangeValue: Function;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type SettingsStackParamList = {
|
|
|
|
SettingsView: undefined;
|
|
|
|
SecurityPrivacyView: undefined;
|
|
|
|
E2EEncryptionSecurityView: undefined;
|
|
|
|
LanguageView: undefined;
|
|
|
|
ThemeView: undefined;
|
|
|
|
DefaultBrowserView: undefined;
|
|
|
|
ScreenLockConfigView: undefined;
|
|
|
|
ProfileView: undefined;
|
|
|
|
DisplayPrefsView: undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type AdminPanelStackParamList = {
|
|
|
|
AdminPanelView: undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type DisplayPrefStackParamList = {
|
|
|
|
DisplayPrefsView: undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type DrawerParamList = {
|
|
|
|
ChatsStackNavigator: NavigatorScreenParams<ChatsStackParamList>;
|
|
|
|
ProfileStackNavigator: NavigatorScreenParams<ProfileStackParamList>;
|
|
|
|
SettingsStackNavigator: NavigatorScreenParams<SettingsStackParamList>;
|
|
|
|
AdminPanelStackNavigator: NavigatorScreenParams<AdminPanelStackParamList>;
|
|
|
|
DisplayPrefStackNavigator: NavigatorScreenParams<DisplayPrefStackParamList>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type NewMessageStackParamList = {
|
|
|
|
NewMessageView: undefined;
|
|
|
|
SelectedUsersViewCreateChannel: {
|
|
|
|
maxUsers?: number;
|
|
|
|
showButton?: boolean;
|
|
|
|
title?: string;
|
|
|
|
buttonText?: string;
|
|
|
|
nextAction?: Function;
|
|
|
|
}; // TODO: Change
|
|
|
|
CreateChannelView: {
|
|
|
|
isTeam?: boolean; // TODO: To check
|
|
|
|
teamId?: string;
|
|
|
|
};
|
|
|
|
CreateDiscussionView: {
|
2022-01-11 13:51:48 +00:00
|
|
|
channel: ISubscription;
|
2021-12-03 19:27:57 +00:00
|
|
|
message: IMessage;
|
|
|
|
showCloseModal: boolean;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type E2ESaveYourPasswordStackParamList = {
|
|
|
|
E2ESaveYourPasswordView: undefined;
|
|
|
|
E2EHowItWorksView?: {
|
|
|
|
showCloseModal?: boolean;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type E2EEnterYourPasswordStackParamList = {
|
|
|
|
E2EEnterYourPasswordView: undefined;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type InsideStackParamList = {
|
|
|
|
DrawerNavigator: NavigatorScreenParams<DrawerParamList>;
|
|
|
|
NewMessageStackNavigator: NavigatorScreenParams<NewMessageStackParamList>;
|
|
|
|
E2ESaveYourPasswordStackNavigator: NavigatorScreenParams<E2ESaveYourPasswordStackParamList>;
|
|
|
|
E2EEnterYourPasswordStackNavigator: NavigatorScreenParams<E2EEnterYourPasswordStackParamList>;
|
|
|
|
AttachmentView: {
|
|
|
|
attachment: IAttachment;
|
|
|
|
};
|
|
|
|
StatusView: undefined;
|
|
|
|
ShareView: {
|
|
|
|
attachments: IAttachment[];
|
|
|
|
isShareView?: boolean;
|
|
|
|
isShareExtension: boolean;
|
|
|
|
serverInfo: IServer;
|
|
|
|
text: string;
|
2022-03-02 14:18:01 +00:00
|
|
|
room: TSubscriptionModel;
|
2021-12-03 19:27:57 +00:00
|
|
|
thread: any; // TODO: Change
|
|
|
|
};
|
|
|
|
ModalBlockView: {
|
|
|
|
data: any; // TODO: Change;
|
|
|
|
};
|
|
|
|
JitsiMeetView: {
|
|
|
|
rid: string;
|
|
|
|
url: string;
|
|
|
|
onlyAudio?: boolean;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type OutsideParamList = {
|
|
|
|
NewServerView: undefined;
|
|
|
|
WorkspaceView: undefined;
|
|
|
|
LoginView: {
|
|
|
|
title: string;
|
|
|
|
username?: string;
|
|
|
|
};
|
|
|
|
ForgotPasswordView: {
|
|
|
|
title: string;
|
|
|
|
};
|
|
|
|
SendEmailConfirmationView: {
|
|
|
|
user?: string;
|
|
|
|
};
|
|
|
|
RegisterView: {
|
|
|
|
title: string;
|
2022-03-22 22:14:42 +00:00
|
|
|
username?: string;
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
LegalView: undefined;
|
2022-03-22 22:14:42 +00:00
|
|
|
AuthenticationWebView: {
|
|
|
|
authType: string;
|
|
|
|
url: string;
|
|
|
|
ssoToken?: string;
|
|
|
|
};
|
2021-12-03 19:27:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export type OutsideModalParamList = {
|
|
|
|
OutsideStack: NavigatorScreenParams<OutsideParamList>;
|
|
|
|
AuthenticationWebView: {
|
|
|
|
authType: string;
|
|
|
|
url: string;
|
|
|
|
ssoToken?: string;
|
|
|
|
};
|
|
|
|
};
|