stream-chat 6.7.2 → 6.9.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 +133 -39
- 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 +133 -39
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +133 -39
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +133 -39
- package/dist/index.js.map +1 -1
- package/dist/types/channel.d.ts +5 -0
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/channel_state.d.ts +12 -2
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +7 -8
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/connection.d.ts +1 -0
- package/dist/types/connection.d.ts.map +1 -1
- package/dist/types/types.d.ts +29 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +28 -2
- package/src/channel_state.ts +30 -3
- package/src/client.ts +28 -16
- package/src/connection.ts +4 -0
- package/src/types.ts +37 -0
package/src/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
import { StableWSConnection } from './connection';
|
|
2
3
|
import { EVENT_MAP } from './events';
|
|
3
4
|
import { Role } from './permissions';
|
|
4
5
|
|
|
@@ -101,6 +102,7 @@ export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics
|
|
|
101
102
|
}
|
|
102
103
|
>;
|
|
103
104
|
reminders_interval: number;
|
|
105
|
+
agora_options?: AgoraOptions | null;
|
|
104
106
|
async_url_enrich_enabled?: boolean;
|
|
105
107
|
auto_translation_enabled?: boolean;
|
|
106
108
|
before_message_send_hook_url?: string;
|
|
@@ -112,6 +114,7 @@ export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics
|
|
|
112
114
|
enforce_unique_usernames?: 'no' | 'app' | 'team';
|
|
113
115
|
file_upload_config?: FileUploadConfig;
|
|
114
116
|
grants?: Record<string, string[]>;
|
|
117
|
+
hms_options?: HMSOptions | null;
|
|
115
118
|
image_moderation_enabled?: boolean;
|
|
116
119
|
image_upload_config?: FileUploadConfig;
|
|
117
120
|
multi_tenant_enabled?: boolean;
|
|
@@ -136,6 +139,7 @@ export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics
|
|
|
136
139
|
suspended?: boolean;
|
|
137
140
|
suspended_explanation?: string;
|
|
138
141
|
user_search_disallowed_roles?: string[] | null;
|
|
142
|
+
video_provider?: string;
|
|
139
143
|
webhook_events?: Array<string>;
|
|
140
144
|
webhook_url?: string;
|
|
141
145
|
};
|
|
@@ -270,6 +274,7 @@ export type ChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = D
|
|
|
270
274
|
pinned_messages: MessageResponse<StreamChatGenerics>[];
|
|
271
275
|
hidden?: boolean;
|
|
272
276
|
membership?: ChannelMembership<StreamChatGenerics> | null;
|
|
277
|
+
pending_messages?: PendingMessageResponse<StreamChatGenerics>[];
|
|
273
278
|
read?: ReadResponse<StreamChatGenerics>[];
|
|
274
279
|
watcher_count?: number;
|
|
275
280
|
watchers?: UserResponse<StreamChatGenerics>[];
|
|
@@ -434,6 +439,10 @@ export type GetCommandResponse<StreamChatGenerics extends ExtendableGenerics = D
|
|
|
434
439
|
CreateCommandOptions<StreamChatGenerics> &
|
|
435
440
|
CreatedAtUpdatedAt;
|
|
436
441
|
|
|
442
|
+
export type GetMessageAPIResponse<
|
|
443
|
+
StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
|
|
444
|
+
> = SendMessageAPIResponse<StreamChatGenerics>;
|
|
445
|
+
|
|
437
446
|
export type GetMultipleMessagesAPIResponse<
|
|
438
447
|
StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
|
|
439
448
|
> = APIResponse & {
|
|
@@ -601,6 +610,12 @@ export type SendFileAPIResponse = APIResponse & { file: string; thumb_url?: stri
|
|
|
601
610
|
|
|
602
611
|
export type SendMessageAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
|
|
603
612
|
message: MessageResponse<StreamChatGenerics>;
|
|
613
|
+
pending_message_metadata?: Record<string, string> | null;
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
export type SyncResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
|
|
617
|
+
events: Event<StreamChatGenerics>[];
|
|
618
|
+
inaccessible_cids?: string[];
|
|
604
619
|
};
|
|
605
620
|
|
|
606
621
|
export type TruncateChannelAPIResponse<
|
|
@@ -893,6 +908,22 @@ export type StreamChatOptions = AxiosRequestConfig & {
|
|
|
893
908
|
*/
|
|
894
909
|
recoverStateOnReconnect?: boolean;
|
|
895
910
|
warmUp?: boolean;
|
|
911
|
+
// Set the instance of StableWSConnection on chat client. Its purely for testing purpose and should
|
|
912
|
+
// not be used in production apps.
|
|
913
|
+
wsConnection?: StableWSConnection;
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
export type SyncOptions = {
|
|
917
|
+
/**
|
|
918
|
+
* This will behave as queryChannels option.
|
|
919
|
+
*/
|
|
920
|
+
watch?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* Return channels from request that user does not have access to in a separate
|
|
923
|
+
* field in the response called 'inaccessible_cids' instead of
|
|
924
|
+
* adding them as 'notification.removed_from_channel' events.
|
|
925
|
+
*/
|
|
926
|
+
with_inaccessible_cids?: boolean;
|
|
896
927
|
};
|
|
897
928
|
|
|
898
929
|
export type UnBanUserOptions = {
|
|
@@ -1468,6 +1499,7 @@ export type AppSettings = {
|
|
|
1468
1499
|
};
|
|
1469
1500
|
async_url_enrich_enabled?: boolean;
|
|
1470
1501
|
auto_translation_enabled?: boolean;
|
|
1502
|
+
before_message_send_hook_url?: string;
|
|
1471
1503
|
cdn_expiration_seconds?: number;
|
|
1472
1504
|
custom_action_handler_url?: string;
|
|
1473
1505
|
disable_auth_checks?: boolean;
|
|
@@ -1998,6 +2030,11 @@ export type PartialMessageUpdate<StreamChatGenerics extends ExtendableGenerics =
|
|
|
1998
2030
|
unset?: Array<keyof MessageUpdatableFields<StreamChatGenerics>>;
|
|
1999
2031
|
};
|
|
2000
2032
|
|
|
2033
|
+
export type PendingMessageResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
|
|
2034
|
+
message: MessageResponse<StreamChatGenerics>;
|
|
2035
|
+
pending_message_metadata?: Record<string, string>;
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2001
2038
|
export type PermissionAPIObject = {
|
|
2002
2039
|
action?: string;
|
|
2003
2040
|
condition?: object;
|