k2-im 0.1.58 → 0.2.1
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 +3 -1
- package/dist/browser.js +1 -1
- package/dist/chat-kit-pinia.d.ts +225 -170
- package/dist/chat-kit-pinia.js +1 -1
- package/dist/chat-kit-vue.d.ts +64 -44
- package/dist/chat-kit-vue.js +1 -1
- package/dist/chat-kit.d.ts +226 -171
- package/dist/chat-kit.js +1 -1
- package/dist/crypto.worker.js +17 -25
- package/dist/i18n.d.ts +61 -41
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +241 -186
- package/dist/index.js +1 -1
- package/dist/modules/api-protocol-client/src/bi-feedback.js +1 -0
- package/dist/modules/api-protocol-client/src/browser.js +1 -0
- package/dist/modules/api-protocol-client/src/client.js +1 -0
- package/dist/modules/api-protocol-client/src/config.js +1 -0
- package/dist/modules/api-protocol-client/src/constants.js +1 -0
- package/dist/modules/api-protocol-client/src/json.js +1 -0
- package/dist/modules/api-protocol-client/src/nonce.js +1 -0
- package/dist/modules/api-protocol-client/src/transports/axios.js +1 -0
- package/dist/modules/api-protocol-client/src/utils.js +1 -0
- package/dist/modules/crypto/browser.js +1 -0
- package/dist/modules/crypto/driver.js +1 -0
- package/dist/modules/crypto/vendor/crypto/index_bg.js +1 -0
- package/dist/modules/im-browser/src/crypto/channel-key-service.js +1 -0
- package/dist/modules/im-browser/src/crypto/collect-tea.js +1 -0
- package/dist/modules/im-browser/src/crypto/crypto-task-executor.js +1 -0
- package/dist/modules/im-browser/src/crypto/crypto-worker-factory.js +1 -0
- package/dist/modules/im-browser/src/crypto/crypto-worker-protocol.js +1 -0
- package/dist/modules/im-browser/src/crypto/encrypt-key-service.js +1 -0
- package/dist/modules/im-browser/src/crypto/group-key-service.js +1 -0
- package/dist/modules/im-browser/src/crypto/peer-public-key-service.js +1 -0
- package/dist/modules/im-browser/src/crypto/rsa-private-key.js +1 -0
- package/dist/modules/im-browser/src/crypto/rsa-tea-crypto-adapter.js +1 -0
- package/dist/modules/im-browser/src/crypto/stale-key-refresh.js +1 -0
- package/dist/modules/im-browser/src/crypto/tea.js +1 -0
- package/dist/modules/im-browser/src/crypto/wait-for-key-signal.js +1 -0
- package/dist/modules/im-browser/src/http/application-http-adapters.js +1 -0
- package/dist/modules/im-browser/src/http/channel-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/channel-join-application-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/channel-member-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/channel-mention-member-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/cm-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/directory-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/expression-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/lazy-api-protocol-client.js +1 -0
- package/dist/modules/im-browser/src/http/profile-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/http/requests/applications.js +1 -0
- package/dist/modules/im-browser/src/http/requests/bind-robot-conversation.js +1 -0
- package/dist/modules/im-browser/src/http/requests/board-pinned-message-validation.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-join-applications.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-management.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-members.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-mention-members.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-message-context.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-mini-program-rel.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-profile.js +1 -0
- package/dist/modules/im-browser/src/http/requests/channel-read-index.js +1 -0
- package/dist/modules/im-browser/src/http/requests/contact-blocklist.js +1 -0
- package/dist/modules/im-browser/src/http/requests/contact-friendship.js +1 -0
- package/dist/modules/im-browser/src/http/requests/contact-report.js +1 -0
- package/dist/modules/im-browser/src/http/requests/core-json-request.js +1 -0
- package/dist/modules/im-browser/src/http/requests/create-channel.js +1 -0
- package/dist/modules/im-browser/src/http/requests/create-face-to-face-group.js +1 -0
- package/dist/modules/im-browser/src/http/requests/create-group.js +1 -0
- package/dist/modules/im-browser/src/http/requests/customer-service-profile.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-board-pinned-message.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-channel-board-pinned-message.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-channel-secret-key.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-conversation-background-presets.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-group-encrypt-info.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-group-info.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-group-member-list.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-user-encrypt-info.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-user-info-friend.js +1 -0
- package/dist/modules/im-browser/src/http/requests/get-user-info-other.js +1 -0
- package/dist/modules/im-browser/src/http/requests/group-management.js +1 -0
- package/dist/modules/im-browser/src/http/requests/mark-group-read-all.js +1 -0
- package/dist/modules/im-browser/src/http/requests/membership-join.js +1 -0
- package/dist/modules/im-browser/src/http/requests/pin-board-message.js +1 -0
- package/dist/modules/im-browser/src/http/requests/pin-channel-board-message.js +1 -0
- package/dist/modules/im-browser/src/http/requests/pull-messages-by-id.js +1 -0
- package/dist/modules/im-browser/src/http/requests/pull-offline-channel.js +1 -0
- package/dist/modules/im-browser/src/http/requests/pull-offline-chat.js +1 -0
- package/dist/modules/im-browser/src/http/requests/pull-offline-group.js +1 -0
- package/dist/modules/im-browser/src/http/requests/pull-offline-signal.js +1 -0
- package/dist/modules/im-browser/src/http/requests/robot-menu-reply.js +1 -0
- package/dist/modules/im-browser/src/http/requests/robot-profile.js +1 -0
- package/dist/modules/im-browser/src/http/requests/search-robots.js +1 -0
- package/dist/modules/im-browser/src/http/requests/set-conversation-undisturb.js +1 -0
- package/dist/modules/im-browser/src/http/requests/set-friend-remark.js +1 -0
- package/dist/modules/im-browser/src/http/requests/set-group-nickname.js +1 -0
- package/dist/modules/im-browser/src/http/requests/unpin-board-message.js +1 -0
- package/dist/modules/im-browser/src/http/requests/unpin-channel-board-message.js +1 -0
- package/dist/modules/im-browser/src/http/requests/update-group-info.js +1 -0
- package/dist/modules/im-browser/src/http/session-favorite-http-adapter.js +1 -0
- package/dist/modules/im-browser/src/media/file-md5.js +1 -0
- package/dist/modules/im-browser/src/media/image-clipboard.js +1 -0
- package/dist/modules/im-browser/src/media/image-header-dimensions.js +1 -0
- package/dist/modules/im-browser/src/media/media-downloader.js +1 -0
- package/dist/modules/im-browser/src/media/media-preview-adapter.js +1 -0
- package/dist/modules/im-browser/src/media/media-preview-preparation-executor.js +1 -0
- package/dist/modules/im-browser/src/media/media-request-limiter.js +1 -0
- package/dist/modules/im-browser/src/media/media-transfer-adapter.js +1 -0
- package/dist/modules/im-browser/src/media/media-transfer-errors.js +1 -0
- package/dist/modules/im-browser/src/media/media-transfer-policy.js +1 -0
- package/dist/modules/im-browser/src/media/media-upload-credentials.js +1 -0
- package/dist/modules/im-browser/src/media/media-upload-recovery-codec.js +1 -0
- package/dist/modules/im-browser/src/media/media-upload-recovery-store.js +1 -0
- package/dist/modules/im-browser/src/media/media-upload-source-fingerprint.js +1 -0
- package/dist/modules/im-browser/src/media/s3-multipart-uploader.js +1 -0
- package/dist/modules/im-browser/src/media/xhr-upload-idle-timeout.js +1 -0
- package/dist/modules/im-browser/src/network/browser-connection-ownership.js +1 -0
- package/dist/modules/im-browser/src/network/network-monitor.js +1 -0
- package/dist/modules/im-browser/src/scheduling/yield-to-browser.js +1 -0
- package/dist/modules/im-browser/src/storage/indexed-db-storage-adapter.js +1 -0
- package/dist/modules/im-browser/src/transport/ws-transport.js +1 -0
- package/dist/modules/im-browser/src/voice/voice-amplitude.js +1 -0
- package/dist/modules/im-browser/src/voice/voice-capabilities.js +1 -0
- package/dist/modules/im-browser/src/voice/voice-codec.js +1 -0
- package/dist/modules/im-browser/src/voice/voice-errors.js +1 -0
- package/dist/modules/im-browser/src/voice/voice-playback.js +1 -0
- package/dist/modules/im-browser/src/voice/voice-player.js +1 -0
- package/dist/modules/im-browser/src/voice/voice-recorder.js +1 -0
- package/dist/modules/im-chat-kit/src/i18n/use-im-text.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/applications.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/capabilities.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/composer.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/context.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/conversation-activation.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/conversation-deletion.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/conversation-list.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/expression.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/history-return-after-send.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/media-transfer-estimate.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/media.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/message-operations.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/profile-directory.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/quoted-message.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/reaction.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/search-senders.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/search.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/session-favorites.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/session.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/thread-paging.store.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/thread-return-to-latest.js +1 -0
- package/dist/modules/im-chat-kit/src/pinia/thread.store.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/channel-mini-program-open.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/channel-mini-program-rels.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/conversation-list.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/conversation-unread.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/delayed-loading-indicator.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/media-source-priority.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/message-notification.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/message-search.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/mini-program-game-preview.js +1 -0
- package/dist/modules/im-chat-kit/src/presentation/mini-program-open-url.js +1 -0
- package/dist/modules/im-chat-kit/src/runtime/chat-runtime.js +1 -0
- package/dist/modules/im-chat-kit/src/runtime/conversation-prefetch-controller.js +1 -0
- package/dist/modules/im-chat-kit/src/runtime/media-object-url-registry.js +1 -0
- package/dist/modules/im-chat-kit/src/runtime/runtime-operation.js +1 -0
- package/dist/modules/im-chat-kit/src/services/capabilities.js +1 -0
- package/dist/modules/im-chat-kit/src/services/channel-member-management.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/channel-profile-management.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/channel-send-restriction.js +1 -0
- package/dist/modules/im-chat-kit/src/services/direct-contact-management.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/forward.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/group-member-management.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/group-profile-management.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/image-copy.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/media-file-classification.js +1 -0
- package/dist/modules/im-chat-kit/src/services/media.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/message.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/pinned-message-rules.js +1 -0
- package/dist/modules/im-chat-kit/src/services/pinned-message.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/profile-access.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/profile-directory.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/profile-display.js +1 -0
- package/dist/modules/im-chat-kit/src/services/profile.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/read.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/robot-sender-profile.js +1 -0
- package/dist/modules/im-chat-kit/src/services/search.service.js +1 -0
- package/dist/modules/im-chat-kit/src/services/send.service.js +1 -0
- package/dist/modules/im-chat-kit/src/thread/active-date.js +1 -0
- package/dist/modules/im-chat-kit/src/thread/create-thread-items.js +1 -0
- package/dist/modules/im-chat-kit/src/thread/message-locate-result.js +1 -0
- package/dist/modules/im-chat-kit/src/thread/new-message-badge.js +1 -0
- package/dist/modules/im-chat-kit/src/thread/resolve-message-body-kind.js +1 -0
- package/dist/modules/im-chat-kit/src/thread/resolve-quoted-message-presentation.js +1 -0
- package/dist/modules/im-chat-kit/src/thread/viewport-rules.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/emoji/emoji-legacy-catalog.json.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/emoji/index.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/emoji/recent.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/emoji/unicode-emoji-catalog.json.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/emoji/unicode.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/highlight.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/link.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/media-batch.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/media-dimensions.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/media-format.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/media-transfer-presentation.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/time-display.js +1 -0
- package/dist/modules/im-chat-kit/src/utils/waveform.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/ImThreadBodySwitch.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/ImThreadItems.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/ImThreadSurface.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/ImThreadViewport.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/message-renderer-registry.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/thread-idle-task.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/thread-layout-measurements.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/thread-read-actions-context.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/thread-surface-context.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/thread-viewport-context.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/thread-visibility-target-group.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/thread-visibility-targets.js +1 -0
- package/dist/modules/im-chat-kit/src/vue/thread/use-im-thread-layout-measurement.js +1 -0
- package/dist/modules/im-core/src/abort.js +1 -0
- package/dist/modules/im-core/src/cache-namespace.js +1 -0
- package/dist/modules/im-core/src/connection/backoff.js +1 -0
- package/dist/modules/im-core/src/connection/connection-manager.js +1 -0
- package/dist/modules/im-core/src/connection/heartbeat-manager.js +1 -0
- package/dist/modules/im-core/src/conversation-identity.js +1 -0
- package/dist/modules/im-core/src/diagnostics.js +1 -0
- package/dist/modules/im-core/src/event-emitter.js +1 -0
- package/dist/modules/im-core/src/login/login-handler.js +1 -0
- package/dist/modules/im-core/src/mapping/bot-sender.js +1 -0
- package/dist/modules/im-core/src/mapping/call-record-body.js +1 -0
- package/dist/modules/im-core/src/mapping/channel-message-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/channel-notify-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/channel-offline-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/channel-pinned-message-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/channel-read-position.js +1 -0
- package/dist/modules/im-core/src/mapping/contact-body.js +1 -0
- package/dist/modules/im-core/src/mapping/content-body.js +1 -0
- package/dist/modules/im-core/src/mapping/conversation.js +1 -0
- package/dist/modules/im-core/src/mapping/crypto-batch-preparation.js +1 -0
- package/dist/modules/im-core/src/mapping/customer-service-body.js +1 -0
- package/dist/modules/im-core/src/mapping/customer-service-message-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/decrypt-recovery.js +1 -0
- package/dist/modules/im-core/src/mapping/file-body.js +1 -0
- package/dist/modules/im-core/src/mapping/files-album-body.js +1 -0
- package/dist/modules/im-core/src/mapping/game-body.js +1 -0
- package/dist/modules/im-core/src/mapping/gift-body.js +1 -0
- package/dist/modules/im-core/src/mapping/group-message-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/group-notify-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/group-offline-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/image-body.js +1 -0
- package/dist/modules/im-core/src/mapping/live-room-body.js +1 -0
- package/dist/modules/im-core/src/mapping/media-album-body.js +1 -0
- package/dist/modules/im-core/src/mapping/merge.js +1 -0
- package/dist/modules/im-core/src/mapping/mes-chat-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/message-id.js +1 -0
- package/dist/modules/im-core/src/mapping/message-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/messages-by-id.js +1 -0
- package/dist/modules/im-core/src/mapping/mini-program-body.js +1 -0
- package/dist/modules/im-core/src/mapping/offline-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/pinned-message-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/profile-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/reaction-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/recall-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/red-packet-body.js +1 -0
- package/dist/modules/im-core/src/mapping/robot-body.js +1 -0
- package/dist/modules/im-core/src/mapping/robot-message-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/search-text.js +1 -0
- package/dist/modules/im-core/src/mapping/session-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/signal-offline-mapper.js +1 -0
- package/dist/modules/im-core/src/mapping/sort.js +1 -0
- package/dist/modules/im-core/src/mapping/sticker-body.js +1 -0
- package/dist/modules/im-core/src/mapping/stored-message.js +1 -0
- package/dist/modules/im-core/src/mapping/system-event-timeline-policy.js +1 -0
- package/dist/modules/im-core/src/mapping/text-segments.js +1 -0
- package/dist/modules/im-core/src/mapping/transfer-body.js +1 -0
- package/dist/modules/im-core/src/mapping/transfer-status.js +1 -0
- package/dist/modules/im-core/src/mapping/unread-divider.js +1 -0
- package/dist/modules/im-core/src/mapping/video-body.js +1 -0
- package/dist/modules/im-core/src/mapping/voice-body.js +1 -0
- package/dist/modules/im-core/src/message-flow/call/direct-call-manager.js +1 -0
- package/dist/modules/im-core/src/message-flow/call/direct-call-record.js +1 -0
- package/dist/modules/im-core/src/message-flow/call/direct-p2p-call.js +1 -0
- package/dist/modules/im-core/src/message-flow/call/group-call-manager.js +1 -0
- package/dist/modules/im-core/src/message-flow/call/group-call-record.js +1 -0
- package/dist/modules/im-core/src/message-flow/conversation-support.js +1 -0
- package/dist/modules/im-core/src/message-flow/edit/edit-frame.js +1 -0
- package/dist/modules/im-core/src/message-flow/edit/edit-manager.js +1 -0
- package/dist/modules/im-core/src/message-flow/edit/edit-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/edit/edit-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/expression/expression-message.js +1 -0
- package/dist/modules/im-core/src/message-flow/forward/can-transmit.js +1 -0
- package/dist/modules/im-core/src/message-flow/forward/forward-content-spec.js +1 -0
- package/dist/modules/im-core/src/message-flow/forward/forward-messages.js +1 -0
- package/dist/modules/im-core/src/message-flow/game/game-message.js +1 -0
- package/dist/modules/im-core/src/message-flow/gift/gift-message.js +1 -0
- package/dist/modules/im-core/src/message-flow/live-room/live-room-message.js +1 -0
- package/dist/modules/im-core/src/message-flow/media/media-sender.js +1 -0
- package/dist/modules/im-core/src/message-flow/mini-program/mini-program-message.js +1 -0
- package/dist/modules/im-core/src/message-flow/reaction/can-react.js +1 -0
- package/dist/modules/im-core/src/message-flow/reaction/reaction-manager.js +1 -0
- package/dist/modules/im-core/src/message-flow/reaction/reaction-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/read/channel-read-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/read/channel-read-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/read/customer-service-read-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/read/direct-read-sync.js +1 -0
- package/dist/modules/im-core/src/message-flow/read/group-read-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/read/read-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/read/robot-read-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/recall/channel-message-deletion-manager.js +1 -0
- package/dist/modules/im-core/src/message-flow/recall/recall-frame.js +1 -0
- package/dist/modules/im-core/src/message-flow/recall/recall-manager.js +1 -0
- package/dist/modules/im-core/src/message-flow/recall/recall-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/recall/recall-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/channel-application-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/channel-notify-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/channel-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/command-handler-registry.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/contact-application-answer-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/contact-application-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/direct-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/friend-action-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/group-event-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/group-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/mes-chat-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/robot-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/session-favorite-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/receive/wallet-notify-receive-handlers.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/channel-outgoing-frame.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/channel-send-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/direct-outgoing-frame.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/direct-send-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/group-outgoing-frame.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/group-send-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/robot-outgoing-frame.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/robot-send-strategy.js +1 -0
- package/dist/modules/im-core/src/message-flow/send/send-strategy-registry.js +1 -0
- package/dist/modules/im-core/src/message-flow/transfer/transfer-message.js +1 -0
- package/dist/modules/im-core/src/outbox/outbox-manager.js +1 -0
- package/dist/modules/im-core/src/packet-router.js +1 -0
- package/dist/modules/im-core/src/ports/crypto-port.js +1 -0
- package/dist/modules/im-core/src/ports/crypto-task-executor.js +1 -0
- package/dist/modules/im-core/src/ports/http-port.js +1 -0
- package/dist/modules/im-core/src/ports/media-asset-cache-port.js +1 -0
- package/dist/modules/im-core/src/push/push-registration.js +1 -0
- package/dist/modules/im-core/src/read/read-reporter.js +1 -0
- package/dist/modules/im-core/src/request-tracker.js +1 -0
- package/dist/modules/im-core/src/session-favorite-album.js +1 -0
- package/dist/modules/im-core/src/session-favorite-files.js +1 -0
- package/dist/modules/im-core/src/state/channel-permissions.js +1 -0
- package/dist/modules/im-core/src/state/channel-restriction-coordinator.js +1 -0
- package/dist/modules/im-core/src/state/domain-state.js +1 -0
- package/dist/modules/im-core/src/state/draft-store.js +1 -0
- package/dist/modules/im-core/src/state/group-restriction-coordinator.js +1 -0
- package/dist/modules/im-core/src/state/local-message-window-read-error.js +1 -0
- package/dist/modules/im-core/src/state/message-reactions.js +1 -0
- package/dist/modules/im-core/src/state/message-store.js +1 -0
- package/dist/modules/im-core/src/state/message-window-store.js +1 -0
- package/dist/modules/im-core/src/state/pinned-message-coordinator.js +1 -0
- package/dist/modules/im-core/src/state/pinned-message-store.js +1 -0
- package/dist/modules/im-core/src/state/read-store.js +1 -0
- package/dist/modules/im-core/src/state/session-sort.js +1 -0
- package/dist/modules/im-core/src/state/session-store.js +1 -0
- package/dist/modules/im-core/src/sync/channel-sync-checkpoint.js +1 -0
- package/dist/modules/im-core/src/sync/sync-manager.js +1 -0
- package/dist/modules/im-i18n/src/catalog/en-US.js +1 -0
- package/dist/modules/im-i18n/src/catalog/index.js +1 -0
- package/dist/modules/im-i18n/src/catalog/th-TH.js +1 -0
- package/dist/modules/im-i18n/src/catalog/vi-VN.js +1 -0
- package/dist/modules/im-i18n/src/catalog/zh-CN.js +1 -0
- package/dist/modules/im-i18n/src/catalog/zh-TW.js +1 -0
- package/dist/modules/im-i18n/src/create-im-i18n.js +1 -0
- package/dist/modules/im-i18n/src/format/failure.js +1 -0
- package/dist/modules/im-i18n/src/format/last-message.js +1 -0
- package/dist/modules/im-i18n/src/format/media.js +1 -0
- package/dist/modules/im-i18n/src/format/mention.js +1 -0
- package/dist/modules/im-i18n/src/format/service-text.js +1 -0
- package/dist/modules/im-i18n/src/format/system-message.js +1 -0
- package/dist/modules/im-i18n/src/internal/duration.js +1 -0
- package/dist/modules/im-i18n/src/internal/interpolate.js +1 -0
- package/dist/modules/im-i18n/src/locale.js +1 -0
- package/dist/modules/im-protocol/src/board-pinned-message.js +1 -0
- package/dist/modules/im-protocol/src/frame-codec.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/channel_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/group_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.app.msg_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.channel_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.group_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.login_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.msg_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.pub_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.robot_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/im.sig_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/gen/msg_pb.js +1 -0
- package/dist/modules/im-protocol/src/protobuf/registry.js +1 -0
- package/dist/modules/im-sdk/src/cache-prefix-migration.js +1 -0
- package/dist/modules/im-sdk/src/create-im-client.js +1 -0
- package/dist/modules/im-sdk/src/domains/channel.js +1 -0
- package/dist/modules/im-sdk/src/domains/contact.js +1 -0
- package/dist/modules/im-sdk/src/domains/conversation.js +1 -0
- package/dist/modules/im-sdk/src/domains/group.js +1 -0
- package/dist/modules/im-sdk/src/domains/media-byte-computation.js +1 -0
- package/dist/modules/im-sdk/src/domains/media.js +1 -0
- package/dist/modules/im-sdk/src/domains/message.js +1 -0
- package/dist/modules/im-sdk/src/domains/pinned-message-source.js +1 -0
- package/dist/modules/im-sdk/src/domains/pinned-message.js +1 -0
- package/dist/modules/im-sdk/src/domains/session.js +1 -0
- package/dist/modules/im-sdk/src/product/applications.js +1 -0
- package/dist/modules/im-sdk/src/product/calls.js +1 -0
- package/dist/modules/im-sdk/src/product/capabilities.js +1 -0
- package/dist/modules/im-sdk/src/product/channel-mention-candidates.js +1 -0
- package/dist/modules/im-sdk/src/product/conversation-background.js +1 -0
- package/dist/modules/im-sdk/src/product/conversation-entry-unread.js +1 -0
- package/dist/modules/im-sdk/src/product/conversation-handle.js +1 -0
- package/dist/modules/im-sdk/src/product/conversations.js +1 -0
- package/dist/modules/im-sdk/src/product/customer-service.js +1 -0
- package/dist/modules/im-sdk/src/product/diagnostic-memory-buffer.js +1 -0
- package/dist/modules/im-sdk/src/product/diagnostics.js +1 -0
- package/dist/modules/im-sdk/src/product/directory.js +1 -0
- package/dist/modules/im-sdk/src/product/draft.js +1 -0
- package/dist/modules/im-sdk/src/product/emoji-catalog.js +1 -0
- package/dist/modules/im-sdk/src/product/emoji-catalog.json.js +1 -0
- package/dist/modules/im-sdk/src/product/events.js +1 -0
- package/dist/modules/im-sdk/src/product/expressions.js +1 -0
- package/dist/modules/im-sdk/src/product/face-to-face-group.js +1 -0
- package/dist/modules/im-sdk/src/product/group-calls.js +1 -0
- package/dist/modules/im-sdk/src/product/image-format.js +1 -0
- package/dist/modules/im-sdk/src/product/local-data.js +1 -0
- package/dist/modules/im-sdk/src/product/media.js +1 -0
- package/dist/modules/im-sdk/src/product/mention.js +1 -0
- package/dist/modules/im-sdk/src/product/message.js +1 -0
- package/dist/modules/im-sdk/src/product/messages-by-id.js +1 -0
- package/dist/modules/im-sdk/src/product/outbox.js +1 -0
- package/dist/modules/im-sdk/src/product/profiles.js +1 -0
- package/dist/modules/im-sdk/src/product/resource-uploader.js +1 -0
- package/dist/modules/im-sdk/src/product/robots.js +1 -0
- package/dist/modules/im-sdk/src/product/search.js +1 -0
- package/dist/modules/im-sdk/src/product/session-favorites.js +1 -0
- package/dist/modules/im-sdk/src/product/settings.js +1 -0
- package/dist/modules/im-sdk/src/runtime/advanced-message-diagnostics.js +1 -0
- package/dist/modules/im-sdk/src/runtime/channel-read-summary-refresh.js +1 -0
- package/dist/modules/im-sdk/src/runtime/customer-service-legacy-recovery.js +1 -0
- package/dist/modules/im-sdk/src/runtime/decrypt-diagnostics.js +1 -0
- package/dist/modules/im-sdk/src/runtime/foreground-work-coordinator.js +1 -0
- package/dist/modules/im-sdk/src/runtime/group-history-page-boundary.js +1 -0
- package/dist/modules/im-sdk/src/runtime/key-prefetch.js +1 -0
- package/dist/modules/im-sdk/src/runtime/local-media-preview.js +1 -0
- package/dist/modules/im-sdk/src/runtime/media-cache-maintenance.js +1 -0
- package/dist/modules/im-sdk/src/runtime/media-upload-recovery.js +1 -0
- package/dist/modules/im-sdk/src/runtime/protobuf-wire-shape.js +1 -0
- package/dist/modules/im-sdk/src/runtime/receiving-activity.js +1 -0
- package/dist/modules/im-sdk/src/runtime/recent-history-fetcher.js +1 -0
- package/dist/modules/im-sdk/src/runtime/recent-history-prefetch.js +1 -0
- package/dist/modules/im-sdk/src/runtime/session-http-clients.js +1 -0
- package/dist/modules/im-sdk/src/runtime/session-runtime.js +1 -0
- package/dist/modules/im-sdk/src/runtime/signal-offline-poller.js +1 -0
- package/dist/request-crypto.js +1 -1
- package/dist/sdk.d.ts +170 -111
- package/dist/sdk.js +1 -1
- package/package.json +2 -2
- package/dist/browser-GFKMMRZD.js +0 -1
- package/dist/browser-RTCHWSQ2.js +0 -2
- package/dist/chunk-2U2JMY5V.js +0 -1
- package/dist/chunk-B5V2O54N.js +0 -1
- package/dist/chunk-I7YY5G76.js +0 -1
- package/dist/chunk-IDECJJXC.js +0 -0
- package/dist/chunk-PHJQ6QKU.js +0 -2
- package/dist/chunk-Q2DEFN53.js +0 -1
- package/dist/chunk-SXY56EVC.js +0 -0
- package/dist/chunk-TIQ37Q7E.js +0 -2
- package/dist/chunk-VMNZGJNM.js +0 -2
- package/dist/chunk-WOT6VMZA.js +0 -1
- package/dist/chunk-X7ZBIWYF.js +0 -8
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ interface MediaTransferProgress {
|
|
|
9
9
|
phase?: 'transferring' | 'finalizing';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup' | 'robot';
|
|
12
|
+
/** 会话类型;各类型分别处理权限、收发和历史。supergroup 仅预留类型,尚未提供业务实现。 */
|
|
13
|
+
type ConversationType = 'direct' | 'group' | 'channel' | 'supergroup' | 'robot' | 'customerService';
|
|
14
14
|
/**
|
|
15
15
|
* 会话复合身份;`conversationId` 只在对应 `conversationType` 的领域内唯一。
|
|
16
16
|
*
|
|
@@ -47,8 +47,8 @@ interface ConversationDraft$1 {
|
|
|
47
47
|
attachments: readonly [];
|
|
48
48
|
updatedAt: number;
|
|
49
49
|
}
|
|
50
|
-
/** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);gift=礼品/刮刮卡(contentType=17);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);liveRoom=直播间分享(contentType=30);未知 wire
|
|
51
|
-
type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'gift' | 'call' | 'redPacket' | 'mediaAlbum' | 'filesAlbum' | 'robot' | 'liveRoom' | 'unknown';
|
|
50
|
+
/** 消息内容类型。sticker=表情/贴图(BMessage contentType=7);call=单聊通话记录(contentType=10);transfer=转账(contentType=16);gift=礼品/刮刮卡(contentType=17);robot=机器人卡片(contentType=18);miniProgram=小程序分享卡(contentType=22);redPacket=红包卡(contentType=25);game=小游戏(contentType=27);liveRoom=直播间分享(contentType=30);未知 wire 正文统一转换为 unknown。 */
|
|
51
|
+
type MessageContentType = 'text' | 'system' | 'image' | 'video' | 'voice' | 'file' | 'sticker' | 'contact' | 'miniProgram' | 'game' | 'transfer' | 'gift' | 'call' | 'redPacket' | 'mediaAlbum' | 'filesAlbum' | 'robot' | 'liveRoom' | 'customerService' | 'unknown';
|
|
52
52
|
/**
|
|
53
53
|
* 发送态(客户端态):消息从本地创建到服务端确认的生命周期。
|
|
54
54
|
* `uploading` 仅媒体消息使用:文件上传阶段(uploading→pending→sending→sent);
|
|
@@ -88,10 +88,10 @@ interface ImSystemMessageBody {
|
|
|
88
88
|
pinnedMessageAction?: ImPinnedMessageAction;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
92
|
-
* `system`
|
|
93
|
-
* EXPRESSION
|
|
94
|
-
*
|
|
91
|
+
* 会话最后一条消息的语义摘要,供存储和 im-i18n 展示使用。
|
|
92
|
+
* `system` 保存解析后的 ImSystemMessageBody,formatSystemMessage 在展示时接收 selfId。
|
|
93
|
+
* EXPRESSION 按 imageType 区分 gif 与静态 sticker。
|
|
94
|
+
* 与 lastMessagePreview 同时保存;变化检查逐字段调用 lastMessageSummaryEqual,不比较对象引用。
|
|
95
95
|
*/
|
|
96
96
|
type LastMessageSummary = {
|
|
97
97
|
kind: 'text';
|
|
@@ -287,7 +287,7 @@ interface ImVoiceBody {
|
|
|
287
287
|
teaKey?: Uint8Array;
|
|
288
288
|
/** 文件加密类型:0=跟随消息,1=不加密,3=完整 TEA(BMessage.fileEncryptType;语音与图片/视频同走完整 TEA)。 */
|
|
289
289
|
fileEncryptType?: number;
|
|
290
|
-
/** 录音振幅波形(0-255
|
|
290
|
+
/** 录音振幅波形(0-255):仅发送端本地展示缓存(随消息写入本地存储、刷新后仍可画波形),**不写入 BMessage**(协议无波形字段)。 */
|
|
291
291
|
waveform?: number[];
|
|
292
292
|
}
|
|
293
293
|
/**
|
|
@@ -394,7 +394,7 @@ interface ImRobotImageGroupModule {
|
|
|
394
394
|
/**
|
|
395
395
|
* 机器人卡片倒计时。
|
|
396
396
|
*
|
|
397
|
-
* `endTimeMs`
|
|
397
|
+
* `endTimeMs` 已转换为 epoch 毫秒;wire 秒/毫秒混用只在 mapper 转换,宿主不要再猜单位。
|
|
398
398
|
*/
|
|
399
399
|
interface ImRobotCountdownModule {
|
|
400
400
|
type: 'countdown';
|
|
@@ -487,10 +487,10 @@ interface ImGiftBody {
|
|
|
487
487
|
benCount?: string;
|
|
488
488
|
fissionNumber?: string;
|
|
489
489
|
}
|
|
490
|
-
/**
|
|
490
|
+
/** 通话媒体类型;各端 wire 0/1 的不同含义已转换成统一业务值,宿主无需读取 raw callType。 */
|
|
491
491
|
type ImCallKind = 'audio' | 'video';
|
|
492
492
|
/**
|
|
493
|
-
* 通话结束结果。Android 跨端同步把未接与取消都写成 callStatus=0
|
|
493
|
+
* 通话结束结果。Android 跨端同步把未接与取消都写成 callStatus=0,只能转换为 missed。
|
|
494
494
|
* `unknown` 仅表示该端 status 数字无法识别,不得猜成 completed。
|
|
495
495
|
*/
|
|
496
496
|
type ImCallOutcome = 'missed' | 'rejected' | 'cancelled' | 'completed' | 'busy' | 'no-permission' | 'interrupted' | 'unknown';
|
|
@@ -498,7 +498,7 @@ type ImCallOutcome = 'missed' | 'rejected' | 'cancelled' | 'completed' | 'busy'
|
|
|
498
498
|
* 单聊通话记录正文(contentType==='call',协议 BMessage.contentType=10)。
|
|
499
499
|
*
|
|
500
500
|
* @remarks JSON 在 BMessage.content。Android 本地 / Android 跨端同步 / iOS 三套字段名与 0/1 含义不同,
|
|
501
|
-
*
|
|
501
|
+
* 仅由 mapping/call-record-body 转换成统一业务值。记录由各端本地插入,不能当普通聊天发出。
|
|
502
502
|
*/
|
|
503
503
|
interface ImCallRecordBody {
|
|
504
504
|
callKind: ImCallKind;
|
|
@@ -525,7 +525,7 @@ type ImRedPacketType = 1 | 2 | 3 | 4;
|
|
|
525
525
|
* @remarks 字段来自 proto 72-79 + 复用 34/35/38/49。领域名 `packetId` 对应 wire `rad_packet_id`。
|
|
526
526
|
* 金额保持 proto string,单位是否微单位未证实,禁止默认套转账 ×1e6。
|
|
527
527
|
* HTTP 详情状态与本地「自己已领」属于宿主投影,不进本 DTO(status 39 / state 53 未裁定)。
|
|
528
|
-
*
|
|
528
|
+
* 当前不提供 `sendRedPacket`;出站字段仅用于 codec 往返闭合。
|
|
529
529
|
*/
|
|
530
530
|
interface ImRedPacketBody {
|
|
531
531
|
packetId: string;
|
|
@@ -545,7 +545,7 @@ interface ImRedPacketBody {
|
|
|
545
545
|
type ImContactKind = 'individual' | 'group' | 'channel' | 'robot' | 'unknown';
|
|
546
546
|
/**
|
|
547
547
|
* 名片消息内容体(contentType==='contact')。字段来自 BMessage contentType=8,但使用领域友好命名:
|
|
548
|
-
* id/icon/name
|
|
548
|
+
* id/icon/name 分别转换为 targetId/avatar/displayName;visitCardKey 转换为 kind,未知值放 rawKind。
|
|
549
549
|
*/
|
|
550
550
|
interface ImContactBody {
|
|
551
551
|
/** 被分享对象 id:个人 userId、普通群 groupId、频道 id 或机器人 id。 */
|
|
@@ -577,7 +577,7 @@ interface UnknownMessageBody {
|
|
|
577
577
|
* 若干项共享消息级的撤回、已读、引用与转发语义。
|
|
578
578
|
*/
|
|
579
579
|
interface ImMediaAlbumItem {
|
|
580
|
-
/** 该项是图片还是视频;由协议
|
|
580
|
+
/** 该项是图片还是视频;由协议 mediaType 转换,无法识别的项会在解析时丢弃。 */
|
|
581
581
|
kind: 'image' | 'video';
|
|
582
582
|
/** 远端地址。加密项也是这个地址,解密用本项自己的 `teaKey`。 */
|
|
583
583
|
url: string;
|
|
@@ -659,8 +659,28 @@ interface ImLiveRoomBody {
|
|
|
659
659
|
/** 点赞数十进制字符串,保持协议原文,不在 Core 换算。 */
|
|
660
660
|
liveRoomLikes?: string;
|
|
661
661
|
}
|
|
662
|
+
/** 客服正文保留一条消息内的全部附件;图片和文件各自保持服务端顺序。 */
|
|
663
|
+
interface ImCustomerServiceBody {
|
|
664
|
+
/** 原始文字;空白不被当作不存在。 */
|
|
665
|
+
text: string;
|
|
666
|
+
/** 图片直达地址,不套用普通消息的加密文件结构。 */
|
|
667
|
+
images: readonly string[];
|
|
668
|
+
/** 文件与名称、大小按协议数组索引配对,不创建伪消息 ID。 */
|
|
669
|
+
files: readonly ImCustomerServiceFile[];
|
|
670
|
+
}
|
|
671
|
+
/** 客服文件元数据。大小是服务端展示文字,不能据此认定下载完整。 */
|
|
672
|
+
interface ImCustomerServiceFile {
|
|
673
|
+
/** 服务端给出的资源地址。 */
|
|
674
|
+
url: string;
|
|
675
|
+
/** 服务端名称;缺省时从 URL 最后一个路径片段提取。 */
|
|
676
|
+
name: string;
|
|
677
|
+
/** 可缺省的原始大小描述,例如 1.5MB,并非精确字节数。 */
|
|
678
|
+
sizeLabel?: string;
|
|
679
|
+
}
|
|
662
680
|
interface ImMessageBody {
|
|
663
|
-
/**
|
|
681
|
+
/** 客服专用复合正文;不能直接作为普通消息发送。 */
|
|
682
|
+
customerService?: ImCustomerServiceBody;
|
|
683
|
+
/** 文本内容(明文,解密后的结果)。 */
|
|
664
684
|
text?: string;
|
|
665
685
|
/** contentType==='system' 时的结构化系统提示体(群通知;text 忽略)。 */
|
|
666
686
|
system?: ImSystemMessageBody;
|
|
@@ -710,7 +730,7 @@ interface MentionRange {
|
|
|
710
730
|
end: number;
|
|
711
731
|
}
|
|
712
732
|
/**
|
|
713
|
-
* 群消息 @ 提及(Android
|
|
733
|
+
* 群消息 @ 提及(Android 三写载体的统一解析):`atAll`(MESGrpChat.nNotifyCount=-1)、`atUserIds`(sNotifyUsers 被 @ 成员,
|
|
714
734
|
* 含正文 token 读边界补全)、`ranges`(extend.atRange,可选、仅诊断/兼容——展示**不依赖其坐标**)。正文 `body.text` 保留 `[userId]` token 原样(真相不变);
|
|
715
735
|
* **展示权威来源 = 正文 token + atUserIds/atAll**,由纯函数 `resolveMentionSegments` 还原为高亮段(含 @昵称/@所有人/@我),UI 不自行解析。
|
|
716
736
|
*/
|
|
@@ -732,21 +752,21 @@ type ImMessageFailureReason = 'timeout' | 'rejected' | 'encrypt_failed' | 'netwo
|
|
|
732
752
|
*/
|
|
733
753
|
type ImFailureDisplayCode = 'media.empty' | 'media.noCrypto' | 'media.previewFailed' | 'media.encryptFailed' | 'media.resumeUnavailable' | 'media.cleanupUnconfirmed' | 'media.uploadFailed' | 'media.uploadTimeout' | 'media.cancelled' | 'media.invalidDuration' | 'media.uploadInterrupted' | 'media.contentTooLarge' | 'contactRequired' | 'messageRefused' | 'forbiddenOrLeft' | 'contentRejected' | 'groupDismissed' | 'groupUnavailable' | 'channelDismissed' | 'channelMuted' | 'channelNotMember' | 'channelAdminRequired' | 'conversationUnsupported' | 'sendCanceled' | 'sessionLoggedOut' | 'timeout' | 'network' | 'unknown';
|
|
734
754
|
interface ImMessageFailure {
|
|
735
|
-
/**
|
|
755
|
+
/** 转换后的错误码(来自 MESChatAck.errcode 或本地失败码,本地码用负值)。 */
|
|
736
756
|
code: number;
|
|
737
757
|
/** 失败机器分类(重试 / fail-fast / 统计消费)。 */
|
|
738
758
|
reason: ImMessageFailureReason;
|
|
739
|
-
/**
|
|
759
|
+
/** 失败展示语义码:UI 经 im-i18n 按语言渲染,缺省时使用 message;不单独触发消息状态更新。 */
|
|
740
760
|
displayCode?: ImFailureDisplayCode;
|
|
741
|
-
/** 展示模板参数(如未支持会话类型的 type
|
|
761
|
+
/** 展示模板参数(如未支持会话类型的 type);不单独触发消息状态更新。 */
|
|
742
762
|
params?: Record<string, string | number>;
|
|
743
763
|
/** 媒体失败的媒体类型(图片/视频/语音/文件):供 displayCode 为 media.* 时渲染 label。 */
|
|
744
764
|
mediaKind?: MediaKind;
|
|
745
|
-
/**
|
|
765
|
+
/** 后端原文或诊断文案;没有专门展示码时用于展示,不单独触发消息状态更新(见 merge.failureEqual)。 */
|
|
746
766
|
message?: string;
|
|
747
767
|
/**
|
|
748
768
|
* 是否可重试(false=业务级不可重试):如 direct 非好友或 GROUP 不在群(0x8201)、内容为空/违规(0x8202)、群已解散(0x8315)→ UI 隐藏「重发」。
|
|
749
|
-
* 缺省(undefined)视为可重试(向后兼容)。由 code 决定(classifyAckFailure
|
|
769
|
+
* 缺省(undefined)视为可重试(向后兼容)。由 code 决定(classifyAckFailure),不单独触发消息状态更新。
|
|
750
770
|
*/
|
|
751
771
|
retryable?: boolean;
|
|
752
772
|
}
|
|
@@ -789,7 +809,7 @@ interface MediaTaskUpdate {
|
|
|
789
809
|
failure?: ImMessageFailure;
|
|
790
810
|
}
|
|
791
811
|
interface ImMessageEncryption {
|
|
792
|
-
/**
|
|
812
|
+
/** true=消息密文链路, false=明文链路(encrypt=0)。 */
|
|
793
813
|
encrypted: boolean;
|
|
794
814
|
/** 扩展:加密方案标识,默认 'rsa-tea'。 */
|
|
795
815
|
scheme?: 'rsa-tea';
|
|
@@ -798,16 +818,16 @@ interface ImMessageEncryption {
|
|
|
798
818
|
}
|
|
799
819
|
/** 单条消息领域模型(§4.1)。主键为客户端生成的 id(无 serverId)。 */
|
|
800
820
|
interface ImMessage {
|
|
801
|
-
/**
|
|
821
|
+
/** 客户端生成的稳定消息 ID(UUID),同时作幂等键;刷新后保持。 */
|
|
802
822
|
id: string;
|
|
803
|
-
/**
|
|
823
|
+
/** 消息所属会话的字符串 ID;必须结合 conversationType 使用。 */
|
|
804
824
|
conversationId: string;
|
|
805
825
|
conversationType: ConversationType;
|
|
806
|
-
/**
|
|
826
|
+
/** 发送者的字符串用户 ID。 */
|
|
807
827
|
senderId: string;
|
|
808
828
|
contentType: MessageContentType;
|
|
809
829
|
body: ImMessageBody;
|
|
810
|
-
/**
|
|
830
|
+
/** 统一毫秒 number(本地创建时间,乐观渲染用)。 */
|
|
811
831
|
createdAt: number;
|
|
812
832
|
/** SDK 内部排序键;有效服务端时间优先,ACK 后可以更新。宿主不解析它,消息身份始终使用 id。 */
|
|
813
833
|
sortKey: string;
|
|
@@ -816,7 +836,7 @@ interface ImMessage {
|
|
|
816
836
|
failure?: ImMessageFailure;
|
|
817
837
|
/** 服务端回传的 epoch 毫秒时间;有效时用于正式排序与展示,createdAt 仍保留创建记录。 */
|
|
818
838
|
serverTime?: number;
|
|
819
|
-
/**
|
|
839
|
+
/** 默认 'unread'。 */
|
|
820
840
|
receipt: MessageReceipt;
|
|
821
841
|
/** 离线单聊服务端标记当前账号已在其它端读过;仅用于本地未读投影,不改变对端回执 receipt。 */
|
|
822
842
|
readBySelf?: boolean;
|
|
@@ -849,7 +869,7 @@ interface ImMessage {
|
|
|
849
869
|
/** 扩展位:后端新增语义先落这里,避免污染核心字段。 */
|
|
850
870
|
extensions?: Record<string, unknown>;
|
|
851
871
|
/**
|
|
852
|
-
* 诊断快照(§4.1
|
|
872
|
+
* 诊断快照(§4.1 诊断口径):后端下发的原始协议字段(已转换为可 JSON 序列化形态)。
|
|
853
873
|
* 默认不填充,仅当映射开启 keepRaw 时附带,便于联调、与后端核对原始下发;不参与任何业务逻辑。
|
|
854
874
|
*/
|
|
855
875
|
raw?: ImMessageRaw;
|
|
@@ -966,17 +986,17 @@ type ChannelSessionState = 'active' | 'guest' | 'left' | 'removed' | 'dismissed'
|
|
|
966
986
|
interface ImSession {
|
|
967
987
|
id: string;
|
|
968
988
|
type: ConversationType;
|
|
969
|
-
/**
|
|
989
|
+
/** 由映射层从用户/群资料补齐。 */
|
|
970
990
|
title: string;
|
|
971
991
|
avatar?: string;
|
|
972
992
|
/**
|
|
973
|
-
*
|
|
993
|
+
* 会话最后一条的预览串(**已收窄**):仅承载 text 消息的正文(供会话列表 previewSegments 解析 @/表情,需原始正文串);
|
|
974
994
|
* 媒体 / 加密 / 系统 / 撤回一律空串——其语义改由 lastMessageSummary 承载、UI 经 im-i18n 渲染。旧盘遗留的中文占位在 hydrate / projectSession 重算时清空。
|
|
975
995
|
*/
|
|
976
996
|
lastMessagePreview: string;
|
|
977
997
|
/**
|
|
978
|
-
*
|
|
979
|
-
*
|
|
998
|
+
* 最后一条消息的语义摘要,持久保存并由 im-i18n 按语言生成文案。
|
|
999
|
+
* 与 lastMessagePreview 同时保存,变化检查使用逐字段比较;旧会话缺此字段时可使用 lastMessagePreview。
|
|
980
1000
|
*/
|
|
981
1001
|
lastMessageSummary?: LastMessageSummary;
|
|
982
1002
|
/** 最后一条消息发送者 id(群会话列表预览「发送者名: 内容」前缀用;`'system'`=系统提示、==自己=我发的,前缀策略由宿主定)。 */
|
|
@@ -1000,7 +1020,7 @@ interface ImSession {
|
|
|
1000
1020
|
* 会话内容仍显示最新一条消息。收到别人 @我 +1、查看/已读该会话清零。投影自 ReadState.mentionUnreadCount,与 unreadCount 同源持久化。
|
|
1001
1021
|
*/
|
|
1002
1022
|
mentionUnreadCount?: number;
|
|
1003
|
-
/**
|
|
1023
|
+
/** 排序时间(毫秒 number)。 */
|
|
1004
1024
|
timestamp: number;
|
|
1005
1025
|
/**
|
|
1006
1026
|
* 用户手工添加的本地“稍后处理”提醒。
|
|
@@ -1016,7 +1036,7 @@ interface ImSession {
|
|
|
1016
1036
|
topTime?: number;
|
|
1017
1037
|
/**
|
|
1018
1038
|
* 最新一条消息若为「己方且未完成发送」的态:'sending'(pending/uploading/sending 统一)/ 'failed'。
|
|
1019
|
-
* 派生展示字段(随最新消息变化,会话列表据此显示发送中 loading / 失败图标);运行期真相,不持久化(persistSession
|
|
1039
|
+
* 派生展示字段(随最新消息变化,会话列表据此显示发送中 loading / 失败图标);运行期真相,不持久化(persistSession 写入本地存储时剔除)。
|
|
1020
1040
|
*/
|
|
1021
1041
|
lastMessageSendState?: 'sending' | 'failed';
|
|
1022
1042
|
/**
|
|
@@ -1024,11 +1044,11 @@ interface ImSession {
|
|
|
1024
1044
|
*
|
|
1025
1045
|
* 只在自己发出且 `status='sent'` 时投影;发送中/失败、对端消息、撤回、全员删除和系统提示都不给。
|
|
1026
1046
|
* `delivered` 与尚未回执一样投影为 `unread`;当前协议没有送达通知,不能把 `sent` 当作对端已收到。
|
|
1027
|
-
*
|
|
1047
|
+
* 该字段随最新消息变化,并随会话写入本地存储,避免冷启动后
|
|
1028
1048
|
* 因「盘中缺字段 / 内存有字段」反复广播;对端已读变化必须刷新会话行。
|
|
1029
1049
|
*/
|
|
1030
1050
|
lastMessageReceipt?: 'unread' | 'read';
|
|
1031
|
-
/**
|
|
1051
|
+
/** 我方已读游标(见 §4.3)。 */
|
|
1032
1052
|
readCursor?: string;
|
|
1033
1053
|
/** 群受限状态(仅 group;来自 0x2204 群通知 side-effect)。缺省视为 'active'(可正常发送)。 */
|
|
1034
1054
|
groupState?: GroupSessionState;
|
|
@@ -1046,11 +1066,11 @@ interface ImSession {
|
|
|
1046
1066
|
interface ReadState {
|
|
1047
1067
|
conversationId: string;
|
|
1048
1068
|
/**
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1069
|
+
* 新写入必须携带会话类型;可选用于兼容迁移前的存储记录。
|
|
1070
|
+
* storage migration 会根据对应 session 补齐旧记录。
|
|
1051
1071
|
*/
|
|
1052
1072
|
conversationType?: ConversationType;
|
|
1053
|
-
/**
|
|
1073
|
+
/** 当前账号已读到的位置,以消息 id 或后端游标表示。 */
|
|
1054
1074
|
readCursor: string;
|
|
1055
1075
|
/**
|
|
1056
1076
|
* 已读游标消息的 sortKey(位置)持久化快照:重启后 readCursor 对应消息未必被 hydrate 到内存,
|
|
@@ -1084,12 +1104,12 @@ interface OutboxUpdate {
|
|
|
1084
1104
|
}
|
|
1085
1105
|
/** 发送队列项(§4.4)。id 复用对应 ImMessage.id 以保证重试幂等。 */
|
|
1086
1106
|
interface OutboxMessage {
|
|
1087
|
-
/**
|
|
1107
|
+
/** == 对应 ImMessage.id(客户端生成,重试时复用以保证幂等)。 */
|
|
1088
1108
|
id: string;
|
|
1089
1109
|
conversationId: string;
|
|
1090
1110
|
conversationType: ConversationType;
|
|
1091
1111
|
contentType: MessageContentType;
|
|
1092
|
-
/**
|
|
1112
|
+
/** 待发送内容(明文;加密在发送管线内按 encryption 处理)。 */
|
|
1093
1113
|
body: ImMessageBody;
|
|
1094
1114
|
/** 群 @ 提及(发送侧:宿主从输入框提取;正文 body.text 已含 [userId] token / @所有人 文字,本字段供群发送策略编码 sNotifyUsers/nNotifyCount/extend)。仅群 @ 消息有。 */
|
|
1095
1115
|
mention?: ImMessageMention;
|
|
@@ -1103,7 +1123,7 @@ interface OutboxMessage {
|
|
|
1103
1123
|
/**
|
|
1104
1124
|
* 复发策略(生命周期 logout 语义):`automatic`(默认,缺省视同)= onAuthenticated/断线重连时自动复发;
|
|
1105
1125
|
* `manual` = 仅用户显式 retry 才发(logout 时把在途消息置 manual,避免退账号后下次登录无提示自动补发)。
|
|
1106
|
-
*
|
|
1126
|
+
* 持久化随账本写入本地存储,故 logout(preserve)→重登后仍为 manual,不被自动复发;retry 会翻回 automatic。缺省(旧账本)按 automatic 处理(向后兼容)。
|
|
1107
1127
|
*/
|
|
1108
1128
|
resumePolicy?: 'automatic' | 'manual';
|
|
1109
1129
|
}
|
|
@@ -1156,7 +1176,7 @@ interface ContactRemarkPhone {
|
|
|
1156
1176
|
countryCode: string;
|
|
1157
1177
|
mobile: string;
|
|
1158
1178
|
}
|
|
1159
|
-
/** 用户资料领域模型(§4.5)。由 ImProfilePort
|
|
1179
|
+
/** 用户资料领域模型(§4.5)。由 ImProfilePort 拉取、映射层转换字段。 */
|
|
1160
1180
|
interface UserProfile {
|
|
1161
1181
|
id: string;
|
|
1162
1182
|
/** 用户自设昵称(后端 `nick_name`)。 */
|
|
@@ -1181,7 +1201,7 @@ interface UserProfile {
|
|
|
1181
1201
|
remarkPhones?: ContactRemarkPhone[];
|
|
1182
1202
|
/** 扩展:消息加密公钥来源(§7 复用)。 */
|
|
1183
1203
|
publicKey?: string;
|
|
1184
|
-
/** 会话免打扰态(好友关系 `is_undisturb`
|
|
1204
|
+
/** 会话免打扰态(好友关系 `is_undisturb` 转换为布尔值):仅好友资料返回,供领域层回填 `ImSession.muted` 做多端/冷启动恢复;非好友无此字段(undefined,不覆盖本地)。 */
|
|
1185
1205
|
muted?: boolean;
|
|
1186
1206
|
extensions?: Record<string, unknown>;
|
|
1187
1207
|
}
|
|
@@ -1197,11 +1217,11 @@ interface GroupProfile {
|
|
|
1197
1217
|
verifyWay?: number;
|
|
1198
1218
|
/** 普通群邀请码;仅 `verifyWay === 4` 时有业务意义。 */
|
|
1199
1219
|
inviteCode?: string;
|
|
1200
|
-
/** 群状态(后端 status
|
|
1220
|
+
/** 群状态(后端 status,具体值语义待后端明确):保留不丢弃,供「普通成员感知群解散」兜底(解散仅通知群主)。 */
|
|
1201
1221
|
status?: number;
|
|
1202
|
-
/** 当前用户是否在群(后端 is_ingroup:false
|
|
1222
|
+
/** 当前用户是否在群(后端 is_ingroup:false=已不在群,被踢/退群的兜底禁发来源)。 */
|
|
1203
1223
|
isInGroup?: boolean;
|
|
1204
|
-
/** 当前用户对该群的免打扰态(`to_user.is_undisturb`
|
|
1224
|
+
/** 当前用户对该群的免打扰态(`to_user.is_undisturb` 转换为布尔值):供领域层回填 `ImSession.muted` 恢复;缺省(undefined)表示后端未返回,不覆盖本地。 */
|
|
1205
1225
|
muted?: boolean;
|
|
1206
1226
|
/** 扩展位:members[] 等明细留扩展。 */
|
|
1207
1227
|
extensions?: Record<string, unknown>;
|
|
@@ -1313,9 +1333,9 @@ interface ChannelProfile {
|
|
|
1313
1333
|
/** CHANNEL 独立访问限制事实;browser 新映射必须提供,legacy storage 可能缺失。 */
|
|
1314
1334
|
accessSnapshot?: ChannelAccessSnapshot;
|
|
1315
1335
|
muted?: boolean;
|
|
1316
|
-
/**
|
|
1336
|
+
/** 服务端频道类型转换后的业务值;不得用它把频道改路由到 `supergroup`。 */
|
|
1317
1337
|
channelKind?: string;
|
|
1318
|
-
/**
|
|
1338
|
+
/** 本地密钥缓存操作编号/服务端未来版本的非敏感标识;不承载 secret_key。 */
|
|
1319
1339
|
secretKeyVersion?: string;
|
|
1320
1340
|
/** `/user_radio/list` 的资料增量版本;与 secretKeyVersion 无关。 */
|
|
1321
1341
|
updateVersion?: string;
|
|
@@ -1345,7 +1365,7 @@ interface ChannelMemberPage {
|
|
|
1345
1365
|
}
|
|
1346
1366
|
/** CHANNEL @ 选择器返回的用户项;专用 UserInfo 协议不提供角色,不得写入 role-rich 成员缓存。 */
|
|
1347
1367
|
interface ChannelMentionMember {
|
|
1348
|
-
/**
|
|
1368
|
+
/** 用户 ID,以字符串表示;来自 `/user_radio/member/*` 的 `user_id`。 */
|
|
1349
1369
|
userId: string;
|
|
1350
1370
|
/** CHANNEL @ 面板展示名;按频道昵称、全局昵称、协议备用名、用户 ID 的顺序降级。 */
|
|
1351
1371
|
displayName: string;
|
|
@@ -1378,7 +1398,7 @@ interface ImError {
|
|
|
1378
1398
|
* 诊断日志钩子(§5.3,可选):宿主注入以观察核心诊断(如 ACK 原始 errcode)。
|
|
1379
1399
|
* core 不内置 console;不注入则不产生诊断输出。
|
|
1380
1400
|
*/
|
|
1381
|
-
/**
|
|
1401
|
+
/** 当前连接策略固定为 single,只连接首个端点。 */
|
|
1382
1402
|
type ConnectionStrategy = 'single' | 'race' | 'sequential';
|
|
1383
1403
|
interface ImReconnectOptions {
|
|
1384
1404
|
/** 退避基数毫秒,默认 1000。 */
|
|
@@ -1424,7 +1444,7 @@ interface ContactApplication {
|
|
|
1424
1444
|
/** 申请人的产品展示 ID,例如服务端 `user_info.mid`。 */
|
|
1425
1445
|
applicantDisplayId?: string;
|
|
1426
1446
|
message: string;
|
|
1427
|
-
/**
|
|
1447
|
+
/** 服务端时间戳转换后的 Unix 毫秒;源字段缺失时保持未知。 */
|
|
1428
1448
|
createdAt?: number;
|
|
1429
1449
|
}
|
|
1430
1450
|
/** 联系人申请页;分页耗尽依据原始 type=1 页,不依据产品聚合结果。 */
|
|
@@ -1480,7 +1500,7 @@ interface ApplicationTarget {
|
|
|
1480
1500
|
* GROUP 申请/邀请 provider 的权威记录。
|
|
1481
1501
|
*
|
|
1482
1502
|
* @remarks `applicationId` 是审核命令参数,`groupId` 是会话身份,两者不可互换;actor/target
|
|
1483
|
-
* 是申请时快照,最终成员关系和群资料仍由各自领域 API
|
|
1503
|
+
* 是申请时快照,最终成员关系和群资料仍由各自领域 API 统一更新。
|
|
1484
1504
|
*/
|
|
1485
1505
|
interface GroupApplication {
|
|
1486
1506
|
applicationId: string;
|
|
@@ -1491,7 +1511,7 @@ interface GroupApplication {
|
|
|
1491
1511
|
target: ApplicationTarget;
|
|
1492
1512
|
/** 申请附言或邀请说明,服务端允许为空。 */
|
|
1493
1513
|
message: string;
|
|
1494
|
-
/**
|
|
1514
|
+
/** 服务端时间戳转换后的 Unix 毫秒;源字段缺失时保持未知。 */
|
|
1495
1515
|
createdAt?: number;
|
|
1496
1516
|
}
|
|
1497
1517
|
/** GROUP 申请页;分页耗尽依据原始 type=2 混合页。 */
|
|
@@ -1590,7 +1610,7 @@ interface ChannelJoinApplication {
|
|
|
1590
1610
|
channelAvatar?: string;
|
|
1591
1611
|
/** 申请人填写的入群说明,服务端允许为空。 */
|
|
1592
1612
|
message: string;
|
|
1593
|
-
/**
|
|
1613
|
+
/** 服务端创建时间转换为 Unix 毫秒;源字段缺失或非法时不提供。 */
|
|
1594
1614
|
createdAt?: number;
|
|
1595
1615
|
}
|
|
1596
1616
|
/** CHANNEL 申请列表的页号 cursor 输入;cursor 是下一原始混合页页号。 */
|
|
@@ -1659,7 +1679,7 @@ interface ImChannelProfilePort {
|
|
|
1659
1679
|
getProfile: (channelId: string, options?: {
|
|
1660
1680
|
forceRefresh?: boolean;
|
|
1661
1681
|
}) => Promise<ChannelProfile | null>;
|
|
1662
|
-
/** 清空 CHANNEL profile
|
|
1682
|
+
/** 清空 CHANNEL profile 内存缓存,并阻止旧请求写回;与 GROUP profile 保持 sibling。 */
|
|
1663
1683
|
clearCache?: () => void;
|
|
1664
1684
|
}
|
|
1665
1685
|
/** CHANNEL 成员查询。cursor 是频道成员接口的不透明游标。 */
|
|
@@ -1672,7 +1692,7 @@ interface ChannelMemberPageQuery {
|
|
|
1672
1692
|
}
|
|
1673
1693
|
/** CHANNEL 成员读取 capability;分页列表与当前消息窗口的稀疏批量读取共用同一独立 adapter。 */
|
|
1674
1694
|
interface ImChannelMemberPort {
|
|
1675
|
-
/** hydrate
|
|
1695
|
+
/** hydrate 有界公共快照;快照新鲜时不重新请求服务端,过期时按完整页重建约 200 人。 */
|
|
1676
1696
|
prefetchMembers?: (channelId: string) => Promise<void>;
|
|
1677
1697
|
/** 只读取公共快照或其本地直接/拼音搜索结果;允许返回过期快照供 UI 先显,不发 HTTP。 */
|
|
1678
1698
|
getCachedMembers?: (input: {
|
|
@@ -1696,9 +1716,9 @@ interface ImChannelMemberPort {
|
|
|
1696
1716
|
getMembersByIds: (channelId: string, userIds: readonly string[], options?: {
|
|
1697
1717
|
forceRefresh?: boolean;
|
|
1698
1718
|
}) => Promise<ChannelMember[]>;
|
|
1699
|
-
/**
|
|
1719
|
+
/** 使频道成员缓存失效;旧请求可以返回原调用方,但不得写回当前缓存。 */
|
|
1700
1720
|
invalidateChannelMembers: (channelId: string) => Promise<void>;
|
|
1701
|
-
/** 清空全部 CHANNEL role-rich
|
|
1721
|
+
/** 清空全部 CHANNEL role-rich 成员内存缓存,并阻止旧请求写回;持久层由 storage 分类清理统一处理。 */
|
|
1702
1722
|
clearCache?: () => void;
|
|
1703
1723
|
}
|
|
1704
1724
|
/** CHANNEL @ 专用成员页查询;不得复用 role-rich 管理列表的 query/response 语义。 */
|
|
@@ -1782,10 +1802,9 @@ interface TransportEvents {
|
|
|
1782
1802
|
interface TransportPort {
|
|
1783
1803
|
readonly state: TransportState;
|
|
1784
1804
|
/**
|
|
1785
|
-
*
|
|
1786
|
-
*
|
|
1787
|
-
*
|
|
1788
|
-
* 该清理契约由 @k2/im-browser 的 WsTransport 实现并锁测(切片 04)。
|
|
1805
|
+
* 候选连接地址数组;当前实现仅连接 endpoints[0]。
|
|
1806
|
+
* 再次 connect() 时必须先关闭旧连接,保证任一时刻至多存在一个活跃传输连接。
|
|
1807
|
+
* @k2/im-browser 的 WsTransport 实现该约定。
|
|
1789
1808
|
*/
|
|
1790
1809
|
connect: (endpoints: TransportEndpoint[], options?: TransportConnectOptions) => Promise<void>;
|
|
1791
1810
|
/** 发送一帧(已编码字节)。 */
|
|
@@ -1796,7 +1815,7 @@ interface TransportPort {
|
|
|
1796
1815
|
}
|
|
1797
1816
|
|
|
1798
1817
|
interface ImEndpointProvider {
|
|
1799
|
-
/** WS
|
|
1818
|
+
/** WS 候选地址。返回单元素数组;后端下发多 host 时返回多元素。 */
|
|
1800
1819
|
getEndpoints: () => Promise<TransportEndpoint[]>;
|
|
1801
1820
|
/** CM Protobuf HTTP 基址。 */
|
|
1802
1821
|
getCmHttpBaseUrl: () => Promise<string>;
|
|
@@ -1985,7 +2004,7 @@ interface ImProfilePort {
|
|
|
1985
2004
|
getGroupProfile: (groupId: string, opts?: {
|
|
1986
2005
|
forceRefresh?: boolean;
|
|
1987
2006
|
}) => Promise<GroupProfile | null>;
|
|
1988
|
-
/** 清空实现持有的 user/GROUP profile/member
|
|
2007
|
+
/** 清空实现持有的 user/GROUP profile/member 内存缓存,并阻止旧请求写回;无缓存的实现可省略。 */
|
|
1989
2008
|
clearCache?: () => void;
|
|
1990
2009
|
}
|
|
1991
2010
|
|
|
@@ -2120,53 +2139,49 @@ interface ImDecryptRecoveryRecord {
|
|
|
2120
2139
|
createdAt: number;
|
|
2121
2140
|
}
|
|
2122
2141
|
/**
|
|
2123
|
-
*
|
|
2142
|
+
* 持久化用户资料:领域 `UserProfile` + 写入本地存储时间戳。跨刷新持久化以消除群历史发送者「占位→回填」闪动。
|
|
2124
2143
|
* 分字段存(remark/nickname/avatar),展示名优先级在读取侧算,避免固化合并结果。
|
|
2125
2144
|
*/
|
|
2126
2145
|
interface StoredUserProfile extends UserProfile {
|
|
2127
|
-
/**
|
|
2146
|
+
/** 写入本地存储/刷新时间(毫秒),供 TTL 过期判断。 */
|
|
2128
2147
|
updatedAt: number;
|
|
2129
2148
|
}
|
|
2130
2149
|
/**
|
|
2131
|
-
*
|
|
2132
|
-
*
|
|
2150
|
+
* 持久化群成员项:群内昵称 + 预留角色/加入方式。
|
|
2151
|
+
* roleId/joinType 供群成员列表展示,可缺省;头像保存在 userProfiles,避免重复存储。
|
|
2133
2152
|
*/
|
|
2134
2153
|
interface StoredGroupMember {
|
|
2135
2154
|
userId: string;
|
|
2136
2155
|
/** 群内昵称(展示名优先级第 2 级,仅次于好友备注)。 */
|
|
2137
2156
|
groupNick: string;
|
|
2138
|
-
/**
|
|
2157
|
+
/** 成员角色 roleId(1 普通 / 9 管理员 / 10 群主);响应缺少时可省略。 */
|
|
2139
2158
|
roleId?: number;
|
|
2140
|
-
/**
|
|
2159
|
+
/** 加入方式 joinType(0 退群 / 1 主动 / 2 邀请 / 3 群主);响应缺少时可省略。 */
|
|
2141
2160
|
joinType?: number;
|
|
2142
2161
|
}
|
|
2143
2162
|
/**
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
2146
|
-
* 【前瞻·P-B】结构对普通群/超级群通用;超级群海量成员按需 per-sender 填充由各会话类型策略决定,store 不感知类型。
|
|
2163
|
+
* 持久保存群成员列表,按 groupId 保存整份数据,同时记录 updateVersion 与更新时间。
|
|
2164
|
+
* 增量响应由资料适配层合并后写入;存储层不解释成员变更。
|
|
2147
2165
|
*/
|
|
2148
2166
|
interface StoredGroupMemberList {
|
|
2149
2167
|
groupId: string;
|
|
2150
2168
|
members: StoredGroupMember[];
|
|
2151
|
-
/**
|
|
2169
|
+
/** 成员列表增量版本 update_version;服务端未返回时可省略。 */
|
|
2152
2170
|
updateVersion?: number;
|
|
2153
|
-
/**
|
|
2171
|
+
/** 写入本地存储/刷新时间(毫秒),供 TTL 过期判断。 */
|
|
2154
2172
|
updatedAt: number;
|
|
2155
2173
|
}
|
|
2156
2174
|
/**
|
|
2157
|
-
*
|
|
2158
|
-
*
|
|
2159
|
-
* 故须在正常态把群主信息落盘。
|
|
2160
|
-
* 【前瞻·P-B】结构对普通群/超级群通用(群主体系 `roleId=10` 两类群共用);超级群特有字段(返佣/游客/管理员)由各会话类型
|
|
2161
|
-
* 策略在 `extensions` 扩展,store 不感知类型——新增群类型走 sibling 策略填充,不改本结构语义。
|
|
2175
|
+
* 持久保存普通群资料,包括群主 ownerId、名称、头像、成员数和更新时间。
|
|
2176
|
+
* 被踢、退群或解散后无法访问远端群资料时,产品仍可读取此前保存的群主标识。
|
|
2162
2177
|
*/
|
|
2163
2178
|
interface StoredGroupProfile extends GroupProfile {
|
|
2164
|
-
/**
|
|
2179
|
+
/** 写入本地存储/刷新时间(毫秒),供 TTL 过期判断。 */
|
|
2165
2180
|
updatedAt: number;
|
|
2166
2181
|
}
|
|
2167
2182
|
/** CHANNEL 资料的账号级持久化副本;不得包含 `secret_key`。 */
|
|
2168
2183
|
interface StoredChannelProfile extends ChannelProfile {
|
|
2169
|
-
/**
|
|
2184
|
+
/** 写入本地存储/刷新时间(毫秒),供后续资料 TTL 与诊断使用。 */
|
|
2170
2185
|
updatedAt: number;
|
|
2171
2186
|
}
|
|
2172
2187
|
/** CHANNEL 稀疏成员缓存项;按 `{channelId,userId}` 存储,不允许把整频道成员全量塞入单条记录。 */
|
|
@@ -2216,7 +2231,7 @@ type StoredConversationBackground = {
|
|
|
2216
2231
|
* 本地存储端口(DB 无关、异步、可测试)。面向消息/会话/已读/发送账本/元数据等领域实体。
|
|
2217
2232
|
*
|
|
2218
2233
|
* 生命周期:宿主(SDK)在拿到登录 userId 后先 `open({ namespace: userId })`(幂等,内部跑 schema 迁移),
|
|
2219
|
-
* 再由 domainState `hydrate()` 回读;登出/切账号时 `close()`。所有写入源自 domainState
|
|
2234
|
+
* 再由 domainState `hydrate()` 回读;登出/切账号时 `close()`。所有写入源自 domainState 统一更新入口,
|
|
2220
2235
|
* 失败经 `error` 事件(scope:'storage')暴露、不静默吞、不阻塞内存主流程。
|
|
2221
2236
|
*/
|
|
2222
2237
|
interface ImStoragePort {
|
|
@@ -2232,7 +2247,7 @@ interface ImStoragePort {
|
|
|
2232
2247
|
/** 关闭库句柄(登出/切账号)。 */
|
|
2233
2248
|
close: () => Promise<void>;
|
|
2234
2249
|
/**
|
|
2235
|
-
* 只清当前已打开账号的可重建缓存;messages/sessions/read/drafts/outbox/pinned
|
|
2250
|
+
* 只清当前已打开账号的可重建缓存;messages/sessions/read/drafts/outbox/pinned/删除标记/sync meta 等 durable 数据必须保留。
|
|
2236
2251
|
* 自定义 adapter 可省略;产品清理入口检测缺失后显式拒绝,不能伪装成功。
|
|
2237
2252
|
*/
|
|
2238
2253
|
clearRebuildableCaches?: () => Promise<void>;
|
|
@@ -2285,7 +2300,7 @@ interface ImStoragePort {
|
|
|
2285
2300
|
deleteConversationDecryptRecoveries?: (conversation: ConversationRef) => Promise<void>;
|
|
2286
2301
|
/** 全量会话(hydrate 用)。 */
|
|
2287
2302
|
getSessions: () => Promise<ImSession[]>;
|
|
2288
|
-
/**
|
|
2303
|
+
/** 批量写入本地存储会话(按 id 覆盖写)。 */
|
|
2289
2304
|
saveSessions: (sessions: readonly ImSession[]) => Promise<void>;
|
|
2290
2305
|
/** 删除单会话行(删除会话用)。 */
|
|
2291
2306
|
deleteSession: (conversation: ImStorageConversation) => Promise<void>;
|
|
@@ -2303,7 +2318,7 @@ interface ImStoragePort {
|
|
|
2303
2318
|
clearConversationHistory?: (conversation: ConversationRef, nextSession?: ImSession, nextReadState?: ReadState) => Promise<void>;
|
|
2304
2319
|
/** 全量已读态(hydrate 用)。 */
|
|
2305
2320
|
getReadStates: () => Promise<ReadState[]>;
|
|
2306
|
-
/**
|
|
2321
|
+
/** 写入本地存储单条已读态(按 conversationId 覆盖写)。 */
|
|
2307
2322
|
saveReadState: (state: ReadState) => Promise<void>;
|
|
2308
2323
|
/** 全量读取当前账号草稿,供账号 runtime hydrate。 */
|
|
2309
2324
|
getDrafts: () => Promise<ConversationDraft$1[]>;
|
|
@@ -2325,7 +2340,7 @@ interface ImStoragePort {
|
|
|
2325
2340
|
deleteDefaultConversationBackground?: () => Promise<void>;
|
|
2326
2341
|
/** 全量在途发送账本(回读用)。 */
|
|
2327
2342
|
getOutbox: () => Promise<OutboxMessage[]>;
|
|
2328
|
-
/**
|
|
2343
|
+
/** 写入本地存储/更新单条 Outbox(按 id 覆盖写)。 */
|
|
2329
2344
|
saveOutboxMessage: (message: OutboxMessage) => Promise<void>;
|
|
2330
2345
|
/** 出队删除单条 Outbox(sent 后)。 */
|
|
2331
2346
|
removeOutboxMessage: (id: string) => Promise<void>;
|
|
@@ -2337,15 +2352,15 @@ interface ImStoragePort {
|
|
|
2337
2352
|
removePinnedMessage: (conversation: ImStorageConversation) => Promise<void>;
|
|
2338
2353
|
/** 按 userId 取持久化用户资料(含 updatedAt 供 TTL 判断);无则 null。best-effort,失败降级不阻塞主流程。 */
|
|
2339
2354
|
getUserProfile: (userId: string) => Promise<StoredUserProfile | null>;
|
|
2340
|
-
/**
|
|
2355
|
+
/** 写入本地存储用户资料(按 userId 覆盖写)。 */
|
|
2341
2356
|
saveUserProfile: (profile: StoredUserProfile) => Promise<void>;
|
|
2342
2357
|
/** 按 groupId 取持久化群成员列表(含 updateVersion/updatedAt);无则 null。 */
|
|
2343
2358
|
getGroupMembers: (groupId: string) => Promise<StoredGroupMemberList | null>;
|
|
2344
|
-
/**
|
|
2359
|
+
/** 按 groupId 保存完整群成员列表;增量响应应由调用方先合并。 */
|
|
2345
2360
|
saveGroupMembers: (list: StoredGroupMemberList) => Promise<void>;
|
|
2346
2361
|
/** 按 groupId 取持久化群资料(含 ownerId/updatedAt);无则 null。供受限群本地标群主(受限群不调群资料接口)。 */
|
|
2347
2362
|
getGroupProfile: (groupId: string) => Promise<StoredGroupProfile | null>;
|
|
2348
|
-
/**
|
|
2363
|
+
/** 写入本地存储群资料(按 id 覆盖写)。 */
|
|
2349
2364
|
saveGroupProfile: (profile: StoredGroupProfile) => Promise<void>;
|
|
2350
2365
|
/** 按 channelId 读取资料;无则 null。 */
|
|
2351
2366
|
getChannelProfile: (channelId: string) => Promise<StoredChannelProfile | null>;
|
|
@@ -2711,7 +2726,7 @@ declare function extractSearchText(message: Pick<ImMessage, 'contentType' | 'bod
|
|
|
2711
2726
|
*
|
|
2712
2727
|
* @remarks 拉丁字母统一为 A-Z;中文按整段文本上下文取首字读音的首字母,多音字随词语变化;
|
|
2713
2728
|
* 数字、符号和 emoji 归入 `#`。
|
|
2714
|
-
*
|
|
2729
|
+
* 该工具只负责文本处理,不持有目录或 UI 状态,H5/PC 可以共享同一规则。
|
|
2715
2730
|
*/
|
|
2716
2731
|
declare function getImTextSearchInitial(text: string): Promise<string>;
|
|
2717
2732
|
/**
|
|
@@ -2785,7 +2800,7 @@ interface ResolveTextOptions<Extra = never> {
|
|
|
2785
2800
|
}
|
|
2786
2801
|
/**
|
|
2787
2802
|
* 把消息正文解析为内联富文本展示段:内置 @ matcher(协议)+ 宿主注入 matcher(应用)各自产出命中区间,
|
|
2788
|
-
* SDK
|
|
2803
|
+
* SDK 统一**按位置合并、区间不重叠**(一个字符只属于一个段)。空文本 → 单空段;无任何命中 → 整段文本。
|
|
2789
2804
|
* **冲突/重叠优先级**(稳定):① 起点靠前优先;② 同起点更长(更具体)优先;③ 仍相同按注册顺序——
|
|
2790
2805
|
* 内置 @ 最先 push(协议安全类优先),其余按 `opts.matchers` 顺序。靠后的重叠区间在 assemble 中让位跳过。
|
|
2791
2806
|
*/
|
|
@@ -2877,7 +2892,7 @@ interface MessageWindowPage {
|
|
|
2877
2892
|
|
|
2878
2893
|
/**
|
|
2879
2894
|
* 全局总未读聚合规则(mute-aware · 通用):默认排除免打扰会话(对齐主流 IM:静音会话不进 App 总角标)。
|
|
2880
|
-
* 免打扰会话的「@我未读」聚合待 `mentionUnreadCount`
|
|
2895
|
+
* 免打扰会话的「@我未读」聚合待 `mentionUnreadCount` 落地后再加(未填充)。
|
|
2881
2896
|
* @param sessions 会话快照。
|
|
2882
2897
|
* @param options 聚合选项。
|
|
2883
2898
|
* @param options.includeMuted 是否把免打扰会话也计入总数(默认 false)。
|
|
@@ -2903,7 +2918,7 @@ interface ImGroupCallMeetingSnapshot {
|
|
|
2903
2918
|
* 根据 CHANNEL 角色、生命周期和禁言事实计算稳定访问能力。
|
|
2904
2919
|
*
|
|
2905
2920
|
* 这是无副作用的权限投影:输入来自权威 profile/session,输出供发送和 UI 预检使用;服务端仍做最终
|
|
2906
|
-
* 权限裁决。未知或冲突状态不会借 GROUP
|
|
2921
|
+
* 权限裁决。未知或冲突状态不会借 GROUP 权限兜底,而是转换为受限能力与明确原因。
|
|
2907
2922
|
*/
|
|
2908
2923
|
|
|
2909
2924
|
/** CHANNEL 有效访问解析入参;`nowMs` 显式传入,使 hydrate、发送门禁与 Web 时钟使用同一纯逻辑。 */
|
|
@@ -3284,16 +3299,16 @@ interface GroupMemberItem {
|
|
|
3284
3299
|
interface ProfileHttpAdapterDeps {
|
|
3285
3300
|
/** 宿主注入的协议客户端(如 Nuxt `$clientApi`);本适配作为调用方走 core JSON 链路拉资料。 */
|
|
3286
3301
|
client: ApiProtocolClient;
|
|
3287
|
-
/** 端类型 clientType(Web/H5=2):透传给群资料/成员接口写 `Client-type` header
|
|
3302
|
+
/** 端类型 clientType(Web/H5=2):透传给群资料/成员接口写 `Client-type` header,对齐后端全链路一致建议。缺省不带。 */
|
|
3288
3303
|
clientType?: number;
|
|
3289
3304
|
/**
|
|
3290
|
-
*
|
|
3305
|
+
* 本地持久化端口:注入后 `getUserProfile`/`getGroupMemberNames` 走三级缓存(内存→持久化→HTTP),跨刷新消除群历史发送者「占位→回填」闪动。
|
|
3291
3306
|
* 只用 profile/member 四方法;**缺省 = 纯内存**(向后兼容)。storage 未 open / 读写异常时自动**降级 HTTP-only**(不阻塞不报错,符合 storage=downstream 原则)。
|
|
3292
3307
|
* open 时序:与 SDK 共享同一 storage 实例,SDK `connect()` 统一 `open(namespace=userId)`;本适配读写前 open 未完成即降级。
|
|
3293
3308
|
*/
|
|
3294
3309
|
storage?: Pick<ImStoragePort, 'getUserProfile' | 'saveUserProfile' | 'getGroupMembers' | 'saveGroupMembers' | 'getGroupProfile' | 'saveGroupProfile'>;
|
|
3295
3310
|
}
|
|
3296
|
-
/**
|
|
3311
|
+
/** 群成员昵称接口,作为 ImProfilePort 的补充;提供群消息发送者的群内昵称,最终展示优先级由调用方决定。 */
|
|
3297
3312
|
interface GroupMemberNameProvider {
|
|
3298
3313
|
/** 取群内成员昵称映射(userId → 群内昵称,空昵称成员不含);空/失败 → null(调用方回退用户资料名)。缓存 + 同 id 去抖 + forceRefresh。 */
|
|
3299
3314
|
getGroupMemberNames: (groupId: string, opts?: {
|
|
@@ -3303,30 +3318,38 @@ interface GroupMemberNameProvider {
|
|
|
3303
3318
|
listGroupMembers: (groupId: string, opts?: {
|
|
3304
3319
|
forceRefresh?: boolean;
|
|
3305
3320
|
}) => Promise<GroupMemberItem[] | null>;
|
|
3306
|
-
/**
|
|
3321
|
+
/** 仅读取内存或本地用户资料,不发 HTTP 请求;命中返回 { value, stale },未命中返回 null,stale 表示本地记录已过期。 */
|
|
3307
3322
|
peekUserProfile: (userId: string) => Promise<{
|
|
3308
3323
|
value: UserProfile;
|
|
3309
3324
|
stale: boolean;
|
|
3310
3325
|
} | null>;
|
|
3311
|
-
/**
|
|
3326
|
+
/** 仅读取内存或本地的群成员昵称,不发 HTTP 请求;命中返回 { value, stale },未命中返回 null。 */
|
|
3312
3327
|
peekGroupMemberNames: (groupId: string) => Promise<{
|
|
3313
3328
|
value: Record<string, string>;
|
|
3314
3329
|
stale: boolean;
|
|
3315
3330
|
} | null>;
|
|
3316
|
-
/**
|
|
3331
|
+
/** 仅读取内存或本地的有序群成员列表,不发 HTTP 请求;命中返回 { value, stale },供面板先展示已有内容。 */
|
|
3317
3332
|
peekGroupMembers: (groupId: string) => Promise<{
|
|
3318
3333
|
value: GroupMemberItem[];
|
|
3319
3334
|
stale: boolean;
|
|
3320
3335
|
} | null>;
|
|
3321
|
-
/**
|
|
3336
|
+
/** 仅读取内存或本地群资料,不发 HTTP 请求;命中返回 { value, stale },供受限群展示已缓存的群主等信息。 */
|
|
3322
3337
|
peekGroupProfile: (groupId: string) => Promise<{
|
|
3323
3338
|
value: GroupProfile;
|
|
3324
3339
|
stale: boolean;
|
|
3325
3340
|
} | null>;
|
|
3326
3341
|
}
|
|
3327
|
-
/** 创建用户 / 群资料 HTTP 适配(实现 ImProfilePort +
|
|
3342
|
+
/** 创建用户 / 群资料 HTTP 适配(实现 ImProfilePort + 群成员昵称):组合 requests/ 请求、回退、缓存和字段转换。 */
|
|
3328
3343
|
declare function createProfileHttpAdapter(deps: ProfileHttpAdapterDeps): ImProfilePort & GroupMemberNameProvider;
|
|
3329
3344
|
|
|
3345
|
+
/** 客服号公开展示资料;不携带后台发送者身份或网络路由参数。 */
|
|
3346
|
+
interface CustomerServiceProfile {
|
|
3347
|
+
/** 当前语言的客服名称。 */
|
|
3348
|
+
displayName: string;
|
|
3349
|
+
/** 当前语言的头像地址;服务端未配置时为空。 */
|
|
3350
|
+
avatarUrl: string;
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3330
3353
|
/** 服务端对入群请求的最终裁决:已入群,或已提交并等待管理员审核。 */
|
|
3331
3354
|
type MembershipJoinOutcome = 'joined' | 'waiting';
|
|
3332
3355
|
/** Browser adapter 暴露给 SDK 的稳定入群结果,不携带具体 HTTP 响应结构。 */
|
|
@@ -3335,7 +3358,7 @@ interface MembershipJoinResult {
|
|
|
3335
3358
|
outcome: MembershipJoinOutcome;
|
|
3336
3359
|
}
|
|
3337
3360
|
|
|
3338
|
-
/** 服务端按逻辑桶签发的 S3
|
|
3361
|
+
/** 服务端按逻辑桶签发的 S3 临时上传凭证(已转换为 SDK 合同字段)。 */
|
|
3339
3362
|
interface MediaUploadCredentials {
|
|
3340
3363
|
/** STS access key id(服务端字段 `access_key_id`)。 */
|
|
3341
3364
|
accessKeyId: string;
|
|
@@ -3351,7 +3374,7 @@ interface MediaUploadCredentials {
|
|
|
3351
3374
|
region: string;
|
|
3352
3375
|
/** 对象 key 前缀;STS 策略只允许写该前缀下的对象,SDK 生成的 key 必须以它开头。 */
|
|
3353
3376
|
keyPrefix?: string;
|
|
3354
|
-
/**
|
|
3377
|
+
/** 公开访问域名(已转换为带 scheme、无尾斜杠);写进消息体的媒体 URL 以它为准。 */
|
|
3355
3378
|
dnsPoint: string;
|
|
3356
3379
|
/** 服务端身份标识;SDK 不使用,仅原样透出供宿主排查。 */
|
|
3357
3380
|
identityId?: string;
|
|
@@ -3372,13 +3395,13 @@ interface MediaUploadCredentialsRequest {
|
|
|
3372
3395
|
*/
|
|
3373
3396
|
type MediaUploadCredentialsProvider = (request: MediaUploadCredentialsRequest) => Promise<MediaUploadCredentials>;
|
|
3374
3397
|
/**
|
|
3375
|
-
*
|
|
3398
|
+
* 把服务端原始回包转换为 `MediaUploadCredentials`,同时兼容 snake_case 与 camelCase。
|
|
3376
3399
|
*
|
|
3377
3400
|
* 宿主可直接用它解析自己 BFF 的返回值,避免 PC 与 H5 各写一份宽松解析;SDK 在收到 provider
|
|
3378
3401
|
* 结果后也会再跑一次本函数,因此绕过它自行构造的对象同样会被校验。
|
|
3379
3402
|
*
|
|
3380
3403
|
* @param raw 凭证对象本身(不含 code/msg 外层包装,由宿主先拆包)。
|
|
3381
|
-
* @returns
|
|
3404
|
+
* @returns 转换后的凭证;关键字段缺失或非法时抛 `MediaTransferError('credentials-invalid')`,不返回半份凭证。
|
|
3382
3405
|
*/
|
|
3383
3406
|
declare function normalizeMediaUploadCredentials(raw: unknown): MediaUploadCredentials;
|
|
3384
3407
|
|
|
@@ -4021,7 +4044,7 @@ interface MentionCandidatePage {
|
|
|
4021
4044
|
/**
|
|
4022
4045
|
* CHANNEL role-free @候选产品 sibling。
|
|
4023
4046
|
*
|
|
4024
|
-
* @remarks list/search 使用独立缓存与 token 上下文;token 只在创建它的账号 runtime
|
|
4047
|
+
* @remarks list/search 使用独立缓存与 token 上下文;token 只在创建它的账号 runtime、查询类型和频道缓存版本号内有效。
|
|
4025
4048
|
* 本 API 不读取 role-rich 成员 provider,也不包含已退场的 @消息索引/定位能力。
|
|
4026
4049
|
* @example
|
|
4027
4050
|
* ```ts
|
|
@@ -4035,13 +4058,13 @@ interface ImChannelMentionApi {
|
|
|
4035
4058
|
peekFirstPage: (channel: ConversationRef<'channel'>) => MentionCandidatePage | null;
|
|
4036
4059
|
/** 从已 hydrate 的常用候选快照做同步直接文本过滤;不发远端搜索请求。 */
|
|
4037
4060
|
peekSearchCandidates: (channel: ConversationRef<'channel'>, keyword: string) => readonly MentionCandidate[];
|
|
4038
|
-
/** hydrate 持久快照并返回本地首页或直接/拼音搜索结果;cache miss 返回 null
|
|
4061
|
+
/** hydrate 持久快照并返回本地首页或直接/拼音搜索结果;cache miss 返回 null,绝不请求服务端。 */
|
|
4039
4062
|
getCachedPage: (channel: ConversationRef<'channel'>, keyword?: string) => Promise<MentionCandidatePage | null>;
|
|
4040
4063
|
/** hydrate 持久快照,并在缺失/过期时按完整页预热约 200 人;同频道在途任务复用。 */
|
|
4041
4064
|
prefetchFirstPage: (channel: ConversationRef<'channel'>) => Promise<void>;
|
|
4042
4065
|
/** 强制从专用 mention provider 重建约 200 人常用候选快照。 */
|
|
4043
4066
|
refreshFirstPage: (channel: ConversationRef<'channel'>) => Promise<MentionCandidatePage>;
|
|
4044
|
-
/**
|
|
4067
|
+
/** 读取常用候选;内存未命中时先读本地存储,两处都没有才查询服务端。 */
|
|
4045
4068
|
listFirstPage: (channel: ConversationRef<'channel'>) => Promise<MentionCandidatePage>;
|
|
4046
4069
|
/** 使用 list 页产生的 token 继续分页;search token 会被拒绝。 */
|
|
4047
4070
|
listNextPage: (pageToken: ImPageToken) => Promise<MentionCandidatePage>;
|
|
@@ -4100,7 +4123,7 @@ interface ImDirectorySearchApi {
|
|
|
4100
4123
|
search: (keyword: string) => Promise<ImDirectorySearchResult>;
|
|
4101
4124
|
}
|
|
4102
4125
|
|
|
4103
|
-
/**
|
|
4126
|
+
/** 服务端消息查询失败的原因,以及是否允许重试。 */
|
|
4104
4127
|
interface MessagesByIdFailure {
|
|
4105
4128
|
/**
|
|
4106
4129
|
* 能否稍后重试。
|
|
@@ -4112,7 +4135,10 @@ interface MessagesByIdFailure {
|
|
|
4112
4135
|
/** 原始错误,供诊断与上报。 */
|
|
4113
4136
|
error: unknown;
|
|
4114
4137
|
}
|
|
4115
|
-
/**
|
|
4138
|
+
/**
|
|
4139
|
+
* 服务端消息查询汇总。三组 ID 互不重叠,合起来覆盖调用方传入的全部有效 ID。
|
|
4140
|
+
* @template TMessage 调用方需要的消息展示类型,由 projectMessage 从领域消息转换得到。
|
|
4141
|
+
*/
|
|
4116
4142
|
interface ImMessagesByIdResult<TMessage> {
|
|
4117
4143
|
/** 成功取回的消息。已经进了本地历史,后续本地查询就能命中。 */
|
|
4118
4144
|
readonly messages: readonly TMessage[];
|
|
@@ -4134,7 +4160,7 @@ interface ImMessagesByIdResult<TMessage> {
|
|
|
4134
4160
|
* SDK 内部 CHANNEL sibling:装配资料、成员、申请、置顶、历史限制与通知修复能力。
|
|
4135
4161
|
*
|
|
4136
4162
|
* 所有入口都要求精确 CHANNEL 身份,并把协议 I/O 结果提交到当前账号的同一 DomainState;不会复用
|
|
4137
|
-
* GROUP 端口或为 `supergroup` fallback。运行时 dispose 后,在途 HTTP
|
|
4163
|
+
* GROUP 端口或为 `supergroup` fallback。运行时 dispose 后,在途 HTTP 查询的结果必须失效,不能广播旧账号事件。
|
|
4138
4164
|
*/
|
|
4139
4165
|
|
|
4140
4166
|
/** CHANNEL 资料、成员和申请门面;已退场的 Mention 历史定位不进入产品面。 */
|
|
@@ -4159,7 +4185,7 @@ interface ImChannelApi extends ImDirectoryApi<'channel'> {
|
|
|
4159
4185
|
cursor?: string;
|
|
4160
4186
|
limit?: number;
|
|
4161
4187
|
}) => Promise<ChannelMemberPage>;
|
|
4162
|
-
/** 进入 CHANNEL
|
|
4188
|
+
/** 进入 CHANNEL 时预取含成员角色的有限列表;缓存未过期时不重复请求服务端。 */
|
|
4163
4189
|
prefetchMembers: (channelId: string) => Promise<void>;
|
|
4164
4190
|
/** 读取 role-rich 有界快照或本地搜索命中;不触发远端请求。 */
|
|
4165
4191
|
getCachedMembers: (input: {
|
|
@@ -4308,7 +4334,7 @@ interface ImContactApi extends ImDirectoryApi<'individual'> {
|
|
|
4308
4334
|
getProfile: (userId: string, opts?: {
|
|
4309
4335
|
forceRefresh?: boolean;
|
|
4310
4336
|
}) => Promise<UserProfile | null>;
|
|
4311
|
-
/**
|
|
4337
|
+
/** 只读内存或本地存储,不发 HTTP;命中时明确返回 stale,提醒调用方缓存可能已过期。 */
|
|
4312
4338
|
peekProfile: (userId: string) => Promise<{
|
|
4313
4339
|
value: UserProfile;
|
|
4314
4340
|
stale: boolean;
|
|
@@ -4358,7 +4384,7 @@ interface ConversationPrefetchOptions {
|
|
|
4358
4384
|
* skipped 表示当前类型、权限、存储或预算不允许预取;失败不改变正常打开会话的行为。
|
|
4359
4385
|
*/
|
|
4360
4386
|
interface ConversationPrefetchResult {
|
|
4361
|
-
ref: ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
|
|
4387
|
+
ref: ConversationRef<'direct' | 'group' | 'channel' | 'robot' | 'customerService'>;
|
|
4362
4388
|
status: 'ready' | 'skipped' | 'failed' | 'cancelled';
|
|
4363
4389
|
reason?: 'unsupported' | 'unavailable' | 'storage-unavailable' | 'budget' | 'page-too-large' | 'decrypt-failed' | 'invalidated' | 'cancelled';
|
|
4364
4390
|
error?: ImSdkErrorShape;
|
|
@@ -4366,7 +4392,7 @@ interface ConversationPrefetchResult {
|
|
|
4366
4392
|
|
|
4367
4393
|
/**
|
|
4368
4394
|
* 当前账号草稿的产品 DTO、跨组件 API 与 handle 绑定门面。
|
|
4369
|
-
*
|
|
4395
|
+
* 草稿按会话类型和 ID 串行保存,统一由 SDK DomainState 管理;当前不支持保存附件,非空附件输入会被明确拒绝。
|
|
4370
4396
|
*/
|
|
4371
4397
|
|
|
4372
4398
|
/** 当前产品草稿实体;只包含可持久化的 text/mention/reply,附件集合固定为空。 */
|
|
@@ -4429,7 +4455,7 @@ interface ImDraftsApi {
|
|
|
4429
4455
|
*/
|
|
4430
4456
|
|
|
4431
4457
|
/** 当前兼容门面支持的精确会话 ref。 */
|
|
4432
|
-
type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel' | 'robot'>;
|
|
4458
|
+
type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel' | 'robot' | 'customerService'>;
|
|
4433
4459
|
/**
|
|
4434
4460
|
* 会话 API 的迁移期入参。优先传完整 ref;旧 string 仅在当前 session 中唯一命中时可用。
|
|
4435
4461
|
*
|
|
@@ -4437,10 +4463,10 @@ type ImSupportedConversationRef = ConversationRef<'direct' | 'group' | 'channel'
|
|
|
4437
4463
|
*/
|
|
4438
4464
|
type ImConversationInput = ImSupportedConversationRef | string;
|
|
4439
4465
|
/**
|
|
4440
|
-
*
|
|
4466
|
+
* 内部会话列表数据。草稿反映当前账号的本机输入,不写入会话持久记录,也不跨端同步。
|
|
4441
4467
|
*
|
|
4442
|
-
*
|
|
4443
|
-
* @example
|
|
4468
|
+
* 保留 ImSession 的展示字段供内部调用方使用;跨类型识别会话时必须使用会话类型 + ID,不自行拼接主键。
|
|
4469
|
+
* @example client.conversations.list().find(item => item.draft !== null) 可找到当前账号有未发送草稿的会话。
|
|
4444
4470
|
*/
|
|
4445
4471
|
interface ConversationListItem$1 extends ImSession {
|
|
4446
4472
|
draft: ConversationDraft | null;
|
|
@@ -4467,7 +4493,7 @@ interface ImConversationsApi {
|
|
|
4467
4493
|
markConversationRead: (conversation: ImConversationInput) => Promise<void>;
|
|
4468
4494
|
/** 给已无真实未读的会话添加本地未读提醒;不回退消息已读状态,也不发网络请求。 */
|
|
4469
4495
|
markConversationUnread: (conversation: ImConversationInput) => void;
|
|
4470
|
-
/**
|
|
4496
|
+
/** 删除本机会话、消息、已读状态和草稿并立即发布本地事件;存储删除失败会报告 storage error,本地删除标记阻止离线消息恢复已删除内容。 */
|
|
4471
4497
|
deleteConversation: (conversation: ImConversationInput) => void;
|
|
4472
4498
|
}
|
|
4473
4499
|
|
|
@@ -4567,16 +4593,16 @@ declare class ImPinnedMessageOperationError extends Error {
|
|
|
4567
4593
|
}
|
|
4568
4594
|
|
|
4569
4595
|
/**
|
|
4570
|
-
* SDK
|
|
4596
|
+
* SDK 内部普通群模块:提供群资料、成员名称、@ 候选和群置顶操作。
|
|
4571
4597
|
*
|
|
4572
4598
|
* 本模块只接收 GROUP `ConversationRef`,使用普通群独立 HTTP/mapper,并回写当前账号唯一 DomainState。
|
|
4573
|
-
* CHANNEL
|
|
4599
|
+
* CHANNEL 的角色、申请、成员管理和置顶协议由独立模块处理;dispose 后旧查询和协调任务的结果不再生效。
|
|
4574
4600
|
*/
|
|
4575
4601
|
|
|
4576
4602
|
/**
|
|
4577
4603
|
* GROUP 完整 @候选集合产品面。
|
|
4578
4604
|
*
|
|
4579
|
-
* @remarks `listAll` 使用账号级产品缓存;`refreshAll`
|
|
4605
|
+
* @remarks `listAll` 使用账号级产品缓存;`refreshAll` 绕过缓存重新请求服务端。两者只消费普通群完整成员 provider,
|
|
4580
4606
|
* 不接受 CHANNEL 分页 cursor/provider。缺少 provider、远端失败或不完整结果会拒绝,不用空数组伪装失败。
|
|
4581
4607
|
* @example
|
|
4582
4608
|
* ```ts
|
|
@@ -4588,7 +4614,7 @@ declare class ImPinnedMessageOperationError extends Error {
|
|
|
4588
4614
|
interface ImGroupMentionApi {
|
|
4589
4615
|
/** 读取完整候选集合;同群并发读取复用请求,成功结果按 userId 稳定去重并缓存。 */
|
|
4590
4616
|
listAll: (group: ConversationRef<'group'>) => Promise<readonly MentionCandidate[]>;
|
|
4591
|
-
/**
|
|
4617
|
+
/** 显式向服务端重新查询完整候选;并发刷新复用请求,失败保留此前成功缓存。 */
|
|
4592
4618
|
refreshAll: (group: ConversationRef<'group'>) => Promise<readonly MentionCandidate[]>;
|
|
4593
4619
|
}
|
|
4594
4620
|
/** GROUP 资料、成员缓存、@候选与单条置顶门面;不与 CHANNEL 合并。 */
|
|
@@ -4607,17 +4633,17 @@ interface ImGroupApi extends ImDirectoryApi<'group'> {
|
|
|
4607
4633
|
getMemberNames: (groupId: string, opts?: {
|
|
4608
4634
|
forceRefresh?: boolean;
|
|
4609
4635
|
}) => Promise<Record<string, string> | null>;
|
|
4610
|
-
/**
|
|
4636
|
+
/** 仅读普通群成员缓存,不请求服务端。 */
|
|
4611
4637
|
peekMembers: (groupId: string) => Promise<{
|
|
4612
4638
|
value: GroupMemberItem[];
|
|
4613
4639
|
stale: boolean;
|
|
4614
4640
|
} | null>;
|
|
4615
|
-
/**
|
|
4641
|
+
/** 仅读普通群昵称缓存,不请求服务端。 */
|
|
4616
4642
|
peekMemberNames: (groupId: string) => Promise<{
|
|
4617
4643
|
value: Record<string, string>;
|
|
4618
4644
|
stale: boolean;
|
|
4619
4645
|
} | null>;
|
|
4620
|
-
/**
|
|
4646
|
+
/** 仅读普通群资料缓存,不请求服务端。 */
|
|
4621
4647
|
peekProfile: (groupId: string) => Promise<{
|
|
4622
4648
|
value: GroupProfile;
|
|
4623
4649
|
stale: boolean;
|
|
@@ -4666,7 +4692,7 @@ interface ImGroupApi extends ImDirectoryApi<'group'> {
|
|
|
4666
4692
|
}
|
|
4667
4693
|
|
|
4668
4694
|
/**
|
|
4669
|
-
* SDK
|
|
4695
|
+
* SDK 账号资源和网络连接的稳定生命周期合同。
|
|
4670
4696
|
* 账号准备、联网和 logout 保持可区分;快照不包含 token、transport、storage 句柄或宿主认证状态。
|
|
4671
4697
|
*/
|
|
4672
4698
|
|
|
@@ -4675,9 +4701,9 @@ interface ImClientSnapshot {
|
|
|
4675
4701
|
connectionState: ImConnectionState;
|
|
4676
4702
|
pendingOutbox: OutboxMessage[];
|
|
4677
4703
|
}
|
|
4678
|
-
/**
|
|
4704
|
+
/** 账号资源的准备和释放状态;网络连接状态单独记录,二者互不替代。 */
|
|
4679
4705
|
type ImSessionLifecycleState = 'empty' | 'preparing' | 'ready' | 'logging-out' | 'disposed';
|
|
4680
|
-
/**
|
|
4706
|
+
/** 账号资源状态、网络连接状态,以及由二者计算的便捷状态。 */
|
|
4681
4707
|
interface ImLifecycleSnapshot {
|
|
4682
4708
|
sessionState: ImSessionLifecycleState;
|
|
4683
4709
|
connectionState: ImConnectionState;
|
|
@@ -4786,7 +4812,7 @@ type ImApplicationItem = (ApplicationItemBase<'contact-request', ContactApplicat
|
|
|
4786
4812
|
* typed application inbox 产品面。
|
|
4787
4813
|
*
|
|
4788
4814
|
* @remarks `listPending` 只有在 contact/GROUP/CHANNEL 三个 provider 全部成功时才返回完整快照;审核动作按 ref.domain
|
|
4789
|
-
* 精确回到 sibling。CHANNEL invite type=5
|
|
4815
|
+
* 精确回到 sibling。CHANNEL invite type=5 不属于已确认 provider,因此不会出现在结果中。
|
|
4790
4816
|
* @example
|
|
4791
4817
|
* ```ts
|
|
4792
4818
|
* const pending = await client.applications.listPending()
|
|
@@ -4856,13 +4882,13 @@ interface ImDirectCallsApi {
|
|
|
4856
4882
|
}
|
|
4857
4883
|
|
|
4858
4884
|
/**
|
|
4859
|
-
*
|
|
4885
|
+
* 管理会话背景选择、预设读取和本地保存。
|
|
4860
4886
|
*
|
|
4861
|
-
* SDK 保存 builtin/preset/custom
|
|
4862
|
-
*
|
|
4887
|
+
* SDK 保存 builtin/preset/custom 选择及账号默认值;自定义图片 Blob 经 storage 保存,不持有 DOM、图片元素或 object URL。
|
|
4888
|
+
* 异步读取返回时核对运行环境版本,防止切会话或切账号后应用旧结果;宿主负责最终渲染和 URL 释放。
|
|
4863
4889
|
*/
|
|
4864
4890
|
|
|
4865
|
-
type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel' | 'robot';
|
|
4891
|
+
type ConversationBackgroundConversationType = 'direct' | 'group' | 'channel' | 'robot' | 'customerService';
|
|
4866
4892
|
interface ConversationBackgroundPreset {
|
|
4867
4893
|
id: string;
|
|
4868
4894
|
url: string;
|
|
@@ -4901,9 +4927,9 @@ interface ImConversationBackgroundApi {
|
|
|
4901
4927
|
}
|
|
4902
4928
|
|
|
4903
4929
|
/**
|
|
4904
|
-
*
|
|
4930
|
+
* 把联系人、普通群和 CHANNEL 资料转换为稳定产品数据。
|
|
4905
4931
|
*
|
|
4906
|
-
*
|
|
4932
|
+
* 本文件只复制字段、统一权限格式和转换错误,不缓存资料,也不发 HTTP。GROUP/CHANNEL 各自保留业务字段,
|
|
4907
4933
|
* 公钥、访问快照、密钥版本、协议状态和 core extensions 都不会进入 default API。
|
|
4908
4934
|
*/
|
|
4909
4935
|
|
|
@@ -4926,14 +4952,14 @@ interface ImContactRemarkPhone {
|
|
|
4926
4952
|
countryCode: string;
|
|
4927
4953
|
mobile: string;
|
|
4928
4954
|
}
|
|
4929
|
-
/** default GROUP 资料 DTO
|
|
4955
|
+
/** default GROUP 资料 DTO;后端尚未确认的数值 status 与缓存扩展不进入产品面。 */
|
|
4930
4956
|
interface ImGroupProfile {
|
|
4931
4957
|
ref: ConversationRef<'group'>;
|
|
4932
4958
|
name: string;
|
|
4933
4959
|
avatar?: string;
|
|
4934
4960
|
memberCount?: number;
|
|
4935
4961
|
ownerId?: string;
|
|
4936
|
-
/** 普通群入群验证方式(1/2/4
|
|
4962
|
+
/** 普通群入群验证方式(1/2/4 为当前可设置值);未知值不能在产品层被自动改写。 */
|
|
4937
4963
|
verifyWay?: number;
|
|
4938
4964
|
/** 普通群邀请码;仅邀请码模式有意义。 */
|
|
4939
4965
|
inviteCode?: string;
|
|
@@ -5024,7 +5050,7 @@ interface ImChannelProfile {
|
|
|
5024
5050
|
*/
|
|
5025
5051
|
|
|
5026
5052
|
/** default 会话列表支持的精确类型;`supergroup` 继续受产品 Gate 约束。 */
|
|
5027
|
-
type ProductConversationListType = 'direct' | 'group' | 'channel' | 'robot';
|
|
5053
|
+
type ProductConversationListType = 'direct' | 'group' | 'channel' | 'robot' | 'customerService';
|
|
5028
5054
|
/** GROUP 会话限制状态;与 CHANNEL 状态保持独立 sibling。 */
|
|
5029
5055
|
type ImGroupConversationState = GroupSessionState;
|
|
5030
5056
|
/**
|
|
@@ -5195,8 +5221,8 @@ interface ImConversationListSnapshot {
|
|
|
5195
5221
|
* default 会话列表产品面。
|
|
5196
5222
|
*
|
|
5197
5223
|
* @remarks
|
|
5198
|
-
* `list()`
|
|
5199
|
-
* 所有写动作只接受复合身份。`deleteLocal`
|
|
5224
|
+
* `list()` 同步读取本机会话;`getSnapshot/subscribe` 为普通宿主提供同一时刻的列表和总未读。
|
|
5225
|
+
* 所有写动作只接受复合身份。`deleteLocal` 立即提交内存删除事件,但底层存储删除仍异步执行,失败会报告错误,
|
|
5200
5226
|
* 因此该方法不虚假返回代表“持久化已完成”的 Promise。
|
|
5201
5227
|
*
|
|
5202
5228
|
* @example
|
|
@@ -5258,6 +5284,17 @@ interface DirectConversationCapabilities {
|
|
|
5258
5284
|
canUseMessageActions: CapabilityDecision;
|
|
5259
5285
|
canManageRelationship: CapabilityDecision;
|
|
5260
5286
|
}
|
|
5287
|
+
/** 客服只读能力;资料、发送和消息修改均不可用,历史读取仅限本机已接收消息。 */
|
|
5288
|
+
interface CustomerServiceConversationCapabilities {
|
|
5289
|
+
/** 客服号不可发送消息。 */
|
|
5290
|
+
canSendMessages: CapabilityDecision;
|
|
5291
|
+
/** 客服号没有好友或成员资料页。 */
|
|
5292
|
+
canOpenProfile: CapabilityDecision;
|
|
5293
|
+
/** 客服号不开放消息修改与转发等动作。 */
|
|
5294
|
+
canUseMessageActions: CapabilityDecision;
|
|
5295
|
+
/** 允许读取客服本机历史。 */
|
|
5296
|
+
canReadHistory: CapabilityDecision;
|
|
5297
|
+
}
|
|
5261
5298
|
interface RobotConversationCapabilities {
|
|
5262
5299
|
canSendMessages: CapabilityDecision;
|
|
5263
5300
|
canOpenProfile: CapabilityDecision;
|
|
@@ -5332,6 +5369,8 @@ type ConversationCapabilitySnapshot = (ConversationCapabilityBase<'direct'> & {
|
|
|
5332
5369
|
value: ChannelConversationCapabilities;
|
|
5333
5370
|
}) | (ConversationCapabilityBase<'robot'> & {
|
|
5334
5371
|
value: RobotConversationCapabilities;
|
|
5372
|
+
}) | (ConversationCapabilityBase<'customerService'> & {
|
|
5373
|
+
value: CustomerServiceConversationCapabilities;
|
|
5335
5374
|
});
|
|
5336
5375
|
interface ImConversationCapabilitiesApi {
|
|
5337
5376
|
/** 只读取 SDK 当前本机真相与已刷新过的资料/关系投影,不隐式联网。 */
|
|
@@ -5483,7 +5522,7 @@ interface ImExpressionsApi {
|
|
|
5483
5522
|
*/
|
|
5484
5523
|
|
|
5485
5524
|
/** 当前已接线的产品 handle 会话类型;三者只在无会话语义原子层复用。 */
|
|
5486
|
-
type ProductHandleConversationType = 'direct' | 'group' | 'channel' | 'robot';
|
|
5525
|
+
type ProductHandleConversationType = 'direct' | 'group' | 'channel' | 'robot' | 'customerService';
|
|
5487
5526
|
/**
|
|
5488
5527
|
* 会话 handle 初始打开位置。
|
|
5489
5528
|
*
|
|
@@ -5545,9 +5584,9 @@ interface ConversationHandleSnapshot<TType extends ProductHandleConversationType
|
|
|
5545
5584
|
error?: ImSdkErrorShape;
|
|
5546
5585
|
}
|
|
5547
5586
|
/**
|
|
5548
|
-
*
|
|
5587
|
+
* 单条消息的本机删除结果。
|
|
5549
5588
|
*
|
|
5550
|
-
*
|
|
5589
|
+
* scope 固定为 local-only;该动作不发送撤回或双方删除命令,也不会让服务端标记删除,重新加载远端历史时可能再次出现同一消息。
|
|
5551
5590
|
*/
|
|
5552
5591
|
interface LocalMessageDeletionResult {
|
|
5553
5592
|
scope: 'local-only';
|
|
@@ -5820,8 +5859,8 @@ type ConversationMessageApiFor<TType extends ProductHandleConversationType> = TT
|
|
|
5820
5859
|
/**
|
|
5821
5860
|
* 绑定单个复合会话身份的产品级会话句柄。
|
|
5822
5861
|
*
|
|
5823
|
-
* @remarks 每次打开都持有独立连续窗口;`close()`
|
|
5824
|
-
*
|
|
5862
|
+
* @remarks 每次打开都持有独立连续窗口;`close()` 只释放瞬时窗口和订阅,不删除领域消息。各会话类型
|
|
5863
|
+
* 使用各自工厂;草稿经 drafts API 维护。关闭后继续读取或执行动作都会立即报错。
|
|
5825
5864
|
* @template TType 当前句柄绑定的精确会话类型。
|
|
5826
5865
|
* @example
|
|
5827
5866
|
* ```ts
|
|
@@ -5887,6 +5926,18 @@ interface ConversationHandle<TType extends ProductHandleConversationType = Produ
|
|
|
5887
5926
|
close: () => void;
|
|
5888
5927
|
}
|
|
5889
5928
|
|
|
5929
|
+
/** 只读客服号资料;账号由 SDK runtime 绑定,宿主只提供当前语言。 */
|
|
5930
|
+
interface ImCustomerServiceApi {
|
|
5931
|
+
/** 下载当前账号客服消息的指定文件;返回真实字节,不使用展示大小判断完成。 */
|
|
5932
|
+
downloadFile: (input: {
|
|
5933
|
+
messageId: string;
|
|
5934
|
+
itemIndex: number;
|
|
5935
|
+
signal?: AbortSignal;
|
|
5936
|
+
}) => Promise<Blob>;
|
|
5937
|
+
/** 获取并更新已有会话的显示资料;并发请求按语言合并,过期语言不覆盖当前页面。 */
|
|
5938
|
+
getProfile: (lang: number) => Promise<Readonly<CustomerServiceProfile>>;
|
|
5939
|
+
}
|
|
5940
|
+
|
|
5890
5941
|
/**
|
|
5891
5942
|
* SDK 对外的结构化诊断投影、过滤与 sink 装配。
|
|
5892
5943
|
*
|
|
@@ -5960,7 +6011,7 @@ interface ImDebugOptions {
|
|
|
5960
6011
|
declare const IM_DIAGNOSTIC_CATEGORIES: readonly ImDiagnosticCategory[];
|
|
5961
6012
|
/** SDK 默认控制台 sink;Core/Chat Kit/Pinia/Worker 不直接访问 console。 */
|
|
5962
6013
|
declare function createImConsoleDiagnosticSink(): ImDiagnosticSink;
|
|
5963
|
-
/** 把产品
|
|
6014
|
+
/** 把产品 debug 配置转换为当前账号唯一的诊断输出器;自定义输出失败时由默认输出器报告一次。 */
|
|
5964
6015
|
declare function createSdkDiagnosticWriter(debug: boolean | ImDebugOptions | undefined, getRuntimeContext: () => {
|
|
5965
6016
|
accountId?: string;
|
|
5966
6017
|
generation?: number;
|
|
@@ -6008,7 +6059,7 @@ interface ImMediaTask {
|
|
|
6008
6059
|
direction: 'upload' | 'download';
|
|
6009
6060
|
/** 终态 completed/failed/canceled 不会被同一尝试的迟到 progress 回退。 */
|
|
6010
6061
|
state: 'queued' | 'running' | 'paused' | 'completed' | 'failed' | 'canceled';
|
|
6011
|
-
/** 0
|
|
6062
|
+
/** 范围为 0 到 100 的整数进度。 */
|
|
6012
6063
|
percent: number;
|
|
6013
6064
|
/**
|
|
6014
6065
|
* upload 子阶段。
|
|
@@ -6191,7 +6242,7 @@ interface ImMediaTasksApi {
|
|
|
6191
6242
|
* 可靠发送账本的产品查询、订阅、重试和取消门面。
|
|
6192
6243
|
*
|
|
6193
6244
|
* Core Outbox 是唯一发送真相;产品项只暴露消息身份、状态和安全错误,不泄漏尝试次数或恢复策略。
|
|
6194
|
-
* 控制动作始终回到当前账号 connection,dispose
|
|
6245
|
+
* 控制动作始终回到当前账号 connection,dispose 后旧订阅失效,随后返回的旧结果不再生效,取消 queued 不等价于远端撤回。
|
|
6195
6246
|
*/
|
|
6196
6247
|
|
|
6197
6248
|
/** 产品可观察 Outbox 项;不包含正文、帧、ACK、attempts、加密信息或 resumePolicy。 */
|
|
@@ -6752,7 +6803,7 @@ interface ImMessageSearchApi {
|
|
|
6752
6803
|
inDirect: (conversation: ConversationRef<'direct'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
|
|
6753
6804
|
/** 搜索 GROUP 本地历史;不得接受 CHANNEL ref 或回退 direct。 */
|
|
6754
6805
|
inGroup: (conversation: ConversationRef<'group'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
|
|
6755
|
-
/** 搜索 CHANNEL
|
|
6806
|
+
/** 搜索 CHANNEL 本地历史;当前不调用尚未确认的远端 CHANNEL 搜索/定位协议。 */
|
|
6756
6807
|
inChannel: (conversation: ConversationRef<'channel'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
|
|
6757
6808
|
/** 搜索 robot 本地历史;无远端历史,不得回退 direct。 */
|
|
6758
6809
|
inRobot: (conversation: ConversationRef<'robot'>, keyword: string) => Promise<ProductMessageSearchPage<MessageContentType>>;
|
|
@@ -6885,7 +6936,7 @@ declare function resolveImEmojiToken(token: string): ImEmojiCatalogEntry | undef
|
|
|
6885
6936
|
*
|
|
6886
6937
|
* 上传凭证由业务后端按登录态签发(与 iOS、prod H5 同一个接口),回包同时给出**物理桶**、区域、`key_prefix` 和
|
|
6887
6938
|
* 公开访问域名;SDK 据此拼 object key 与消息体 URL,宿主 env 里配的只是申请凭证用的逻辑桶名。凭证缓存(本地
|
|
6888
|
-
* 1 小时、按服务端过期时间提前 5
|
|
6939
|
+
* 1 小时、按服务端过期时间提前 5 分钟失效)、同桶并发请求复用和失败后重新签发由 SDK 负责,宿主只需提供「打一次接口」的纯函数。
|
|
6889
6940
|
*
|
|
6890
6941
|
* 默认单次 PUT/GET;仅 multipartTransfer=true 才允许大资源分片上传、下载。
|
|
6891
6942
|
* 各 bucket 需在对象存储侧配置 CORS 允许本站 origin 的 PUT + GET;开启分片后,超过 16MiB 的上传另需放行
|
|
@@ -6964,6 +7015,7 @@ interface ImAccountAdapterContext extends ImClientAdapterContext {
|
|
|
6964
7015
|
* @remarks create/purge 必须消费传入的 namespace factory;SDK 会先 close 返回的 storage,再调用 purge。
|
|
6965
7016
|
*/
|
|
6966
7017
|
interface ImStorageAdapterFactory {
|
|
7018
|
+
/** 创建或复用当前运行环境的存储;返回 undefined 明确使用纯内存,即使浏览器支持 IndexedDB 也不启用默认库。 */
|
|
6967
7019
|
create: (context: ImClientAdapterContext) => ImStoragePort | undefined;
|
|
6968
7020
|
purgeCurrentAccount: (context: ImAccountAdapterContext) => Promise<void>;
|
|
6969
7021
|
}
|
|
@@ -7054,7 +7106,7 @@ interface ImAdvancedClientOptions extends ImClientOptions {
|
|
|
7054
7106
|
channelMembers?: ImChannelMemberPort;
|
|
7055
7107
|
/** CHANNEL Mention 候选 provider;不复用 role-rich 成员治理列表。 */
|
|
7056
7108
|
channelMentionMembers?: ImChannelMentionMemberPort;
|
|
7057
|
-
/** CHANNEL 申请审核 provider
|
|
7109
|
+
/** CHANNEL 申请审核 provider;当前只装配已确认的 18A 审核能力。 */
|
|
7058
7110
|
channelJoinApplications?: ImChannelJoinApplicationPort;
|
|
7059
7111
|
/** 联系人申请 provider;与 GROUP/CHANNEL 审核 sibling 独立。 */
|
|
7060
7112
|
contactApplications?: ImContactApplicationPort;
|
|
@@ -7111,7 +7163,7 @@ interface ImContactsApi extends ImDirectoryApi<'individual'> {
|
|
|
7111
7163
|
* 发送好友申请。
|
|
7112
7164
|
*
|
|
7113
7165
|
* @remarks `remark` 是当前账号对目标用户设置的私有备注,按后端申请合同作为
|
|
7114
|
-
* `remark_nick_name` 提交。SDK
|
|
7166
|
+
* `remark_nick_name` 提交。SDK 不另存待处理副本;关系建立后从当前账号的权威好友资料读取并展示。
|
|
7115
7167
|
*/
|
|
7116
7168
|
requestFriendship: (userId: string, options: {
|
|
7117
7169
|
message: string;
|
|
@@ -7335,7 +7387,7 @@ interface AdvancedConversationsApi extends ImConversationsApi, ImConversationBac
|
|
|
7335
7387
|
*
|
|
7336
7388
|
* @internal
|
|
7337
7389
|
*/
|
|
7338
|
-
ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel' | 'robot'>>;
|
|
7390
|
+
ensureOpenableConversation: (ref: ConversationRef) => Promise<ConversationRef<'direct' | 'group' | 'channel' | 'robot' | 'customerService'>>;
|
|
7339
7391
|
/**
|
|
7340
7392
|
* 读取已有会话或本次账号内已校验的目标资料;返回值不代表列表成员资格。
|
|
7341
7393
|
* @internal
|
|
@@ -7365,6 +7417,8 @@ interface ImProductClient {
|
|
|
7365
7417
|
/** 当前账号完整联系人、群组和社群目录的统一搜索。 */
|
|
7366
7418
|
readonly directory: ImDirectorySearchApi;
|
|
7367
7419
|
/** 机器人公开目录;通讯录查找与群/社群绑定列表共用分页合同。 */
|
|
7420
|
+
/** 客服号只读资料能力。 */
|
|
7421
|
+
readonly customerService: ImCustomerServiceApi;
|
|
7368
7422
|
readonly robots: ImRobotsApi;
|
|
7369
7423
|
readonly contacts: ImContactsApi;
|
|
7370
7424
|
readonly groups: ImGroupsApi;
|
|
@@ -7416,6 +7470,7 @@ interface ImClient extends Omit<ImProductClient, 'capabilities' | 'channels' | '
|
|
|
7416
7470
|
(ref: ConversationRef<'group'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'group'>>;
|
|
7417
7471
|
(ref: ConversationRef<'channel'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'channel'>>;
|
|
7418
7472
|
(ref: ConversationRef<'robot'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'robot'>>;
|
|
7473
|
+
(ref: ConversationRef<'customerService'>, options?: ConversationOpenOptions): Promise<ConversationHandle<'customerService'>>;
|
|
7419
7474
|
};
|
|
7420
7475
|
/** 当前账号草稿产品面;按复合身份持久化,handle.draft 委托同一状态源。 */
|
|
7421
7476
|
drafts: ImDraftsApi;
|
|
@@ -7433,7 +7488,7 @@ interface ImClient extends Omit<ImProductClient, 'capabilities' | 'channels' | '
|
|
|
7433
7488
|
contact: ImContactApi;
|
|
7434
7489
|
/** 群域:群资料读取 + 修改群名/群头像/群内昵称。 */
|
|
7435
7490
|
group: ImGroupApi;
|
|
7436
|
-
/** CHANNEL
|
|
7491
|
+
/** CHANNEL 域:资料、成员管理与独立置顶能力;尚未确认的动作不进入此门面。 */
|
|
7437
7492
|
channel: ImChannelApi;
|
|
7438
7493
|
/** 可观察媒体任务与按精确消息引用下载。 */
|
|
7439
7494
|
media: ImMediaTasksApi;
|
|
@@ -7696,7 +7751,7 @@ type ImLocale = 'en-US' | 'th-TH' | 'vi-VN' | 'zh-CN' | 'zh-TW';
|
|
|
7696
7751
|
/** 默认展示语言;缺译 / 未知 locale 一律回退至此(对齐 NUXT_PUBLIC_DEFAULT_LOCALE 默认值)。 */
|
|
7697
7752
|
declare const DEFAULT_LOCALE: ImLocale;
|
|
7698
7753
|
/**
|
|
7699
|
-
* 把宿主更宽的 locale
|
|
7754
|
+
* 把宿主更宽的 locale 联合转换到 ImLocale:精确命中 5 个规范 locale 之一即原样返回,
|
|
7700
7755
|
* 非法 / 未知输入回退 `DEFAULT_LOCALE`。供宿主 `env.locale`(如 `useI18n().locale`)安全窄化。
|
|
7701
7756
|
* @example normalizeImLocale('zh-CN') // 'zh-CN'
|
|
7702
7757
|
* @example normalizeImLocale('fr-FR') // 'zh-CN'(DEFAULT_LOCALE)
|
|
@@ -7881,7 +7936,7 @@ interface ImMediaCatalog {
|
|
|
7881
7936
|
/** 媒体合集:图片与视频混合,参数 `{photoCount}` `{videoCount}`(各语言自行决定量词与连接符)。 */
|
|
7882
7937
|
mediaAlbumMixed: string;
|
|
7883
7938
|
}
|
|
7884
|
-
/**
|
|
7939
|
+
/** 失败气泡文案,供 formatFailure 根据稳定错误码选取。 */
|
|
7885
7940
|
interface ImFailureCatalog {
|
|
7886
7941
|
/** 媒体类型名(mediaKind → 文案,供 media.* 模板 {label})。 */
|
|
7887
7942
|
mediaLabel: Record<MediaKind, string>;
|
|
@@ -8010,9 +8065,9 @@ interface ImLastMessageCatalog {
|
|
|
8010
8065
|
channelModerationDeleted: string;
|
|
8011
8066
|
}
|
|
8012
8067
|
/**
|
|
8013
|
-
*
|
|
8014
|
-
*
|
|
8015
|
-
*
|
|
8068
|
+
* 命令和生命周期操作提示的文案 key,供 formatServiceText 使用。
|
|
8069
|
+
* kit service/runtime 返回语义码与参数,由宿主根据语言生成文案。
|
|
8070
|
+
* 动态 error.message 作为 {reason} 参数,不纳入 catalog 翻译。
|
|
8016
8071
|
*/
|
|
8017
8072
|
type ImServiceTextKey = 'common.notConnected' | 'common.selectOrOpenConversation' | 'common.conversationTypeNotReady' | 'common.conversationNotReady' | `recall.${RecallFailReason}` | `edit.${EditFailReason}` | 'localDelete.done' | 'localDelete.notFound' | 'localDelete.inFlight' | 'localDelete.failed' | 'channelDelete.notFound' | 'channelDelete.unsupported' | 'channelDelete.notSent' | 'channelDelete.unavailable' | 'channelDelete.forbidden' | 'channelDelete.timeout' | 'channelDelete.failed' | 'channelDelete.disconnected' | 'directBlock.contactRequired' | 'groupBlock.left' | 'groupBlock.removed' | 'groupBlock.dismissed' | 'groupBlock.unknownRestricted' | 'channelBlock.guest' | 'channelBlock.left' | 'channelBlock.removed' | 'channelBlock.dismissed' | 'channelBlock.muted' | 'channelBlock.allMembersMuted' | 'channelBlock.currentUserMuted' | 'channelBlock.blacklisted' | 'channelBlock.unknownRestricted' | 'channelProfile.loadFailed' | 'channelProfile.notFound' | 'channelProfile.retryAction' | 'channelMembers.title' | 'channelMembers.searchPlaceholder' | 'channelMembers.loading' | 'channelMembers.loadFailed' | 'channelMembers.retryAction' | 'channelMembers.empty' | 'channelMembers.loadingMore' | 'channelMembers.loadMoreFailed' | 'channelMembers.exhausted' | 'channelMembers.loadMoreAction' | 'label.image' | 'label.video' | 'label.file' | 'label.sticker' | 'send.failed' | 'send.retryFailed' | 'send.cancelFailed' | 'send.mediaFailed' | 'send.mediaEmpty' | 'send.mediaCancelled' | 'send.mediaCountLimit' | 'send.mediaTooLarge' | 'send.mediaFormatMismatch' | 'send.imageFormatUnsupported' | 'send.videoTooLong' | 'send.videoDurationUnavailable' | 'send.voiceEmpty' | 'send.voiceStorageNotConfigured' | 'send.voiceCancelled' | 'send.voiceFailed' | 'media.uploadWaiting' | 'media.voiceNotReady' | 'media.voiceLoadEmpty' | 'media.voiceLoadFailed' | 'media.videoOpenEmpty' | 'media.videoLoadFailed' | 'media.imageInvalid' | 'media.imageLoadFailed' | 'media.fileDownloadEmpty' | 'media.fileDownloadFailed' | 'conversation.muteEnableFailed' | 'conversation.muteDisableFailed' | 'conversation.backgroundLoadFailed' | 'read.markReadFailed' | 'storage.failed' | 'sync.failed' | 'draft.saveFailed' | 'history.returnLatestFailed' | 'pinned.forbidden' | 'pinned.network' | 'pinned.contract' | 'pinned.unsupported' | 'pinned.failed' | 'pinned.previewUnavailable' | 'pinned.locateFailed' | 'pinned.messageNotFound' | 'pinned.recalled' | 'pinned.deleted' | 'pinned.protected' | 'pinned.pinAction' | 'pinned.unpinAction' | 'pinned.unpinConfirm' | 'pinned.cancelAction' | 'lifecycle.missingLoginState' | 'lifecycle.prepareFailed' | 'lifecycle.missingConnectParams' | 'lifecycle.connectFailed' | 'lifecycle.disposed' | 'lifecycle.connectionOccupied' | 'lifecycle.connectionCoordinationUnavailable' | 'forward.emptyInput' | 'forward.allSkipped' | 'forward.partialSkipped' | 'forward.done' | 'forward.failed';
|
|
8018
8073
|
/** 命令/生命周期操作提示 catalog(key 齐全,模板含 {reason}/{label}/{size} 占位)。 */
|
|
@@ -8143,8 +8198,8 @@ interface FormatFailureContext {
|
|
|
8143
8198
|
params?: Record<string, string | number>;
|
|
8144
8199
|
}
|
|
8145
8200
|
/**
|
|
8146
|
-
*
|
|
8147
|
-
*
|
|
8201
|
+
* 将失败展示码转换为气泡文案:media.* 插入媒体名称,conversationUnsupported 插入会话类型,其余按码查表。
|
|
8202
|
+
* switch 覆盖全部 ImFailureDisplayCode,新增错误码时由编译检查提醒补齐。
|
|
8148
8203
|
*/
|
|
8149
8204
|
declare function formatFailure(displayCode: ImFailureDisplayCode, ctx: FormatFailureContext): string;
|
|
8150
8205
|
|
|
@@ -8160,8 +8215,8 @@ interface FormatLastMessageContext {
|
|
|
8160
8215
|
selfId: string;
|
|
8161
8216
|
}
|
|
8162
8217
|
/**
|
|
8163
|
-
*
|
|
8164
|
-
* system
|
|
8218
|
+
* 将会话最后一条消息的摘要转换为展示文案。text 返回正文,媒体使用列表占位文案,
|
|
8219
|
+
* system 复用带成员名的 formatSystemMessage,撤回消息按是否本人撤回选择文案。
|
|
8165
8220
|
*/
|
|
8166
8221
|
declare function formatLastMessageSummary(summary: LastMessageSummary, ctx: FormatLastMessageContext): string;
|
|
8167
8222
|
|
|
@@ -8231,8 +8286,8 @@ interface FormatServiceTextContext {
|
|
|
8231
8286
|
declare function formatServiceText(key: ImServiceTextKey, ctx: FormatServiceTextContext): string;
|
|
8232
8287
|
|
|
8233
8288
|
/**
|
|
8234
|
-
*
|
|
8235
|
-
* 不读取协议 notify/raw payload
|
|
8289
|
+
* 将解析后的系统消息语义转换为当前语言的文案。
|
|
8290
|
+
* 不读取协议 notify/raw payload;缺字段时使用 catalog 中的明确提示,不猜操作者或目标身份。
|
|
8236
8291
|
*/
|
|
8237
8292
|
|
|
8238
8293
|
/** formatSystemMessage 上下文:locale + 名称解析(宿主提供,已按备注>群昵称>昵称解析)+ selfId(判「你」)。 */
|
|
@@ -8373,7 +8428,7 @@ interface DelayedLoadingIndicatorOptions {
|
|
|
8373
8428
|
clearTimer?: (timer: ReturnType<typeof setTimeout>) => void;
|
|
8374
8429
|
}
|
|
8375
8430
|
interface DelayedLoadingIndicator {
|
|
8376
|
-
/** 同一 identity
|
|
8431
|
+
/** 同一 identity 继续当前计时;identity 改变后旧操作不再生效,并重新开始计时。 */
|
|
8377
8432
|
update: (loading: boolean, identity: string) => void;
|
|
8378
8433
|
/** 取消定时器并在必要时发出一次隐藏通知。 */
|
|
8379
8434
|
dispose: () => void;
|
|
@@ -8384,7 +8439,7 @@ declare const DEFAULT_LOADING_MINIMUM_VISIBLE_MS = 220;
|
|
|
8384
8439
|
* 将真实 loading 与可见提示分离。
|
|
8385
8440
|
*
|
|
8386
8441
|
* 快速完成的缓存读取不会显示提示;已经显示的提示会满足最短展示时间。identity 变化、关闭和
|
|
8387
|
-
* dispose
|
|
8442
|
+
* dispose 都会取消旧定时器,避免上一条媒体随后返回的旧状态影响当前预览。
|
|
8388
8443
|
*/
|
|
8389
8444
|
declare function createDelayedLoadingIndicator(options: DelayedLoadingIndicatorOptions): DelayedLoadingIndicator;
|
|
8390
8445
|
|
|
@@ -9109,7 +9164,7 @@ interface ConversationPrefetchController {
|
|
|
9109
9164
|
* 页间重新等待宿主空闲调度,使置顶、未读、删除和活动会话变化及时影响下一页,
|
|
9110
9165
|
* SDK 仍负责请求去重、前台优先与本次账号 Runtime 的网络总预算。
|
|
9111
9166
|
* 同一 Client 下完成或失败的候选本轮不自动重试;取消项可在运行条件恢复后重新排队。
|
|
9112
|
-
* reset
|
|
9167
|
+
* reset 或更换 client 后旧请求结果失效,旧 Promise 完成后不能修改新账号的请求记录。
|
|
9113
9168
|
*/
|
|
9114
9169
|
declare function createConversationPrefetchController(options: ConversationPrefetchControllerOptions): ConversationPrefetchController;
|
|
9115
9170
|
|
|
@@ -9865,7 +9920,7 @@ declare function resolveChannelMembers(runtime: ChatRuntime, channelId: string,
|
|
|
9865
9920
|
/**
|
|
9866
9921
|
* 收到“普通群成员已改名”的系统消息后,重新读取该群成员昵称;不直接信任通知中的展示文本。
|
|
9867
9922
|
*
|
|
9868
|
-
* 本机写入的通知可能晚于写请求返回;宿主通过 `preserveUserIds`
|
|
9923
|
+
* 本机写入的通知可能晚于写请求返回;宿主通过 `preserveUserIds` 明确保留尚未被服务端查询确认的本机昵称。
|
|
9869
9924
|
* 不能仅凭 `operatorId === self` 判断为本机写入,因为同账号其它设备改名也使用相同操作者。
|
|
9870
9925
|
*/
|
|
9871
9926
|
declare function applyGroupMemberRename(runtime: ChatRuntime, message: AdvancedMessage, options?: {
|
|
@@ -9874,21 +9929,21 @@ declare function applyGroupMemberRename(runtime: ChatRuntime, message: AdvancedM
|
|
|
9874
9929
|
/**
|
|
9875
9930
|
* 把已经加载的普通群成员列表同步为消息气泡可查询的昵称表。
|
|
9876
9931
|
*
|
|
9877
|
-
*
|
|
9932
|
+
* 输入成员可能已合并本地昵称投影,因此这里只同步展示,不能因值相同就认定服务端已返回最新昵称。
|
|
9878
9933
|
*/
|
|
9879
9934
|
declare function applyMemberNames(runtime: ChatRuntime, groupId: string, members: readonly GroupMember[]): void;
|
|
9880
9935
|
/**
|
|
9881
|
-
*
|
|
9936
|
+
* 写请求成功后只更新普通群昵称的共享展示数据。
|
|
9882
9937
|
*
|
|
9883
|
-
* 成员列表、消息气泡和 GROUP `@` 候选都读取 Runtime
|
|
9884
|
-
*
|
|
9938
|
+
* 成员列表、消息气泡和 GROUP `@` 候选都读取 Runtime 的这份映射,因此更新单个成员后即可
|
|
9939
|
+
* 让这些界面立即显示同一昵称;后续完整成员查询返回相同值后自动解除本机保护。
|
|
9885
9940
|
*/
|
|
9886
9941
|
declare function applyGroupMemberNickname(runtime: ChatRuntime, groupId: string, userId: string, nickname: string): void;
|
|
9887
9942
|
/**
|
|
9888
|
-
*
|
|
9943
|
+
* 清理一个群的本机昵称保护记录。
|
|
9889
9944
|
*
|
|
9890
|
-
*
|
|
9891
|
-
*
|
|
9945
|
+
* 只有资料接口确认账号已退出或群已不存在时,才使用 clearCachedNames 同时清空已缓存的群昵称,避免影响重新加入的会话。
|
|
9946
|
+
* 收到其他设备改名时只清除保护记录,完整成员名称由强制刷新后的结果更新。
|
|
9892
9947
|
*/
|
|
9893
9948
|
declare function clearGroupMemberNicknameProjection(runtime: ChatRuntime, groupId: string, options?: {
|
|
9894
9949
|
clearCachedNames?: boolean;
|
|
@@ -10080,7 +10135,7 @@ interface ImMediaBatchSendResult {
|
|
|
10080
10135
|
selectedCount: number;
|
|
10081
10136
|
/** 实际进入逐项发送流程的数量。 */
|
|
10082
10137
|
processedCount: number;
|
|
10083
|
-
/**
|
|
10138
|
+
/** sendMediaFile 返回成功,且操作结束时仍处于同一账号版本的项目数量。 */
|
|
10084
10139
|
acceptedCount: number;
|
|
10085
10140
|
/** 是否因为单批数量上限忽略了部分选择。 */
|
|
10086
10141
|
rejectedByLimit: boolean;
|
|
@@ -10522,10 +10577,10 @@ declare function createNewMessageBadgeController(onCountChange?: NewMessageBadge
|
|
|
10522
10577
|
/** Surface renderer registry 可接收的稳定消息正文种类。 */
|
|
10523
10578
|
type ImMessageBodyKind = MessageContentType | 'gif' | 'decrypt-failed';
|
|
10524
10579
|
/**
|
|
10525
|
-
* 把 SDK
|
|
10580
|
+
* 把 SDK 统一格式的消息解析为唯一正文 renderer kind。
|
|
10526
10581
|
*
|
|
10527
10582
|
* 解密失败优先于正文类型;已注册类型结构不完整时返回 `unknown`,避免一条坏消息中断整个线程。
|
|
10528
|
-
* GIF 只依据 SDK
|
|
10583
|
+
* GIF 只依据 SDK 转换后的 sticker `imageType` 判断,不解析 URL 后缀或协议原始字段。
|
|
10529
10584
|
*/
|
|
10530
10585
|
declare function resolveMessageBodyKind(message: ImMessageView): ImMessageBodyKind;
|
|
10531
10586
|
|
|
@@ -10890,4 +10945,4 @@ declare function resampleWaveform(data: readonly number[], targetCount: number):
|
|
|
10890
10945
|
declare function placeholderWaveform(seed: string, count: number): number[];
|
|
10891
10946
|
|
|
10892
10947
|
export { DEFAULT_EMOJI_ASSET_BASE, DEFAULT_LOADING_MINIMUM_VISIBLE_MS, DEFAULT_LOADING_SHOW_DELAY_MS, DEFAULT_LOCALE, EDIT_WINDOW_MS, EMOJI_CATALOG, EMOJI_GAME_DICE_STABLE_KEY, EMOJI_GAME_RPS_STABLE_KEY, EMOJI_TOKEN_RE, IMAGE_MESSAGE_ACCEPT, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, MAX_BATCH_FILES, MAX_RECENT_EMOJI_COUNT, MEDIA_ALBUM_CAPTION_MAX_LENGTH, MEDIA_ALBUM_MAX_ITEMS, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_HEIGHT, MINI_PROGRAM_GAME_PREVIEW_FALLBACK_WIDTH, MINI_PROGRAM_LANG_NUMBERS, MediaTransferError, REACTION_SUPPORTED_CONTENT_TYPES, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, buildSessionFavoritePlainBody, calculateMediaBox, canCopyMessageImage, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canReactToMessage, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, channelMiniProgramRelKey, classifyGifFile, classifyMediaFile, classifyStickerImageType, countUnreadConversations, createChatRuntime, createConversationPrefetchController, createDelayedLoadingIndicator, createEmojiMatcher, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImI18n, createImResourceUploader, createImTextSearchMatcher, createLinkMatcher, createMessageImageCopySource, createNewMessageBadgeController, createSdkDiagnosticWriter, createThreadItems, createVoicePlayer, createVoiceRecordingSession, csvIncludes, decideChannelMiniProgramRelOpen, decideConversationAction, decideMemberTargetAction, decideMessageAction, detectVoiceCapabilities, emojiAssetUrl, emojiUrlByCode, extractSearchText, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatConversationUnreadBadge, formatFailure, formatFileSize, formatLastMessageSummary, formatMediaDuration, formatMediaPlaceholder, formatMentionAll, formatServiceText, formatSystemMessage, forward_service as forwardService, getFileExtension, getImTextSearchInitial, getImTimeCatalog, getLocalDayKey, getMessageCopyImageUrl, getMessageCopyText, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, isMiniProgramShowTypeOpenable, isPinnedMessageProtected, isSupportedImageFile, isVoiceStorageConfigured, loadOlderUntilBoundary, mediaBatchBudgetBytes, media_service as mediaService, mediaTransferErrorCodeOf, message_service as messageService, migrateImCachePrefix, normalizeImLocale, normalizeLinkHref, normalizeMediaUploadCredentials, parseSessionFavoriteAlbumItems, parseSessionFavoriteFileItems, parseUnicodeEmojiCode, pinnedMessage_service as pinnedMessageService, placeholderWaveform, prependRecentEmoji, profile_service as profileService, read_service as readService, refreshPrependMessageAnchorPosition, registerImCatalogOverrides, replaceInterruptedMediaFile, requiresConversationEncryption, requiresForwardTypeConfirmation, resampleWaveform, resetImCatalogOverrides, resolveBestMediaPresentationSource, resolveCenteredMessageScrollTop, resolveChannelAccess, resolveChannelMemberAvatarUrl, resolveChannelMemberDisplayName, resolveChannelMiniProgramRelIcon, resolveChannelMiniProgramRelName, resolveChannelMiniProgramRelOpenSurface, resolveChannelMiniProgramRelUrl, resolveChannelPinnedGameCopy, resolveConversationListPresentation, resolveDisplayTimestamp, resolveEmojiToken, resolveFriendDisplayName, resolveImEmojiToken, resolveImProfileAccessDestination, resolveImThreadActiveDate, resolveMediaAlbumSendContentType, resolveMediaPresentation, resolveMediaTransferPresentation, resolveMemberDisplayName, resolveMessageBodyKind, resolveMessageNotificationDecision, resolveMessageSearchPreview, resolveMessageTimelineTimestamp, resolveMiniProgramFloatLinkUrl, resolveMiniProgramGamePreviewLayout, resolveMiniProgramOpenUrl, resolvePrependMessageAnchor, resolvePrependMessageAnchorAdjustment, resolvePrependMessageAnchorPosition, resolvePublicNickname, resolveQuotedMessagePresentation, resolveSenderAvatarUrl, resolveSessionFavoriteAlbumCaption, resolveSessionFavoriteAlbumItemPreviewUrl, resolveSessionFavoriteKindFromMessage, resolveStandaloneEmojiMessage, resolveSurvivingMessageAnchorAdjustment, resolveTextSegments, resolveUnicodeEmoji, resolveVisibleChannelMiniProgramRels, resolveVisibleMessageAnchorPositions, retryMessage, runMediaSendBatch, sendAsFilesBatch, sendBlockReasonForDecision, sendMediaAlbum, sendMediaFile, sendMediaFilesBatch, sendText, sendVoice, shouldCompleteInitialViewport, shouldFillInitialHistoryViewport, shouldFollowIncomingMessage, shouldLoadNewerHistoryPage, shouldPrefetchOlderHistory, shouldRestoreMessageViewportFocus, shouldShowChatDateSeparator, shouldTrackRemoteMessageForBadge, sortChannelMiniProgramFloatingItems, sortSessions, spikeCountForDuration, sumSessionsUnread, supportsConversationMention, unicodeEmojiTextFromCode, voiceErrorCodeOf };
|
|
10893
|
-
export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CapabilityAvailability, CapabilityDecision, CapabilityReason, CenteredMessageScrollInput, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramOpenGame, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMiniProgramRelOpenDecision, ChannelMiniProgramRelOpenSurface, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilityAction, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadNavigation, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewMediaKind, ConversationListPreviewSegment, ConversationMessageApi, ConversationOpenOptions, ConversationPrefetchController, ConversationPrefetchControllerOptions, ConversationPrefetchOptions, ConversationPrefetchResult, ConversationRef, ConversationSearchCategory, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, CreateThreadItemsInput, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, ExpressionMessageOptions, FileMessageOptions, FormatFailureContext, FormatLastMessageContext, FormatMediaPlaceholderContext, FormatServiceTextContext, FormatSystemMessageContext, FormatTimeDisplayContext, ForwardCommandHooks, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifFileClassification, GifMessageOptions, GiftMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, HighlightSegment, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImBlockedContact, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImCatalog, ImCatalogOverrides, ImChannelConversationAccessSnapshot, ImChannelMemberPresentation, ImChannelMentionApi, ImChannelMentionPresentation, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelProfilePresentation, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFailureCatalog, ImFileBody, ImFilesAlbumBody, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiftBody, ImGiftSessionType, ImGiftStatus, ImGiftType, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMemberPresentation, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImI18n, ImImageBody, ImLastMessageCatalog, ImLifecycleSnapshot, ImLiveRoomBody, ImLiveRoomStatus, ImLiveRoomType, ImLocalDataApi, ImLocalDataInfo, ImLocale, ImLogoutOptions, ImMediaAlbumBody, ImMediaAlbumItem, ImMediaBatchSendResult, ImMediaCatalog, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMentionCatalog, ImMessageActionResult, ImMessageBodyKind, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPartialCatalog, ImPinnedMessageActionResult, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImPinnedMessageSnapshot, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImProfileAccessDestination, ImPushApi, ImPushSnapshot, ImQuotedMessagePresentation, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImRequestError, ImRequestErrorHandler, ImResourceKind, ImResourceUploadInput, ImResourceUploadProgress, ImResourceUploadResult, ImResourceUploader, ImResourceUploaderConfig, ImRobotBody, ImRobotChatMenuItem, ImRobotCommand, ImRobotConversationBindInput, ImRobotDirectoryItem, ImRobotDirectoryPage, ImRobotDirectoryScope, ImRobotMenuReplyInput, ImRobotModule, ImRobotProfile, ImRobotProfileInput, ImRobotsApi, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImServiceCatalog, ImServiceTextKey, ImSessionApi, ImSessionFavoriteAlbumItem, ImSessionFavoriteFileItem, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImSystemCatalog, ImTextResolver, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, ImTimeCatalog, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImWebPushSubscription, ImWeekdayKey, ImageMessageOptions, ImagePreviewMetadata, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, LiveRoomMessageOptions, LocalConversationHistoryClearResult, LocalMessageDeletionResult, LocalVideoPreviewMetadata, MediaAlbumItemInput, MediaAlbumMessageOptions, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaFileClassification, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MediaTransferErrorCode, MediaTransferPresentation, MediaUploadCredentials, MediaUploadCredentialsProvider, MediaUploadCredentialsRequest, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MentionCandidate, MentionCandidatePage, MentionInput, MessageCapabilityAction, MessageCapabilityInput, MessageContentType, MessageLocateScrollProtectionInput, MessageNotificationDecision, MessageNotificationInput, MessageSearchPreviewOptions, MessageSearchPreviewSegment, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramGamePreviewInput, MiniProgramGamePreviewLayout, MiniProgramHostLocale, MiniProgramMessageOptions, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchPreviewPart, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, RobotConversationCapabilities, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SegmentMatch, SegmentMatcher, SendCapabilityMode, SendCommandHooks, SendMessageResult, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnicodeEmojiEntry, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VisibleChannelMiniProgramRels, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
|
|
10948
|
+
export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CapabilityAvailability, CapabilityDecision, CapabilityReason, CenteredMessageScrollInput, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramOpenGame, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMiniProgramRelOpenDecision, ChannelMiniProgramRelOpenSurface, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilityAction, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadNavigation, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewMediaKind, ConversationListPreviewSegment, ConversationMessageApi, ConversationOpenOptions, ConversationPrefetchController, ConversationPrefetchControllerOptions, ConversationPrefetchOptions, ConversationPrefetchResult, ConversationRef, ConversationSearchCategory, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, CreateThreadItemsInput, CustomerServiceConversationCapabilities, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, ExpressionMessageOptions, FileMessageOptions, FormatFailureContext, FormatLastMessageContext, FormatMediaPlaceholderContext, FormatServiceTextContext, FormatSystemMessageContext, FormatTimeDisplayContext, ForwardCommandHooks, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifFileClassification, GifMessageOptions, GiftMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, HighlightSegment, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImBlockedContact, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImCatalog, ImCatalogOverrides, ImChannelConversationAccessSnapshot, ImChannelMemberPresentation, ImChannelMentionApi, ImChannelMentionPresentation, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelProfilePresentation, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImCustomerServiceApi, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFailureCatalog, ImFileBody, ImFilesAlbumBody, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiftBody, ImGiftSessionType, ImGiftStatus, ImGiftType, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMemberPresentation, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImI18n, ImImageBody, ImLastMessageCatalog, ImLifecycleSnapshot, ImLiveRoomBody, ImLiveRoomStatus, ImLiveRoomType, ImLocalDataApi, ImLocalDataInfo, ImLocale, ImLogoutOptions, ImMediaAlbumBody, ImMediaAlbumItem, ImMediaBatchSendResult, ImMediaCatalog, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMentionCatalog, ImMessageActionResult, ImMessageBodyKind, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPartialCatalog, ImPinnedMessageActionResult, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImPinnedMessageSnapshot, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImProfileAccessDestination, ImPushApi, ImPushSnapshot, ImQuotedMessagePresentation, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImRequestError, ImRequestErrorHandler, ImResourceKind, ImResourceUploadInput, ImResourceUploadProgress, ImResourceUploadResult, ImResourceUploader, ImResourceUploaderConfig, ImRobotBody, ImRobotChatMenuItem, ImRobotCommand, ImRobotConversationBindInput, ImRobotDirectoryItem, ImRobotDirectoryPage, ImRobotDirectoryScope, ImRobotMenuReplyInput, ImRobotModule, ImRobotProfile, ImRobotProfileInput, ImRobotsApi, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImServiceCatalog, ImServiceTextKey, ImSessionApi, ImSessionFavoriteAlbumItem, ImSessionFavoriteFileItem, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImSystemCatalog, ImTextResolver, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, ImTimeCatalog, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImWebPushSubscription, ImWeekdayKey, ImageMessageOptions, ImagePreviewMetadata, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, LiveRoomMessageOptions, LocalConversationHistoryClearResult, LocalMessageDeletionResult, LocalVideoPreviewMetadata, MediaAlbumItemInput, MediaAlbumMessageOptions, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaFileClassification, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MediaTransferErrorCode, MediaTransferPresentation, MediaUploadCredentials, MediaUploadCredentialsProvider, MediaUploadCredentialsRequest, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MentionCandidate, MentionCandidatePage, MentionInput, MessageCapabilityAction, MessageCapabilityInput, MessageContentType, MessageLocateScrollProtectionInput, MessageNotificationDecision, MessageNotificationInput, MessageSearchPreviewOptions, MessageSearchPreviewSegment, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramGamePreviewInput, MiniProgramGamePreviewLayout, MiniProgramHostLocale, MiniProgramMessageOptions, MiniProgramOpenUrlInput, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchPreviewPart, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, RobotConversationCapabilities, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SegmentMatch, SegmentMatcher, SendCapabilityMode, SendCommandHooks, SendMessageResult, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnicodeEmojiEntry, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VisibleChannelMiniProgramRels, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
|