@linktr.ee/messaging-react 1.19.3 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -58,7 +58,7 @@ export declare const ChannelView: default_2.NamedExoticComponent<ChannelViewProp
58
58
  * Props that MessagingShell passes through to ChannelView.
59
59
  * ChannelViewProps is the source of truth for these props.
60
60
  */
61
- declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'CustomChannelEmptyState' | 'onDeleteConversationClick' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'messageMetadata' | 'onMessageSent' | 'showStarButton'>;
61
+ declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'CustomChannelEmptyState' | 'onDeleteConversationClick' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'messageMetadata' | 'onMessageSent' | 'showStarButton' | 'chatbotVotingEnabled'>;
62
62
 
63
63
  /**
64
64
  * ChannelView component props
@@ -121,6 +121,13 @@ export declare interface ChannelViewProps {
121
121
  * and filter by starred/pinned status.
122
122
  */
123
123
  showStarButton?: boolean;
124
+ /**
125
+ * Enable thumbs up/down voting on chatbot messages.
126
+ * When true, vote buttons render below chatbot (DM Agent) messages.
127
+ * Votes are persisted as Stream Chat reactions (vote_up / vote_down).
128
+ * Defaults to false.
129
+ */
130
+ chatbotVotingEnabled?: boolean;
124
131
  }
125
132
 
126
133
  export declare interface Faq {
@@ -170,6 +177,14 @@ export declare interface MessageMetadata {
170
177
  listing_id?: string;
171
178
  }
172
179
 
180
+ export declare const MessageVoteButtons: default_2.FC<MessageVoteButtonsProps>;
181
+
182
+ declare interface MessageVoteButtonsProps {
183
+ selected: VoteSelection;
184
+ onVoteUp: () => void;
185
+ onVoteDown: () => void;
186
+ }
187
+
173
188
  /**
174
189
  * Messaging capabilities configuration
175
190
  */
@@ -315,6 +330,22 @@ export declare interface ParticipantSource {
315
330
  loading?: boolean;
316
331
  }
317
332
 
333
+ /**
334
+ * Hook that wraps Stream Chat reactions to provide toggle-style
335
+ * upvote/downvote behavior on a message.
336
+ *
337
+ * Uses enforce_unique so sending a new reaction type automatically
338
+ * removes the previous one. Uses skip_push to avoid notifying the
339
+ * Linker on every vote.
340
+ */
341
+ export declare function useMessageVote(message: LocalMessage): UseMessageVoteResult;
342
+
343
+ declare interface UseMessageVoteResult {
344
+ selected: VoteSelection;
345
+ voteUp: () => void;
346
+ voteDown: () => void;
347
+ }
348
+
318
349
  /**
319
350
  * Hook to access messaging service and state
320
351
  */
@@ -338,6 +369,8 @@ export declare const useParticipants: (participantSource: ParticipantSource, opt
338
369
  refresh: () => void;
339
370
  };
340
371
 
372
+ export declare type VoteSelection = 'up' | 'down' | null;
373
+
341
374
  export { }
342
375
 
343
376