easemob-websdk 4.24.1 → 5.0.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/README.md +95 -39
- package/bundle/im-sdk-web.iife.js +1 -0
- package/cache/cache-crypto.d.ts +26 -0
- package/cache/cache-eviction.d.ts +16 -0
- package/cache/cache-keys.d.ts +23 -0
- package/cache/cache-manager.d.ts +254 -0
- package/cache/cache-metadata.d.ts +14 -0
- package/cache/cache-store.d.ts +19 -0
- package/cache/cache-types.d.ts +225 -0
- package/cache/cache-utils.d.ts +7 -0
- package/cache/contact-cache.d.ts +35 -0
- package/cache/conversation-cache.d.ts +21 -0
- package/cache/group-namecard-cache.d.ts +20 -0
- package/cache/index.d.ts +24 -0
- package/cache/joined-group-preview-cache.d.ts +12 -0
- package/cache/session-list-cache.d.ts +10 -0
- package/cache/user-info-cache.d.ts +16 -0
- package/chat-client.d.ts +558 -0
- package/chunks/cache-utils-BwRPIZ7n.js +1 -0
- package/chunks/cache-utils-CKbcYPlM.cjs +1 -0
- package/chunks/chat-manager-ChdK26ck.cjs +1 -0
- package/chunks/chat-manager-DH8a6Qj9.js +2 -0
- package/chunks/common-CfAlncj9.cjs +1 -0
- package/chunks/common-DN_g4O3n.js +1 -0
- package/chunks/event-system-COBJFEIq.cjs +1 -0
- package/chunks/event-system-D6IJA0C4.js +1 -0
- package/chunks/group-user-info-resolver-C5pdiqox.cjs +1 -0
- package/chunks/group-user-info-resolver-FNRqDg18.js +1 -0
- package/chunks/index-BKg4EGcI.cjs +1 -0
- package/chunks/index-CK3GHdGU.cjs +1 -0
- package/chunks/index-CjofwvEQ.js +1 -0
- package/chunks/index-uKWbjx-u.js +1 -0
- package/chunks/profile-version-DLMz8lqW.js +1 -0
- package/chunks/profile-version-njNs7R5-.cjs +1 -0
- package/chunks/reflection-proto-codec-64ocOTHU.js +1 -0
- package/chunks/reflection-proto-codec-BnQFQdZC.cjs +1 -0
- package/chunks/session-list-query-B6dh-b4Y.cjs +1 -0
- package/chunks/session-list-query-Dnp2HbpW.js +1 -0
- package/chunks/user-info-BfRwS4ZA.js +1 -0
- package/chunks/user-info-icpL0Eaw.cjs +1 -0
- package/config/cache.d.ts +12 -0
- package/config/timeouts.d.ts +34 -0
- package/core/connection/connection-manager.d.ts +228 -0
- package/core/connection/connection-retry.d.ts +47 -0
- package/core/connection/heartbeat.d.ts +68 -0
- package/core/contact-sync/contact-roster-event-sidecar.d.ts +3 -0
- package/core/contact-sync/roster-sync-client.d.ts +21 -0
- package/core/contact-sync/roster-sync-controller.d.ts +20 -0
- package/core/contact-sync/roster-sync-session.d.ts +28 -0
- package/core/contact-sync/roster-sync-types.d.ts +74 -0
- package/core/events/event-hub.d.ts +13 -0
- package/core/group-sync/group-sync-client.d.ts +19 -0
- package/core/group-sync/group-sync-controller.d.ts +11 -0
- package/core/group-sync/group-sync-merge.d.ts +3 -0
- package/core/group-sync/group-sync-normalizer.d.ts +4 -0
- package/core/group-sync/group-sync-session.d.ts +17 -0
- package/core/group-sync/group-sync-types.d.ts +24 -0
- package/core/group-sync/index.d.ts +4 -0
- package/core/index.d.ts +95 -0
- package/core/message/attachment-downloader.d.ts +7 -0
- package/core/message/chatroom-operation-types.d.ts +6 -0
- package/core/message/combine-message-downloader.d.ts +7 -0
- package/core/message/message-action-types.d.ts +22 -0
- package/core/message/message-deduplicator.d.ts +11 -0
- package/core/message/message-receiver.d.ts +65 -0
- package/core/message/message-retry.d.ts +33 -0
- package/core/message/message-sender.d.ts +63 -0
- package/core/message/profile-sync/group-namecard-hydration-queue.d.ts +33 -0
- package/core/message/profile-sync/group-namecard-hydrator.d.ts +8 -0
- package/core/message/profile-sync/latest-message-version-projector.d.ts +3 -0
- package/core/message/profile-sync/profile-version-sidecar.d.ts +9 -0
- package/core/message/profile-sync/profile-version.d.ts +3 -0
- package/core/message/profile-sync/user-info-hydration-queue.d.ts +29 -0
- package/core/message/profile-sync/user-info-hydrator.d.ts +8 -0
- package/core/message/stream-message-cache.d.ts +38 -0
- package/core/message/stream-message-handler.d.ts +22 -0
- package/core/session-list-sync/session-list-query.d.ts +26 -0
- package/core/session-list-sync/session-list-sync-controller.d.ts +17 -0
- package/core/session-list-sync/session-list-sync-merge.d.ts +17 -0
- package/core/session-list-sync/session-list-sync-normalizer.d.ts +6 -0
- package/core/session-list-sync/session-list-sync-runner.d.ts +13 -0
- package/core/session-list-sync/session-list-sync-session.d.ts +26 -0
- package/core/session-list-sync/session-list-sync-types.d.ts +24 -0
- package/core/sync/shared-sync-websocket-session.d.ts +61 -0
- package/core/user-info/group-user-info-resolver.d.ts +40 -0
- package/data-report/bridge.d.ts +11 -0
- package/data-report/constants.d.ts +25 -0
- package/data-report/data-reporter.d.ts +21 -0
- package/data-report/event-queue.d.ts +38 -0
- package/data-report/index.d.ts +3 -0
- package/data-report/network-type.d.ts +1 -0
- package/data-report/operation-map.d.ts +8 -0
- package/data-report/transport.d.ts +17 -0
- package/data-report/types.d.ts +61 -0
- package/index.cjs +1 -0
- package/index.d.ts +134 -0
- package/index.js +3 -0
- package/managers/chat/index.cjs +1 -0
- package/managers/chat/index.d.ts +1 -0
- package/managers/chat/index.js +1 -0
- package/managers/chat-manager.d.ts +880 -0
- package/managers/chat-thread/chat-thread.d.ts +126 -0
- package/managers/chat-thread/index.cjs +1 -0
- package/managers/chat-thread/index.d.ts +2 -0
- package/managers/chat-thread/index.js +1 -0
- package/managers/chat-thread-manager.d.ts +257 -0
- package/managers/chatroom/chatroom-event-mapper.d.ts +17 -0
- package/managers/chatroom/chatroom-event-user-info-resolver.d.ts +15 -0
- package/managers/chatroom/chatroom-normalizers.d.ts +23 -0
- package/managers/chatroom/chatroom.d.ts +403 -0
- package/managers/chatroom/index.cjs +1 -0
- package/managers/chatroom/index.d.ts +2 -0
- package/managers/chatroom/index.js +1 -0
- package/managers/chatroom-manager.d.ts +604 -0
- package/managers/contact/contact-user-info-resolver.d.ts +15 -0
- package/managers/contact/index.cjs +1 -0
- package/managers/contact/index.d.ts +1 -0
- package/managers/contact/index.js +1 -0
- package/managers/contact-manager.d.ts +215 -0
- package/managers/group/group-event-mapper.d.ts +18 -0
- package/managers/group/group-event-user-info-resolver.d.ts +15 -0
- package/managers/group/group-normalizers.d.ts +15 -0
- package/managers/group/group.d.ts +504 -0
- package/managers/group/index.cjs +1 -0
- package/managers/group/index.d.ts +2 -0
- package/managers/group/index.js +1 -0
- package/managers/group/internal/group-event-sync.d.ts +13 -0
- package/managers/group/internal/group-repository.d.ts +31 -0
- package/managers/group/internal/group-snapshot-mapper.d.ts +6 -0
- package/managers/group/internal/internal-group.d.ts +24 -0
- package/managers/group-manager.d.ts +371 -0
- package/managers/presence/index.cjs +1 -0
- package/managers/presence/index.d.ts +1 -0
- package/managers/presence/index.js +1 -0
- package/managers/presence-manager.d.ts +201 -0
- package/managers/push/index.cjs +1 -0
- package/managers/push/index.d.ts +1 -0
- package/managers/push/index.js +1 -0
- package/managers/push-manager.d.ts +205 -0
- package/managers/user-info/index.cjs +1 -0
- package/managers/user-info/index.d.ts +4 -0
- package/managers/user-info/index.js +1 -0
- package/managers/user-info/user-info-notify-normalizer.d.ts +2 -0
- package/managers/user-info/user-info-runtime-store.d.ts +28 -0
- package/managers/user-info-manager.d.ts +196 -0
- package/message/combine-compatible-text-sidecar.d.ts +4 -0
- package/message/combine-message-constraints.d.ts +7 -0
- package/message/combine-payload-codec.d.ts +17 -0
- package/message/create-message.d.ts +64 -0
- package/package.json +64 -16
- package/platform/capability-validator.d.ts +7 -0
- package/platform/env.d.ts +68 -0
- package/platform/factory.d.ts +7 -0
- package/platform/image/miniapp-image-processor.d.ts +45 -0
- package/platform/image/web-image-processor.d.ts +2 -0
- package/platform/index.d.ts +17 -0
- package/platform/miniapp/miniapp-adapter.d.ts +3 -0
- package/platform/proto/proto-adapter.d.ts +17 -0
- package/platform/proto/reflection-proto-codec.d.ts +8 -0
- package/platform/proto/static-proto-adapter.d.ts +8 -0
- package/platform/request/web-request-adapter.d.ts +9 -0
- package/platform/runtime/connection-event-normalizer.d.ts +14 -0
- package/platform/runtime/runtime-event-bridge.d.ts +23 -0
- package/platform/runtime/web-runtime-adapter.d.ts +26 -0
- package/platform/socket/web-socket-adapter.d.ts +8 -0
- package/platform/types.d.ts +472 -0
- package/platform/upload/react-native-upload-adapter.d.ts +14 -0
- package/platform/upload/upload-error-mapper.d.ts +7 -0
- package/platform/upload/upload-source.d.ts +20 -0
- package/platform/upload/web-upload-adapter.d.ts +10 -0
- package/protocol/joined-groups/codec.d.ts +11 -0
- package/protocol/joined-groups/gateway.d.ts +2 -0
- package/protocol/joined-groups/index.d.ts +2 -0
- package/protocol/joined-groups/proto.d.ts +174 -0
- package/protocol/joined-groups/types.d.ts +65 -0
- package/protocol/msync/codec.d.ts +191 -0
- package/protocol/msync/context.d.ts +40 -0
- package/protocol/msync/lz4-compressor/index.d.ts +40 -0
- package/protocol/msync/lz4-compressor/utils.d.ts +27 -0
- package/protocol/msync/multi-device-normalizer.d.ts +75 -0
- package/protocol/msync/proto.d.ts +1306 -0
- package/protocol/msync/root.d.ts +5 -0
- package/protocol/msync/types.d.ts +96 -0
- package/protocol/msync/utils.d.ts +26 -0
- package/protocol/protobuf/decoder.d.ts +44 -0
- package/protocol/protobuf/encoder.d.ts +23 -0
- package/protocol/protobuf/types.d.ts +53 -0
- package/protocol/roster/codec.d.ts +9 -0
- package/protocol/roster/proto.d.ts +205 -0
- package/protocol/roster/root.d.ts +5 -0
- package/protocol/roster/types.d.ts +83 -0
- package/protocol/session-list/codec.d.ts +11 -0
- package/protocol/session-list/gateway.d.ts +19 -0
- package/protocol/session-list/payload-decoder.d.ts +1 -0
- package/protocol/session-list/proto.d.ts +207 -0
- package/protocol/session-list/types.d.ts +83 -0
- package/rest/chat-management.d.ts +26 -0
- package/rest/chat-thread-management.d.ts +14 -0
- package/rest/chatroom-management.d.ts +40 -0
- package/rest/client.d.ts +86 -0
- package/rest/contact-management.d.ts +27 -0
- package/rest/contact-metadata.d.ts +11 -0
- package/rest/conversation-management.d.ts +11 -0
- package/rest/dns-config.d.ts +20 -0
- package/rest/error-map-types.d.ts +32 -0
- package/rest/error-maps/chat.d.ts +888 -0
- package/rest/error-maps/chatroom.d.ts +592 -0
- package/rest/error-maps/common.d.ts +208 -0
- package/rest/error-maps/contact.d.ts +185 -0
- package/rest/error-maps/core.d.ts +21 -0
- package/rest/error-maps/group.d.ts +500 -0
- package/rest/error-maps/index.d.ts +9 -0
- package/rest/error-maps/presence.d.ts +62 -0
- package/rest/error-maps/push.d.ts +158 -0
- package/rest/error-maps/thread.d.ts +538 -0
- package/rest/error-maps/user-info.d.ts +289 -0
- package/rest/errors.d.ts +23 -0
- package/rest/group-management.d.ts +55 -0
- package/rest/rtc-token.d.ts +14 -0
- package/rest/speech-helpers.d.ts +24 -0
- package/rest/user-info-subscription.d.ts +10 -0
- package/rest/user-info.d.ts +34 -0
- package/types/chat-client.d.ts +226 -0
- package/types/chat-manager.d.ts +641 -0
- package/types/chat-thread.d.ts +311 -0
- package/types/chatroom.d.ts +1258 -0
- package/types/connection.d.ts +111 -0
- package/types/contact.d.ts +149 -0
- package/types/conversation.d.ts +270 -0
- package/types/event-system.d.ts +721 -0
- package/types/group.d.ts +980 -0
- package/types/index.d.ts +577 -44
- package/types/manager.d.ts +99 -0
- package/types/message-conversation.d.ts +22 -0
- package/types/message-create.d.ts +173 -0
- package/types/multi-device.d.ts +275 -0
- package/types/presence.d.ts +101 -0
- package/types/push.d.ts +296 -0
- package/types/sender.d.ts +12 -0
- package/types/sync-data.d.ts +54 -0
- package/types/user-info.d.ts +178 -0
- package/upload/attachment-file-store.d.ts +11 -0
- package/upload/attachment-uploader.d.ts +36 -0
- package/upload/constants.d.ts +8 -0
- package/upload/index.d.ts +2 -0
- package/upload/multipart-upload.d.ts +14 -0
- package/upload/simple-upload.d.ts +3 -0
- package/upload/types.d.ts +79 -0
- package/upload/utils.d.ts +71 -0
- package/utils/env.d.ts +4 -0
- package/utils/error-codes.d.ts +2 -0
- package/utils/error-codes.generated.d.ts +145 -0
- package/utils/error-sanitizer.d.ts +8 -0
- package/utils/errors.d.ts +139 -0
- package/utils/log-reporter.d.ts +61 -0
- package/utils/log-sanitizer.d.ts +6 -0
- package/utils/logger.d.ts +48 -0
- package/utils/md5.d.ts +1 -0
- package/utils/message-id.d.ts +12 -0
- package/utils/provision-error-mapping.d.ts +21 -0
- package/utils/retry.d.ts +26 -0
- package/utils/runtime-global.d.ts +4 -0
- package/utils/trace-id.d.ts +5 -0
- package/utils/utf8.d.ts +2 -0
- package/validators/chat-client.d.ts +787 -0
- package/validators/message-create.d.ts +419 -0
- package/validators/search-messages.d.ts +127 -0
- package/validators/validator.d.ts +49 -0
- package/version.d.ts +2 -0
- package/Easemob-chat.d.ts +0 -8457
- package/Easemob-chat.js +0 -2
- package/chatroom/chatroom.d.ts +0 -649
- package/chatroom/chatroom.js +0 -1
- package/contact/contact.d.ts +0 -726
- package/contact/contact.js +0 -1
- package/group/group.d.ts +0 -848
- package/group/group.js +0 -1
- package/localCache/localCache.d.ts +0 -59
- package/localCache/localCache.js +0 -1
- package/message/audio.d.ts +0 -183
- package/message/channel.d.ts +0 -82
- package/message/cmd.d.ts +0 -146
- package/message/combine.d.ts +0 -132
- package/message/custom.d.ts +0 -135
- package/message/delivery.d.ts +0 -77
- package/message/file.d.ts +0 -173
- package/message/img.d.ts +0 -200
- package/message/index.d.ts +0 -211
- package/message/location.d.ts +0 -134
- package/message/read.d.ts +0 -85
- package/message/text.d.ts +0 -149
- package/message/video.d.ts +0 -180
- package/miniCore/miniCore.d.ts +0 -217
- package/miniCore/miniCore.js +0 -2
- package/miniProgram/Easemob-chat.js +0 -2
- package/miniProgram/miniProgram.zip +0 -0
- package/presence/presence.d.ts +0 -69
- package/presence/presence.js +0 -1
- package/silent/silent.d.ts +0 -128
- package/silent/silent.js +0 -1
- package/status.d.ts +0 -184
- package/thread/thread.d.ts +0 -159
- package/thread/thread.js +0 -1
- package/translation/translation.d.ts +0 -30
- package/translation/translation.js +0 -1
- package/types/chatRoomApi.d.ts +0 -226
- package/types/common.d.ts +0 -89
- package/types/engineCore.d.ts +0 -194
- package/types/error.d.ts +0 -13
- package/types/eventHandler.d.ts +0 -437
- package/types/groupApi.d.ts +0 -306
- package/types/indexApi.d.ts +0 -366
- package/types/localCache.d.ts +0 -53
- package/types/message.d.ts +0 -959
- package/types/presenceApi.d.ts +0 -61
- package/types/reactionApi.d.ts +0 -74
- package/types/restApis.d.ts +0 -6
- package/types/silentModeApi.d.ts +0 -109
- package/types/threadApi.d.ts +0 -175
- package/types/translation.d.ts +0 -25
- package/types/utils.d.ts +0 -90
- package/uniApp/Easemob-chat.js +0 -2
- package/uniApp/uniApp.zip +0 -0
- package/websdk.zip +0 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [zh-CN] ChatClient 对外类型定义。
|
|
3
|
+
* [en-US] Public ChatClient type definitions.
|
|
4
|
+
*/
|
|
5
|
+
import type { ConnectionStatus } from './connection';
|
|
6
|
+
import type { ManagerRegistration } from './manager';
|
|
7
|
+
import type { SyncDataType } from './sync-data';
|
|
8
|
+
import type { CreatePlatformAdapterOptions } from '../platform/types';
|
|
9
|
+
/**
|
|
10
|
+
* [zh-CN] 对外暴露的连接状态枚举别名。
|
|
11
|
+
* [en-US] Public connection state alias.
|
|
12
|
+
*/
|
|
13
|
+
export type ConnectionState = ConnectionStatus;
|
|
14
|
+
/**
|
|
15
|
+
* [zh-CN] 固定服务地址配置。
|
|
16
|
+
* [en-US] Fixed service endpoint configuration.
|
|
17
|
+
*/
|
|
18
|
+
export interface ServerUrlsConfig {
|
|
19
|
+
/** [zh-CN] REST API 服务的基准地址。 [en-US] The base URL for the REST API service. */
|
|
20
|
+
readonly restApiUrl?: string;
|
|
21
|
+
/** [zh-CN] 消息长连接的 WebSocket 地址。 [en-US] The WebSocket URL for the messaging connection. */
|
|
22
|
+
readonly wsUrl?: string;
|
|
23
|
+
/** [zh-CN] 会话与好友同步 REST API 服务的基准地址。 [en-US] The base URL for the conversation and friend synchronization REST API service. */
|
|
24
|
+
readonly syncRestApiUrl?: string;
|
|
25
|
+
/** [zh-CN] 会话与好友同步长连接的 WebSocket 地址。 [en-US] The WebSocket URL for the conversation and friend synchronization connection. */
|
|
26
|
+
readonly syncWsUrl?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* [zh-CN] 服务接入配置。
|
|
30
|
+
* [en-US] Service access configuration.
|
|
31
|
+
*/
|
|
32
|
+
export interface ServiceConfig {
|
|
33
|
+
/** [zh-CN] DNS_CONFIG 地址列表;配置后,SDK 仍会走标准的 DNS 发现流程来获取最终的服务端点。 [en-US] DNS_CONFIG URL list. Even when configured, the SDK will still perform the standard DNS discovery process to resolve service endpoints. */
|
|
34
|
+
readonly dnsConfigUrls?: string[];
|
|
35
|
+
/** [zh-CN] 固定服务地址;配置后直连这些地址,不请求 DNS_CONFIG。 [en-US] Fixed service URLs; SDK connects directly and skips DNS_CONFIG. */
|
|
36
|
+
readonly serverUrls?: ServerUrlsConfig;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* [zh-CN] 消息资料回填节流配置。
|
|
40
|
+
* [en-US] Message profile-hydration throttling configuration.
|
|
41
|
+
*/
|
|
42
|
+
export interface ProfileSyncConfig {
|
|
43
|
+
/** [zh-CN] 用户资料回填聚合窗口,单位毫秒。 [en-US] Aggregation window for user-info hydration in milliseconds. */
|
|
44
|
+
readonly userInfoWindowMs?: number;
|
|
45
|
+
/** [zh-CN] 单次用户资料回填批大小。 [en-US] Batch size for one user-info hydration request. */
|
|
46
|
+
readonly userInfoBatchSize?: number;
|
|
47
|
+
/** [zh-CN] 群名片回填聚合窗口,单位毫秒。 [en-US] Aggregation window for group-namecard hydration in milliseconds. */
|
|
48
|
+
readonly groupNamecardWindowMs?: number;
|
|
49
|
+
/** [zh-CN] 群名片回填最大并发数。 [en-US] Maximum concurrency for group-namecard hydration. */
|
|
50
|
+
readonly groupNamecardMaxConcurrency?: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* [zh-CN] 会话列表同步配置。
|
|
54
|
+
* [en-US] Conversation list synchronization configuration.
|
|
55
|
+
*/
|
|
56
|
+
export interface SyncConversationListConfig {
|
|
57
|
+
/** [zh-CN] 是否同步空会话;会话标记固定同步。 [en-US] Whether empty conversations should be synchronized; Conversation marks are always synchronized. */
|
|
58
|
+
readonly includeEmpty?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* [zh-CN] ChatClient 初始化配置。
|
|
62
|
+
* [en-US] ChatClient initialization options.
|
|
63
|
+
*/
|
|
64
|
+
export interface InitConfig {
|
|
65
|
+
/** [zh-CN] 应用唯一标识,格式为 `org#app`。 [en-US] Unique application key in `org#app` format. */
|
|
66
|
+
appKey: string;
|
|
67
|
+
/** [zh-CN] 是否启用用户资料同步增强能力。 [en-US] Whether to enable enhanced user profile synchronization. */
|
|
68
|
+
enableUserInfoSync?: boolean;
|
|
69
|
+
/** [zh-CN] 登录后自动同步的数据类型。 [en-US] Data types to synchronize automatically after login. */
|
|
70
|
+
enableSyncData?: ReadonlyArray<SyncDataType>;
|
|
71
|
+
/**
|
|
72
|
+
* [zh-CN] 是否开启送达回执。开启后,收到单聊消息时 SDK 自动向发送方回送达回执;发送方通过 `onMessageDelivered` 事件得知消息已送达。
|
|
73
|
+
* [en-US] Whether to enable delivery receipts. When enabled, the SDK automatically sends a delivery ack to the sender upon receiving a one-to-one chat message; the sender receives `onMessageDelivered` event.
|
|
74
|
+
*/
|
|
75
|
+
enableDeliveryReceipt?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* [zh-CN] 群组解散时是否自动删除对应的本地群会话,默认为 `true`。
|
|
78
|
+
* [en-US] Whether to automatically delete the corresponding local group conversation when a group is destroyed. Defaults to `true`.
|
|
79
|
+
*/
|
|
80
|
+
deleteConversationOnGroupDestroyed?: boolean;
|
|
81
|
+
/** [zh-CN] 会话列表同步配置。 [en-US] Session-list synchronization options. */
|
|
82
|
+
syncConversationListConfig?: SyncConversationListConfig;
|
|
83
|
+
/** [zh-CN] 是否使用自定义附件上传能力。 [en-US] Whether to use custom attachment upload. */
|
|
84
|
+
useCustomAttachmentUpload?: boolean;
|
|
85
|
+
/** [zh-CN] 是否在同一浏览器内复用固定设备标识。 [en-US] Whether to reuse a fixed device identifier in the same browser. */
|
|
86
|
+
useFixedDeviceId?: boolean;
|
|
87
|
+
/** [zh-CN] 自定义设备标识;未传时使用 SDK 默认值。 [en-US] Custom device identifier; SDK default is used when omitted. */
|
|
88
|
+
deviceId?: string;
|
|
89
|
+
/** [zh-CN] 服务接入配置;缺省时使用 SDK 内置 DNS_CONFIG。 [en-US] Service endpoint configuration; omitted means SDK default DNS_CONFIG. */
|
|
90
|
+
serviceConfig?: ServiceConfig;
|
|
91
|
+
/** [zh-CN] 内容审核替换后,是否将替换后的消息回给发送方。 [en-US] Whether to return moderation-replaced message content to the sender. */
|
|
92
|
+
useReplacedMessageContents?: boolean;
|
|
93
|
+
/** [zh-CN] 自定义设备名称;通常与 `customOSPlatform` 搭配使用。 [en-US] Custom device name, usually used with `customOSPlatform`. */
|
|
94
|
+
customDeviceName?: string;
|
|
95
|
+
/** [zh-CN] 自定义平台编号。 [en-US] Custom platform code. */
|
|
96
|
+
customOSPlatform?: number;
|
|
97
|
+
/** [zh-CN] 是否启用自动登录续连行为。 [en-US] Whether to enable auto-login reconnect behavior. */
|
|
98
|
+
/** [zh-CN] UI Kit 版本号,用于上报。 [en-US] UI Kit version used for reporting. */
|
|
99
|
+
uiKitVersion?: string;
|
|
100
|
+
/**
|
|
101
|
+
* [zh-CN] 登录自定义扩展信息。当多设备登录策略导致当前设备被踢时,该扩展字符串会传递给被踢设备,最大长度 1024 字符。
|
|
102
|
+
* [en-US] Custom login extension string. When this device is kicked out by multi-device login policy, the string is delivered to the kicked device. Maximum length is 1024 characters.
|
|
103
|
+
*/
|
|
104
|
+
loginExtensionInfo?: string;
|
|
105
|
+
/** [zh-CN] 初始化时需要自动注册的管理器列表。 [en-US] Managers to auto-register during initialization. */
|
|
106
|
+
managers?: ReadonlyArray<ManagerRegistration<unknown>>;
|
|
107
|
+
/** [zh-CN] 可选平台适配配置;缺省时 SDK 自动识别运行环境,仅在非标准宿主或需要覆盖能力时传入。 [en-US] Optional platform-adapter options; SDK auto-detects the runtime by default, so provide this only for non-standard hosts or capability overrides. */
|
|
108
|
+
platformAdapterOptions?: CreatePlatformAdapterOptions;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* [zh-CN] 登录参数。
|
|
112
|
+
* [en-US] Login parameters.
|
|
113
|
+
*/
|
|
114
|
+
export interface AuthContext {
|
|
115
|
+
/** [zh-CN] 登录用户 ID。 [en-US] User ID to log in with. */
|
|
116
|
+
userId: string;
|
|
117
|
+
/** [zh-CN] IM 登录 token。 [en-US] IM login token. */
|
|
118
|
+
token: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* [zh-CN] IM token 续期结果。
|
|
122
|
+
* [en-US] IM token renewal result.
|
|
123
|
+
*/
|
|
124
|
+
export interface TokenRenewalResult {
|
|
125
|
+
/** [zh-CN] 已成功应用的新 IM token。 [en-US] The renewed IM token that has been applied. */
|
|
126
|
+
readonly token: string;
|
|
127
|
+
/** [zh-CN] token 过期时间戳,单位毫秒。 [en-US] Token expiration timestamp in milliseconds. */
|
|
128
|
+
readonly expireAt: number;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* [zh-CN] RTC token 查询参数。
|
|
132
|
+
* [en-US] Parameters for requesting RTC token information.
|
|
133
|
+
*/
|
|
134
|
+
export interface GetRTCTokenInfoParams {
|
|
135
|
+
/** [zh-CN] RTC 频道名;不传时使用服务端默认频道语义。 [en-US] RTC channel name; omitted means service default. */
|
|
136
|
+
readonly channelName?: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* [zh-CN] RTC token 信息。
|
|
140
|
+
* [en-US] RTC token information.
|
|
141
|
+
*/
|
|
142
|
+
export interface RTCTokenInfo {
|
|
143
|
+
/** [zh-CN] RTC App ID。 [en-US] RTC App ID. */
|
|
144
|
+
readonly appId: string;
|
|
145
|
+
/** [zh-CN] RTC 入会 token。 [en-US] RTC token used for joining the channel. */
|
|
146
|
+
readonly rtcToken: string;
|
|
147
|
+
/** [zh-CN] RTC 频道名。 [en-US] RTC channel name. */
|
|
148
|
+
readonly channelName: string;
|
|
149
|
+
/** [zh-CN] 当前用户的 RTC UID。 [en-US] RTC UID for the current user. */
|
|
150
|
+
readonly rtcUid: number;
|
|
151
|
+
/** [zh-CN] RTC token 过期时间戳,单位毫秒。 [en-US] RTC token expiration timestamp in milliseconds. */
|
|
152
|
+
readonly expireAt: number;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* [zh-CN] RTC UID 类型别名。
|
|
156
|
+
* [en-US] RTC UID type alias.
|
|
157
|
+
*/
|
|
158
|
+
export type RTCUid = number;
|
|
159
|
+
/**
|
|
160
|
+
* [zh-CN] RTC UID 到 IM userId 的映射。
|
|
161
|
+
* [en-US] Mapping from RTC UID to IM userId.
|
|
162
|
+
*/
|
|
163
|
+
export type RTCUidUserIdMap = Record<RTCUid, string>;
|
|
164
|
+
/**
|
|
165
|
+
* [zh-CN] 当前用户在其他平台上的登录 ID 列表。
|
|
166
|
+
* [en-US] Login IDs of the current user on other platforms.
|
|
167
|
+
*/
|
|
168
|
+
export type SelfIdsOnOtherPlatform = ReadonlyArray<string>;
|
|
169
|
+
/**
|
|
170
|
+
* [zh-CN] REST 访问上下文。
|
|
171
|
+
* [en-US] REST access context.
|
|
172
|
+
*/
|
|
173
|
+
export interface RestContext {
|
|
174
|
+
/** [zh-CN] REST 基础地址。 [en-US] REST base URL. */
|
|
175
|
+
readonly restBaseUrl: string;
|
|
176
|
+
/** [zh-CN] 当前应用的 appKey。 [en-US] appKey of the current application. */
|
|
177
|
+
readonly appKey: string;
|
|
178
|
+
/** [zh-CN] 当前登录用户 ID。 [en-US] Current logged-in user ID. */
|
|
179
|
+
readonly userId: string;
|
|
180
|
+
/** [zh-CN] 当前登录 token。 [en-US] Current access token. */
|
|
181
|
+
readonly token: string;
|
|
182
|
+
/** [zh-CN] 当前连接的设备资源标识。 [en-US] Device resource identifier of the current connection. */
|
|
183
|
+
readonly clientResource: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* [zh-CN] DNS Host 信息。
|
|
187
|
+
* [en-US] DNS host information.
|
|
188
|
+
*/
|
|
189
|
+
export interface DnsHost {
|
|
190
|
+
/** [zh-CN] 地址协议。 [en-US] Endpoint protocol. */
|
|
191
|
+
protocol: string;
|
|
192
|
+
/** [zh-CN] 域名。 [en-US] Domain name. */
|
|
193
|
+
domain?: string;
|
|
194
|
+
/** [zh-CN] IP 地址。 [en-US] IP address. */
|
|
195
|
+
ip?: string;
|
|
196
|
+
/** [zh-CN] 端口号。 [en-US] Port number. */
|
|
197
|
+
port?: string | number;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* [zh-CN] DNSConfig 响应结构。
|
|
201
|
+
* [en-US] DNSConfig response structure.
|
|
202
|
+
*/
|
|
203
|
+
export interface DnsConfig {
|
|
204
|
+
/** [zh-CN] REST 服务地址集合。 [en-US] REST service host set. */
|
|
205
|
+
rest: {
|
|
206
|
+
hosts: DnsHost[];
|
|
207
|
+
};
|
|
208
|
+
/** [zh-CN] 消息 WebSocket 地址集合。 [en-US] Message WebSocket host set. */
|
|
209
|
+
'msync-wx': {
|
|
210
|
+
hosts: DnsHost[];
|
|
211
|
+
};
|
|
212
|
+
/** [zh-CN] 会话/联系人同步 WebSocket 地址集合。 [en-US] Session/contact sync WebSocket host set. */
|
|
213
|
+
'sync-ws'?: {
|
|
214
|
+
hosts: DnsHost[];
|
|
215
|
+
};
|
|
216
|
+
/** [zh-CN] 日志上报开关(DNS 下发)。 [en-US] Log-report switch delivered by DNS. */
|
|
217
|
+
enableReportLogs?: 'true' | 'false';
|
|
218
|
+
/** [zh-CN] 日志上报间隔,单位为毫秒(DNS 下发)。 [en-US] Log-report interval in milliseconds delivered by DNS. */
|
|
219
|
+
reportInterval?: number;
|
|
220
|
+
/** [zh-CN] 数据上报开关(DNS 下发)。 [en-US] Data-report switch delivered by DNS. */
|
|
221
|
+
enableDataReport?: 'true' | 'false';
|
|
222
|
+
/** [zh-CN] MD5 附件预检开关(DNS 下发)。 [en-US] MD5 attachment-precheck switch delivered by DNS. */
|
|
223
|
+
enableMd5Check?: 'true' | 'false';
|
|
224
|
+
/** [zh-CN] 附件分片上传开关(DNS 下发)。 [en-US] Multipart attachment-upload switch delivered by DNS. */
|
|
225
|
+
uploadinparts_enable?: 'true' | 'false';
|
|
226
|
+
}
|