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/types/presenceApi.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* presence types
|
|
3
|
-
* @module TYPES
|
|
4
|
-
*/
|
|
5
|
-
interface SubscribePresence {
|
|
6
|
-
/** The expiration time of the presence subscription. */
|
|
7
|
-
expiry: number;
|
|
8
|
-
/** The presence extension information. */
|
|
9
|
-
ext: string;
|
|
10
|
-
/** The presence update time, which is generated by the server. */
|
|
11
|
-
last_time: number;
|
|
12
|
-
/** The details of the current presence state. */
|
|
13
|
-
status: object;
|
|
14
|
-
/** The user ID of the presence publisher. */
|
|
15
|
-
uid: string;
|
|
16
|
-
}
|
|
17
|
-
interface SubscribePresenceResult {
|
|
18
|
-
/** The subscribe result. */
|
|
19
|
-
result: SubscribePresence[];
|
|
20
|
-
}
|
|
21
|
-
interface SubscribeUserListType {
|
|
22
|
-
/** The user ID of the presence publisher. */
|
|
23
|
-
uid: string;
|
|
24
|
-
/** The expiration time of the presence subscription. */
|
|
25
|
-
expiry: number;
|
|
26
|
-
}
|
|
27
|
-
interface GetSubscribedType {
|
|
28
|
-
/** subscribe users list */
|
|
29
|
-
sublist: SubscribeUserListType[];
|
|
30
|
-
/** The total number of subscribe users */
|
|
31
|
-
totalnum: number;
|
|
32
|
-
}
|
|
33
|
-
interface GetSubscribedPresenceListResult {
|
|
34
|
-
/** Fetch all subscribe result. */
|
|
35
|
-
result: GetSubscribedType;
|
|
36
|
-
}
|
|
37
|
-
interface StatusDetailsType {
|
|
38
|
-
device: string;
|
|
39
|
-
status: number;
|
|
40
|
-
}
|
|
41
|
-
interface PresenceType {
|
|
42
|
-
/** The user ID of the presence publisher. */
|
|
43
|
-
userId: string;
|
|
44
|
-
/** The details of the current presence state. */
|
|
45
|
-
statusDetails: StatusDetailsType[];
|
|
46
|
-
/** The presence extension information. */
|
|
47
|
-
ext: string;
|
|
48
|
-
/** The presence update time, which is generated by the server. */
|
|
49
|
-
lastTime: number;
|
|
50
|
-
/** The expiration time of the presence subscription. */
|
|
51
|
-
expire: number;
|
|
52
|
-
}
|
|
53
|
-
export type {
|
|
54
|
-
SubscribePresence,
|
|
55
|
-
SubscribePresenceResult,
|
|
56
|
-
SubscribeUserListType,
|
|
57
|
-
GetSubscribedType,
|
|
58
|
-
GetSubscribedPresenceListResult,
|
|
59
|
-
PresenceType,
|
|
60
|
-
StatusDetailsType,
|
|
61
|
-
};
|
package/types/reactionApi.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { UserId } from './common';
|
|
2
|
-
interface ReactionMessage {
|
|
3
|
-
/** The message sender. */
|
|
4
|
-
from: string;
|
|
5
|
-
/** The message recipient. */
|
|
6
|
-
to: string;
|
|
7
|
-
/** The conversation type. */
|
|
8
|
-
chatType: 'singleChat' | 'groupChat';
|
|
9
|
-
/** The reaction to be added to the message. The length is limited to 128 characters. */
|
|
10
|
-
reactions: Reaction[];
|
|
11
|
-
/** The ID of the message whose reaction updated. */
|
|
12
|
-
messageId: string;
|
|
13
|
-
/** The Unix timestamp for updating the reaction. */
|
|
14
|
-
ts: number;
|
|
15
|
-
}
|
|
16
|
-
interface Reaction {
|
|
17
|
-
/** The content of the reaction to be added to the message. The length is limited to 128 characters. */
|
|
18
|
-
reaction: string;
|
|
19
|
-
/** The reaction count. */
|
|
20
|
-
count: number;
|
|
21
|
-
/** The reaction update operation. Once the reaction is updated, the onReactionChange callback is triggered. */
|
|
22
|
-
op?: {
|
|
23
|
-
operator: UserId;
|
|
24
|
-
reactionType: 'create' | 'delete';
|
|
25
|
-
}[];
|
|
26
|
-
/** The IDs of the users that added the reaction. */
|
|
27
|
-
userList: UserId[];
|
|
28
|
-
/** Whether the current user has added this reaction.
|
|
29
|
-
* - `true`: Yes.
|
|
30
|
-
* - `false`: No.
|
|
31
|
-
*/
|
|
32
|
-
isAddedBySelf?: boolean;
|
|
33
|
-
}
|
|
34
|
-
interface GetReactionDetailResult {
|
|
35
|
-
/** The reaction to be added to the message. The length is limited to 128 characters. */
|
|
36
|
-
reaction: string;
|
|
37
|
-
/** Whether the current user added this reaction.
|
|
38
|
-
* - `true`: Yes;
|
|
39
|
-
* - `false`: No.
|
|
40
|
-
*/
|
|
41
|
-
isAddedBySelf: boolean;
|
|
42
|
-
/** The number of users that added this reaction. */
|
|
43
|
-
userCount: number;
|
|
44
|
-
/** The IDs of the users who added the reaction. */
|
|
45
|
-
userList: UserId[];
|
|
46
|
-
/** The cursor that specifies where to start to get data. If there is data on the next page, this method will return the cursor to indicate where to start to get data for the next query. If it is `null`, the data of the first page will be returned.*/
|
|
47
|
-
cursor: string;
|
|
48
|
-
}
|
|
49
|
-
interface ReactionListItem {
|
|
50
|
-
/** The reaction added to the message. It cannot exceed 128 characters. */
|
|
51
|
-
reaction: string;
|
|
52
|
-
/** Whether the current user added this reaction.
|
|
53
|
-
* - `true`: Yes;
|
|
54
|
-
* - `false`: No.
|
|
55
|
-
*/
|
|
56
|
-
isAddedBySelf: boolean;
|
|
57
|
-
/** The number of users that added this reaction. */
|
|
58
|
-
userCount: number;
|
|
59
|
-
/** The IDs of the users who added the reaction. */
|
|
60
|
-
userList: UserId[];
|
|
61
|
-
}
|
|
62
|
-
interface GetReactionListResult {
|
|
63
|
-
/** The ID of the message to which this reaction was added. */
|
|
64
|
-
msgId: string;
|
|
65
|
-
/** The reaction list of this message. */
|
|
66
|
-
reactionList: ReactionListItem[];
|
|
67
|
-
}
|
|
68
|
-
export type {
|
|
69
|
-
ReactionMessage,
|
|
70
|
-
Reaction,
|
|
71
|
-
GetReactionDetailResult,
|
|
72
|
-
GetReactionListResult,
|
|
73
|
-
ReactionListItem,
|
|
74
|
-
};
|
package/types/restApis.d.ts
DELETED
package/types/silentModeApi.d.ts
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* improve push types
|
|
3
|
-
* @module TYPES
|
|
4
|
-
*/
|
|
5
|
-
interface SilentModeConversationType {
|
|
6
|
-
/** Silent mode type. */
|
|
7
|
-
type: string;
|
|
8
|
-
/** Silent mode duration, duration of Unix timestamp. */
|
|
9
|
-
ignoreDuration: number;
|
|
10
|
-
/** Silent mode interval. */
|
|
11
|
-
ignoreInterval: string;
|
|
12
|
-
}
|
|
13
|
-
interface ConversationSilentModeType {
|
|
14
|
-
/** User push map. */
|
|
15
|
-
user: {
|
|
16
|
-
[propname: string]: SilentModeConversationType;
|
|
17
|
-
};
|
|
18
|
-
/** Group push map. */
|
|
19
|
-
group: {
|
|
20
|
-
[propname: string]: SilentModeConversationType;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
interface TranslationLanguageType {
|
|
24
|
-
/** Translation language. */
|
|
25
|
-
language: string;
|
|
26
|
-
}
|
|
27
|
-
declare enum SILENTMODETYPE {
|
|
28
|
-
/** All message. */
|
|
29
|
-
ALL = 'ALL',
|
|
30
|
-
/** @ message of myself. */
|
|
31
|
-
AT = 'AT',
|
|
32
|
-
/** None. */
|
|
33
|
-
NONE = 'NONE',
|
|
34
|
-
}
|
|
35
|
-
declare enum CONVERSATIONTYPE {
|
|
36
|
-
/** Single chat. */
|
|
37
|
-
SINGLECHAT = 'singleChat',
|
|
38
|
-
/** Group chat. */
|
|
39
|
-
GROUPCHAT = 'groupChat',
|
|
40
|
-
/** Chat room. */
|
|
41
|
-
CHATROOM = 'chatRoom',
|
|
42
|
-
}
|
|
43
|
-
declare type ConversationListType = {
|
|
44
|
-
/** Conversation id. */
|
|
45
|
-
id: string;
|
|
46
|
-
/** Conversation type. */
|
|
47
|
-
type: string;
|
|
48
|
-
};
|
|
49
|
-
interface SilentModeRemindType {
|
|
50
|
-
/** Silent mode type. */
|
|
51
|
-
paramType: 0;
|
|
52
|
-
/** Silent mode type. */
|
|
53
|
-
remindType: SILENTMODETYPE;
|
|
54
|
-
}
|
|
55
|
-
interface SilentModeDuration {
|
|
56
|
-
/** Silent mode type. */
|
|
57
|
-
paramType: 1;
|
|
58
|
-
/** Silent mode duration, duration of Unix timestamp. */
|
|
59
|
-
duration: number;
|
|
60
|
-
}
|
|
61
|
-
interface SilentModeInterval {
|
|
62
|
-
/** Silent mode type. */
|
|
63
|
-
paramType: 2;
|
|
64
|
-
/** Start time interval. */
|
|
65
|
-
startTime: Interval;
|
|
66
|
-
/** End time interval. */
|
|
67
|
-
endTime: Interval;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
interface ConversationWithRemindType {
|
|
71
|
-
/** Conversation id. */
|
|
72
|
-
conversationId: string;
|
|
73
|
-
/** Conversation type. */
|
|
74
|
-
type: 'singleChat' | 'groupChat';
|
|
75
|
-
/** Silent mode type. */
|
|
76
|
-
remindType: SILENTMODETYPE;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface GetSilentModeRemindTypeConversationsResult {
|
|
80
|
-
/** The cursor that specifies where to start to get data. */
|
|
81
|
-
cursor: string;
|
|
82
|
-
/** conversations with remind type. */
|
|
83
|
-
conversations: ConversationWithRemindType[];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export declare type Interval = {
|
|
87
|
-
/** Hours. */
|
|
88
|
-
hours: number;
|
|
89
|
-
/** Minutes. */
|
|
90
|
-
minutes: number;
|
|
91
|
-
};
|
|
92
|
-
declare type SilentModeParamType =
|
|
93
|
-
| SilentModeRemindType
|
|
94
|
-
| SilentModeDuration
|
|
95
|
-
| SilentModeInterval;
|
|
96
|
-
export type {
|
|
97
|
-
SilentModeConversationType,
|
|
98
|
-
ConversationSilentModeType,
|
|
99
|
-
TranslationLanguageType,
|
|
100
|
-
SILENTMODETYPE,
|
|
101
|
-
CONVERSATIONTYPE,
|
|
102
|
-
ConversationListType,
|
|
103
|
-
SilentModeParamType,
|
|
104
|
-
SilentModeRemindType,
|
|
105
|
-
SilentModeDuration,
|
|
106
|
-
SilentModeInterval,
|
|
107
|
-
GetSilentModeRemindTypeConversationsResult,
|
|
108
|
-
ConversationWithRemindType,
|
|
109
|
-
};
|
package/types/threadApi.d.ts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The threading types.
|
|
3
|
-
* @module TYPES
|
|
4
|
-
*/
|
|
5
|
-
import { UserId } from './common';
|
|
6
|
-
import { MessageBody } from './message';
|
|
7
|
-
/** The message thread interface. */
|
|
8
|
-
interface ChatThread {
|
|
9
|
-
/** The ID of the parent message in the message thread. */
|
|
10
|
-
messageId: string;
|
|
11
|
-
/** The group ID to which the message thread belongs. */
|
|
12
|
-
parentId: string;
|
|
13
|
-
/** The message thread name. */
|
|
14
|
-
chatThreadName: SVGStringList;
|
|
15
|
-
}
|
|
16
|
-
/** The message thread overview interface. */
|
|
17
|
-
interface ChatThreadOverview {
|
|
18
|
-
/** The message thread ID. */
|
|
19
|
-
id: string;
|
|
20
|
-
/** The group ID to which the message thread belongs. */
|
|
21
|
-
parentId: string;
|
|
22
|
-
/** The message thread name. */
|
|
23
|
-
name: string;
|
|
24
|
-
/** The last threaded reply. */
|
|
25
|
-
lastMessage: LastMessage;
|
|
26
|
-
/** The Unix timestamp when the message thread is created. The unit is millisecond. */
|
|
27
|
-
createTimestamp: number;
|
|
28
|
-
/** The Unix timestamp when the message thread overview is updated. The unit is millisecond. */
|
|
29
|
-
updateTimestamp: number;
|
|
30
|
-
/** The number of threaded replies. */
|
|
31
|
-
messageCount: number;
|
|
32
|
-
}
|
|
33
|
-
/** The interface for the last threaded reply. */
|
|
34
|
-
interface LastMessage {
|
|
35
|
-
/** The message ID. */
|
|
36
|
-
id: string;
|
|
37
|
-
/** The user ID of the sender. */
|
|
38
|
-
from: string;
|
|
39
|
-
/** The user ID of the recipient. */
|
|
40
|
-
to: string;
|
|
41
|
-
/** The Unix timestamp when the message is sent. The unit is millisecond. */
|
|
42
|
-
timestamp: number;
|
|
43
|
-
/** The message content. */
|
|
44
|
-
payload: any;
|
|
45
|
-
}
|
|
46
|
-
export declare type Operation = 'create' | 'update' | 'delete' | 'update_msg';
|
|
47
|
-
/** The interface for message thread events. */
|
|
48
|
-
interface ThreadNotifyServerMsg {
|
|
49
|
-
/** The event type. */
|
|
50
|
-
operation: Operation;
|
|
51
|
-
/** The ID of the parent message in the message thread. */
|
|
52
|
-
msg_parent_id?: string;
|
|
53
|
-
/** The message thread ID. */
|
|
54
|
-
id: string;
|
|
55
|
-
/** The group ID to which the message thread belongs. */
|
|
56
|
-
muc_parent_id: string;
|
|
57
|
-
/** The message thread name. */
|
|
58
|
-
name: string;
|
|
59
|
-
/** The Unix timestamp when an event occurs. The unit is millisecond. */
|
|
60
|
-
timestamp: number;
|
|
61
|
-
/** The operator. */
|
|
62
|
-
from?: string;
|
|
63
|
-
/** The last threaded reply. */
|
|
64
|
-
last_message?: LastMessage;
|
|
65
|
-
/** The number of threaded replies. */
|
|
66
|
-
message_count?: number;
|
|
67
|
-
}
|
|
68
|
-
/** The interface for the message thread creation result. */
|
|
69
|
-
interface CreateChatThreadResult {
|
|
70
|
-
/** The message thread ID. */
|
|
71
|
-
chatThreadId: string;
|
|
72
|
-
}
|
|
73
|
-
/** The interface for the message thread name changes. */
|
|
74
|
-
interface ChangeChatThreadName {
|
|
75
|
-
/** The message thread name. */
|
|
76
|
-
name: string;
|
|
77
|
-
}
|
|
78
|
-
/** The interface for the message thread member list. */
|
|
79
|
-
interface ChatThreadMembers {
|
|
80
|
-
/** The list of members in a message thread. */
|
|
81
|
-
affiliations: string[];
|
|
82
|
-
}
|
|
83
|
-
/** The definition for the result of removing a member from the message thread. */
|
|
84
|
-
declare type RemoveMemberResult = {
|
|
85
|
-
/** Whether the member is successfully removed from the message thread.
|
|
86
|
-
* - `true`: Yes.
|
|
87
|
-
* - `false`: No.
|
|
88
|
-
*/
|
|
89
|
-
result: boolean;
|
|
90
|
-
/** The ID of the removed message thread member. */
|
|
91
|
-
user: UserId;
|
|
92
|
-
};
|
|
93
|
-
/** The interface for the message thread details. */
|
|
94
|
-
interface ChatThreadDetail {
|
|
95
|
-
/** The message thread ID. */
|
|
96
|
-
id: string;
|
|
97
|
-
/** The message thread name. */
|
|
98
|
-
name: string;
|
|
99
|
-
/** The message thread creator. */
|
|
100
|
-
owner: string;
|
|
101
|
-
/** The Unix timestamp when the message thread is created. The unit is millisecond. */
|
|
102
|
-
created: number;
|
|
103
|
-
/** The member count of the message thread. */
|
|
104
|
-
affiliationsCount?: number;
|
|
105
|
-
/** The group ID to which the message thread belongs. */
|
|
106
|
-
parentId: string;
|
|
107
|
-
/** The ID of the parent message. */
|
|
108
|
-
messageId: string;
|
|
109
|
-
}
|
|
110
|
-
/** The interface for the result of joining the message thread. */
|
|
111
|
-
interface JoinChatThreadResult {
|
|
112
|
-
/** Whether the current user successfully joins the message thread. The value is `OK`, indicating that the user successfully joins the message thread.*/
|
|
113
|
-
status: string;
|
|
114
|
-
/** The message thread details. */
|
|
115
|
-
detail: ChatThreadDetail;
|
|
116
|
-
}
|
|
117
|
-
/** The interface for the last threaded reply. */
|
|
118
|
-
interface ChatThreadLastMessage {
|
|
119
|
-
/** The message thread ID. */
|
|
120
|
-
chatThreadId: string;
|
|
121
|
-
/** The last threaded reply. */
|
|
122
|
-
lastMessage: MessageBody;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* The definition of the message thread event types: <br/>
|
|
126
|
-
* create: Occurs when creating a chat thread.<br/>
|
|
127
|
-
* update: Occurs when there is a new message in the chat thread.<br/>
|
|
128
|
-
* destroy: Occurs when a chat thread is deleted.<br/>
|
|
129
|
-
* userRemove: Occurs when you were kicked out of chat thread.<br/>
|
|
130
|
-
*/
|
|
131
|
-
declare type onChatThreadChangeType =
|
|
132
|
-
| 'create'
|
|
133
|
-
| 'update'
|
|
134
|
-
| 'destroy'
|
|
135
|
-
| 'userRemove';
|
|
136
|
-
/** The interface for the message thread event details. */
|
|
137
|
-
interface ThreadChangeInfo {
|
|
138
|
-
/** The message thread ID. */
|
|
139
|
-
id: string;
|
|
140
|
-
/** The message thread name. */
|
|
141
|
-
name: string;
|
|
142
|
-
/** The operator. */
|
|
143
|
-
operator: string;
|
|
144
|
-
/** The event type. */
|
|
145
|
-
operation: onChatThreadChangeType;
|
|
146
|
-
/** The group ID to which the message thread belongs. */
|
|
147
|
-
parentId: string;
|
|
148
|
-
/** The ID of the parent message. */
|
|
149
|
-
messageId?: string;
|
|
150
|
-
/** The number of threaded replies. */
|
|
151
|
-
messageCount?: number;
|
|
152
|
-
/** The last threaded reply. */
|
|
153
|
-
lastMessage?: MessageBody | {};
|
|
154
|
-
/** The operation object. */
|
|
155
|
-
userName?: string;
|
|
156
|
-
/** The Unix timestamp when the event occurs. The unit is millisecond. */
|
|
157
|
-
timestamp?: number;
|
|
158
|
-
/** The Unix timestamp when the message thread is created. The unit is millisecond.*/
|
|
159
|
-
createTimestamp?: number;
|
|
160
|
-
}
|
|
161
|
-
export type {
|
|
162
|
-
ChatThread,
|
|
163
|
-
ThreadNotifyServerMsg,
|
|
164
|
-
LastMessage,
|
|
165
|
-
ChatThreadOverview,
|
|
166
|
-
CreateChatThreadResult,
|
|
167
|
-
ChangeChatThreadName,
|
|
168
|
-
ChatThreadMembers,
|
|
169
|
-
RemoveMemberResult,
|
|
170
|
-
ChatThreadDetail,
|
|
171
|
-
JoinChatThreadResult,
|
|
172
|
-
ChatThreadLastMessage,
|
|
173
|
-
ThreadChangeInfo,
|
|
174
|
-
onChatThreadChangeType,
|
|
175
|
-
};
|
package/types/translation.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
interface TranslationResult {
|
|
2
|
-
/** The translation results body. */
|
|
3
|
-
translations: {
|
|
4
|
-
/** The translation. */
|
|
5
|
-
text: string;
|
|
6
|
-
/** The target language of translation. */
|
|
7
|
-
to: string;
|
|
8
|
-
}[];
|
|
9
|
-
/** The original text language detection result. */
|
|
10
|
-
detectedLanguage: {
|
|
11
|
-
/** The original text language. */
|
|
12
|
-
language: string;
|
|
13
|
-
/** The test result score (0-1). */
|
|
14
|
-
score: number;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
interface SupportLanguage {
|
|
18
|
-
/** The codes of the target languages. For example, the code for simplified Chinese is "zh-Hans". */
|
|
19
|
-
code: string;
|
|
20
|
-
/** The language name. For example, the code for simplified Chinese is "Chinese Simplified". */
|
|
21
|
-
name: string;
|
|
22
|
-
/** The native name of the language. For example, the native name of simplified Chinese is "Chinese (Simplified)".*/
|
|
23
|
-
nativeName: string;
|
|
24
|
-
}
|
|
25
|
-
export type { TranslationResult, SupportLanguage };
|
package/types/utils.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Code } from '../status';
|
|
2
|
-
interface AsyncResult<T = any> {
|
|
3
|
-
/** Status of the request. */
|
|
4
|
-
type: Code;
|
|
5
|
-
/** Data returned by successful request. */
|
|
6
|
-
data?: T;
|
|
7
|
-
/** message. */
|
|
8
|
-
message?: string;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
interface uri {
|
|
12
|
-
url: string;
|
|
13
|
-
filename: string;
|
|
14
|
-
filetype: string;
|
|
15
|
-
data: File | null;
|
|
16
|
-
}
|
|
17
|
-
interface KVString {
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
}
|
|
20
|
-
interface AjaxOptions {
|
|
21
|
-
url: string;
|
|
22
|
-
dataType?: string;
|
|
23
|
-
type?: string;
|
|
24
|
-
data?: any;
|
|
25
|
-
headers?: KVString;
|
|
26
|
-
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
|
|
27
|
-
mimeType?: string;
|
|
28
|
-
success?: (res: any) => void;
|
|
29
|
-
error?: (res: any) => void;
|
|
30
|
-
}
|
|
31
|
-
interface UploadFileOptions {
|
|
32
|
-
onFileUploadProgress?: (msg: any) => void;
|
|
33
|
-
onFileUploadComplete?: (msg: any) => void;
|
|
34
|
-
onFileUploadError?: (msg: any) => void;
|
|
35
|
-
onFileUploadCanceled?: (msg: any) => void;
|
|
36
|
-
accessToken: string;
|
|
37
|
-
appKey: string;
|
|
38
|
-
apiUrl: string;
|
|
39
|
-
uploadUrl?: string;
|
|
40
|
-
file: any;
|
|
41
|
-
}
|
|
42
|
-
declare type Fns = (...args: any) => any;
|
|
43
|
-
declare enum PLATFORM {
|
|
44
|
-
WEB = 'web',
|
|
45
|
-
WX = 'wx',
|
|
46
|
-
ZFB = 'zfb',
|
|
47
|
-
DD = 'dd',
|
|
48
|
-
TT = 'tt',
|
|
49
|
-
BAIDU = 'baidu',
|
|
50
|
-
QUICK_APP = 'quick_app',
|
|
51
|
-
UNI = 'uni',
|
|
52
|
-
NODE = 'node',
|
|
53
|
-
}
|
|
54
|
-
interface EnvInfo {
|
|
55
|
-
platform: PLATFORM;
|
|
56
|
-
global: any;
|
|
57
|
-
}
|
|
58
|
-
interface DownloadParams {
|
|
59
|
-
onFileDownloadComplete: (data: any) => void;
|
|
60
|
-
onFileDownloadError: (error: any) => void;
|
|
61
|
-
id: string;
|
|
62
|
-
secret: string;
|
|
63
|
-
[key: string]: any;
|
|
64
|
-
}
|
|
65
|
-
interface Utils {
|
|
66
|
-
/** @hidden */
|
|
67
|
-
autoIncrement: number;
|
|
68
|
-
getUniqueId: () => string;
|
|
69
|
-
/** @hidden */
|
|
70
|
-
ajax: (options: AjaxOptions) => Promise<AsyncResult<any>>;
|
|
71
|
-
getFileUrl: (fileInputId: string | HTMLInputElement) => uri;
|
|
72
|
-
uploadFile: (options: UploadFileOptions) => void;
|
|
73
|
-
/** @hidden */
|
|
74
|
-
flow: (fns: Fns[]) => any;
|
|
75
|
-
listenNetwork: (online: () => void, offline: () => void) => void;
|
|
76
|
-
getEnvInfo: () => EnvInfo;
|
|
77
|
-
/** @hidden */
|
|
78
|
-
wxRequest: (options: AjaxOptions) => Promise<AsyncResult<any>>;
|
|
79
|
-
/** @hidden */
|
|
80
|
-
parseDownloadResponse: (res: any) => string;
|
|
81
|
-
download: (params: DownloadParams) => void;
|
|
82
|
-
}
|
|
83
|
-
export type {
|
|
84
|
-
Utils,
|
|
85
|
-
DownloadParams,
|
|
86
|
-
EnvInfo,
|
|
87
|
-
PLATFORM,
|
|
88
|
-
UploadFileOptions,
|
|
89
|
-
uri,
|
|
90
|
-
};
|