2021-12-03 19:27:57 +00:00
|
|
|
import { NewMessageStackParamList } from '../../stacks/types';
|
2022-05-02 22:48:29 +00:00
|
|
|
import { ISubscription, SubscriptionType } from '../../definitions/ISubscription';
|
|
|
|
import { IBaseScreen, IMessage, ISearchLocal, IUser } from '../../definitions';
|
2022-04-12 16:27:05 +00:00
|
|
|
import { TSupportedThemes } from '../../theme';
|
2022-02-02 18:51:18 +00:00
|
|
|
|
|
|
|
export interface IResult {
|
|
|
|
rid: string;
|
|
|
|
t: SubscriptionType;
|
|
|
|
prid: string;
|
|
|
|
}
|
2021-12-03 19:27:57 +00:00
|
|
|
|
2022-02-02 18:51:18 +00:00
|
|
|
export interface IError {
|
|
|
|
reason: string;
|
|
|
|
}
|
|
|
|
export interface ICreateChannelViewProps extends IBaseScreen<NewMessageStackParamList, 'CreateDiscussionView'> {
|
2021-09-15 19:58:14 +00:00
|
|
|
server: string;
|
2022-05-02 22:48:29 +00:00
|
|
|
user: IUser;
|
2021-09-15 19:58:14 +00:00
|
|
|
create: Function;
|
|
|
|
loading: boolean;
|
2022-02-02 18:51:18 +00:00
|
|
|
result: IResult;
|
2021-09-15 19:58:14 +00:00
|
|
|
failure: boolean;
|
2022-02-02 18:51:18 +00:00
|
|
|
error: IError;
|
2021-09-15 19:58:14 +00:00
|
|
|
isMasterDetail: boolean;
|
|
|
|
blockUnauthenticatedAccess: boolean;
|
|
|
|
serverVersion: string;
|
|
|
|
encryptionEnabled: boolean;
|
|
|
|
}
|
|
|
|
|
2022-05-02 22:48:29 +00:00
|
|
|
export interface ICreateChannelViewState {
|
|
|
|
channel: ISubscription | ISearchLocal;
|
|
|
|
message: IMessage;
|
|
|
|
name?: string;
|
|
|
|
users: string[];
|
|
|
|
reply: string;
|
|
|
|
encrypted: boolean;
|
|
|
|
}
|
|
|
|
|
2021-09-15 19:58:14 +00:00
|
|
|
export interface ICreateDiscussionViewSelectChannel {
|
|
|
|
server: string;
|
|
|
|
token: string;
|
|
|
|
userId: string;
|
|
|
|
initial: object;
|
|
|
|
onChannelSelect: Function;
|
|
|
|
blockUnauthenticatedAccess: boolean;
|
|
|
|
serverVersion: string;
|
2022-04-12 16:27:05 +00:00
|
|
|
theme: TSupportedThemes;
|
2021-09-15 19:58:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ICreateDiscussionViewSelectUsers {
|
|
|
|
server: string;
|
|
|
|
token: string;
|
|
|
|
userId: string;
|
|
|
|
selected: any[];
|
|
|
|
onUserSelect: Function;
|
|
|
|
blockUnauthenticatedAccess: boolean;
|
|
|
|
serverVersion: string;
|
2022-04-12 16:27:05 +00:00
|
|
|
theme: TSupportedThemes;
|
2021-09-15 19:58:14 +00:00
|
|
|
}
|