stream-chat 9.30.1 → 9.32.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/dist/cjs/index.browser.js +38 -7
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +39 -7
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +38 -7
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/client.d.ts +19 -1
- package/dist/types/messageComposer/attachmentIdentity.d.ts +2 -1
- package/dist/types/messageComposer/messageComposer.d.ts +8 -1
- package/dist/types/messageComposer/middleware/textComposer/commands.d.ts +2 -2
- package/dist/types/messageComposer/types.d.ts +8 -1
- package/dist/types/types.d.ts +114 -2
- package/dist/types/utils.d.ts +1 -0
- package/package.json +1 -1
- package/src/client.ts +24 -0
- package/src/messageComposer/attachmentIdentity.ts +5 -0
- package/src/messageComposer/messageComposer.ts +22 -10
- package/src/messageComposer/types.ts +9 -1
- package/src/types.ts +127 -2
package/src/types.ts
CHANGED
|
@@ -353,6 +353,7 @@ export type QueryReactionsAPIResponse = APIResponse & {
|
|
|
353
353
|
|
|
354
354
|
export type QueryChannelsAPIResponse = APIResponse & {
|
|
355
355
|
channels: Omit<ChannelAPIResponse, keyof APIResponse>[];
|
|
356
|
+
predefined_filter?: ParsedPredefinedFilterResponse;
|
|
356
357
|
};
|
|
357
358
|
|
|
358
359
|
export type QueryChannelAPIResponse = APIResponse & ChannelAPIResponse;
|
|
@@ -742,6 +743,7 @@ export type MessageResponseBase = MessageBase & {
|
|
|
742
743
|
latest_reactions?: ReactionResponse[];
|
|
743
744
|
member?: ChannelMemberResponse;
|
|
744
745
|
mentioned_users?: UserResponse[];
|
|
746
|
+
mentioned_channel?: boolean;
|
|
745
747
|
message_text_updated_at?: string;
|
|
746
748
|
moderation?: ModerationResponse; // present only with Moderation v2
|
|
747
749
|
moderation_details?: ModerationDetailsResponse; // present only with Moderation v1
|
|
@@ -1109,6 +1111,7 @@ export type CreateChannelOptions = {
|
|
|
1109
1111
|
url_enrichment?: boolean;
|
|
1110
1112
|
user_message_reminders?: boolean;
|
|
1111
1113
|
count_messages?: boolean;
|
|
1114
|
+
push_level?: 'all' | 'all_mentions' | 'direct_mentions' | 'mentions' | 'none';
|
|
1112
1115
|
};
|
|
1113
1116
|
|
|
1114
1117
|
export type CreateCommandOptions = {
|
|
@@ -1216,6 +1219,7 @@ export type UpdateChannelTypeRequest =
|
|
|
1216
1219
|
uploads?: boolean;
|
|
1217
1220
|
url_enrichment?: boolean;
|
|
1218
1221
|
count_messages?: boolean;
|
|
1222
|
+
push_level?: 'all' | 'all_mentions' | 'direct_mentions' | 'mentions' | 'none';
|
|
1219
1223
|
};
|
|
1220
1224
|
|
|
1221
1225
|
export type UpdateChannelTypeResponse = {
|
|
@@ -1257,6 +1261,7 @@ export type UpdateChannelTypeResponse = {
|
|
|
1257
1261
|
partition_ttl?: string;
|
|
1258
1262
|
count_messages?: boolean;
|
|
1259
1263
|
user_message_reminders?: boolean;
|
|
1264
|
+
push_level?: string;
|
|
1260
1265
|
};
|
|
1261
1266
|
|
|
1262
1267
|
export type GetChannelTypeResponse = {
|
|
@@ -1298,6 +1303,7 @@ export type GetChannelTypeResponse = {
|
|
|
1298
1303
|
partition_ttl?: string;
|
|
1299
1304
|
count_messages?: boolean;
|
|
1300
1305
|
user_message_reminders?: boolean;
|
|
1306
|
+
push_level?: string;
|
|
1301
1307
|
};
|
|
1302
1308
|
|
|
1303
1309
|
export type UpdateChannelOptions = Partial<{
|
|
@@ -2808,7 +2814,7 @@ type GiphyVersionInfo = {
|
|
|
2808
2814
|
size?: string;
|
|
2809
2815
|
};
|
|
2810
2816
|
|
|
2811
|
-
type GiphyVersions =
|
|
2817
|
+
export type GiphyVersions =
|
|
2812
2818
|
| 'original'
|
|
2813
2819
|
| 'fixed_height'
|
|
2814
2820
|
| 'fixed_height_still'
|
|
@@ -2817,7 +2823,7 @@ type GiphyVersions =
|
|
|
2817
2823
|
| 'fixed_width_still'
|
|
2818
2824
|
| 'fixed_width_downsampled';
|
|
2819
2825
|
|
|
2820
|
-
type GiphyData = {
|
|
2826
|
+
export type GiphyData = {
|
|
2821
2827
|
[key in GiphyVersions]: GiphyVersionInfo;
|
|
2822
2828
|
};
|
|
2823
2829
|
|
|
@@ -2847,6 +2853,7 @@ export type Message = Partial<
|
|
|
2847
2853
|
MessageBase & {
|
|
2848
2854
|
mentioned_users: string[];
|
|
2849
2855
|
shared_location?: StaticLocationPayload | LiveLocationPayload;
|
|
2856
|
+
mentioned_channel?: boolean;
|
|
2850
2857
|
}
|
|
2851
2858
|
>;
|
|
2852
2859
|
|
|
@@ -4692,8 +4699,126 @@ export type ListPredefinedFiltersResponse = APIResponse & {
|
|
|
4692
4699
|
prev?: string;
|
|
4693
4700
|
};
|
|
4694
4701
|
|
|
4702
|
+
/**
|
|
4703
|
+
* Contains the interpolated filter and sort from a predefined filter.
|
|
4704
|
+
* This is returned in the QueryChannels response when using a predefined filter.
|
|
4705
|
+
*/
|
|
4706
|
+
export type ParsedPredefinedFilterResponse = {
|
|
4707
|
+
name: string;
|
|
4708
|
+
filter: Record<string, unknown>;
|
|
4709
|
+
sort?: PredefinedFilterSortParam[];
|
|
4710
|
+
};
|
|
4711
|
+
|
|
4695
4712
|
export type PredefinedFilterSort = SortParam[];
|
|
4696
4713
|
|
|
4697
4714
|
export type ListPredefinedFiltersOptions = Pager & {
|
|
4698
4715
|
sort?: PredefinedFilterSort;
|
|
4699
4716
|
};
|
|
4717
|
+
|
|
4718
|
+
/**
|
|
4719
|
+
* Team Usage Stats Types
|
|
4720
|
+
*/
|
|
4721
|
+
|
|
4722
|
+
/**
|
|
4723
|
+
* Represents a metric value for a specific date
|
|
4724
|
+
*/
|
|
4725
|
+
export type DailyValue = {
|
|
4726
|
+
/** Date in YYYY-MM-DD format */
|
|
4727
|
+
date: string;
|
|
4728
|
+
/** Metric value for this date */
|
|
4729
|
+
value: number;
|
|
4730
|
+
};
|
|
4731
|
+
|
|
4732
|
+
/**
|
|
4733
|
+
* Statistics for a single metric with optional daily breakdown
|
|
4734
|
+
*/
|
|
4735
|
+
export type MetricStats = {
|
|
4736
|
+
/** Per-day values (only present in daily mode) */
|
|
4737
|
+
daily?: DailyValue[];
|
|
4738
|
+
/** Aggregated total value */
|
|
4739
|
+
total: number;
|
|
4740
|
+
};
|
|
4741
|
+
|
|
4742
|
+
/**
|
|
4743
|
+
* Usage statistics for a single team containing all 16 metrics
|
|
4744
|
+
*/
|
|
4745
|
+
export type TeamUsageStats = {
|
|
4746
|
+
/** Team identifier (empty string for users not assigned to any team) */
|
|
4747
|
+
team: string;
|
|
4748
|
+
|
|
4749
|
+
// Daily activity metrics (total = SUM of daily values)
|
|
4750
|
+
/** Daily active users */
|
|
4751
|
+
users_daily: MetricStats;
|
|
4752
|
+
/** Daily messages sent */
|
|
4753
|
+
messages_daily: MetricStats;
|
|
4754
|
+
/** Daily translations */
|
|
4755
|
+
translations_daily: MetricStats;
|
|
4756
|
+
/** Daily image moderations */
|
|
4757
|
+
image_moderations_daily: MetricStats;
|
|
4758
|
+
|
|
4759
|
+
// Peak metrics (total = MAX of daily values)
|
|
4760
|
+
/** Peak concurrent users */
|
|
4761
|
+
concurrent_users: MetricStats;
|
|
4762
|
+
/** Peak concurrent connections */
|
|
4763
|
+
concurrent_connections: MetricStats;
|
|
4764
|
+
|
|
4765
|
+
// Rolling/cumulative metrics (total = LATEST daily value)
|
|
4766
|
+
/** Total users */
|
|
4767
|
+
users_total: MetricStats;
|
|
4768
|
+
/** Users active in last 24 hours */
|
|
4769
|
+
users_last_24_hours: MetricStats;
|
|
4770
|
+
/** MAU - users active in last 30 days */
|
|
4771
|
+
users_last_30_days: MetricStats;
|
|
4772
|
+
/** Users active this month */
|
|
4773
|
+
users_month_to_date: MetricStats;
|
|
4774
|
+
/** Engaged MAU */
|
|
4775
|
+
users_engaged_last_30_days: MetricStats;
|
|
4776
|
+
/** Engaged users this month */
|
|
4777
|
+
users_engaged_month_to_date: MetricStats;
|
|
4778
|
+
/** Total messages */
|
|
4779
|
+
messages_total: MetricStats;
|
|
4780
|
+
/** Messages in last 24 hours */
|
|
4781
|
+
messages_last_24_hours: MetricStats;
|
|
4782
|
+
/** Messages in last 30 days */
|
|
4783
|
+
messages_last_30_days: MetricStats;
|
|
4784
|
+
/** Messages this month */
|
|
4785
|
+
messages_month_to_date: MetricStats;
|
|
4786
|
+
};
|
|
4787
|
+
|
|
4788
|
+
/**
|
|
4789
|
+
* Options for querying team-level usage statistics
|
|
4790
|
+
*/
|
|
4791
|
+
export type QueryTeamUsageStatsOptions = {
|
|
4792
|
+
/**
|
|
4793
|
+
* Month in YYYY-MM format (e.g., '2026-01').
|
|
4794
|
+
* Mutually exclusive with start_date/end_date.
|
|
4795
|
+
* Returns aggregated monthly values.
|
|
4796
|
+
*/
|
|
4797
|
+
month?: string;
|
|
4798
|
+
/**
|
|
4799
|
+
* Start date in YYYY-MM-DD format.
|
|
4800
|
+
* Used with end_date for custom date range.
|
|
4801
|
+
* Returns daily breakdown.
|
|
4802
|
+
*/
|
|
4803
|
+
start_date?: string;
|
|
4804
|
+
/**
|
|
4805
|
+
* End date in YYYY-MM-DD format.
|
|
4806
|
+
* Used with start_date for custom date range.
|
|
4807
|
+
* Returns daily breakdown.
|
|
4808
|
+
*/
|
|
4809
|
+
end_date?: string;
|
|
4810
|
+
/** Maximum number of teams to return per page (default: 30, max: 30) */
|
|
4811
|
+
limit?: number;
|
|
4812
|
+
/** Cursor for pagination to fetch next page of teams */
|
|
4813
|
+
next?: string;
|
|
4814
|
+
};
|
|
4815
|
+
|
|
4816
|
+
/**
|
|
4817
|
+
* Response containing team-level usage statistics
|
|
4818
|
+
*/
|
|
4819
|
+
export type QueryTeamUsageStatsResponse = APIResponse & {
|
|
4820
|
+
/** Array of team usage statistics */
|
|
4821
|
+
teams: TeamUsageStats[];
|
|
4822
|
+
/** Cursor for pagination to fetch next page */
|
|
4823
|
+
next?: string;
|
|
4824
|
+
};
|