stream-chat 8.44.0 → 8.45.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat",
3
- "version": "8.44.0",
3
+ "version": "8.45.0",
4
4
  "description": "JS SDK for the Stream Chat API",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -68,6 +68,8 @@ export class TokenManager<StreamChatGenerics extends ExtendableGenerics = Defaul
68
68
  */
69
69
  reset = () => {
70
70
  this.token = undefined;
71
+ this.tokenProvider = undefined;
72
+ this.type = 'static';
71
73
  this.user = undefined;
72
74
  this.loadTokenPromise = null;
73
75
  };
package/src/types.ts CHANGED
@@ -678,7 +678,8 @@ export type MessageResponseBase<
678
678
  latest_reactions?: ReactionResponse<StreamChatGenerics>[];
679
679
  mentioned_users?: UserResponse<StreamChatGenerics>[];
680
680
  message_text_updated_at?: string;
681
- moderation_details?: ModerationDetailsResponse;
681
+ moderation?: ModerationResponse; // present only with Moderation v2
682
+ moderation_details?: ModerationDetailsResponse; // present only with Moderation v1
682
683
  own_reactions?: ReactionResponse<StreamChatGenerics>[] | null;
683
684
  pin_expires?: string | null;
684
685
  pinned_at?: string | null;
@@ -713,6 +714,18 @@ export type ModerationHarmResponse = {
713
714
  phrase_list_ids: number[];
714
715
  };
715
716
 
717
+ export type ModerationAction = 'bounce' | 'flag' | 'remove' | 'shadow';
718
+
719
+ export type ModerationResponse = {
720
+ action: ModerationAction;
721
+ original_text: string;
722
+ blocklist_matched?: string;
723
+ image_harms?: string[];
724
+ platform_circumvented?: boolean;
725
+ semantic_filter_matched?: string;
726
+ text_harms?: string[];
727
+ };
728
+
716
729
  export type MuteResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
717
730
  user: UserResponse<StreamChatGenerics>;
718
731
  created_at?: string;