stream-chat 9.19.1 → 9.20.1

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.
@@ -2275,6 +2275,7 @@ export type CampaignData = {
2275
2275
  segment_ids?: string[];
2276
2276
  sender_id?: string;
2277
2277
  sender_mode?: 'exclude' | 'include' | null;
2278
+ sender_visibility?: 'hidden' | 'archived' | null;
2278
2279
  show_channels?: boolean;
2279
2280
  skip_push?: boolean;
2280
2281
  skip_webhook?: boolean;
@@ -2805,9 +2806,6 @@ export type RuleBuilderAction = {
2805
2806
  type: string;
2806
2807
  ban_options?: BanOptions;
2807
2808
  flag_user_options?: FlagUserOptions;
2808
- flag_content_options?: FlagContentOptions;
2809
- remove_content_options?: RemoveContentOptions;
2810
- shadow_content_options?: ShadowContentOptions;
2811
2809
  };
2812
2810
  export type TextRuleParameters = {
2813
2811
  threshold: number;
@@ -2865,15 +2863,6 @@ export type BanOptions = {
2865
2863
  export type FlagUserOptions = {
2866
2864
  reason: string;
2867
2865
  };
2868
- export type FlagContentOptions = {
2869
- reason: string;
2870
- };
2871
- export type RemoveContentOptions = {
2872
- reason: string;
2873
- };
2874
- export type ShadowContentOptions = {
2875
- reason: string;
2876
- };
2877
2866
  export type QueryModerationRulesFilters = QueryFilters<{
2878
2867
  name?: string;
2879
2868
  team?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat",
3
- "version": "9.19.1",
3
+ "version": "9.20.1",
4
4
  "description": "JS SDK for the Stream Chat API",
5
5
  "homepage": "https://getstream.io/chat/",
6
6
  "author": {
package/src/campaign.ts CHANGED
@@ -19,6 +19,7 @@ export class Campaign {
19
19
  segment_ids: this.data?.segment_ids,
20
20
  sender_id: this.data?.sender_id,
21
21
  sender_mode: this.data?.sender_mode,
22
+ sender_visibility: this.data?.sender_visibility,
22
23
  channel_template: this.data?.channel_template,
23
24
  create_channels: this.data?.create_channels,
24
25
  show_channels: this.data?.show_channels,
package/src/client.ts CHANGED
@@ -987,8 +987,13 @@ export class StreamChat {
987
987
  this.state = new ClientState({ client: this });
988
988
  // reset thread manager
989
989
  this.threads.resetState();
990
- // reset token manager
991
- setTimeout(this.tokenManager.reset); // delay reseting to use token for disconnect calls
990
+
991
+ // Since we wipe all user data already, we should reset token manager as well
992
+ closePromise
993
+ .finally(() => {
994
+ this.tokenManager.reset();
995
+ })
996
+ .catch((err) => console.error(err));
992
997
 
993
998
  // close the WS connection
994
999
  return closePromise;
@@ -36,6 +36,9 @@ export const createAttachmentsCompositionMiddleware = (
36
36
  emitter: 'MessageComposer',
37
37
  context: { composer },
38
38
  },
39
+ options: {
40
+ type: 'validation:attachment:upload:in-progress',
41
+ },
39
42
  });
40
43
  return discard();
41
44
  }
package/src/types.ts CHANGED
@@ -3136,6 +3136,7 @@ export type CampaignData = {
3136
3136
  segment_ids?: string[];
3137
3137
  sender_id?: string;
3138
3138
  sender_mode?: 'exclude' | 'include' | null;
3139
+ sender_visibility?: 'hidden' | 'archived' | null;
3139
3140
  show_channels?: boolean;
3140
3141
  skip_push?: boolean;
3141
3142
  skip_webhook?: boolean;
@@ -3844,9 +3845,6 @@ export type RuleBuilderAction = {
3844
3845
  type: string;
3845
3846
  ban_options?: BanOptions;
3846
3847
  flag_user_options?: FlagUserOptions;
3847
- flag_content_options?: FlagContentOptions;
3848
- remove_content_options?: RemoveContentOptions;
3849
- shadow_content_options?: ShadowContentOptions;
3850
3848
  };
3851
3849
 
3852
3850
  export type TextRuleParameters = {
@@ -3917,18 +3915,6 @@ export type FlagUserOptions = {
3917
3915
  reason: string;
3918
3916
  };
3919
3917
 
3920
- export type FlagContentOptions = {
3921
- reason: string;
3922
- };
3923
-
3924
- export type RemoveContentOptions = {
3925
- reason: string;
3926
- };
3927
-
3928
- export type ShadowContentOptions = {
3929
- reason: string;
3930
- };
3931
-
3932
3918
  export type QueryModerationRulesFilters = QueryFilters<{
3933
3919
  name?: string;
3934
3920
  team?: string;