stream-chat 6.7.1 → 6.8.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 +97 -11
- 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 +97 -11
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +97 -11
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +97 -11
- 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 +11 -1
- 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 +31 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/channel.ts +27 -1
- package/src/channel_state.ts +27 -0
- package/src/client.ts +22 -14
- package/src/connection.ts +4 -0
- package/src/types.ts +39 -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,16 +102,19 @@ 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;
|
|
107
109
|
campaign_enabled?: boolean;
|
|
110
|
+
cdn_expiration_seconds?: number;
|
|
108
111
|
custom_action_handler_url?: string;
|
|
109
112
|
disable_auth_checks?: boolean;
|
|
110
113
|
disable_permissions_checks?: boolean;
|
|
111
114
|
enforce_unique_usernames?: 'no' | 'app' | 'team';
|
|
112
115
|
file_upload_config?: FileUploadConfig;
|
|
113
116
|
grants?: Record<string, string[]>;
|
|
117
|
+
hms_options?: HMSOptions | null;
|
|
114
118
|
image_moderation_enabled?: boolean;
|
|
115
119
|
image_upload_config?: FileUploadConfig;
|
|
116
120
|
multi_tenant_enabled?: boolean;
|
|
@@ -135,6 +139,7 @@ export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics
|
|
|
135
139
|
suspended?: boolean;
|
|
136
140
|
suspended_explanation?: string;
|
|
137
141
|
user_search_disallowed_roles?: string[] | null;
|
|
142
|
+
video_provider?: string;
|
|
138
143
|
webhook_events?: Array<string>;
|
|
139
144
|
webhook_url?: string;
|
|
140
145
|
};
|
|
@@ -269,6 +274,7 @@ export type ChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = D
|
|
|
269
274
|
pinned_messages: MessageResponse<StreamChatGenerics>[];
|
|
270
275
|
hidden?: boolean;
|
|
271
276
|
membership?: ChannelMembership<StreamChatGenerics> | null;
|
|
277
|
+
pending_messages?: PendingMessageResponse<StreamChatGenerics>[];
|
|
272
278
|
read?: ReadResponse<StreamChatGenerics>[];
|
|
273
279
|
watcher_count?: number;
|
|
274
280
|
watchers?: UserResponse<StreamChatGenerics>[];
|
|
@@ -433,6 +439,10 @@ export type GetCommandResponse<StreamChatGenerics extends ExtendableGenerics = D
|
|
|
433
439
|
CreateCommandOptions<StreamChatGenerics> &
|
|
434
440
|
CreatedAtUpdatedAt;
|
|
435
441
|
|
|
442
|
+
export type GetMessageAPIResponse<
|
|
443
|
+
StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
|
|
444
|
+
> = SendMessageAPIResponse<StreamChatGenerics>;
|
|
445
|
+
|
|
436
446
|
export type GetMultipleMessagesAPIResponse<
|
|
437
447
|
StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
|
|
438
448
|
> = APIResponse & {
|
|
@@ -600,6 +610,12 @@ export type SendFileAPIResponse = APIResponse & { file: string; thumb_url?: stri
|
|
|
600
610
|
|
|
601
611
|
export type SendMessageAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
|
|
602
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[];
|
|
603
619
|
};
|
|
604
620
|
|
|
605
621
|
export type TruncateChannelAPIResponse<
|
|
@@ -892,6 +908,22 @@ export type StreamChatOptions = AxiosRequestConfig & {
|
|
|
892
908
|
*/
|
|
893
909
|
recoverStateOnReconnect?: boolean;
|
|
894
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;
|
|
895
927
|
};
|
|
896
928
|
|
|
897
929
|
export type UnBanUserOptions = {
|
|
@@ -1467,6 +1499,8 @@ export type AppSettings = {
|
|
|
1467
1499
|
};
|
|
1468
1500
|
async_url_enrich_enabled?: boolean;
|
|
1469
1501
|
auto_translation_enabled?: boolean;
|
|
1502
|
+
before_message_send_hook_url?: string;
|
|
1503
|
+
cdn_expiration_seconds?: number;
|
|
1470
1504
|
custom_action_handler_url?: string;
|
|
1471
1505
|
disable_auth_checks?: boolean;
|
|
1472
1506
|
disable_permissions_checks?: boolean;
|
|
@@ -1996,6 +2030,11 @@ export type PartialMessageUpdate<StreamChatGenerics extends ExtendableGenerics =
|
|
|
1996
2030
|
unset?: Array<keyof MessageUpdatableFields<StreamChatGenerics>>;
|
|
1997
2031
|
};
|
|
1998
2032
|
|
|
2033
|
+
export type PendingMessageResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
|
|
2034
|
+
message: MessageResponse<StreamChatGenerics>;
|
|
2035
|
+
pending_message_metadata?: Record<string, string>;
|
|
2036
|
+
};
|
|
2037
|
+
|
|
1999
2038
|
export type PermissionAPIObject = {
|
|
2000
2039
|
action?: string;
|
|
2001
2040
|
condition?: object;
|