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
package/README.md
CHANGED
|
@@ -1,59 +1,115 @@
|
|
|
1
|
-
# 环信 IM SDK
|
|
1
|
+
# 环信 Web IM SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`easemob-websdk` 是面向 Web 应用的 TypeScript IM SDK,提供连接管理、消息、会话、联系人、群组、聊天室、用户资料、在线状态和推送设置等类型安全的 API。
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
1. 安装
|
|
5
|
+
## 安装
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
|
-
npm install easemob-websdk
|
|
8
|
+
npm install easemob-websdk
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
发布包同时支持 ESM 和 CommonJS。可从主入口导入完整 SDK,也可从 Manager 子路径导入,以便业务构建工具移除未使用的 Manager 代码。
|
|
12
|
+
|
|
13
|
+
## 快速开始
|
|
14
|
+
|
|
15
|
+
使用应用所需的 Manager 初始化客户端,再使用由应用服务端签发的用户 Token 登录:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { ChatClient, ChatManager } from 'easemob-websdk';
|
|
19
|
+
|
|
20
|
+
const client = ChatClient.init({
|
|
21
|
+
appKey: 'your-org#your-app',
|
|
22
|
+
managers: [ChatManager],
|
|
23
|
+
});
|
|
14
24
|
|
|
25
|
+
client.addEventHandler('connection', {
|
|
26
|
+
onConnected: () => {
|
|
27
|
+
console.log('connected');
|
|
28
|
+
},
|
|
29
|
+
onDisconnected: event => {
|
|
30
|
+
console.warn('disconnected', event.reason);
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
await client.login({
|
|
35
|
+
userId: 'user-id',
|
|
36
|
+
token: 'user-token',
|
|
37
|
+
});
|
|
15
38
|
```
|
|
16
|
-
|
|
39
|
+
|
|
40
|
+
登录成功后可发送单聊文本消息:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
const message = client.chatManager.createTextMessage({
|
|
44
|
+
conversationId: 'peer-user-id',
|
|
45
|
+
conversationType: 'singleChat',
|
|
46
|
+
content: 'Hello from Easemob',
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
await client.chatManager.sendMessage(message);
|
|
17
50
|
```
|
|
18
51
|
|
|
19
|
-
|
|
52
|
+
## Manager 子路径导入
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import { ChatClient } from 'easemob-websdk';
|
|
56
|
+
import { ChatManager } from 'easemob-websdk/managers/chat';
|
|
57
|
+
import { GroupManager } from 'easemob-websdk/managers/group';
|
|
20
58
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
59
|
+
const client = ChatClient.init({
|
|
60
|
+
appKey: 'your-org#your-app',
|
|
61
|
+
managers: [ChatManager, GroupManager],
|
|
24
62
|
});
|
|
25
63
|
```
|
|
26
64
|
|
|
27
|
-
|
|
65
|
+
可用的 Manager 子路径:
|
|
66
|
+
|
|
67
|
+
- `easemob-websdk/managers/chat`
|
|
68
|
+
- `easemob-websdk/managers/chat-thread`
|
|
69
|
+
- `easemob-websdk/managers/chatroom`
|
|
70
|
+
- `easemob-websdk/managers/contact`
|
|
71
|
+
- `easemob-websdk/managers/group`
|
|
72
|
+
- `easemob-websdk/managers/presence`
|
|
73
|
+
- `easemob-websdk/managers/push`
|
|
74
|
+
- `easemob-websdk/managers/user-info`
|
|
75
|
+
|
|
76
|
+
## 浏览器 script 标签
|
|
77
|
+
|
|
78
|
+
未使用打包工具的 Web 应用可从 CDN 加载 IIFE bundle,加载后的全局变量为 `IMSDK`:
|
|
28
79
|
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
80
|
+
```html
|
|
81
|
+
<script src="https://unpkg.com/easemob-websdk@latest/bundle/im-sdk-web.iife.js"></script>
|
|
82
|
+
<script>
|
|
83
|
+
const client = IMSDK.ChatClient.init({
|
|
84
|
+
appKey: 'your-org#your-app',
|
|
85
|
+
managers: [IMSDK.ChatManager],
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
35
88
|
```
|
|
36
89
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.catch((e) => {
|
|
52
|
-
console.log('Send private text error');
|
|
53
|
-
});
|
|
90
|
+
## 错误处理
|
|
91
|
+
|
|
92
|
+
所有公开异步 API 都会 reject `SDKError` 子类。请根据稳定的 SDK 错误码处理异常,不要解析错误文案:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { isSDKError } from 'easemob-websdk';
|
|
96
|
+
|
|
97
|
+
try {
|
|
98
|
+
await client.login({ userId: 'user-id', token: 'user-token' });
|
|
99
|
+
} catch (error) {
|
|
100
|
+
if (isSDKError(error)) {
|
|
101
|
+
console.error(error.code, error.message, error.details);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
54
104
|
```
|
|
55
105
|
|
|
56
|
-
##
|
|
106
|
+
## 安全建议
|
|
107
|
+
|
|
108
|
+
- 从应用服务端获取用户 Token,不要把 App 凭据或长期有效 Token 写入浏览器代码。
|
|
109
|
+
- 不要在业务日志中输出 Token、授权请求头或消息正文。
|
|
110
|
+
- 按照应用自身的安全策略保存和刷新 Token。
|
|
111
|
+
|
|
112
|
+
## 资源
|
|
57
113
|
|
|
58
|
-
-
|
|
59
|
-
-
|
|
114
|
+
- 官网:<https://www.easemob.com/>
|
|
115
|
+
- SDK 发布文档提供生成的 TypeDoc API Reference 与错误码表。
|