stream-chat 8.27.0 → 8.28.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/src/channel.ts CHANGED
@@ -55,6 +55,7 @@ import {
55
55
  QueryChannelAPIResponse,
56
56
  PollVoteData,
57
57
  SendMessageOptions,
58
+ AscDesc,
58
59
  } from './types';
59
60
  import { Role } from './permissions';
60
61
 
@@ -823,10 +824,13 @@ export class Channel<StreamChatGenerics extends ExtendableGenerics = DefaultGene
823
824
  async getReplies(
824
825
  parent_id: string,
825
826
  options: MessagePaginationOptions & { user?: UserResponse<StreamChatGenerics>; user_id?: string },
827
+ sort?: { created_at: AscDesc }[],
826
828
  ) {
829
+ const normalizedSort = sort ? normalizeQuerySort(sort) : undefined;
827
830
  const data = await this.getClient().get<GetRepliesAPIResponse<StreamChatGenerics>>(
828
831
  this.getClient().baseURL + `/messages/${parent_id}/replies`,
829
832
  {
833
+ sort: normalizedSort,
830
834
  ...options,
831
835
  },
832
836
  );
package/src/types.ts CHANGED
@@ -627,6 +627,7 @@ export type MessageResponse<
627
627
  export type MessageResponseBase<
628
628
  StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
629
629
  > = MessageBase<StreamChatGenerics> & {
630
+ reaction_groups: Record<string, ReactionGroupResponse>;
630
631
  type: MessageLabel;
631
632
  args?: string;
632
633
  before_message_send_failed?: boolean;
@@ -658,6 +659,13 @@ export type MessageResponseBase<
658
659
  updated_at?: string;
659
660
  };
660
661
 
662
+ export type ReactionGroupResponse = {
663
+ count: number;
664
+ sum_scores: number;
665
+ first_reaction_at?: string;
666
+ last_reaction_at?: string;
667
+ };
668
+
661
669
  export type ModerationDetailsResponse = {
662
670
  action: 'MESSAGE_RESPONSE_ACTION_BOUNCE' | (string & {});
663
671
  error_msg: string;