1 | import { StyleProp, ViewStyle } from 'react-native';
|
2 | import { LightboxProps } from 'react-native-lightbox-v2';
|
3 | export { ActionsProps } from './Actions';
|
4 | export { AvatarProps } from './Avatar';
|
5 | export { BubbleProps, RenderMessageImageProps, RenderMessageVideoProps, RenderMessageAudioProps, RenderMessageTextProps } from './Bubble';
|
6 | export { ComposerProps } from './Composer';
|
7 | export { DayProps } from './Day';
|
8 | export { GiftedAvatarProps } from './GiftedAvatar';
|
9 | export { InputToolbarProps } from './InputToolbar';
|
10 | export { LoadEarlierProps } from './LoadEarlier';
|
11 | export { MessageProps } from './Message';
|
12 | export { MessageContainerProps } from './MessageContainer';
|
13 | export { MessageImageProps } from './MessageImage';
|
14 | export { MessageTextProps } from './MessageText';
|
15 | export { QuickRepliesProps } from './QuickReplies';
|
16 | export { SendProps } from './Send';
|
17 | export { SystemMessageProps } from './SystemMessage';
|
18 | export { TimeProps } from './Time';
|
19 | export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
20 | export interface LeftRightStyle<T> {
|
21 | left?: StyleProp<T>;
|
22 | right?: StyleProp<T>;
|
23 | }
|
24 | type renderFunction = (x: unknown) => JSX.Element;
|
25 | export interface User {
|
26 | _id: string | number;
|
27 | name?: string;
|
28 | avatar?: string | number | renderFunction;
|
29 | }
|
30 | export interface Reply {
|
31 | title: string;
|
32 | value: string;
|
33 | messageId?: number | string;
|
34 | }
|
35 | export interface QuickReplies {
|
36 | type: 'radio' | 'checkbox';
|
37 | values: Reply[];
|
38 | keepIt?: boolean;
|
39 | }
|
40 | export interface IMessage {
|
41 | _id: string | number;
|
42 | text: string;
|
43 | createdAt: Date | number;
|
44 | user: User;
|
45 | image?: string;
|
46 | video?: string;
|
47 | audio?: string;
|
48 | system?: boolean;
|
49 | sent?: boolean;
|
50 | received?: boolean;
|
51 | pending?: boolean;
|
52 | quickReplies?: QuickReplies;
|
53 | }
|
54 | export type IChatMessage = IMessage;
|
55 | export interface MessageVideoProps<TMessage extends IMessage> {
|
56 | currentMessage: TMessage;
|
57 | containerStyle?: StyleProp<ViewStyle>;
|
58 | videoStyle?: StyleProp<ViewStyle>;
|
59 | videoProps?: object;
|
60 | lightboxProps?: LightboxProps;
|
61 | }
|
62 | export interface MessageAudioProps<TMessage extends IMessage> {
|
63 | currentMessage: TMessage;
|
64 | containerStyle?: StyleProp<ViewStyle>;
|
65 | audioStyle?: StyleProp<ViewStyle>;
|
66 | audioProps?: object;
|
67 | }
|