stream-chat 8.10.0 → 8.11.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/browser.es.js +534 -563
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +534 -563
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +534 -563
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +534 -563
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/client.d.ts +4 -5
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/types.d.ts +11 -15
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +1 -0
- package/src/client.ts +4 -7
- package/src/types.ts +11 -16
package/src/client.ts
CHANGED
|
@@ -93,7 +93,6 @@ import {
|
|
|
93
93
|
GetImportResponse,
|
|
94
94
|
GetMessageAPIResponse,
|
|
95
95
|
GetRateLimitsResponse,
|
|
96
|
-
GetUnreadCountAPIResponse,
|
|
97
96
|
ListChannelResponse,
|
|
98
97
|
ListCommandsResponse,
|
|
99
98
|
ListImportsPaginationOptions,
|
|
@@ -1460,7 +1459,7 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
|
|
|
1460
1459
|
*
|
|
1461
1460
|
* @param {BannedUsersFilters} filterConditions MongoDB style filter conditions
|
|
1462
1461
|
* @param {BannedUsersSort} sort Sort options [{created_at: 1}].
|
|
1463
|
-
* @param {BannedUsersPaginationOptions} options Option object, {limit: 10, offset:0}
|
|
1462
|
+
* @param {BannedUsersPaginationOptions} options Option object, {limit: 10, offset:0, exclude_expired_bans: true}
|
|
1464
1463
|
*
|
|
1465
1464
|
* @return {Promise<BannedUsersResponse<StreamChatGenerics>>} Ban Query Response
|
|
1466
1465
|
*/
|
|
@@ -1663,10 +1662,6 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
|
|
|
1663
1662
|
);
|
|
1664
1663
|
}
|
|
1665
1664
|
|
|
1666
|
-
async getUnreadCount(userID?: string) {
|
|
1667
|
-
return await this.get<GetUnreadCountAPIResponse>(this.baseURL + '/unread', userID ? { user_id: userID } : {});
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
1665
|
/**
|
|
1671
1666
|
* removeDevice - Removes the device with the given id. Clientside users can only delete their own devices
|
|
1672
1667
|
*
|
|
@@ -2545,7 +2540,9 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
|
|
|
2545
2540
|
}
|
|
2546
2541
|
|
|
2547
2542
|
async getMessage(messageID: string) {
|
|
2548
|
-
return await this.get<GetMessageAPIResponse<StreamChatGenerics>>(
|
|
2543
|
+
return await this.get<GetMessageAPIResponse<StreamChatGenerics>>(
|
|
2544
|
+
this.baseURL + `/messages/${encodeURIComponent(messageID)}`,
|
|
2545
|
+
);
|
|
2549
2546
|
}
|
|
2550
2547
|
|
|
2551
2548
|
getUserAgent() {
|
package/src/types.ts
CHANGED
|
@@ -118,6 +118,12 @@ export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics
|
|
|
118
118
|
disable_permissions_checks?: boolean;
|
|
119
119
|
enforce_unique_usernames?: 'no' | 'app' | 'team';
|
|
120
120
|
file_upload_config?: FileUploadConfig;
|
|
121
|
+
geofences?: Array<{
|
|
122
|
+
country_codes: Array<string>;
|
|
123
|
+
description: string;
|
|
124
|
+
name: string;
|
|
125
|
+
type: string;
|
|
126
|
+
}>;
|
|
121
127
|
grants?: Record<string, string[]>;
|
|
122
128
|
hms_options?: HMSOptions | null;
|
|
123
129
|
image_moderation_enabled?: boolean;
|
|
@@ -477,20 +483,6 @@ export type GetRepliesAPIResponse<StreamChatGenerics extends ExtendableGenerics
|
|
|
477
483
|
messages: MessageResponse<StreamChatGenerics>[];
|
|
478
484
|
};
|
|
479
485
|
|
|
480
|
-
export type GetUnreadCountAPIResponse = APIResponse & {
|
|
481
|
-
channel_type: {
|
|
482
|
-
channel_count: number;
|
|
483
|
-
channel_type: string;
|
|
484
|
-
unread_count: number;
|
|
485
|
-
}[];
|
|
486
|
-
channels: {
|
|
487
|
-
channel_id: string;
|
|
488
|
-
last_read: string;
|
|
489
|
-
unread_count: number;
|
|
490
|
-
}[];
|
|
491
|
-
total_unread_count: number;
|
|
492
|
-
};
|
|
493
|
-
|
|
494
486
|
export type ListChannelResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
|
|
495
487
|
channel_types: Record<
|
|
496
488
|
string,
|
|
@@ -548,7 +540,6 @@ export type MessageResponseBase<
|
|
|
548
540
|
reaction_scores?: { [key: string]: number } | null;
|
|
549
541
|
reply_count?: number;
|
|
550
542
|
shadowed?: boolean;
|
|
551
|
-
silent?: boolean;
|
|
552
543
|
status?: string;
|
|
553
544
|
thread_participants?: UserResponse<StreamChatGenerics>[];
|
|
554
545
|
updated_at?: string;
|
|
@@ -728,7 +719,9 @@ export type ReviewFlagReportOptions = {
|
|
|
728
719
|
user_id?: string;
|
|
729
720
|
};
|
|
730
721
|
|
|
731
|
-
export type BannedUsersPaginationOptions = Omit<PaginationOptions, 'id_gt' | 'id_gte' | 'id_lt' | 'id_lte'
|
|
722
|
+
export type BannedUsersPaginationOptions = Omit<PaginationOptions, 'id_gt' | 'id_gte' | 'id_lt' | 'id_lte'> & {
|
|
723
|
+
exclude_expired_bans?: boolean;
|
|
724
|
+
};
|
|
732
725
|
|
|
733
726
|
export type BanUserOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = UnBanUserOptions & {
|
|
734
727
|
banned_by?: UserResponse<StreamChatGenerics>;
|
|
@@ -1038,6 +1031,7 @@ export type Event<StreamChatGenerics extends ExtendableGenerics = DefaultGeneric
|
|
|
1038
1031
|
connection_id?: string;
|
|
1039
1032
|
created_at?: string;
|
|
1040
1033
|
hard_delete?: boolean;
|
|
1034
|
+
last_read_message_id?: string;
|
|
1041
1035
|
mark_messages_deleted?: boolean;
|
|
1042
1036
|
me?: OwnUserResponse<StreamChatGenerics>;
|
|
1043
1037
|
member?: ChannelMemberResponse<StreamChatGenerics>;
|
|
@@ -2074,6 +2068,7 @@ export type MessageBase<
|
|
|
2074
2068
|
pinned_at?: string | null;
|
|
2075
2069
|
quoted_message_id?: string;
|
|
2076
2070
|
show_in_channel?: boolean;
|
|
2071
|
+
silent?: boolean;
|
|
2077
2072
|
text?: string;
|
|
2078
2073
|
user?: UserResponse<StreamChatGenerics> | null;
|
|
2079
2074
|
user_id?: string;
|