stream-chat 9.52.1 → 9.54.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/types.ts CHANGED
@@ -83,6 +83,7 @@ export type TranslateResponse = {
83
83
  export type AppSettingsAPIResponse = APIResponse & {
84
84
  app?: {
85
85
  id?: string | number;
86
+ activity_metrics_config?: Record<string, number>;
86
87
  allow_multi_user_devices?: boolean;
87
88
  feed_audit_logs_enabled?: boolean;
88
89
  moderation_onboarding_complete?: boolean | null;
@@ -137,8 +138,10 @@ export type AppSettingsAPIResponse = APIResponse & {
137
138
  auto_translation_enabled?: boolean;
138
139
  before_message_send_hook_url?: string;
139
140
  before_message_send_hook_attempt_timeout_ms?: number;
141
+ before_message_send_hook_system_messages?: boolean;
140
142
  campaign_enabled?: boolean;
141
143
  cdn_expiration_seconds?: number;
144
+ chat_primary_use_case?: string;
142
145
  custom_action_handler_url?: string;
143
146
  datadog_info?: {
144
147
  api_key: string;
@@ -163,13 +166,18 @@ export type AppSettingsAPIResponse = APIResponse & {
163
166
  image_upload_config?: FileUploadConfig;
164
167
  allowed_flag_reasons?: string[];
165
168
  max_aggregated_activities_length?: number;
169
+ member_custom_on_mentioned_users_enabled?: boolean;
170
+ member_custom_on_messages_enabled?: boolean;
171
+ member_custom_on_typing_events_enabled?: boolean;
166
172
  moderation_bulk_submit_action_enabled?: boolean;
167
173
  moderation_dashboard_preferences?: Record<string, unknown> | null;
168
174
  moderation_audio_call_moderation_enabled?: boolean;
169
175
  moderation_enabled?: boolean;
170
176
  moderation_flood_rules_enabled?: boolean;
177
+ moderation_keyframe_video_enabled?: boolean;
171
178
  moderation_llm_configurability_enabled?: boolean;
172
179
  moderation_multitenant_blocklist_enabled?: boolean;
180
+ moderation_s3_image_access_role_arn?: string;
173
181
  moderation_video_call_moderation_enabled?: boolean;
174
182
  moderation_webhook_url?: string;
175
183
  multi_tenant_enabled?: boolean;
@@ -206,6 +214,7 @@ export type AppSettingsAPIResponse = APIResponse & {
206
214
  use_hook_v2?: boolean;
207
215
  user_response_time_enabled?: boolean;
208
216
  user_search_disallowed_roles?: string[] | null;
217
+ video_primary_use_case?: string;
209
218
  video_provider?: string;
210
219
  webhook_events?: Array<string>;
211
220
  webhook_url?: string;
@@ -795,9 +804,7 @@ export type MessageResponseBase = MessageBase & {
795
804
  created_at?: string;
796
805
  deleted_at?: string;
797
806
  deleted_reply_count?: number;
798
- i18n?: RequireAtLeastOne<Record<`${TranslationLanguages}_text`, string>> & {
799
- language: TranslationLanguages;
800
- };
807
+ i18n?: TranslatedField;
801
808
  latest_reactions?: ReactionResponse[];
802
809
  member?: ChannelMemberResponse;
803
810
  mentioned_users?: UserResponse[];
@@ -3277,6 +3284,13 @@ export type TranslationLanguages =
3277
3284
  | 'zh-TW'
3278
3285
  | (string & {});
3279
3286
 
3287
+ // Server-owned translations for a single text field, keyed by language.
3288
+ export type TranslatedField = RequireAtLeastOne<
3289
+ Record<`${TranslationLanguages}_text`, string>
3290
+ > & {
3291
+ language: TranslationLanguages;
3292
+ };
3293
+
3280
3294
  export type TypingStartEvent = Event;
3281
3295
 
3282
3296
  export type ReservedUpdatedMessageFields = keyof typeof RESERVED_UPDATED_MESSAGE_FIELDS;
@@ -3639,7 +3653,9 @@ export type PollResponse = CustomPollData &
3639
3653
  allow_answers?: boolean;
3640
3654
  allow_user_suggested_options?: boolean;
3641
3655
  description?: string;
3656
+ description_i18n?: TranslatedField;
3642
3657
  is_closed?: boolean;
3658
+ name_i18n?: TranslatedField;
3643
3659
  voting_visibility?: VotingVisibility;
3644
3660
  };
3645
3661
 
@@ -3650,6 +3666,7 @@ export type PollOption = {
3650
3666
  text: string;
3651
3667
  updated_at: string;
3652
3668
  vote_count: number;
3669
+ text_i18n?: TranslatedField;
3653
3670
  votes?: PollVote[];
3654
3671
  };
3655
3672
 
@@ -3725,6 +3742,7 @@ export type PollOptionResponse = CustomPollData & {
3725
3742
  text: string;
3726
3743
  updated_at: string;
3727
3744
  vote_count: number;
3745
+ text_i18n?: TranslatedField;
3728
3746
  votes?: PollVote[];
3729
3747
  };
3730
3748
 
@@ -3741,6 +3759,7 @@ export type PollVote = {
3741
3759
  export type PollAnswer = Exclude<PollVote, 'option_id'> & {
3742
3760
  answer_text: string;
3743
3761
  is_answer: boolean; // this is absolutely redundant prop as answer_text indicates that a vote is an answer
3762
+ answer_text_i18n?: TranslatedField;
3744
3763
  };
3745
3764
 
3746
3765
  export type PollVotesAPIResponse = {
@@ -4990,8 +5009,37 @@ export type UpdateChannelsBatchOptions = {
4990
5009
  filter: UpdateChannelsBatchFilters;
4991
5010
  members?: string[] | Array<NewMemberPayload>;
4992
5011
  data?: BatchChannelDataUpdate;
5012
+ /**
5013
+ * `updateData` only. Merges these keys into each matched channel's existing
5014
+ * custom object, leaving every other custom key untouched — unlike
5015
+ * `data.custom`, which replaces the whole object. Keys are dot-paths, so
5016
+ * `a.b` sets key `b` inside object `a` (the parent object must already
5017
+ * exist). Cannot be combined with `data.custom`.
5018
+ *
5019
+ * Lives at the request root, not inside `data`.
5020
+ */
5021
+ custom_set?: Record<string, unknown>;
5022
+ /**
5023
+ * `updateData` only. Deletes these keys from each matched channel's existing
5024
+ * custom object, leaving every other custom key untouched. Keys are
5025
+ * dot-paths; deleting a key that does not exist is a no-op. Cannot be
5026
+ * combined with `data.custom`.
5027
+ *
5028
+ * Lives at the request root, not inside `data`.
5029
+ */
5030
+ custom_unset?: string[];
4993
5031
  };
4994
5032
 
5033
+ /**
5034
+ * Options for {@link ChannelBatchUpdater.updateData}. `custom_set` and
5035
+ * `custom_unset` are sent at the request root, while `data` contains the
5036
+ * channel fields to update.
5037
+ */
5038
+ export type ChannelBatchDataUpdateOptions = Pick<
5039
+ UpdateChannelsBatchOptions,
5040
+ 'data' | 'custom_set' | 'custom_unset'
5041
+ >;
5042
+
4995
5043
  export type UpdateChannelsBatchFilters = QueryFilters<{
4996
5044
  cids?:
4997
5045
  | RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$eq'>>