@@ -118,7 +118,13 @@ export interface KeyboardContextValue {
118118//================================================================================================
119119//================================================================================================
120120export interface ChatProps {
121+ /** The StreamChat client object */
121122 client : Client . StreamChat ;
123+ /**
124+ * Theme object
125+ *
126+ * @ref https://getstream.io/chat/react-native-chat/tutorial/#custom-styles
127+ * */
122128 style ?: object ;
123129}
124130
@@ -131,16 +137,17 @@ export interface ChannelProps extends ChatContextValue {
131137 Attachment ?: React . ElementType < AttachmentProps > ;
132138}
133139
134- export interface EmptyStateIndicatorProps {
135- listType ?: 'channel' | 'message' | 'default' ;
136- }
140+ export type listType = 'channel' | 'message' | 'default' ;
137141
138142export interface LoadingErrorIndicatorProps {
139- listType ?: 'channel' | 'message' | 'default' ;
143+ listType ?: listType ;
144+ }
145+ export interface EmptyStateIndicatorProps {
146+ listType ?: listType ;
140147}
141148
142149export interface LoadingIndicatorProps {
143- listType : 'channel' | 'message' | 'default' ;
150+ listType ?: listType ;
144151}
145152export interface DateSeparatorProps {
146153 message : Client . MessageResponse ;
@@ -435,9 +442,57 @@ export interface MessageUIComponentProps
435442 AttachmentFileIcon ?: React . ElementType < FileIconUIComponentProps > ;
436443}
437444
445+ export interface MessageRepliesUIComponentProps {
446+ /** Current [message object](https://getstream.io/chat/docs/#message_format) */
447+ message : Client . MessageResponse ;
448+ /** Boolean if current message is part of thread */
449+ isThreadList : boolean ;
450+ /** @see See [Channel Context](https://getstream.github.io/stream-chat-react-native/#channelcontext) */
451+ openThread ?( message : Client . Message , event : React . SyntheticEvent ) : void ;
452+ /** right | left */
453+ pos : string ;
454+ }
455+
456+ export interface MessageStatusUIComponentProps {
457+ /** @see See [Channel Context](https://getstream.github.io/stream-chat-react-native/#channelcontext) */
458+ client : Client . StreamChat ;
459+ /** A list of users who have read the message */
460+ readBy : Array < Client . UserResponse > ;
461+ /** Current [message object](https://getstream.io/chat/docs/#message_format) */
462+ message : Client . MessageResponse ;
463+ /** Latest message id on current channel */
464+ lastReceivedId : string ;
465+ /** Boolean if current message is part of thread */
466+ isThreadList : boolean ;
467+ }
468+
469+ export interface MessageAvatarUIComponentProps {
470+ /** Current [message object](https://getstream.io/chat/docs/#message_format) */
471+ message : Client . MessageResponse ;
472+ /**
473+ * Returns true if message (param) belongs to current user, else false
474+ *
475+ * @param message
476+ * */
477+ isMyMessage ?( message : Client . MessageResponse ) : boolean ;
478+ /**
479+ * Position of message in group - top, bottom, middle, single.
480+ *
481+ * Message group is a group of consecutive messages from same user. groupStyles can be used to style message as per their position in message group
482+ * e.g., user avatar (to which message belongs to) is only showed for last (bottom) message in group.
483+ */
484+ groupStyles : [ ] ;
485+ }
486+
487+ export interface MessageContentUIComponentProps
488+ extends MessageUIComponentProps {
489+ alignment : string ;
490+ }
491+
438492export interface MessageTextProps {
439493 message : Client . MessageResponse ;
440494}
495+
441496export interface ThreadProps extends ChannelContextValue {
442497 /** the thread (the parent message object) */
443498 thread : SeamlessImmutable . Immutable < Client . MessageResponse > ;
@@ -462,7 +517,7 @@ export interface FileIconUIComponentProps {
462517
463518export interface AutoCompleteInputProps {
464519 value : string ;
465- openSuggestions ?( title : string , component : React . ElementType < any , any > ) : void ;
520+ openSuggestions ?( title : string , component : React . ElementType < any > ) : void ;
466521 closeSuggestions ?( ) : void ;
467522 updateSuggestions ?( param : object ) : void ;
468523 triggerSettings : object ;
@@ -493,24 +548,18 @@ export interface DateSeparatorProps {
493548 message : Client . MessageResponse ;
494549 formatDate ?( date : Date ) : string ;
495550}
496- export interface EmptyStateIndicatorProps {
497- listType ?: 'string' ;
498- }
499- export interface EventIndicatorProps {
500- event : Client . Event ;
501- }
502551export interface FileAttachmentGroupProps {
503552 messageId : string ;
504553 files : [ ] ;
505554 handleAction ?( ) : void ;
506555 alignment : 'right' | 'left' ;
507- AttachmentFileIcon : React . ElementType < any , any > ;
556+ AttachmentFileIcon : React . ElementType < any > ;
508557}
509558export interface FileUploadPreviewProps {
510559 fileUploads : [ ] ;
511560 removeFile ?( id : string ) : void ;
512561 retryUpload ?( id : string ) : Promise < any > ;
513- AttachmentFileIcon : React . ElementType < any , any > ;
562+ AttachmentFileIcon : React . ElementType < any > ;
514563}
515564export interface GalleryProps {
516565 images : Client . Attachment [ ] ;
@@ -533,11 +582,22 @@ export interface ImageUploadPreviewProps {
533582 retryUpload ?( id : string ) : Promise < any > ;
534583}
535584export interface KeyboardCompatibleViewProps { }
585+
586+ export interface EmptyStateIndicatorProps {
587+ listType ?: listType ;
588+ }
589+ export interface EventIndicatorProps {
590+ event :
591+ | Client . Event < Client . MemberAddedEvent >
592+ | Client . Event < Client . MemberRemovedEvent >
593+ | null ;
594+ }
595+
536596export interface LoadingErrorIndicatorProps {
537- listType : string ;
597+ listType ?: listType ;
538598}
539599export interface LoadingIndicatorProps {
540- listType : 'channel' | 'message' | 'default' ;
600+ listType ?: listType ;
541601}
542602export interface MentionsItemProps {
543603 item : {
@@ -714,6 +774,23 @@ export class MessageSimple extends React.PureComponent<
714774 MessageUIComponentProps ,
715775 any
716776> { }
777+ export class MessageContent extends React . PureComponent <
778+ MessageContentUIComponentProps ,
779+ any
780+ > { }
781+ export class MessageReplies extends React . PureComponent <
782+ MessageRepliesUIComponentProps ,
783+ any
784+ > { }
785+ export class MessageStatus extends React . PureComponent <
786+ MessageStatusUIComponentProps ,
787+ any
788+ > { }
789+ export class MessageAvatar extends React . PureComponent <
790+ MessageAvatarUIComponentProps ,
791+ any
792+ > { }
793+
717794export class ChannelList extends React . PureComponent < ChannelListProps , any > { }
718795
719796export class Thread extends React . PureComponent < ThreadProps , any > { }
0 commit comments