stream-chat 9.54.4 → 9.55.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 +3 -3
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +3 -3
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/types.d.ts +24 -1
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/types.ts +29 -2
package/dist/types/types.d.ts
CHANGED
|
@@ -41,6 +41,24 @@ export type APIResponse = {
|
|
|
41
41
|
duration: string;
|
|
42
42
|
blocklist?: BlockListResponse;
|
|
43
43
|
};
|
|
44
|
+
export type PagerDefaults = {
|
|
45
|
+
limit: number;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Request limit defaults applied by the server when the corresponding field is omitted.
|
|
49
|
+
*/
|
|
50
|
+
export type AppDefaults = {
|
|
51
|
+
get_or_create_channel: {
|
|
52
|
+
members: PagerDefaults;
|
|
53
|
+
messages: PagerDefaults;
|
|
54
|
+
};
|
|
55
|
+
query_channels: {
|
|
56
|
+
limit: number;
|
|
57
|
+
max_limit: number;
|
|
58
|
+
member_limit: number;
|
|
59
|
+
message_limit: number;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
44
62
|
export type TranslateResponse = {
|
|
45
63
|
language: string;
|
|
46
64
|
translated_text: string;
|
|
@@ -97,6 +115,7 @@ export type AppSettingsAPIResponse = APIResponse & {
|
|
|
97
115
|
cdn_expiration_seconds?: number;
|
|
98
116
|
chat_primary_use_case?: string;
|
|
99
117
|
custom_action_handler_url?: string;
|
|
118
|
+
defaults?: AppDefaults;
|
|
100
119
|
datadog_info?: {
|
|
101
120
|
api_key: string;
|
|
102
121
|
site: string;
|
|
@@ -2107,6 +2126,10 @@ export type ChannelConfigFields = {
|
|
|
2107
2126
|
};
|
|
2108
2127
|
export type ChannelConfigWithInfo = ChannelConfigFields & CreatedAtUpdatedAt & {
|
|
2109
2128
|
commands?: CommandResponse[];
|
|
2129
|
+
scheduled_messages_max_lead_time_seconds?: number;
|
|
2130
|
+
scheduled_messages_max_per_channel?: number;
|
|
2131
|
+
scheduled_messages_max_per_user?: number;
|
|
2132
|
+
scheduled_messages_min_lead_time_seconds?: number;
|
|
2110
2133
|
};
|
|
2111
2134
|
export type ChannelData = CustomChannelData & Partial<{
|
|
2112
2135
|
blocked: boolean;
|
|
@@ -2465,7 +2488,7 @@ export type DeleteChannelsResponse = {
|
|
|
2465
2488
|
} & Partial<TaskResponse>;
|
|
2466
2489
|
export type DeleteType = 'soft' | 'hard' | 'pruning';
|
|
2467
2490
|
export type DeleteUserOptions = {
|
|
2468
|
-
conversations?: Exclude<DeleteType, 'pruning'
|
|
2491
|
+
conversations?: Exclude<DeleteType, 'pruning'> | 'keep';
|
|
2469
2492
|
messages?: DeleteType;
|
|
2470
2493
|
new_channel_owner_id?: string;
|
|
2471
2494
|
user?: DeleteType;
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -4656,10 +4656,10 @@ export class StreamChat {
|
|
|
4656
4656
|
}
|
|
4657
4657
|
if (
|
|
4658
4658
|
typeof options.conversations !== 'undefined' &&
|
|
4659
|
-
!['soft', 'hard'].includes(options.conversations)
|
|
4659
|
+
!['soft', 'hard', 'keep'].includes(options.conversations)
|
|
4660
4660
|
) {
|
|
4661
4661
|
throw new Error(
|
|
4662
|
-
'Invalid delete user options. conversations must be one of [soft hard]',
|
|
4662
|
+
'Invalid delete user options. conversations must be one of [soft hard keep]',
|
|
4663
4663
|
);
|
|
4664
4664
|
}
|
|
4665
4665
|
if (
|
package/src/types.ts
CHANGED
|
@@ -75,6 +75,26 @@ export type APIResponse = {
|
|
|
75
75
|
blocklist?: BlockListResponse;
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
export type PagerDefaults = {
|
|
79
|
+
limit: number;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Request limit defaults applied by the server when the corresponding field is omitted.
|
|
84
|
+
*/
|
|
85
|
+
export type AppDefaults = {
|
|
86
|
+
get_or_create_channel: {
|
|
87
|
+
members: PagerDefaults;
|
|
88
|
+
messages: PagerDefaults;
|
|
89
|
+
};
|
|
90
|
+
query_channels: {
|
|
91
|
+
limit: number;
|
|
92
|
+
max_limit: number;
|
|
93
|
+
member_limit: number;
|
|
94
|
+
message_limit: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
78
98
|
export type TranslateResponse = {
|
|
79
99
|
language: string;
|
|
80
100
|
translated_text: string;
|
|
@@ -143,6 +163,7 @@ export type AppSettingsAPIResponse = APIResponse & {
|
|
|
143
163
|
cdn_expiration_seconds?: number;
|
|
144
164
|
chat_primary_use_case?: string;
|
|
145
165
|
custom_action_handler_url?: string;
|
|
166
|
+
defaults?: AppDefaults;
|
|
146
167
|
datadog_info?: {
|
|
147
168
|
api_key: string;
|
|
148
169
|
site: string;
|
|
@@ -2676,6 +2697,11 @@ export type ChannelConfigFields = {
|
|
|
2676
2697
|
export type ChannelConfigWithInfo = ChannelConfigFields &
|
|
2677
2698
|
CreatedAtUpdatedAt & {
|
|
2678
2699
|
commands?: CommandResponse[];
|
|
2700
|
+
// scheduled message limits, present only when the app has scheduled messages enabled
|
|
2701
|
+
scheduled_messages_max_lead_time_seconds?: number;
|
|
2702
|
+
scheduled_messages_max_per_channel?: number;
|
|
2703
|
+
scheduled_messages_max_per_user?: number;
|
|
2704
|
+
scheduled_messages_min_lead_time_seconds?: number;
|
|
2679
2705
|
};
|
|
2680
2706
|
|
|
2681
2707
|
export type ChannelData = CustomChannelData &
|
|
@@ -3347,10 +3373,11 @@ export type DeleteType = 'soft' | 'hard' | 'pruning';
|
|
|
3347
3373
|
`user`:
|
|
3348
3374
|
- soft: marks user as deleted and retains all user data
|
|
3349
3375
|
- pruning: marks user as deleted and nullifies user information
|
|
3350
|
-
- hard: deletes user completely - this requires hard option for messages and
|
|
3376
|
+
- hard: deletes user completely - this requires hard option for messages, and hard or keep option for conversations
|
|
3351
3377
|
`conversations`:
|
|
3352
3378
|
- soft: marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
|
|
3353
3379
|
- hard: deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
|
|
3380
|
+
- keep: doesn't delete any conversation channels. Use it with user hard, where an unset value defaults to hard
|
|
3354
3381
|
`messages`:
|
|
3355
3382
|
- soft: marks all user messages as deleted without removing any related message data
|
|
3356
3383
|
- pruning: marks all user messages as deleted, nullifies message information and removes some message data such as reactions and flags
|
|
@@ -3358,7 +3385,7 @@ export type DeleteType = 'soft' | 'hard' | 'pruning';
|
|
|
3358
3385
|
`new_channel_owner_id`: any channels owned by the hard-deleted user will be transferred to this user ID
|
|
3359
3386
|
*/
|
|
3360
3387
|
export type DeleteUserOptions = {
|
|
3361
|
-
conversations?: Exclude<DeleteType, 'pruning'
|
|
3388
|
+
conversations?: Exclude<DeleteType, 'pruning'> | 'keep';
|
|
3362
3389
|
messages?: DeleteType;
|
|
3363
3390
|
new_channel_owner_id?: string;
|
|
3364
3391
|
user?: DeleteType;
|