stream-chat 9.43.0 → 9.43.2
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/cjs/index.browser.js +17 -13
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +22 -13
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +17 -13
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/client.d.ts +8 -6
- package/dist/types/messageComposer/attachmentManager.d.ts +1 -1
- package/dist/types/messageComposer/middleware/textComposer/index.d.ts +1 -0
- package/dist/types/types.d.ts +140 -19
- package/dist/types/utils.d.ts +4 -2
- package/package.json +1 -1
- package/src/client.ts +22 -17
- package/src/connection.ts +5 -4
- package/src/messageComposer/MessageComposerEffectHandlers.ts +2 -0
- package/src/messageComposer/attachmentManager.ts +1 -2
- package/src/messageComposer/middleware/textComposer/index.ts +1 -0
- package/src/types.ts +160 -19
package/src/types.ts
CHANGED
|
@@ -119,6 +119,13 @@ export type AppSettingsAPIResponse = APIResponse & {
|
|
|
119
119
|
uploads?: boolean;
|
|
120
120
|
url_enrichment?: boolean;
|
|
121
121
|
user_message_reminders?: boolean;
|
|
122
|
+
push_level?:
|
|
123
|
+
| 'all'
|
|
124
|
+
| 'all_mentions'
|
|
125
|
+
| 'direct_mentions'
|
|
126
|
+
| 'mentions'
|
|
127
|
+
| 'none'
|
|
128
|
+
| '';
|
|
122
129
|
}
|
|
123
130
|
>;
|
|
124
131
|
reminders_interval: number;
|
|
@@ -154,9 +161,11 @@ export type AppSettingsAPIResponse = APIResponse & {
|
|
|
154
161
|
max_aggregated_activities_length?: number;
|
|
155
162
|
moderation_bulk_submit_action_enabled?: boolean;
|
|
156
163
|
moderation_dashboard_preferences?: Record<string, unknown> | null;
|
|
164
|
+
moderation_audio_call_moderation_enabled?: boolean;
|
|
157
165
|
moderation_enabled?: boolean;
|
|
158
166
|
moderation_llm_configurability_enabled?: boolean;
|
|
159
167
|
moderation_multitenant_blocklist_enabled?: boolean;
|
|
168
|
+
moderation_video_call_moderation_enabled?: boolean;
|
|
160
169
|
moderation_webhook_url?: string;
|
|
161
170
|
multi_tenant_enabled?: boolean;
|
|
162
171
|
name?: string;
|
|
@@ -535,8 +544,8 @@ export type LocalMessageBase = Omit<
|
|
|
535
544
|
};
|
|
536
545
|
|
|
537
546
|
export type LocalMessage = LocalMessageBase & {
|
|
538
|
-
error?: ErrorFromResponse<APIErrorResponse
|
|
539
|
-
quoted_message?: LocalMessageBase;
|
|
547
|
+
error?: ErrorFromResponse<APIErrorResponse> | null;
|
|
548
|
+
quoted_message?: LocalMessageBase | null;
|
|
540
549
|
};
|
|
541
550
|
|
|
542
551
|
/**
|
|
@@ -744,6 +753,8 @@ export type MessageResponseBase = MessageBase & {
|
|
|
744
753
|
member?: ChannelMemberResponse;
|
|
745
754
|
mentioned_users?: UserResponse[];
|
|
746
755
|
mentioned_channel?: boolean;
|
|
756
|
+
mentioned_here?: boolean;
|
|
757
|
+
mentioned_roles?: string[];
|
|
747
758
|
message_text_updated_at?: string;
|
|
748
759
|
moderation?: ModerationResponse; // present only with Moderation v2
|
|
749
760
|
moderation_details?: ModerationDetailsResponse; // present only with Moderation v1
|
|
@@ -770,6 +781,13 @@ export type ReactionGroupResponse = {
|
|
|
770
781
|
sum_scores: number;
|
|
771
782
|
first_reaction_at?: string;
|
|
772
783
|
last_reaction_at?: string;
|
|
784
|
+
latest_reactions_by?: ReactionGroupUserResponse[];
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
export type ReactionGroupUserResponse = {
|
|
788
|
+
created_at: string;
|
|
789
|
+
user_id: string;
|
|
790
|
+
user?: UserResponse;
|
|
773
791
|
};
|
|
774
792
|
|
|
775
793
|
export type ModerationDetailsResponse = {
|
|
@@ -1042,13 +1060,29 @@ export type ChannelOptions = {
|
|
|
1042
1060
|
user_id?: string;
|
|
1043
1061
|
watch?: boolean;
|
|
1044
1062
|
/**
|
|
1045
|
-
* Name of a predefined filter to use instead of
|
|
1046
|
-
*
|
|
1063
|
+
* Name of a predefined filter to use instead of sending raw
|
|
1064
|
+
* `filter_conditions`.
|
|
1065
|
+
*
|
|
1066
|
+
* The backend resolves the filter template by name and interpolates it using
|
|
1067
|
+
* `filter_values`.
|
|
1068
|
+
*
|
|
1069
|
+
* A regular `sort` can still be passed to `queryChannels()`, but backend
|
|
1070
|
+
* precedence rules apply:
|
|
1071
|
+
*
|
|
1072
|
+
* - if the predefined filter has its own stored sort template, that stored
|
|
1073
|
+
* sort takes precedence and the request `sort` is ignored
|
|
1074
|
+
* - if the predefined filter does not define a sort template, the request
|
|
1075
|
+
* `sort` can still be used
|
|
1047
1076
|
*/
|
|
1048
1077
|
predefined_filter?: string;
|
|
1049
1078
|
/**
|
|
1050
|
-
* Values to interpolate
|
|
1051
|
-
*
|
|
1079
|
+
* Values used to interpolate placeholders inside the predefined filter's
|
|
1080
|
+
* `filter` template.
|
|
1081
|
+
*
|
|
1082
|
+
* Example: a template value like `{{user_id}}` can be resolved with
|
|
1083
|
+
* `{ user_id: 'alice' }`.
|
|
1084
|
+
*
|
|
1085
|
+
* Only used when `predefined_filter` is provided.
|
|
1052
1086
|
*/
|
|
1053
1087
|
filter_values?: Record<string, unknown>;
|
|
1054
1088
|
/**
|
|
@@ -2500,6 +2534,7 @@ export type ChannelConfigFields = {
|
|
|
2500
2534
|
uploads?: boolean;
|
|
2501
2535
|
url_enrichment?: boolean;
|
|
2502
2536
|
user_message_reminders?: boolean; // Feature flag for user message reminders
|
|
2537
|
+
push_level?: 'all' | 'all_mentions' | 'direct_mentions' | 'mentions' | 'none' | '';
|
|
2503
2538
|
};
|
|
2504
2539
|
|
|
2505
2540
|
export type ChannelConfigWithInfo = ChannelConfigFields &
|
|
@@ -2920,9 +2955,13 @@ export type Mute = {
|
|
|
2920
2955
|
user: UserResponse;
|
|
2921
2956
|
};
|
|
2922
2957
|
|
|
2958
|
+
export type PartialUpdateChannelFields = Partial<ChannelResponse> & {
|
|
2959
|
+
config_overrides?: Partial<ChannelConfigFields>;
|
|
2960
|
+
};
|
|
2961
|
+
|
|
2923
2962
|
export type PartialUpdateChannel = {
|
|
2924
|
-
set?:
|
|
2925
|
-
unset?: Array<keyof
|
|
2963
|
+
set?: PartialUpdateChannelFields;
|
|
2964
|
+
unset?: Array<keyof PartialUpdateChannelFields>;
|
|
2926
2965
|
};
|
|
2927
2966
|
|
|
2928
2967
|
export type PartialUpdateMember = {
|
|
@@ -4732,38 +4771,129 @@ export type UpdateChannelsBatchResponse = {
|
|
|
4732
4771
|
export type PredefinedFilterOperation = 'QueryChannels';
|
|
4733
4772
|
|
|
4734
4773
|
export type PredefinedFilterSortParam = {
|
|
4774
|
+
/**
|
|
4775
|
+
* Field name to sort by.
|
|
4776
|
+
*
|
|
4777
|
+
* This may be a literal field name such as `created_at`, or a placeholder
|
|
4778
|
+
* template such as `{{sort_field}}` that will be interpolated server-side.
|
|
4779
|
+
*/
|
|
4735
4780
|
field: string;
|
|
4781
|
+
/**
|
|
4782
|
+
* Sort direction. `1` means ascending and `-1` means descending.
|
|
4783
|
+
*
|
|
4784
|
+
* The backend defaults this to `1` when omitted.
|
|
4785
|
+
*/
|
|
4736
4786
|
direction?: AscDesc;
|
|
4787
|
+
/**
|
|
4788
|
+
* Optional server-side hint describing how the sort field value should be
|
|
4789
|
+
* interpreted.
|
|
4790
|
+
*
|
|
4791
|
+
* This is mainly relevant for predefined-filter sort templates and is not
|
|
4792
|
+
* part of the regular `queryChannels()` sort shape. Omitting it uses the
|
|
4793
|
+
* backend default string behavior. Known backend values include:
|
|
4794
|
+
*
|
|
4795
|
+
* - `number`: cast custom-field values to numeric before sorting
|
|
4796
|
+
* - `boolean`: cast custom-field values to boolean before sorting
|
|
4797
|
+
*
|
|
4798
|
+
* Other values are backend-defined. In most cases this should be omitted
|
|
4799
|
+
* unless you are sorting by a custom field whose stored JSON value is not
|
|
4800
|
+
* string-like.
|
|
4801
|
+
*/
|
|
4737
4802
|
type?: string;
|
|
4738
4803
|
};
|
|
4739
4804
|
|
|
4740
|
-
|
|
4805
|
+
/**
|
|
4806
|
+
* Stored predefined filter definition as returned by the server.
|
|
4807
|
+
*
|
|
4808
|
+
* `F` represents the raw filter template shape. It defaults to a generic record
|
|
4809
|
+
* because predefined filters are server-managed templates and may include
|
|
4810
|
+
* placeholders or app-specific structures.
|
|
4811
|
+
*/
|
|
4812
|
+
export type PredefinedFilter<
|
|
4813
|
+
F extends Record<string, unknown> = Record<string, unknown>,
|
|
4814
|
+
> = {
|
|
4815
|
+
/**
|
|
4816
|
+
* Unique predefined filter name within the app.
|
|
4817
|
+
*/
|
|
4741
4818
|
name: string;
|
|
4819
|
+
/**
|
|
4820
|
+
* Operation this predefined filter is valid for.
|
|
4821
|
+
*/
|
|
4742
4822
|
operation: PredefinedFilterOperation;
|
|
4743
|
-
|
|
4823
|
+
/**
|
|
4824
|
+
* Filter template stored on the server.
|
|
4825
|
+
*
|
|
4826
|
+
* This is not necessarily the fully interpolated runtime filter; placeholder
|
|
4827
|
+
* values such as `{{user_id}}` may still be present.
|
|
4828
|
+
*/
|
|
4829
|
+
filter: F;
|
|
4830
|
+
/**
|
|
4831
|
+
* Server creation timestamp in ISO-8601 format.
|
|
4832
|
+
*/
|
|
4744
4833
|
created_at: string;
|
|
4834
|
+
/**
|
|
4835
|
+
* Server update timestamp in ISO-8601 format.
|
|
4836
|
+
*/
|
|
4745
4837
|
updated_at: string;
|
|
4838
|
+
/**
|
|
4839
|
+
* Optional human-readable description.
|
|
4840
|
+
*/
|
|
4746
4841
|
description?: string;
|
|
4842
|
+
/**
|
|
4843
|
+
* Optional sort template stored with the predefined filter.
|
|
4844
|
+
*/
|
|
4747
4845
|
sort?: PredefinedFilterSortParam[];
|
|
4846
|
+
/**
|
|
4847
|
+
* Query identifier generated by the backend for the filter/sort pattern.
|
|
4848
|
+
*
|
|
4849
|
+
* The exact value is backend-generated and primarily useful for correlating
|
|
4850
|
+
* predefined filters with query analysis / query performance data.
|
|
4851
|
+
*/
|
|
4748
4852
|
query_id?: number;
|
|
4749
4853
|
};
|
|
4750
4854
|
|
|
4751
|
-
export type CreatePredefinedFilterOptions
|
|
4855
|
+
export type CreatePredefinedFilterOptions<
|
|
4856
|
+
F extends Record<string, unknown> = Record<string, unknown>,
|
|
4857
|
+
> = {
|
|
4858
|
+
/**
|
|
4859
|
+
* Unique predefined filter name.
|
|
4860
|
+
*/
|
|
4752
4861
|
name: string;
|
|
4862
|
+
/**
|
|
4863
|
+
* Operation this predefined filter will be used with.
|
|
4864
|
+
*/
|
|
4753
4865
|
operation: PredefinedFilterOperation;
|
|
4754
|
-
|
|
4866
|
+
/**
|
|
4867
|
+
* Filter template to store on the server.
|
|
4868
|
+
*/
|
|
4869
|
+
filter: F;
|
|
4870
|
+
/**
|
|
4871
|
+
* Optional human-readable description.
|
|
4872
|
+
*/
|
|
4755
4873
|
description?: string;
|
|
4874
|
+
/**
|
|
4875
|
+
* Optional sort template stored with the predefined filter.
|
|
4876
|
+
*/
|
|
4756
4877
|
sort?: PredefinedFilterSortParam[];
|
|
4757
4878
|
};
|
|
4758
4879
|
|
|
4759
|
-
export type UpdatePredefinedFilterOptions
|
|
4880
|
+
export type UpdatePredefinedFilterOptions<
|
|
4881
|
+
F extends Record<string, unknown> = Record<string, unknown>,
|
|
4882
|
+
> = Omit<CreatePredefinedFilterOptions<F>, 'name'>;
|
|
4760
4883
|
|
|
4761
|
-
export type PredefinedFilterResponse
|
|
4762
|
-
|
|
4884
|
+
export type PredefinedFilterResponse<
|
|
4885
|
+
F extends Record<string, unknown> = Record<string, unknown>,
|
|
4886
|
+
> = APIResponse & {
|
|
4887
|
+
predefined_filter: PredefinedFilter<F>;
|
|
4763
4888
|
};
|
|
4764
4889
|
|
|
4765
|
-
|
|
4766
|
-
|
|
4890
|
+
/**
|
|
4891
|
+
* Paginated response returned when listing predefined filters.
|
|
4892
|
+
*/
|
|
4893
|
+
export type ListPredefinedFiltersResponse<
|
|
4894
|
+
F extends Record<string, unknown> = Record<string, unknown>,
|
|
4895
|
+
> = APIResponse & {
|
|
4896
|
+
predefined_filters: PredefinedFilter<F>[];
|
|
4767
4897
|
next?: string;
|
|
4768
4898
|
prev?: string;
|
|
4769
4899
|
};
|
|
@@ -4772,9 +4902,20 @@ export type ListPredefinedFiltersResponse = APIResponse & {
|
|
|
4772
4902
|
* Contains the interpolated filter and sort from a predefined filter.
|
|
4773
4903
|
* This is returned in the QueryChannels response when using a predefined filter.
|
|
4774
4904
|
*/
|
|
4775
|
-
export type ParsedPredefinedFilterResponse
|
|
4905
|
+
export type ParsedPredefinedFilterResponse<
|
|
4906
|
+
F extends Record<string, unknown> = Record<string, unknown>,
|
|
4907
|
+
> = {
|
|
4908
|
+
/**
|
|
4909
|
+
* Name of the predefined filter that was resolved.
|
|
4910
|
+
*/
|
|
4776
4911
|
name: string;
|
|
4777
|
-
|
|
4912
|
+
/**
|
|
4913
|
+
* Fully interpolated filter that the backend executed.
|
|
4914
|
+
*/
|
|
4915
|
+
filter: F;
|
|
4916
|
+
/**
|
|
4917
|
+
* Fully interpolated sort parameters resolved from the predefined filter.
|
|
4918
|
+
*/
|
|
4778
4919
|
sort?: PredefinedFilterSortParam[];
|
|
4779
4920
|
};
|
|
4780
4921
|
|